power: Add interface for accessing platform-profiles

This commit is contained in:
Vicki Pfau 2025-03-20 16:21:26 -07:00
parent b26cc0f45c
commit 45edfe2c7c
10 changed files with 305 additions and 12 deletions

View file

@ -23,6 +23,7 @@ mod gpu_performance_level1;
mod gpu_power_profile1;
mod hdmi_cec1;
mod manager2;
mod performance_profile1;
mod storage1;
mod tdp_limit1;
mod update_bios1;
@ -39,6 +40,7 @@ pub use crate::proxy::gpu_performance_level1::GpuPerformanceLevel1Proxy;
pub use crate::proxy::gpu_power_profile1::GpuPowerProfile1Proxy;
pub use crate::proxy::hdmi_cec1::HdmiCec1Proxy;
pub use crate::proxy::manager2::Manager2Proxy;
pub use crate::proxy::performance_profile1::PerformanceProfile1Proxy;
pub use crate::proxy::storage1::Storage1Proxy;
pub use crate::proxy::tdp_limit1::TdpLimit1Proxy;
pub use crate::proxy::update_bios1::UpdateBios1Proxy;

View file

@ -0,0 +1,35 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.PerformanceProfile1`
//!
//! This code was generated by `zbus-xmlgen` `5.1.0` 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.PerformanceProfile1",
default_service = "com.steampowered.SteamOSManager1",
default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true
)]
pub trait PerformanceProfile1 {
/// AvailablePerformanceProfiles property
#[zbus(property)]
fn available_performance_profiles(&self) -> zbus::Result<Vec<String>>;
/// PerformanceProfile property
#[zbus(property)]
fn performance_profile(&self) -> zbus::Result<String>;
#[zbus(property)]
fn set_performance_profile(&self, value: &str) -> zbus::Result<()>;
/// SuggestedDefaultPerformanceProfile property
#[zbus(property)]
fn suggested_default_performance_profile(&self) -> zbus::Result<String>;
}