1 // This code was autogenerated with `dbus-codegen-rust -s -m None`, see https://github.com/diwic/dbus-rs 2 use dbus as dbus; 3 #[allow(unused_imports)] 4 use dbus::arg; 5 use dbus::blocking; 6 7 pub trait OrgChromiumPowerManager { request_shutdown(&self, reason: i32, description: &str) -> Result<(), dbus::Error>8 fn request_shutdown(&self, reason: i32, description: &str) -> Result<(), dbus::Error>; request_restart(&self, reason: i32, description: &str) -> Result<(), dbus::Error>9 fn request_restart(&self, reason: i32, description: &str) -> Result<(), dbus::Error>; change_wifi_reg_domain(&self, domain: i32) -> Result<(), dbus::Error>10 fn change_wifi_reg_domain(&self, domain: i32) -> Result<(), dbus::Error>; request_suspend(&self, external_wakeup_count: u64, wakeup_timeout: i32, suspend_flavor: u32) -> Result<(), dbus::Error>11 fn request_suspend(&self, external_wakeup_count: u64, wakeup_timeout: i32, suspend_flavor: u32) -> Result<(), dbus::Error>; set_screen_brightness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>12 fn set_screen_brightness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>; decrease_screen_brightness(&self, allow_off: bool) -> Result<(), dbus::Error>13 fn decrease_screen_brightness(&self, allow_off: bool) -> Result<(), dbus::Error>; increase_screen_brightness(&self) -> Result<(), dbus::Error>14 fn increase_screen_brightness(&self) -> Result<(), dbus::Error>; get_screen_brightness_percent(&self) -> Result<f64, dbus::Error>15 fn get_screen_brightness_percent(&self) -> Result<f64, dbus::Error>; has_keyboard_backlight(&self) -> Result<bool, dbus::Error>16 fn has_keyboard_backlight(&self) -> Result<bool, dbus::Error>; decrease_keyboard_brightness(&self) -> Result<(), dbus::Error>17 fn decrease_keyboard_brightness(&self) -> Result<(), dbus::Error>; increase_keyboard_brightness(&self) -> Result<(), dbus::Error>18 fn increase_keyboard_brightness(&self) -> Result<(), dbus::Error>; toggle_keyboard_backlight(&self) -> Result<(), dbus::Error>19 fn toggle_keyboard_backlight(&self) -> Result<(), dbus::Error>; set_keyboard_brightness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>20 fn set_keyboard_brightness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>; get_keyboard_brightness_percent(&self) -> Result<f64, dbus::Error>21 fn get_keyboard_brightness_percent(&self) -> Result<f64, dbus::Error>; set_keyboard_ambient_light_sensor_enabled(&self, enabled: bool) -> Result<(), dbus::Error>22 fn set_keyboard_ambient_light_sensor_enabled(&self, enabled: bool) -> Result<(), dbus::Error>; get_power_supply_properties(&self) -> Result<Vec<u8>, dbus::Error>23 fn get_power_supply_properties(&self) -> Result<Vec<u8>, dbus::Error>; get_battery_state(&self) -> Result<(u32, u32, f64), dbus::Error>24 fn get_battery_state(&self) -> Result<(u32, u32, f64), dbus::Error>; handle_video_activity(&self, fullscreen: bool) -> Result<(), dbus::Error>25 fn handle_video_activity(&self, fullscreen: bool) -> Result<(), dbus::Error>; handle_user_activity(&self, type_: i32) -> Result<(), dbus::Error>26 fn handle_user_activity(&self, type_: i32) -> Result<(), dbus::Error>; set_is_projecting(&self, is_projecting: bool) -> Result<(), dbus::Error>27 fn set_is_projecting(&self, is_projecting: bool) -> Result<(), dbus::Error>; set_policy(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>28 fn set_policy(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>; set_power_source(&self, id: &str) -> Result<(), dbus::Error>29 fn set_power_source(&self, id: &str) -> Result<(), dbus::Error>; handle_power_button_acknowledgment(&self, timestamp_internal: i64) -> Result<(), dbus::Error>30 fn handle_power_button_acknowledgment(&self, timestamp_internal: i64) -> Result<(), dbus::Error>; ignore_next_power_button_press(&self, timeout_internal: i64) -> Result<(), dbus::Error>31 fn ignore_next_power_button_press(&self, timeout_internal: i64) -> Result<(), dbus::Error>; register_suspend_delay(&self, serialized_request_proto: Vec<u8>) -> Result<Vec<u8>, dbus::Error>32 fn register_suspend_delay(&self, serialized_request_proto: Vec<u8>) -> Result<Vec<u8>, dbus::Error>; unregister_suspend_delay(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>33 fn unregister_suspend_delay(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>; handle_suspend_readiness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>34 fn handle_suspend_readiness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>; register_dark_suspend_delay(&self, serialized_request_proto: Vec<u8>) -> Result<Vec<u8>, dbus::Error>35 fn register_dark_suspend_delay(&self, serialized_request_proto: Vec<u8>) -> Result<Vec<u8>, dbus::Error>; unregister_dark_suspend_delay(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>36 fn unregister_dark_suspend_delay(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>; handle_dark_suspend_readiness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>37 fn handle_dark_suspend_readiness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>; record_dark_resume_wake_reason(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>38 fn record_dark_resume_wake_reason(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>; get_inactivity_delays(&self) -> Result<Vec<u8>, dbus::Error>39 fn get_inactivity_delays(&self) -> Result<Vec<u8>, dbus::Error>; has_ambient_color_device(&self) -> Result<bool, dbus::Error>40 fn has_ambient_color_device(&self) -> Result<bool, dbus::Error>; get_thermal_state(&self) -> Result<Vec<u8>, dbus::Error>41 fn get_thermal_state(&self) -> Result<Vec<u8>, dbus::Error>; set_external_display_alsbrightness(&self, enabled: bool) -> Result<(), dbus::Error>42 fn set_external_display_alsbrightness(&self, enabled: bool) -> Result<(), dbus::Error>; get_external_display_alsbrightness(&self) -> Result<bool, dbus::Error>43 fn get_external_display_alsbrightness(&self) -> Result<bool, dbus::Error>; charge_now_for_adaptive_charging(&self) -> Result<(), dbus::Error>44 fn charge_now_for_adaptive_charging(&self) -> Result<(), dbus::Error>; get_charge_history(&self) -> Result<Vec<u8>, dbus::Error>45 fn get_charge_history(&self) -> Result<Vec<u8>, dbus::Error>; get_battery_saver_mode_state(&self) -> Result<Vec<u8>, dbus::Error>46 fn get_battery_saver_mode_state(&self) -> Result<Vec<u8>, dbus::Error>; set_battery_saver_mode_state(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>47 fn set_battery_saver_mode_state(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>; has_ambient_light_sensor(&self) -> Result<bool, dbus::Error>48 fn has_ambient_light_sensor(&self) -> Result<bool, dbus::Error>; set_ambient_light_sensor_enabled(&self, enabled: bool) -> Result<(), dbus::Error>49 fn set_ambient_light_sensor_enabled(&self, enabled: bool) -> Result<(), dbus::Error>; battery_state_poll(&self) -> Result<(u32, u32, f64), dbus::Error>50 fn battery_state_poll(&self) -> Result<(u32, u32, f64), dbus::Error>; 51 } 52 53 #[derive(Debug)] 54 pub struct OrgChromiumPowerManagerBatterySaverModeStateChanged { 55 pub serialized_proto: Vec<u8>, 56 } 57 58 impl arg::AppendAll for OrgChromiumPowerManagerBatterySaverModeStateChanged { append(&self, i: &mut arg::IterAppend)59 fn append(&self, i: &mut arg::IterAppend) { 60 arg::RefArg::append(&self.serialized_proto, i); 61 } 62 } 63 64 impl arg::ReadAll for OrgChromiumPowerManagerBatterySaverModeStateChanged { read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>65 fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 66 Ok(OrgChromiumPowerManagerBatterySaverModeStateChanged { 67 serialized_proto: i.read()?, 68 }) 69 } 70 } 71 72 impl dbus::message::SignalArgs for OrgChromiumPowerManagerBatterySaverModeStateChanged { 73 const NAME: &'static str = "BatterySaverModeStateChanged"; 74 const INTERFACE: &'static str = "org.chromium.PowerManager"; 75 } 76 77 #[derive(Debug)] 78 pub struct OrgChromiumPowerManagerScreenBrightnessChanged { 79 pub serialized_proto: Vec<u8>, 80 } 81 82 impl arg::AppendAll for OrgChromiumPowerManagerScreenBrightnessChanged { append(&self, i: &mut arg::IterAppend)83 fn append(&self, i: &mut arg::IterAppend) { 84 arg::RefArg::append(&self.serialized_proto, i); 85 } 86 } 87 88 impl arg::ReadAll for OrgChromiumPowerManagerScreenBrightnessChanged { read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>89 fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 90 Ok(OrgChromiumPowerManagerScreenBrightnessChanged { 91 serialized_proto: i.read()?, 92 }) 93 } 94 } 95 96 impl dbus::message::SignalArgs for OrgChromiumPowerManagerScreenBrightnessChanged { 97 const NAME: &'static str = "ScreenBrightnessChanged"; 98 const INTERFACE: &'static str = "org.chromium.PowerManager"; 99 } 100 101 #[derive(Debug)] 102 pub struct OrgChromiumPowerManagerKeyboardBrightnessChanged { 103 pub serialized_proto: Vec<u8>, 104 } 105 106 impl arg::AppendAll for OrgChromiumPowerManagerKeyboardBrightnessChanged { append(&self, i: &mut arg::IterAppend)107 fn append(&self, i: &mut arg::IterAppend) { 108 arg::RefArg::append(&self.serialized_proto, i); 109 } 110 } 111 112 impl arg::ReadAll for OrgChromiumPowerManagerKeyboardBrightnessChanged { read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>113 fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 114 Ok(OrgChromiumPowerManagerKeyboardBrightnessChanged { 115 serialized_proto: i.read()?, 116 }) 117 } 118 } 119 120 impl dbus::message::SignalArgs for OrgChromiumPowerManagerKeyboardBrightnessChanged { 121 const NAME: &'static str = "KeyboardBrightnessChanged"; 122 const INTERFACE: &'static str = "org.chromium.PowerManager"; 123 } 124 125 #[derive(Debug)] 126 pub struct OrgChromiumPowerManagerKeyboardAmbientLightSensorEnabledChanged { 127 pub serialized_proto: Vec<u8>, 128 } 129 130 impl arg::AppendAll for OrgChromiumPowerManagerKeyboardAmbientLightSensorEnabledChanged { append(&self, i: &mut arg::IterAppend)131 fn append(&self, i: &mut arg::IterAppend) { 132 arg::RefArg::append(&self.serialized_proto, i); 133 } 134 } 135 136 impl arg::ReadAll for OrgChromiumPowerManagerKeyboardAmbientLightSensorEnabledChanged { read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>137 fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 138 Ok(OrgChromiumPowerManagerKeyboardAmbientLightSensorEnabledChanged { 139 serialized_proto: i.read()?, 140 }) 141 } 142 } 143 144 impl dbus::message::SignalArgs for OrgChromiumPowerManagerKeyboardAmbientLightSensorEnabledChanged { 145 const NAME: &'static str = "KeyboardAmbientLightSensorEnabledChanged"; 146 const INTERFACE: &'static str = "org.chromium.PowerManager"; 147 } 148 149 #[derive(Debug)] 150 pub struct OrgChromiumPowerManagerPeripheralBatteryStatus { 151 pub serialized_proto: Vec<u8>, 152 } 153 154 impl arg::AppendAll for OrgChromiumPowerManagerPeripheralBatteryStatus { append(&self, i: &mut arg::IterAppend)155 fn append(&self, i: &mut arg::IterAppend) { 156 arg::RefArg::append(&self.serialized_proto, i); 157 } 158 } 159 160 impl arg::ReadAll for OrgChromiumPowerManagerPeripheralBatteryStatus { read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>161 fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 162 Ok(OrgChromiumPowerManagerPeripheralBatteryStatus { 163 serialized_proto: i.read()?, 164 }) 165 } 166 } 167 168 impl dbus::message::SignalArgs for OrgChromiumPowerManagerPeripheralBatteryStatus { 169 const NAME: &'static str = "PeripheralBatteryStatus"; 170 const INTERFACE: &'static str = "org.chromium.PowerManager"; 171 } 172 173 #[derive(Debug)] 174 pub struct OrgChromiumPowerManagerPowerSupplyPoll { 175 pub serialized_proto: Vec<u8>, 176 } 177 178 impl arg::AppendAll for OrgChromiumPowerManagerPowerSupplyPoll { append(&self, i: &mut arg::IterAppend)179 fn append(&self, i: &mut arg::IterAppend) { 180 arg::RefArg::append(&self.serialized_proto, i); 181 } 182 } 183 184 impl arg::ReadAll for OrgChromiumPowerManagerPowerSupplyPoll { read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>185 fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 186 Ok(OrgChromiumPowerManagerPowerSupplyPoll { 187 serialized_proto: i.read()?, 188 }) 189 } 190 } 191 192 impl dbus::message::SignalArgs for OrgChromiumPowerManagerPowerSupplyPoll { 193 const NAME: &'static str = "PowerSupplyPoll"; 194 const INTERFACE: &'static str = "org.chromium.PowerManager"; 195 } 196 197 #[derive(Debug)] 198 pub struct OrgChromiumPowerManagerLidOpened { 199 } 200 201 impl arg::AppendAll for OrgChromiumPowerManagerLidOpened { append(&self, _: &mut arg::IterAppend)202 fn append(&self, _: &mut arg::IterAppend) { 203 } 204 } 205 206 impl arg::ReadAll for OrgChromiumPowerManagerLidOpened { read(_: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>207 fn read(_: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 208 Ok(OrgChromiumPowerManagerLidOpened { 209 }) 210 } 211 } 212 213 impl dbus::message::SignalArgs for OrgChromiumPowerManagerLidOpened { 214 const NAME: &'static str = "LidOpened"; 215 const INTERFACE: &'static str = "org.chromium.PowerManager"; 216 } 217 218 #[derive(Debug)] 219 pub struct OrgChromiumPowerManagerLidClosed { 220 } 221 222 impl arg::AppendAll for OrgChromiumPowerManagerLidClosed { append(&self, _: &mut arg::IterAppend)223 fn append(&self, _: &mut arg::IterAppend) { 224 } 225 } 226 227 impl arg::ReadAll for OrgChromiumPowerManagerLidClosed { read(_: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>228 fn read(_: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 229 Ok(OrgChromiumPowerManagerLidClosed { 230 }) 231 } 232 } 233 234 impl dbus::message::SignalArgs for OrgChromiumPowerManagerLidClosed { 235 const NAME: &'static str = "LidClosed"; 236 const INTERFACE: &'static str = "org.chromium.PowerManager"; 237 } 238 239 #[derive(Debug)] 240 pub struct OrgChromiumPowerManagerSuspendImminent { 241 pub serialized_proto: Vec<u8>, 242 } 243 244 impl arg::AppendAll for OrgChromiumPowerManagerSuspendImminent { append(&self, i: &mut arg::IterAppend)245 fn append(&self, i: &mut arg::IterAppend) { 246 arg::RefArg::append(&self.serialized_proto, i); 247 } 248 } 249 250 impl arg::ReadAll for OrgChromiumPowerManagerSuspendImminent { read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>251 fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 252 Ok(OrgChromiumPowerManagerSuspendImminent { 253 serialized_proto: i.read()?, 254 }) 255 } 256 } 257 258 impl dbus::message::SignalArgs for OrgChromiumPowerManagerSuspendImminent { 259 const NAME: &'static str = "SuspendImminent"; 260 const INTERFACE: &'static str = "org.chromium.PowerManager"; 261 } 262 263 #[derive(Debug)] 264 pub struct OrgChromiumPowerManagerSuspendDone { 265 pub serialized_proto: Vec<u8>, 266 } 267 268 impl arg::AppendAll for OrgChromiumPowerManagerSuspendDone { append(&self, i: &mut arg::IterAppend)269 fn append(&self, i: &mut arg::IterAppend) { 270 arg::RefArg::append(&self.serialized_proto, i); 271 } 272 } 273 274 impl arg::ReadAll for OrgChromiumPowerManagerSuspendDone { read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>275 fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 276 Ok(OrgChromiumPowerManagerSuspendDone { 277 serialized_proto: i.read()?, 278 }) 279 } 280 } 281 282 impl dbus::message::SignalArgs for OrgChromiumPowerManagerSuspendDone { 283 const NAME: &'static str = "SuspendDone"; 284 const INTERFACE: &'static str = "org.chromium.PowerManager"; 285 } 286 287 #[derive(Debug)] 288 pub struct OrgChromiumPowerManagerDarkSuspendImminent { 289 pub serialized_proto: Vec<u8>, 290 } 291 292 impl arg::AppendAll for OrgChromiumPowerManagerDarkSuspendImminent { append(&self, i: &mut arg::IterAppend)293 fn append(&self, i: &mut arg::IterAppend) { 294 arg::RefArg::append(&self.serialized_proto, i); 295 } 296 } 297 298 impl arg::ReadAll for OrgChromiumPowerManagerDarkSuspendImminent { read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>299 fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 300 Ok(OrgChromiumPowerManagerDarkSuspendImminent { 301 serialized_proto: i.read()?, 302 }) 303 } 304 } 305 306 impl dbus::message::SignalArgs for OrgChromiumPowerManagerDarkSuspendImminent { 307 const NAME: &'static str = "DarkSuspendImminent"; 308 const INTERFACE: &'static str = "org.chromium.PowerManager"; 309 } 310 311 #[derive(Debug)] 312 pub struct OrgChromiumPowerManagerInputEvent { 313 pub serialized_proto: Vec<u8>, 314 } 315 316 impl arg::AppendAll for OrgChromiumPowerManagerInputEvent { append(&self, i: &mut arg::IterAppend)317 fn append(&self, i: &mut arg::IterAppend) { 318 arg::RefArg::append(&self.serialized_proto, i); 319 } 320 } 321 322 impl arg::ReadAll for OrgChromiumPowerManagerInputEvent { read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>323 fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 324 Ok(OrgChromiumPowerManagerInputEvent { 325 serialized_proto: i.read()?, 326 }) 327 } 328 } 329 330 impl dbus::message::SignalArgs for OrgChromiumPowerManagerInputEvent { 331 const NAME: &'static str = "InputEvent"; 332 const INTERFACE: &'static str = "org.chromium.PowerManager"; 333 } 334 335 #[derive(Debug)] 336 pub struct OrgChromiumPowerManagerIdleActionImminent { 337 pub serialized_proto: Vec<u8>, 338 } 339 340 impl arg::AppendAll for OrgChromiumPowerManagerIdleActionImminent { append(&self, i: &mut arg::IterAppend)341 fn append(&self, i: &mut arg::IterAppend) { 342 arg::RefArg::append(&self.serialized_proto, i); 343 } 344 } 345 346 impl arg::ReadAll for OrgChromiumPowerManagerIdleActionImminent { read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>347 fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 348 Ok(OrgChromiumPowerManagerIdleActionImminent { 349 serialized_proto: i.read()?, 350 }) 351 } 352 } 353 354 impl dbus::message::SignalArgs for OrgChromiumPowerManagerIdleActionImminent { 355 const NAME: &'static str = "IdleActionImminent"; 356 const INTERFACE: &'static str = "org.chromium.PowerManager"; 357 } 358 359 #[derive(Debug)] 360 pub struct OrgChromiumPowerManagerIdleActionDeferred { 361 } 362 363 impl arg::AppendAll for OrgChromiumPowerManagerIdleActionDeferred { append(&self, _: &mut arg::IterAppend)364 fn append(&self, _: &mut arg::IterAppend) { 365 } 366 } 367 368 impl arg::ReadAll for OrgChromiumPowerManagerIdleActionDeferred { read(_: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>369 fn read(_: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 370 Ok(OrgChromiumPowerManagerIdleActionDeferred { 371 }) 372 } 373 } 374 375 impl dbus::message::SignalArgs for OrgChromiumPowerManagerIdleActionDeferred { 376 const NAME: &'static str = "IdleActionDeferred"; 377 const INTERFACE: &'static str = "org.chromium.PowerManager"; 378 } 379 380 #[derive(Debug)] 381 pub struct OrgChromiumPowerManagerScreenIdleStateChanged { 382 pub serialized_proto: Vec<u8>, 383 } 384 385 impl arg::AppendAll for OrgChromiumPowerManagerScreenIdleStateChanged { append(&self, i: &mut arg::IterAppend)386 fn append(&self, i: &mut arg::IterAppend) { 387 arg::RefArg::append(&self.serialized_proto, i); 388 } 389 } 390 391 impl arg::ReadAll for OrgChromiumPowerManagerScreenIdleStateChanged { read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>392 fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 393 Ok(OrgChromiumPowerManagerScreenIdleStateChanged { 394 serialized_proto: i.read()?, 395 }) 396 } 397 } 398 399 impl dbus::message::SignalArgs for OrgChromiumPowerManagerScreenIdleStateChanged { 400 const NAME: &'static str = "ScreenIdleStateChanged"; 401 const INTERFACE: &'static str = "org.chromium.PowerManager"; 402 } 403 404 #[derive(Debug)] 405 pub struct OrgChromiumPowerManagerInactivityDelaysChanged { 406 pub serialized_proto: Vec<u8>, 407 } 408 409 impl arg::AppendAll for OrgChromiumPowerManagerInactivityDelaysChanged { append(&self, i: &mut arg::IterAppend)410 fn append(&self, i: &mut arg::IterAppend) { 411 arg::RefArg::append(&self.serialized_proto, i); 412 } 413 } 414 415 impl arg::ReadAll for OrgChromiumPowerManagerInactivityDelaysChanged { read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>416 fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 417 Ok(OrgChromiumPowerManagerInactivityDelaysChanged { 418 serialized_proto: i.read()?, 419 }) 420 } 421 } 422 423 impl dbus::message::SignalArgs for OrgChromiumPowerManagerInactivityDelaysChanged { 424 const NAME: &'static str = "InactivityDelaysChanged"; 425 const INTERFACE: &'static str = "org.chromium.PowerManager"; 426 } 427 428 #[derive(Debug)] 429 pub struct OrgChromiumPowerManagerAmbientColorTemperatureChanged { 430 pub color_temp: u32, 431 } 432 433 impl arg::AppendAll for OrgChromiumPowerManagerAmbientColorTemperatureChanged { append(&self, i: &mut arg::IterAppend)434 fn append(&self, i: &mut arg::IterAppend) { 435 arg::RefArg::append(&self.color_temp, i); 436 } 437 } 438 439 impl arg::ReadAll for OrgChromiumPowerManagerAmbientColorTemperatureChanged { read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>440 fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 441 Ok(OrgChromiumPowerManagerAmbientColorTemperatureChanged { 442 color_temp: i.read()?, 443 }) 444 } 445 } 446 447 impl dbus::message::SignalArgs for OrgChromiumPowerManagerAmbientColorTemperatureChanged { 448 const NAME: &'static str = "AmbientColorTemperatureChanged"; 449 const INTERFACE: &'static str = "org.chromium.PowerManager"; 450 } 451 452 #[derive(Debug)] 453 pub struct OrgChromiumPowerManagerThermalEvent { 454 pub serialized_proto: Vec<u8>, 455 } 456 457 impl arg::AppendAll for OrgChromiumPowerManagerThermalEvent { append(&self, i: &mut arg::IterAppend)458 fn append(&self, i: &mut arg::IterAppend) { 459 arg::RefArg::append(&self.serialized_proto, i); 460 } 461 } 462 463 impl arg::ReadAll for OrgChromiumPowerManagerThermalEvent { read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>464 fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 465 Ok(OrgChromiumPowerManagerThermalEvent { 466 serialized_proto: i.read()?, 467 }) 468 } 469 } 470 471 impl dbus::message::SignalArgs for OrgChromiumPowerManagerThermalEvent { 472 const NAME: &'static str = "ThermalEvent"; 473 const INTERFACE: &'static str = "org.chromium.PowerManager"; 474 } 475 476 #[derive(Debug)] 477 pub struct OrgChromiumPowerManagerAmbientLightSensorEnabledChanged { 478 pub serialized_proto: Vec<u8>, 479 } 480 481 impl arg::AppendAll for OrgChromiumPowerManagerAmbientLightSensorEnabledChanged { append(&self, i: &mut arg::IterAppend)482 fn append(&self, i: &mut arg::IterAppend) { 483 arg::RefArg::append(&self.serialized_proto, i); 484 } 485 } 486 487 impl arg::ReadAll for OrgChromiumPowerManagerAmbientLightSensorEnabledChanged { read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError>488 fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> { 489 Ok(OrgChromiumPowerManagerAmbientLightSensorEnabledChanged { 490 serialized_proto: i.read()?, 491 }) 492 } 493 } 494 495 impl dbus::message::SignalArgs for OrgChromiumPowerManagerAmbientLightSensorEnabledChanged { 496 const NAME: &'static str = "AmbientLightSensorEnabledChanged"; 497 const INTERFACE: &'static str = "org.chromium.PowerManager"; 498 } 499 500 impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref<Target=T>> OrgChromiumPowerManager for blocking::Proxy<'a, C> { 501 request_shutdown(&self, reason: i32, description: &str) -> Result<(), dbus::Error>502 fn request_shutdown(&self, reason: i32, description: &str) -> Result<(), dbus::Error> { 503 self.method_call("org.chromium.PowerManager", "RequestShutdown", (reason, description, )) 504 } 505 request_restart(&self, reason: i32, description: &str) -> Result<(), dbus::Error>506 fn request_restart(&self, reason: i32, description: &str) -> Result<(), dbus::Error> { 507 self.method_call("org.chromium.PowerManager", "RequestRestart", (reason, description, )) 508 } 509 change_wifi_reg_domain(&self, domain: i32) -> Result<(), dbus::Error>510 fn change_wifi_reg_domain(&self, domain: i32) -> Result<(), dbus::Error> { 511 self.method_call("org.chromium.PowerManager", "ChangeWifiRegDomain", (domain, )) 512 } 513 request_suspend(&self, external_wakeup_count: u64, wakeup_timeout: i32, suspend_flavor: u32) -> Result<(), dbus::Error>514 fn request_suspend(&self, external_wakeup_count: u64, wakeup_timeout: i32, suspend_flavor: u32) -> Result<(), dbus::Error> { 515 self.method_call("org.chromium.PowerManager", "RequestSuspend", (external_wakeup_count, wakeup_timeout, suspend_flavor, )) 516 } 517 set_screen_brightness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>518 fn set_screen_brightness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> { 519 self.method_call("org.chromium.PowerManager", "SetScreenBrightness", (serialized_proto, )) 520 } 521 decrease_screen_brightness(&self, allow_off: bool) -> Result<(), dbus::Error>522 fn decrease_screen_brightness(&self, allow_off: bool) -> Result<(), dbus::Error> { 523 self.method_call("org.chromium.PowerManager", "DecreaseScreenBrightness", (allow_off, )) 524 } 525 increase_screen_brightness(&self) -> Result<(), dbus::Error>526 fn increase_screen_brightness(&self) -> Result<(), dbus::Error> { 527 self.method_call("org.chromium.PowerManager", "IncreaseScreenBrightness", ()) 528 } 529 get_screen_brightness_percent(&self) -> Result<f64, dbus::Error>530 fn get_screen_brightness_percent(&self) -> Result<f64, dbus::Error> { 531 self.method_call("org.chromium.PowerManager", "GetScreenBrightnessPercent", ()) 532 .and_then(|r: (f64, )| Ok(r.0, )) 533 } 534 has_keyboard_backlight(&self) -> Result<bool, dbus::Error>535 fn has_keyboard_backlight(&self) -> Result<bool, dbus::Error> { 536 self.method_call("org.chromium.PowerManager", "HasKeyboardBacklight", ()) 537 .and_then(|r: (bool, )| Ok(r.0, )) 538 } 539 decrease_keyboard_brightness(&self) -> Result<(), dbus::Error>540 fn decrease_keyboard_brightness(&self) -> Result<(), dbus::Error> { 541 self.method_call("org.chromium.PowerManager", "DecreaseKeyboardBrightness", ()) 542 } 543 increase_keyboard_brightness(&self) -> Result<(), dbus::Error>544 fn increase_keyboard_brightness(&self) -> Result<(), dbus::Error> { 545 self.method_call("org.chromium.PowerManager", "IncreaseKeyboardBrightness", ()) 546 } 547 toggle_keyboard_backlight(&self) -> Result<(), dbus::Error>548 fn toggle_keyboard_backlight(&self) -> Result<(), dbus::Error> { 549 self.method_call("org.chromium.PowerManager", "ToggleKeyboardBacklight", ()) 550 } 551 set_keyboard_brightness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>552 fn set_keyboard_brightness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> { 553 self.method_call("org.chromium.PowerManager", "SetKeyboardBrightness", (serialized_proto, )) 554 } 555 get_keyboard_brightness_percent(&self) -> Result<f64, dbus::Error>556 fn get_keyboard_brightness_percent(&self) -> Result<f64, dbus::Error> { 557 self.method_call("org.chromium.PowerManager", "GetKeyboardBrightnessPercent", ()) 558 .and_then(|r: (f64, )| Ok(r.0, )) 559 } 560 set_keyboard_ambient_light_sensor_enabled(&self, enabled: bool) -> Result<(), dbus::Error>561 fn set_keyboard_ambient_light_sensor_enabled(&self, enabled: bool) -> Result<(), dbus::Error> { 562 self.method_call("org.chromium.PowerManager", "SetKeyboardAmbientLightSensorEnabled", (enabled, )) 563 } 564 get_power_supply_properties(&self) -> Result<Vec<u8>, dbus::Error>565 fn get_power_supply_properties(&self) -> Result<Vec<u8>, dbus::Error> { 566 self.method_call("org.chromium.PowerManager", "GetPowerSupplyProperties", ()) 567 .and_then(|r: (Vec<u8>, )| Ok(r.0, )) 568 } 569 get_battery_state(&self) -> Result<(u32, u32, f64), dbus::Error>570 fn get_battery_state(&self) -> Result<(u32, u32, f64), dbus::Error> { 571 self.method_call("org.chromium.PowerManager", "GetBatteryState", ()) 572 } 573 handle_video_activity(&self, fullscreen: bool) -> Result<(), dbus::Error>574 fn handle_video_activity(&self, fullscreen: bool) -> Result<(), dbus::Error> { 575 self.method_call("org.chromium.PowerManager", "HandleVideoActivity", (fullscreen, )) 576 } 577 handle_user_activity(&self, type_: i32) -> Result<(), dbus::Error>578 fn handle_user_activity(&self, type_: i32) -> Result<(), dbus::Error> { 579 self.method_call("org.chromium.PowerManager", "HandleUserActivity", (type_, )) 580 } 581 set_is_projecting(&self, is_projecting: bool) -> Result<(), dbus::Error>582 fn set_is_projecting(&self, is_projecting: bool) -> Result<(), dbus::Error> { 583 self.method_call("org.chromium.PowerManager", "SetIsProjecting", (is_projecting, )) 584 } 585 set_policy(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>586 fn set_policy(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> { 587 self.method_call("org.chromium.PowerManager", "SetPolicy", (serialized_proto, )) 588 } 589 set_power_source(&self, id: &str) -> Result<(), dbus::Error>590 fn set_power_source(&self, id: &str) -> Result<(), dbus::Error> { 591 self.method_call("org.chromium.PowerManager", "SetPowerSource", (id, )) 592 } 593 handle_power_button_acknowledgment(&self, timestamp_internal: i64) -> Result<(), dbus::Error>594 fn handle_power_button_acknowledgment(&self, timestamp_internal: i64) -> Result<(), dbus::Error> { 595 self.method_call("org.chromium.PowerManager", "HandlePowerButtonAcknowledgment", (timestamp_internal, )) 596 } 597 ignore_next_power_button_press(&self, timeout_internal: i64) -> Result<(), dbus::Error>598 fn ignore_next_power_button_press(&self, timeout_internal: i64) -> Result<(), dbus::Error> { 599 self.method_call("org.chromium.PowerManager", "IgnoreNextPowerButtonPress", (timeout_internal, )) 600 } 601 register_suspend_delay(&self, serialized_request_proto: Vec<u8>) -> Result<Vec<u8>, dbus::Error>602 fn register_suspend_delay(&self, serialized_request_proto: Vec<u8>) -> Result<Vec<u8>, dbus::Error> { 603 self.method_call("org.chromium.PowerManager", "RegisterSuspendDelay", (serialized_request_proto, )) 604 .and_then(|r: (Vec<u8>, )| Ok(r.0, )) 605 } 606 unregister_suspend_delay(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>607 fn unregister_suspend_delay(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> { 608 self.method_call("org.chromium.PowerManager", "UnregisterSuspendDelay", (serialized_proto, )) 609 } 610 handle_suspend_readiness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>611 fn handle_suspend_readiness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> { 612 self.method_call("org.chromium.PowerManager", "HandleSuspendReadiness", (serialized_proto, )) 613 } 614 register_dark_suspend_delay(&self, serialized_request_proto: Vec<u8>) -> Result<Vec<u8>, dbus::Error>615 fn register_dark_suspend_delay(&self, serialized_request_proto: Vec<u8>) -> Result<Vec<u8>, dbus::Error> { 616 self.method_call("org.chromium.PowerManager", "RegisterDarkSuspendDelay", (serialized_request_proto, )) 617 .and_then(|r: (Vec<u8>, )| Ok(r.0, )) 618 } 619 unregister_dark_suspend_delay(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>620 fn unregister_dark_suspend_delay(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> { 621 self.method_call("org.chromium.PowerManager", "UnregisterDarkSuspendDelay", (serialized_proto, )) 622 } 623 handle_dark_suspend_readiness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>624 fn handle_dark_suspend_readiness(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> { 625 self.method_call("org.chromium.PowerManager", "HandleDarkSuspendReadiness", (serialized_proto, )) 626 } 627 record_dark_resume_wake_reason(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>628 fn record_dark_resume_wake_reason(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> { 629 self.method_call("org.chromium.PowerManager", "RecordDarkResumeWakeReason", (serialized_proto, )) 630 } 631 get_inactivity_delays(&self) -> Result<Vec<u8>, dbus::Error>632 fn get_inactivity_delays(&self) -> Result<Vec<u8>, dbus::Error> { 633 self.method_call("org.chromium.PowerManager", "GetInactivityDelays", ()) 634 .and_then(|r: (Vec<u8>, )| Ok(r.0, )) 635 } 636 has_ambient_color_device(&self) -> Result<bool, dbus::Error>637 fn has_ambient_color_device(&self) -> Result<bool, dbus::Error> { 638 self.method_call("org.chromium.PowerManager", "HasAmbientColorDevice", ()) 639 .and_then(|r: (bool, )| Ok(r.0, )) 640 } 641 get_thermal_state(&self) -> Result<Vec<u8>, dbus::Error>642 fn get_thermal_state(&self) -> Result<Vec<u8>, dbus::Error> { 643 self.method_call("org.chromium.PowerManager", "GetThermalState", ()) 644 .and_then(|r: (Vec<u8>, )| Ok(r.0, )) 645 } 646 set_external_display_alsbrightness(&self, enabled: bool) -> Result<(), dbus::Error>647 fn set_external_display_alsbrightness(&self, enabled: bool) -> Result<(), dbus::Error> { 648 self.method_call("org.chromium.PowerManager", "SetExternalDisplayALSBrightness", (enabled, )) 649 } 650 get_external_display_alsbrightness(&self) -> Result<bool, dbus::Error>651 fn get_external_display_alsbrightness(&self) -> Result<bool, dbus::Error> { 652 self.method_call("org.chromium.PowerManager", "GetExternalDisplayALSBrightness", ()) 653 .and_then(|r: (bool, )| Ok(r.0, )) 654 } 655 charge_now_for_adaptive_charging(&self) -> Result<(), dbus::Error>656 fn charge_now_for_adaptive_charging(&self) -> Result<(), dbus::Error> { 657 self.method_call("org.chromium.PowerManager", "ChargeNowForAdaptiveCharging", ()) 658 } 659 get_charge_history(&self) -> Result<Vec<u8>, dbus::Error>660 fn get_charge_history(&self) -> Result<Vec<u8>, dbus::Error> { 661 self.method_call("org.chromium.PowerManager", "GetChargeHistory", ()) 662 .and_then(|r: (Vec<u8>, )| Ok(r.0, )) 663 } 664 get_battery_saver_mode_state(&self) -> Result<Vec<u8>, dbus::Error>665 fn get_battery_saver_mode_state(&self) -> Result<Vec<u8>, dbus::Error> { 666 self.method_call("org.chromium.PowerManager", "GetBatterySaverModeState", ()) 667 .and_then(|r: (Vec<u8>, )| Ok(r.0, )) 668 } 669 set_battery_saver_mode_state(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error>670 fn set_battery_saver_mode_state(&self, serialized_proto: Vec<u8>) -> Result<(), dbus::Error> { 671 self.method_call("org.chromium.PowerManager", "SetBatterySaverModeState", (serialized_proto, )) 672 } 673 has_ambient_light_sensor(&self) -> Result<bool, dbus::Error>674 fn has_ambient_light_sensor(&self) -> Result<bool, dbus::Error> { 675 self.method_call("org.chromium.PowerManager", "HasAmbientLightSensor", ()) 676 .and_then(|r: (bool, )| Ok(r.0, )) 677 } 678 set_ambient_light_sensor_enabled(&self, enabled: bool) -> Result<(), dbus::Error>679 fn set_ambient_light_sensor_enabled(&self, enabled: bool) -> Result<(), dbus::Error> { 680 self.method_call("org.chromium.PowerManager", "SetAmbientLightSensorEnabled", (enabled, )) 681 } 682 battery_state_poll(&self) -> Result<(u32, u32, f64), dbus::Error>683 fn battery_state_poll(&self) -> Result<(u32, u32, f64), dbus::Error> { 684 self.method_call("org.chromium.PowerManager", "BatteryStatePoll", ()) 685 } 686 } 687