steamos-manager/src/proxy.rs
Jeremy Whiting 93e153079d Rework the CPUGovernors enum a bit.
Change to CPUScalingGovernors and use strum
crate to remove some cruft.
2024-06-28 08:59:11 -06:00

178 lines
5.5 KiB
Rust

//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.Manager`
//! and `com.steampowered.SteamOSManager1.Job`
//!
//! This code was generated by `zbus-xmlgen` `4.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(
default_service = "com.steampowered.SteamOSManager1",
default_path = "/com/steampowered/SteamOSManager1",
interface = "com.steampowered.SteamOSManager1.Manager"
)]
trait Manager {
/// FormatDevice method
fn format_device(
&self,
device: &str,
label: &str,
validate: bool,
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
/// GetAlsIntegrationTimeFileDescriptor method
fn get_als_integration_time_file_descriptor(&self) -> zbus::Result<zbus::zvariant::OwnedFd>;
/// PrepareFactoryReset method
fn prepare_factory_reset(&self) -> zbus::Result<u32>;
/// SetWifiDebugMode method
fn set_wifi_debug_mode(&self, mode: u32, buffer_size: u32) -> zbus::Result<()>;
/// TrimDevices method
fn trim_devices(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
/// UpdateBios method
fn update_bios(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
/// UpdateDock method
fn update_dock(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
/// ReloadConfig method
fn reload_config(&self) -> zbus::Result<()>;
/// AlsCalibrationGain property
#[zbus(property)]
fn als_calibration_gain(&self) -> zbus::Result<f64>;
/// FanControlState property
#[zbus(property)]
fn fan_control_state(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn set_fan_control_state(&self, value: u32) -> zbus::Result<()>;
/// GpuPerformanceLevel property
#[zbus(property)]
fn gpu_performance_level(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn set_gpu_performance_level(&self, value: u32) -> zbus::Result<()>;
/// CpuScalingGovernor property
#[zbus(property)]
fn cpu_scaling_governor(&self) -> zbus::Result<String>;
#[zbus(property)]
fn set_cpu_scaling_governor(&self, value: String) -> zbus::Result<()>;
/// AvailableCpuScalingGovernors property
#[zbus(property)]
fn available_cpu_scaling_governors(&self) -> zbus::Result<Vec<String>>;
/// GpuPowerProfile property
#[zbus(property)]
fn gpu_power_profile(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn set_gpu_power_profile(&self, value: u32) -> zbus::Result<()>;
/// GpuPowerProfiles property
#[zbus(property)]
fn gpu_power_profiles(&self) -> zbus::Result<std::collections::HashMap<u32, String>>;
/// HardwareCurrentlySupported property
#[zbus(property)]
fn hardware_currently_supported(&self) -> zbus::Result<u32>;
/// HdmiCecState property
#[zbus(property)]
fn hdmi_cec_state(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn set_hdmi_cec_state(&self, value: u32) -> zbus::Result<()>;
/// ManualGpuClock property
#[zbus(property)]
fn manual_gpu_clock(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn set_manual_gpu_clock(&self, value: u32) -> zbus::Result<()>;
/// ManualGpuClockMax property
#[zbus(property)]
fn manual_gpu_clock_max(&self) -> zbus::Result<u32>;
/// ManualGpuClockMin property
#[zbus(property)]
fn manual_gpu_clock_min(&self) -> zbus::Result<u32>;
/// TdpLimit property
#[zbus(property)]
fn tdp_limit(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn set_tdp_limit(&self, value: u32) -> zbus::Result<()>;
/// TdpLimitMax property
#[zbus(property)]
fn tdp_limit_max(&self) -> zbus::Result<u32>;
/// TdpLimitMin property
#[zbus(property)]
fn tdp_limit_min(&self) -> zbus::Result<u32>;
/// Version property
#[zbus(property)]
fn version(&self) -> zbus::Result<u32>;
/// WifiBackend property
#[zbus(property)]
fn wifi_backend(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn set_wifi_backend(&self, value: u32) -> zbus::Result<()>;
/// WifiDebugModeState property
#[zbus(property)]
fn wifi_debug_mode_state(&self) -> zbus::Result<u32>;
/// WifiPowerManagementState property
#[zbus(property)]
fn wifi_power_management_state(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn set_wifi_power_management_state(&self, value: u32) -> zbus::Result<()>;
}
#[proxy(
interface = "com.steampowered.SteamOSManager1.UdevEvents",
default_service = "com.steampowered.SteamOSManager1",
default_path = "/com/steampowered/SteamOSManager1/UdevEvents"
)]
trait UdevEvents {
/// OverCurrent signal
#[zbus(signal)]
fn over_current(&self, devpath: &str, port: &str, count: u64) -> zbus::Result<()>;
}
#[proxy(
default_service = "com.steampowered.SteamOSManager1",
interface = "com.steampowered.SteamOSManager1.Job",
assume_defaults = true
)]
trait Job {
/// Cancel method
fn cancel(&self, force: bool) -> zbus::Result<()>;
/// ExitCode method
fn exit_code(&self) -> zbus::Result<i32>;
/// Pause method
fn pause(&self) -> zbus::Result<()>;
/// Resume method
fn resume(&self) -> zbus::Result<()>;
/// Wait method
fn wait(&self) -> zbus::Result<i32>;
}