use dbus as dbus;
#[allow(unused_imports)]
use dbus::arg;
use dbus::blocking;
pub trait OrgChromiumPowerManager {
fn request_shutdown(&self, reason: i32, description: &str) -> Result<(), dbus::Error>;
fn request_restart(&self, reason: i32, description: &str) -> Result<(), dbus::Error>;
fn change_wifi_reg_domain(&self, domain: i32) -> Result<(), dbus::Error>;
fn request_suspend(&self, external_wakeup_count: u64, wakeup_timeout: i32, suspend_flavor: u32) -> Result<(), dbus::Error>;
fn set_screen_brightness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>;
fn decrease_screen_brightness(&self, allow_off: bool) -> Result<(), dbus::Error>;
fn increase_screen_brightness(&self) -> Result<(), dbus::Error>;
fn get_screen_brightness_percent(&self) -> Result<f64, dbus::Error>;
fn has_keyboard_backlight(&self) -> Result<bool, dbus::Error>;
fn decrease_keyboard_brightness(&self) -> Result<(), dbus::Error>;
fn increase_keyboard_brightness(&self) -> Result<(), dbus::Error>;
fn toggle_keyboard_backlight(&self) -> Result<(), dbus::Error>;
fn set_keyboard_brightness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>;
fn get_keyboard_brightness_percent(&self) -> Result<f64, dbus::Error>;
fn set_keyboard_ambient_light_sensor_enabled(&self, enabled: bool) -> Result<(), dbus::Error>;
fn get_power_supply_properties(&self) -> Result<Vec<u8>, dbus::Error>;
fn get_battery_state(&self) -> Result<(u32, u32, f64), dbus::Error>;
fn handle_video_activity(&self, fullscreen: bool) -> Result<(), dbus::Error>;
fn handle_user_activity(&self, type_: i32) -> Result<(), dbus::Error>;
fn set_is_projecting(&self, is_projecting: bool) -> Result<(), dbus::Error>;
fn set_policy(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>;
fn set_power_source(&self, id: &str) -> Result<(), dbus::Error>;
fn handle_power_button_acknowledgment(&self, timestamp_internal: i64) -> Result<(), dbus::Error>;
fn ignore_next_power_button_press(&self, timeout_internal: i64) -> Result<(), dbus::Error>;
fn register_suspend_delay(&self, serialized_request_proto: Vec<u8>) -> Result<Vec<u8>, dbus::Error>;
fn unregister_suspend_delay(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>;
fn handle_suspend_readiness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>;
fn register_dark_suspend_delay(&self, serialized_request_proto: Vec<u8>) -> Result<Vec<u8>, dbus::Error>;
fn unregister_dark_suspend_delay(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>;
fn handle_dark_suspend_readiness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>;
fn record_dark_resume_wake_reason(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>;
fn get_inactivity_delays(&self) -> Result<Vec<u8>, dbus::Error>;
fn has_ambient_color_device(&self) -> Result<bool, dbus::Error>;
fn get_thermal_state(&self) -> Result<Vec<u8>, dbus::Error>;
fn set_external_display_alsbrightness(&self, enabled: bool) -> Result<(), dbus::Error>;
fn get_external_display_alsbrightness(&self) -> Result<bool, dbus::Error>;
fn charge_now_for_adaptive_charging(&self) -> Result<(), dbus::Error>;
fn get_charge_history(&self) -> Result<Vec<u8>, dbus::Error>;
fn get_battery_saver_mode_state(&self) -> Result<Vec<u8>, dbus::Error>;
fn set_battery_saver_mode_state(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>;
fn has_ambient_light_sensor(&self) -> Result<bool, dbus::Error>;
fn set_ambient_light_sensor_enabled(&self, enabled: bool) -> Result<(), dbus::Error>;
fn battery_state_poll(&self) -> Result<(u32, u32, f64), dbus::Error>;
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerBatterySaverModeStateChanged {
pub serialized_proto: Vec<u8>,
}
impl arg::AppendAll for OrgChromiumPowerManagerBatterySaverModeStateChanged {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.serialized_proto, i);
}
}
impl arg::ReadAll for OrgChromiumPowerManagerBatterySaverModeStateChanged {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerBatterySaverModeStateChanged {
serialized_proto: i.read()?,
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerBatterySaverModeStateChanged {
const NAME: &'static str = "BatterySaverModeStateChanged";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerScreenBrightnessChanged {
pub serialized_proto: Vec<u8>,
}
impl arg::AppendAll for OrgChromiumPowerManagerScreenBrightnessChanged {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.serialized_proto, i);
}
}
impl arg::ReadAll for OrgChromiumPowerManagerScreenBrightnessChanged {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerScreenBrightnessChanged {
serialized_proto: i.read()?,
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerScreenBrightnessChanged {
const NAME: &'static str = "ScreenBrightnessChanged";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerKeyboardBrightnessChanged {
pub serialized_proto: Vec<u8>,
}
impl arg::AppendAll for OrgChromiumPowerManagerKeyboardBrightnessChanged {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.serialized_proto, i);
}
}
impl arg::ReadAll for OrgChromiumPowerManagerKeyboardBrightnessChanged {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerKeyboardBrightnessChanged {
serialized_proto: i.read()?,
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerKeyboardBrightnessChanged {
const NAME: &'static str = "KeyboardBrightnessChanged";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerKeyboardAmbientLightSensorEnabledChanged {
pub serialized_proto: Vec<u8>,
}
impl arg::AppendAll for OrgChromiumPowerManagerKeyboardAmbientLightSensorEnabledChanged {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.serialized_proto, i);
}
}
impl arg::ReadAll for OrgChromiumPowerManagerKeyboardAmbientLightSensorEnabledChanged {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerKeyboardAmbientLightSensorEnabledChanged {
serialized_proto: i.read()?,
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerKeyboardAmbientLightSensorEnabledChanged {
const NAME: &'static str = "KeyboardAmbientLightSensorEnabledChanged";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerPeripheralBatteryStatus {
pub serialized_proto: Vec<u8>,
}
impl arg::AppendAll for OrgChromiumPowerManagerPeripheralBatteryStatus {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.serialized_proto, i);
}
}
impl arg::ReadAll for OrgChromiumPowerManagerPeripheralBatteryStatus {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerPeripheralBatteryStatus {
serialized_proto: i.read()?,
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerPeripheralBatteryStatus {
const NAME: &'static str = "PeripheralBatteryStatus";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerPowerSupplyPoll {
pub serialized_proto: Vec<u8>,
}
impl arg::AppendAll for OrgChromiumPowerManagerPowerSupplyPoll {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.serialized_proto, i);
}
}
impl arg::ReadAll for OrgChromiumPowerManagerPowerSupplyPoll {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerPowerSupplyPoll {
serialized_proto: i.read()?,
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerPowerSupplyPoll {
const NAME: &'static str = "PowerSupplyPoll";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerLidOpened {
}
impl arg::AppendAll for OrgChromiumPowerManagerLidOpened {
fn append(&self, _: &mut arg::IterAppend) {
}
}
impl arg::ReadAll for OrgChromiumPowerManagerLidOpened {
fn read(_: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerLidOpened {
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerLidOpened {
const NAME: &'static str = "LidOpened";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerLidClosed {
}
impl arg::AppendAll for OrgChromiumPowerManagerLidClosed {
fn append(&self, _: &mut arg::IterAppend) {
}
}
impl arg::ReadAll for OrgChromiumPowerManagerLidClosed {
fn read(_: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerLidClosed {
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerLidClosed {
const NAME: &'static str = "LidClosed";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerSuspendImminent {
pub serialized_proto: Vec<u8>,
}
impl arg::AppendAll for OrgChromiumPowerManagerSuspendImminent {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.serialized_proto, i);
}
}
impl arg::ReadAll for OrgChromiumPowerManagerSuspendImminent {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerSuspendImminent {
serialized_proto: i.read()?,
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerSuspendImminent {
const NAME: &'static str = "SuspendImminent";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerSuspendDone {
pub serialized_proto: Vec<u8>,
}
impl arg::AppendAll for OrgChromiumPowerManagerSuspendDone {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.serialized_proto, i);
}
}
impl arg::ReadAll for OrgChromiumPowerManagerSuspendDone {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerSuspendDone {
serialized_proto: i.read()?,
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerSuspendDone {
const NAME: &'static str = "SuspendDone";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerDarkSuspendImminent {
pub serialized_proto: Vec<u8>,
}
impl arg::AppendAll for OrgChromiumPowerManagerDarkSuspendImminent {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.serialized_proto, i);
}
}
impl arg::ReadAll for OrgChromiumPowerManagerDarkSuspendImminent {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerDarkSuspendImminent {
serialized_proto: i.read()?,
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerDarkSuspendImminent {
const NAME: &'static str = "DarkSuspendImminent";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerInputEvent {
pub serialized_proto: Vec<u8>,
}
impl arg::AppendAll for OrgChromiumPowerManagerInputEvent {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.serialized_proto, i);
}
}
impl arg::ReadAll for OrgChromiumPowerManagerInputEvent {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerInputEvent {
serialized_proto: i.read()?,
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerInputEvent {
const NAME: &'static str = "InputEvent";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerIdleActionImminent {
pub serialized_proto: Vec<u8>,
}
impl arg::AppendAll for OrgChromiumPowerManagerIdleActionImminent {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.serialized_proto, i);
}
}
impl arg::ReadAll for OrgChromiumPowerManagerIdleActionImminent {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerIdleActionImminent {
serialized_proto: i.read()?,
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerIdleActionImminent {
const NAME: &'static str = "IdleActionImminent";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerIdleActionDeferred {
}
impl arg::AppendAll for OrgChromiumPowerManagerIdleActionDeferred {
fn append(&self, _: &mut arg::IterAppend) {
}
}
impl arg::ReadAll for OrgChromiumPowerManagerIdleActionDeferred {
fn read(_: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerIdleActionDeferred {
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerIdleActionDeferred {
const NAME: &'static str = "IdleActionDeferred";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerScreenIdleStateChanged {
pub serialized_proto: Vec<u8>,
}
impl arg::AppendAll for OrgChromiumPowerManagerScreenIdleStateChanged {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.serialized_proto, i);
}
}
impl arg::ReadAll for OrgChromiumPowerManagerScreenIdleStateChanged {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerScreenIdleStateChanged {
serialized_proto: i.read()?,
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerScreenIdleStateChanged {
const NAME: &'static str = "ScreenIdleStateChanged";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerInactivityDelaysChanged {
pub serialized_proto: Vec<u8>,
}
impl arg::AppendAll for OrgChromiumPowerManagerInactivityDelaysChanged {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.serialized_proto, i);
}
}
impl arg::ReadAll for OrgChromiumPowerManagerInactivityDelaysChanged {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerInactivityDelaysChanged {
serialized_proto: i.read()?,
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerInactivityDelaysChanged {
const NAME: &'static str = "InactivityDelaysChanged";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerAmbientColorTemperatureChanged {
pub color_temp: u32,
}
impl arg::AppendAll for OrgChromiumPowerManagerAmbientColorTemperatureChanged {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.color_temp, i);
}
}
impl arg::ReadAll for OrgChromiumPowerManagerAmbientColorTemperatureChanged {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerAmbientColorTemperatureChanged {
color_temp: i.read()?,
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerAmbientColorTemperatureChanged {
const NAME: &'static str = "AmbientColorTemperatureChanged";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerThermalEvent {
pub serialized_proto: Vec<u8>,
}
impl arg::AppendAll for OrgChromiumPowerManagerThermalEvent {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.serialized_proto, i);
}
}
impl arg::ReadAll for OrgChromiumPowerManagerThermalEvent {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerThermalEvent {
serialized_proto: i.read()?,
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerThermalEvent {
const NAME: &'static str = "ThermalEvent";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
#[derive(Debug)]
pub struct OrgChromiumPowerManagerAmbientLightSensorEnabledChanged {
pub serialized_proto: Vec<u8>,
}
impl arg::AppendAll for OrgChromiumPowerManagerAmbientLightSensorEnabledChanged {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.serialized_proto, i);
}
}
impl arg::ReadAll for OrgChromiumPowerManagerAmbientLightSensorEnabledChanged {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(OrgChromiumPowerManagerAmbientLightSensorEnabledChanged {
serialized_proto: i.read()?,
})
}
}
impl dbus::message::SignalArgs for OrgChromiumPowerManagerAmbientLightSensorEnabledChanged {
const NAME: &'static str = "AmbientLightSensorEnabledChanged";
const INTERFACE: &'static str = "org.chromium.PowerManager";
}
impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref<Target=T>> OrgChromiumPowerManager for blocking::Proxy<'a, C> {
fn request_shutdown(&self, reason: i32, description: &str) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "RequestShutdown", (reason, description, ))
}
fn request_restart(&self, reason: i32, description: &str) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "RequestRestart", (reason, description, ))
}
fn change_wifi_reg_domain(&self, domain: i32) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "ChangeWifiRegDomain", (domain, ))
}
fn request_suspend(&self, external_wakeup_count: u64, wakeup_timeout: i32, suspend_flavor: u32) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "RequestSuspend", (external_wakeup_count, wakeup_timeout, suspend_flavor, ))
}
fn set_screen_brightness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "SetScreenBrightness", (serialized_proto, ))
}
fn decrease_screen_brightness(&self, allow_off: bool) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "DecreaseScreenBrightness", (allow_off, ))
}
fn increase_screen_brightness(&self) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "IncreaseScreenBrightness", ())
}
fn get_screen_brightness_percent(&self) -> Result<f64, dbus::Error> {
self.method_call("org.chromium.PowerManager", "GetScreenBrightnessPercent", ())
.and_then(|r: (f64, )| Ok(r.0, ))
}
fn has_keyboard_backlight(&self) -> Result<bool, dbus::Error> {
self.method_call("org.chromium.PowerManager", "HasKeyboardBacklight", ())
.and_then(|r: (bool, )| Ok(r.0, ))
}
fn decrease_keyboard_brightness(&self) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "DecreaseKeyboardBrightness", ())
}
fn increase_keyboard_brightness(&self) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "IncreaseKeyboardBrightness", ())
}
fn toggle_keyboard_backlight(&self) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "ToggleKeyboardBacklight", ())
}
fn set_keyboard_brightness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "SetKeyboardBrightness", (serialized_proto, ))
}
fn get_keyboard_brightness_percent(&self) -> Result<f64, dbus::Error> {
self.method_call("org.chromium.PowerManager", "GetKeyboardBrightnessPercent", ())
.and_then(|r: (f64, )| Ok(r.0, ))
}
fn set_keyboard_ambient_light_sensor_enabled(&self, enabled: bool) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "SetKeyboardAmbientLightSensorEnabled", (enabled, ))
}
fn get_power_supply_properties(&self) -> Result<Vec<u8>, dbus::Error> {
self.method_call("org.chromium.PowerManager", "GetPowerSupplyProperties", ())
.and_then(|r: (Vec<u8>, )| Ok(r.0, ))
}
fn get_battery_state(&self) -> Result<(u32, u32, f64), dbus::Error> {
self.method_call("org.chromium.PowerManager", "GetBatteryState", ())
}
fn handle_video_activity(&self, fullscreen: bool) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "HandleVideoActivity", (fullscreen, ))
}
fn handle_user_activity(&self, type_: i32) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "HandleUserActivity", (type_, ))
}
fn set_is_projecting(&self, is_projecting: bool) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "SetIsProjecting", (is_projecting, ))
}
fn set_policy(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "SetPolicy", (serialized_proto, ))
}
fn set_power_source(&self, id: &str) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "SetPowerSource", (id, ))
}
fn handle_power_button_acknowledgment(&self, timestamp_internal: i64) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "HandlePowerButtonAcknowledgment", (timestamp_internal, ))
}
fn ignore_next_power_button_press(&self, timeout_internal: i64) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "IgnoreNextPowerButtonPress", (timeout_internal, ))
}
fn register_suspend_delay(&self, serialized_request_proto: Vec<u8>) -> Result<Vec<u8>, dbus::Error> {
self.method_call("org.chromium.PowerManager", "RegisterSuspendDelay", (serialized_request_proto, ))
.and_then(|r: (Vec<u8>, )| Ok(r.0, ))
}
fn unregister_suspend_delay(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "UnregisterSuspendDelay", (serialized_proto, ))
}
fn handle_suspend_readiness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "HandleSuspendReadiness", (serialized_proto, ))
}
fn register_dark_suspend_delay(&self, serialized_request_proto: Vec<u8>) -> Result<Vec<u8>, dbus::Error> {
self.method_call("org.chromium.PowerManager", "RegisterDarkSuspendDelay", (serialized_request_proto, ))
.and_then(|r: (Vec<u8>, )| Ok(r.0, ))
}
fn unregister_dark_suspend_delay(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "UnregisterDarkSuspendDelay", (serialized_proto, ))
}
fn handle_dark_suspend_readiness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "HandleDarkSuspendReadiness", (serialized_proto, ))
}
fn record_dark_resume_wake_reason(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "RecordDarkResumeWakeReason", (serialized_proto, ))
}
fn get_inactivity_delays(&self) -> Result<Vec<u8>, dbus::Error> {
self.method_call("org.chromium.PowerManager", "GetInactivityDelays", ())
.and_then(|r: (Vec<u8>, )| Ok(r.0, ))
}
fn has_ambient_color_device(&self) -> Result<bool, dbus::Error> {
self.method_call("org.chromium.PowerManager", "HasAmbientColorDevice", ())
.and_then(|r: (bool, )| Ok(r.0, ))
}
fn get_thermal_state(&self) -> Result<Vec<u8>, dbus::Error> {
self.method_call("org.chromium.PowerManager", "GetThermalState", ())
.and_then(|r: (Vec<u8>, )| Ok(r.0, ))
}
fn set_external_display_alsbrightness(&self, enabled: bool) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "SetExternalDisplayALSBrightness", (enabled, ))
}
fn get_external_display_alsbrightness(&self) -> Result<bool, dbus::Error> {
self.method_call("org.chromium.PowerManager", "GetExternalDisplayALSBrightness", ())
.and_then(|r: (bool, )| Ok(r.0, ))
}
fn charge_now_for_adaptive_charging(&self) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "ChargeNowForAdaptiveCharging", ())
}
fn get_charge_history(&self) -> Result<Vec<u8>, dbus::Error> {
self.method_call("org.chromium.PowerManager", "GetChargeHistory", ())
.and_then(|r: (Vec<u8>, )| Ok(r.0, ))
}
fn get_battery_saver_mode_state(&self) -> Result<Vec<u8>, dbus::Error> {
self.method_call("org.chromium.PowerManager", "GetBatterySaverModeState", ())
.and_then(|r: (Vec<u8>, )| Ok(r.0, ))
}
fn set_battery_saver_mode_state(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "SetBatterySaverModeState", (serialized_proto, ))
}
fn has_ambient_light_sensor(&self) -> Result<bool, dbus::Error> {
self.method_call("org.chromium.PowerManager", "HasAmbientLightSensor", ())
.and_then(|r: (bool, )| Ok(r.0, ))
}
fn set_ambient_light_sensor_enabled(&self, enabled: bool) -> Result<(), dbus::Error> {
self.method_call("org.chromium.PowerManager", "SetAmbientLightSensorEnabled", (enabled, ))
}
fn battery_state_poll(&self) -> Result<(u32, u32, f64), dbus::Error> {
self.method_call("org.chromium.PowerManager", "BatteryStatePoll", ())
}
}