From 6817a1c02760d16fc8128adfb905508471b7b9df Mon Sep 17 00:00:00 2001 From: Luke D Jones Date: Mon, 5 Oct 2020 09:31:07 +1300 Subject: [PATCH] Bump dbus autogen --- asus-nb/src/dbus_profile.rs | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/asus-nb/src/dbus_profile.rs b/asus-nb/src/dbus_profile.rs index 6748344c..f2457a75 100644 --- a/asus-nb/src/dbus_profile.rs +++ b/asus-nb/src/dbus_profile.rs @@ -1,30 +1,35 @@ -// This code was autogenerated with `dbus-codegen-rust -s -d org.asuslinux.Daemon -f org.asuslinux.Daemon -c blocking -p /org/asuslinux/Profile -m None`, see https://github.com/diwic/dbus-rs -use dbus; +// This code was autogenerated with `dbus-codegen-rust -s -d org.asuslinux.Daemon -p /org/asuslinux/Profile -m None -f org.asuslinux.Daemon -c blocking`, see https://github.com/diwic/dbus-rs +use dbus as dbus; #[allow(unused_imports)] use dbus::arg; use dbus::blocking; pub trait OrgAsuslinuxDaemon { fn set_profile(&self, profile: &str) -> Result<(), dbus::Error>; + fn active_profile_name(&self) -> Result; fn profile(&self) -> Result; fn profiles(&self) -> Result; } -impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref> OrgAsuslinuxDaemon - for blocking::Proxy<'a, C> -{ +impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref> OrgAsuslinuxDaemon for blocking::Proxy<'a, C> { + fn set_profile(&self, profile: &str) -> Result<(), dbus::Error> { - self.method_call("org.asuslinux.Daemon", "SetProfile", (profile,)) + self.method_call("org.asuslinux.Daemon", "SetProfile", (profile, )) + } + + fn active_profile_name(&self) -> Result { + self.method_call("org.asuslinux.Daemon", "ActiveProfileName", ()) + .and_then(|r: (String, )| Ok(r.0, )) } fn profile(&self) -> Result { self.method_call("org.asuslinux.Daemon", "Profile", ()) - .and_then(|r: (String,)| Ok(r.0)) + .and_then(|r: (String, )| Ok(r.0, )) } fn profiles(&self) -> Result { self.method_call("org.asuslinux.Daemon", "Profiles", ()) - .and_then(|r: (String,)| Ok(r.0)) + .and_then(|r: (String, )| Ok(r.0, )) } } @@ -41,7 +46,9 @@ impl arg::AppendAll for OrgAsuslinuxDaemonNotifyProfile { impl arg::ReadAll for OrgAsuslinuxDaemonNotifyProfile { fn read(i: &mut arg::Iter) -> Result { - Ok(OrgAsuslinuxDaemonNotifyProfile { profile: i.read()? }) + Ok(OrgAsuslinuxDaemonNotifyProfile { + profile: i.read()?, + }) } }