manager/user: Add BatteryChargeLimit1 interface (#12)

This commit is contained in:
Vicki Pfau 2025-01-13 22:42:22 -08:00
parent 02ed562bd0
commit 91890e5948
10 changed files with 292 additions and 36 deletions

View file

@ -0,0 +1,31 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.BatteryChargeLimit1`
//!
//! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`.
//!
//! You may prefer to adapt it, instead of using it verbatim.
//!
//! More information can be found in the [Writing a client proxy] section of the zbus
//! documentation.
//!
//!
//! [Writing a client proxy]: https://dbus2.github.io/zbus/client.html
//! [D-Bus standard interfaces]: https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces,
use zbus::proxy;
#[proxy(
interface = "com.steampowered.SteamOSManager1.BatteryChargeLimit1",
default_service = "com.steampowered.SteamOSManager1",
default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true
)]
pub trait BatteryChargeLimit1 {
/// MaxChargeLevel property
#[zbus(property)]
fn max_charge_level(&self) -> zbus::Result<i32>;
#[zbus(property)]
fn set_max_charge_level(&self, value: i32) -> zbus::Result<()>;
/// SuggestedMinimumLimit property
#[zbus(property)]
fn suggested_minimum_limit(&self) -> zbus::Result<i32>;
}

View file

@ -15,6 +15,7 @@ pub use crate::proxy::manager::ManagerProxy;
// Optional interfaces
mod ambient_light_sensor1;
mod battery_charge_limit1;
mod cpu_scaling1;
mod factory_reset1;
mod fan_control1;
@ -30,6 +31,7 @@ mod wifi_debug1;
mod wifi_debug_dump1;
mod wifi_power_management1;
pub use crate::proxy::ambient_light_sensor1::AmbientLightSensor1Proxy;
pub use crate::proxy::battery_charge_limit1::BatteryChargeLimit1Proxy;
pub use crate::proxy::cpu_scaling1::CpuScaling1Proxy;
pub use crate::proxy::factory_reset1::FactoryReset1Proxy;
pub use crate::proxy::fan_control1::FanControl1Proxy;