pub trait OrgChromiumPowerManager {
Show 43 methods
// Required methods
fn request_shutdown(
&self,
reason: i32,
description: &str
) -> Result<(), Error>;
fn request_restart(
&self,
reason: i32,
description: &str
) -> Result<(), Error>;
fn change_wifi_reg_domain(&self, domain: i32) -> Result<(), Error>;
fn request_suspend(
&self,
external_wakeup_count: u64,
wakeup_timeout: i32,
suspend_flavor: u32
) -> Result<(), Error>;
fn set_screen_brightness(
&self,
serialized_proto: Vec<u8>
) -> Result<(), Error>;
fn decrease_screen_brightness(&self, allow_off: bool) -> Result<(), Error>;
fn increase_screen_brightness(&self) -> Result<(), Error>;
fn get_screen_brightness_percent(&self) -> Result<f64, Error>;
fn has_keyboard_backlight(&self) -> Result<bool, Error>;
fn decrease_keyboard_brightness(&self) -> Result<(), Error>;
fn increase_keyboard_brightness(&self) -> Result<(), Error>;
fn toggle_keyboard_backlight(&self) -> Result<(), Error>;
fn set_keyboard_brightness(
&self,
serialized_proto: Vec<u8>
) -> Result<(), Error>;
fn get_keyboard_brightness_percent(&self) -> Result<f64, Error>;
fn set_keyboard_ambient_light_sensor_enabled(
&self,
enabled: bool
) -> Result<(), Error>;
fn get_power_supply_properties(&self) -> Result<Vec<u8>, Error>;
fn get_battery_state(&self) -> Result<(u32, u32, f64), Error>;
fn handle_video_activity(&self, fullscreen: bool) -> Result<(), Error>;
fn handle_user_activity(&self, type_: i32) -> Result<(), Error>;
fn set_is_projecting(&self, is_projecting: bool) -> Result<(), Error>;
fn set_policy(&self, serialized_proto: Vec<u8>) -> Result<(), Error>;
fn set_power_source(&self, id: &str) -> Result<(), Error>;
fn handle_power_button_acknowledgment(
&self,
timestamp_internal: i64
) -> Result<(), Error>;
fn ignore_next_power_button_press(
&self,
timeout_internal: i64
) -> Result<(), Error>;
fn register_suspend_delay(
&self,
serialized_request_proto: Vec<u8>
) -> Result<Vec<u8>, Error>;
fn unregister_suspend_delay(
&self,
serialized_proto: Vec<u8>
) -> Result<(), Error>;
fn handle_suspend_readiness(
&self,
serialized_proto: Vec<u8>
) -> Result<(), Error>;
fn register_dark_suspend_delay(
&self,
serialized_request_proto: Vec<u8>
) -> Result<Vec<u8>, Error>;
fn unregister_dark_suspend_delay(
&self,
serialized_proto: Vec<u8>
) -> Result<(), Error>;
fn handle_dark_suspend_readiness(
&self,
serialized_proto: Vec<u8>
) -> Result<(), Error>;
fn record_dark_resume_wake_reason(
&self,
serialized_proto: Vec<u8>
) -> Result<(), Error>;
fn get_inactivity_delays(&self) -> Result<Vec<u8>, Error>;
fn has_ambient_color_device(&self) -> Result<bool, Error>;
fn get_thermal_state(&self) -> Result<Vec<u8>, Error>;
fn set_external_display_alsbrightness(
&self,
enabled: bool
) -> Result<(), Error>;
fn get_external_display_alsbrightness(&self) -> Result<bool, Error>;
fn charge_now_for_adaptive_charging(&self) -> Result<(), Error>;
fn get_charge_history(&self) -> Result<Vec<u8>, Error>;
fn get_battery_saver_mode_state(&self) -> Result<Vec<u8>, Error>;
fn set_battery_saver_mode_state(
&self,
serialized_proto: Vec<u8>
) -> Result<(), Error>;
fn has_ambient_light_sensor(&self) -> Result<bool, Error>;
fn set_ambient_light_sensor_enabled(
&self,
enabled: bool
) -> Result<(), Error>;
fn battery_state_poll(&self) -> Result<(u32, u32, f64), Error>;
}