zbus_systemd 0.26000.0

A pure-Rust library to interact with systemd DBus services
Documentation
// This file is autogenerated, do not manually edit.

use crate::zbus::proxy;

/// Proxy object for `org.freedesktop.timedate1`.
#[proxy(
    interface = "org.freedesktop.timedate1",
    gen_blocking = false,
    default_service = "org.freedesktop.timedate1",
    default_path = "/org/freedesktop/timedate1"
)]
pub trait Timedated {
    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#SetTime()) Call interface method `SetTime`.
    #[zbus(name = "SetTime")]
    fn set_time(&self, usec_utc: i64, relative: bool, interactive: bool)
        -> crate::zbus::Result<()>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#SetTimezone()) Call interface method `SetTimezone`.
    #[zbus(name = "SetTimezone")]
    fn set_timezone(&self, timezone: String, interactive: bool) -> crate::zbus::Result<()>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#SetLocalRTC()) Call interface method `SetLocalRTC`.
    #[zbus(name = "SetLocalRTC")]
    fn set_local_rtc(
        &self,
        local_rtc: bool,
        fix_system: bool,
        interactive: bool,
    ) -> crate::zbus::Result<()>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#SetNTP()) Call interface method `SetNTP`.
    #[zbus(name = "SetNTP")]
    fn set_ntp(&self, use_ntp: bool, interactive: bool) -> crate::zbus::Result<()>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#ListTimezones()) Call interface method `ListTimezones`.
    #[zbus(name = "ListTimezones")]
    fn list_timezones(&self) -> crate::zbus::Result<Vec<String>>;

    /// Get property `Timezone`.
    #[zbus(property(emits_changed_signal = "true"), name = "Timezone")]
    fn timezone(&self) -> crate::zbus::Result<String>;

    /// Get property `LocalRTC`.
    #[zbus(property(emits_changed_signal = "true"), name = "LocalRTC")]
    fn local_rtc(&self) -> crate::zbus::Result<bool>;

    /// Get property `CanNTP`.
    #[zbus(property(emits_changed_signal = "false"), name = "CanNTP")]
    fn can_ntp(&self) -> crate::zbus::Result<bool>;

    /// Get property `NTP`.
    #[zbus(property(emits_changed_signal = "true"), name = "NTP")]
    fn ntp(&self) -> crate::zbus::Result<bool>;

    /// Get property `NTPSynchronized`.
    #[zbus(property(emits_changed_signal = "false"), name = "NTPSynchronized")]
    fn ntp_synchronized(&self) -> crate::zbus::Result<bool>;

    /// Get property `TimeUSec`.
    #[zbus(property(emits_changed_signal = "false"), name = "TimeUSec")]
    fn time_u_sec(&self) -> crate::zbus::Result<u64>;

    /// Get property `RTCTimeUSec`.
    #[zbus(property(emits_changed_signal = "false"), name = "RTCTimeUSec")]
    fn rtc_time_u_sec(&self) -> crate::zbus::Result<u64>;
}