// This code was autogenerated with `dbus-codegen-rust -s -d org.asuslinux.Daemon -f org.asuslinux.Daemon -c blocking -p /org/asuslinux/Led -m None`, see https://github.com/diwic/dbus-rs use dbus; #[allow(unused_imports)] use dbus::arg; use dbus::blocking; pub trait OrgAsuslinuxDaemon { fn set_led_mode(&self, data: &str) -> Result<(), dbus::Error>; fn next_led_mode(&self) -> Result<(), dbus::Error>; fn prev_led_mode(&self) -> Result<(), dbus::Error>; fn led_mode(&self) -> Result; fn led_modes(&self) -> Result; fn led_brightness(&self) -> Result; } impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref> OrgAsuslinuxDaemon for blocking::Proxy<'a, C> { fn set_led_mode(&self, data: &str) -> Result<(), dbus::Error> { self.method_call("org.asuslinux.Daemon", "SetLedMode", (data,)) } fn next_led_mode(&self) -> Result<(), dbus::Error> { self.method_call("org.asuslinux.Daemon", "NextLedMode", ()) } fn prev_led_mode(&self) -> Result<(), dbus::Error> { self.method_call("org.asuslinux.Daemon", "PrevLedMode", ()) } fn led_mode(&self) -> Result { self.method_call("org.asuslinux.Daemon", "LedMode", ()) .and_then(|r: (String,)| Ok(r.0)) } fn led_modes(&self) -> Result { self.method_call("org.asuslinux.Daemon", "LedModes", ()) .and_then(|r: (String,)| Ok(r.0)) } fn led_brightness(&self) -> Result { self.method_call("org.asuslinux.Daemon", "LedBrightness", ()) .and_then(|r: (i16,)| Ok(r.0)) } } #[derive(Debug)] pub struct OrgAsuslinuxDaemonNotifyLed { pub data: String, } impl arg::AppendAll for OrgAsuslinuxDaemonNotifyLed { fn append(&self, i: &mut arg::IterAppend) { arg::RefArg::append(&self.data, i); } } impl arg::ReadAll for OrgAsuslinuxDaemonNotifyLed { fn read(i: &mut arg::Iter) -> Result { Ok(OrgAsuslinuxDaemonNotifyLed { data: i.read()? }) } } impl dbus::message::SignalArgs for OrgAsuslinuxDaemonNotifyLed { const NAME: &'static str = "NotifyLed"; const INTERFACE: &'static str = "org.asuslinux.Daemon"; }