From d2d14d66101e4f505f444577721810a03ee81f11 Mon Sep 17 00:00:00 2001 From: Ashley Wulber <48420062+wash2@users.noreply.github.com> Date: Thu, 16 May 2024 16:08:05 -0400 Subject: [PATCH] feat: zbus 4.2.1 update --- Cargo.toml | 2 +- hostname1/Cargo.toml | 2 +- hostname1/src/lib.rs | 40 ++++++++++++++++++++-------------------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 960915c..df9026d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,4 +19,4 @@ serde = { version = "1.0", features = ["derive"] } thiserror = "1.0" time = { version = "0.3", features = ["parsing"] } zbus = { version = "4.2.1" } -zvariant = { version = "4.1.0"} +zvariant = { version = "4.1.0" } diff --git a/hostname1/Cargo.toml b/hostname1/Cargo.toml index 530f3c2..b2aa75c 100644 --- a/hostname1/Cargo.toml +++ b/hostname1/Cargo.toml @@ -9,7 +9,7 @@ categories = ["os::linux-apis"] keywords = ["dbus", "hostname", "hostname1", "zbus", "freedesktop"] [dependencies] -zbus = "3.0.0" +zbus = "4.2.1" [dev-dependencies] pico-args = "0.5.0" diff --git a/hostname1/src/lib.rs b/hostname1/src/lib.rs index 42792fd..9cd70ca 100644 --- a/hostname1/src/lib.rs +++ b/hostname1/src/lib.rs @@ -19,9 +19,9 @@ //! //! …consequently `zbus-xmlgen` did not generate code for the above interfaces. -use zbus::dbus_proxy; +use zbus::dbus; -#[dbus_proxy( +#[dbus( interface = "org.freedesktop.hostname1", default_service = "org.freedesktop.hostname1", default_path = "/org/freedesktop/hostname1" @@ -31,7 +31,7 @@ trait Hostname1 { fn describe(&self) -> zbus::Result; /// GetProductUUID method - #[dbus_proxy(name = "GetProductUUID")] + #[zbus(name = "GetProductUUID")] fn get_product_uuid(&self, interactive: bool) -> zbus::Result>; /// SetChassis method @@ -56,70 +56,70 @@ trait Hostname1 { fn set_static_hostname(&self, hostname: &str, interactive: bool) -> zbus::Result<()>; /// Chassis property - #[dbus_proxy(property)] + #[zbus(property)] fn chassis(&self) -> zbus::Result; /// DefaultHostname property - #[dbus_proxy(property)] + #[zbus(property)] fn default_hostname(&self) -> zbus::Result; /// Deployment property - #[dbus_proxy(property)] + #[zbus(property)] fn deployment(&self) -> zbus::Result; /// HardwareModel property - #[dbus_proxy(property)] + #[zbus(property)] fn hardware_model(&self) -> zbus::Result; /// HardwareVendor property - #[dbus_proxy(property)] + #[zbus(property)] fn hardware_vendor(&self) -> zbus::Result; /// HomeURL property - #[dbus_proxy(property, name = "HomeURL")] + #[zbus(property, name = "HomeURL")] fn home_url(&self) -> zbus::Result; /// Hostname property - #[dbus_proxy(property)] + #[zbus(property)] fn hostname(&self) -> zbus::Result; /// HostnameSource property - #[dbus_proxy(property)] + #[zbus(property)] fn hostname_source(&self) -> zbus::Result; /// IconName property - #[dbus_proxy(property)] + #[zbus(property)] fn icon_name(&self) -> zbus::Result; /// KernelName property - #[dbus_proxy(property)] + #[zbus(property)] fn kernel_name(&self) -> zbus::Result; /// KernelRelease property - #[dbus_proxy(property)] + #[zbus(property)] fn kernel_release(&self) -> zbus::Result; /// KernelVersion property - #[dbus_proxy(property)] + #[zbus(property)] fn kernel_version(&self) -> zbus::Result; /// Location property - #[dbus_proxy(property)] + #[zbus(property)] fn location(&self) -> zbus::Result; /// OperatingSystemCPEName property - #[dbus_proxy(property, name = "OperatingSystemCPEName")] + #[zbus(property, name = "OperatingSystemCPEName")] fn operating_system_cpename(&self) -> zbus::Result; /// OperatingSystemPrettyName property - #[dbus_proxy(property)] + #[zbus(property)] fn operating_system_pretty_name(&self) -> zbus::Result; /// PrettyHostname property - #[dbus_proxy(property)] + #[zbus(property)] fn pretty_hostname(&self) -> zbus::Result; /// StaticHostname property - #[dbus_proxy(property)] + #[zbus(property)] fn static_hostname(&self) -> zbus::Result; }