diff --git a/src/bin/steamosctl.rs b/src/bin/steamosctl.rs index a8e3438..94fa56d 100644 --- a/src/bin/steamosctl.rs +++ b/src/bin/steamosctl.rs @@ -235,7 +235,9 @@ async fn main() -> Result<()> { } } Commands::SetCpuScalingGovernor { governor } => { - proxy.set_cpu_scaling_governor(governor.to_string()).await?; + proxy + .set_cpu_scaling_governor(governor.to_string().as_str()) + .await?; } Commands::GetGPUPowerProfiles => { let profiles = proxy.gpu_power_profiles().await?; diff --git a/src/proxy/ambient_light_sensor1.rs b/src/proxy/ambient_light_sensor1.rs new file mode 100644 index 0000000..2b33d1b --- /dev/null +++ b/src/proxy/ambient_light_sensor1.rs @@ -0,0 +1,28 @@ +//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.AmbientLightSensor1` +//! +//! 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( + interface = "com.steampowered.SteamOSManager1.AmbientLightSensor1", + default_service = "com.steampowered.SteamOSManager1", + default_path = "/com/steampowered/SteamOSManager1", + assume_defaults = true +)] +trait AmbientLightSensor1 { + /// GetAlsIntegrationTimeFileDescriptor method + fn get_als_integration_time_file_descriptor(&self) -> zbus::Result; + + /// AlsCalibrationGain property + #[zbus(property)] + fn als_calibration_gain(&self) -> zbus::Result; +} diff --git a/src/proxy/cpu_scaling1.rs b/src/proxy/cpu_scaling1.rs new file mode 100644 index 0000000..e63666d --- /dev/null +++ b/src/proxy/cpu_scaling1.rs @@ -0,0 +1,31 @@ +//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.CpuScaling1` +//! +//! 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( + interface = "com.steampowered.SteamOSManager1.CpuScaling1", + default_service = "com.steampowered.SteamOSManager1", + default_path = "/com/steampowered/SteamOSManager1", + assume_defaults = true +)] +trait CpuScaling1 { + /// AvailableCpuScalingGovernors property + #[zbus(property)] + fn available_cpu_scaling_governors(&self) -> zbus::Result>; + + /// CpuScalingGovernor property + #[zbus(property)] + fn cpu_scaling_governor(&self) -> zbus::Result; + #[zbus(property)] + fn set_cpu_scaling_governor(&self, value: &str) -> zbus::Result<()>; +} diff --git a/src/proxy/factory_reset1.rs b/src/proxy/factory_reset1.rs new file mode 100644 index 0000000..5c5885d --- /dev/null +++ b/src/proxy/factory_reset1.rs @@ -0,0 +1,24 @@ +//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.FactoryReset1` +//! +//! 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( + interface = "com.steampowered.SteamOSManager1.FactoryReset1", + default_service = "com.steampowered.SteamOSManager1", + default_path = "/com/steampowered/SteamOSManager1", + assume_defaults = true +)] +trait FactoryReset1 { + /// PrepareFactoryReset method + fn prepare_factory_reset(&self) -> zbus::Result; +} diff --git a/src/proxy/fan_control1.rs b/src/proxy/fan_control1.rs new file mode 100644 index 0000000..75a7d57 --- /dev/null +++ b/src/proxy/fan_control1.rs @@ -0,0 +1,27 @@ +//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.FanControl1` +//! +//! 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( + interface = "com.steampowered.SteamOSManager1.FanControl1", + default_service = "com.steampowered.SteamOSManager1", + default_path = "/com/steampowered/SteamOSManager1", + assume_defaults = true +)] +trait FanControl1 { + /// FanControlState property + #[zbus(property)] + fn fan_control_state(&self) -> zbus::Result; + #[zbus(property)] + fn set_fan_control_state(&self, value: u32) -> zbus::Result<()>; +} diff --git a/src/proxy/gpu_performance_level1.rs b/src/proxy/gpu_performance_level1.rs new file mode 100644 index 0000000..068c8a5 --- /dev/null +++ b/src/proxy/gpu_performance_level1.rs @@ -0,0 +1,45 @@ +//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.GpuPerformanceLevel1` +//! +//! 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( + interface = "com.steampowered.SteamOSManager1.GpuPerformanceLevel1", + default_service = "com.steampowered.SteamOSManager1", + default_path = "/com/steampowered/SteamOSManager1", + assume_defaults = true +)] +trait GpuPerformanceLevel1 { + /// AvailableGpuPerformanceLevels property + #[zbus(property)] + fn available_gpu_performance_levels(&self) -> zbus::Result>; + + /// GpuPerformanceLevel property + #[zbus(property)] + fn gpu_performance_level(&self) -> zbus::Result; + #[zbus(property)] + fn set_gpu_performance_level(&self, value: &str) -> zbus::Result<()>; + + /// ManualGpuClock property + #[zbus(property)] + fn manual_gpu_clock(&self) -> zbus::Result; + #[zbus(property)] + fn set_manual_gpu_clock(&self, value: u32) -> zbus::Result<()>; + + /// ManualGpuClockMax property + #[zbus(property)] + fn manual_gpu_clock_max(&self) -> zbus::Result; + + /// ManualGpuClockMin property + #[zbus(property)] + fn manual_gpu_clock_min(&self) -> zbus::Result; +} diff --git a/src/proxy/gpu_power_profile1.rs b/src/proxy/gpu_power_profile1.rs new file mode 100644 index 0000000..7d08ada --- /dev/null +++ b/src/proxy/gpu_power_profile1.rs @@ -0,0 +1,31 @@ +//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.GpuPowerProfile1` +//! +//! 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( + interface = "com.steampowered.SteamOSManager1.GpuPowerProfile1", + default_service = "com.steampowered.SteamOSManager1", + default_path = "/com/steampowered/SteamOSManager1", + assume_defaults = true +)] +trait GpuPowerProfile1 { + /// AvailableGpuPowerProfiles property + #[zbus(property)] + fn available_gpu_power_profiles(&self) -> zbus::Result>; + + /// GpuPowerProfile property + #[zbus(property)] + fn gpu_power_profile(&self) -> zbus::Result; + #[zbus(property)] + fn set_gpu_power_profile(&self, value: &str) -> zbus::Result<()>; +} diff --git a/src/proxy/gpu_tdp_limit1.rs b/src/proxy/gpu_tdp_limit1.rs new file mode 100644 index 0000000..5f75e14 --- /dev/null +++ b/src/proxy/gpu_tdp_limit1.rs @@ -0,0 +1,35 @@ +//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.GpuTdpLimit1` +//! +//! 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( + interface = "com.steampowered.SteamOSManager1.GpuTdpLimit1", + default_service = "com.steampowered.SteamOSManager1", + default_path = "/com/steampowered/SteamOSManager1", + assume_defaults = true +)] +trait GpuTdpLimit1 { + /// TdpLimit property + #[zbus(property)] + fn tdp_limit(&self) -> zbus::Result; + #[zbus(property)] + fn set_tdp_limit(&self, value: u32) -> zbus::Result<()>; + + /// TdpLimitMax property + #[zbus(property)] + fn tdp_limit_max(&self) -> zbus::Result; + + /// TdpLimitMin property + #[zbus(property)] + fn tdp_limit_min(&self) -> zbus::Result; +} diff --git a/src/proxy/hdmi_cec1.rs b/src/proxy/hdmi_cec1.rs new file mode 100644 index 0000000..0846940 --- /dev/null +++ b/src/proxy/hdmi_cec1.rs @@ -0,0 +1,27 @@ +//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.HdmiCec1` +//! +//! 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( + interface = "com.steampowered.SteamOSManager1.HdmiCec1", + default_service = "com.steampowered.SteamOSManager1", + default_path = "/com/steampowered/SteamOSManager1", + assume_defaults = true +)] +trait HdmiCec1 { + /// HdmiCecState property + #[zbus(property)] + fn hdmi_cec_state(&self) -> zbus::Result; + #[zbus(property)] + fn set_hdmi_cec_state(&self, value: u32) -> zbus::Result<()>; +} diff --git a/src/proxy/job.rs b/src/proxy/job.rs new file mode 100644 index 0000000..c944f9b --- /dev/null +++ b/src/proxy/job.rs @@ -0,0 +1,35 @@ +//! # D-Bus interface proxy for: `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( + interface = "com.steampowered.SteamOSManager1.Job", + default_service = "com.steampowered.SteamOSManager1", + assume_defaults = true +)] +trait Job { + /// Cancel method + fn cancel(&self, force: bool) -> zbus::Result<()>; + + /// ExitCode method + fn exit_code(&self) -> zbus::Result; + + /// Pause method + fn pause(&self) -> zbus::Result<()>; + + /// Resume method + fn resume(&self) -> zbus::Result<()>; + + /// Wait method + fn wait(&self) -> zbus::Result; +} diff --git a/src/proxy/job_manager.rs b/src/proxy/job_manager.rs new file mode 100644 index 0000000..0153cec --- /dev/null +++ b/src/proxy/job_manager.rs @@ -0,0 +1,25 @@ +//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.JobManager` +//! +//! 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( + interface = "com.steampowered.SteamOSManager1.JobManager", + default_service = "com.steampowered.SteamOSManager1", + default_path = "/com/steampowered/SteamOSManager1/Jobs", + assume_defaults = true +)] +trait JobManager { + /// JobStarted signal + #[zbus(signal)] + fn job_started(&self, job: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>; +} diff --git a/src/proxy.rs b/src/proxy/manager.rs similarity index 76% rename from src/proxy.rs rename to src/proxy/manager.rs index 5698269..307e95c 100644 --- a/src/proxy.rs +++ b/src/proxy/manager.rs @@ -1,8 +1,7 @@ //! # 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`. +//! Source: `com.steampowered.SteamOSManager1.Manager.xml`. //! //! You may prefer to adapt it, instead of using it verbatim. //! @@ -13,11 +12,11 @@ //! [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.Manager", default_service = "com.steampowered.SteamOSManager1", default_path = "/com/steampowered/SteamOSManager1", - interface = "com.steampowered.SteamOSManager1.Manager" + assume_defaults = true )] trait Manager { /// FormatDevice method @@ -34,6 +33,9 @@ trait Manager { /// PrepareFactoryReset method fn prepare_factory_reset(&self) -> zbus::Result; + /// ReloadConfig method + fn reload_config(&self) -> zbus::Result<()>; + /// SetWifiDebugMode method fn set_wifi_debug_mode(&self, mode: u32, buffer_size: u32) -> zbus::Result<()>; @@ -46,13 +48,20 @@ trait Manager { /// UpdateDock method fn update_dock(&self) -> zbus::Result; - /// ReloadConfig method - fn reload_config(&self) -> zbus::Result<()>; - /// AlsCalibrationGain property #[zbus(property)] fn als_calibration_gain(&self) -> zbus::Result; + /// AvailableCpuScalingGovernors property + #[zbus(property)] + fn available_cpu_scaling_governors(&self) -> zbus::Result>; + + /// CpuScalingGovernor property + #[zbus(property)] + fn cpu_scaling_governor(&self) -> zbus::Result; + #[zbus(property)] + fn set_cpu_scaling_governor(&self, value: &str) -> zbus::Result<()>; + /// FanControlState property #[zbus(property)] fn fan_control_state(&self) -> zbus::Result; @@ -65,16 +74,6 @@ trait Manager { #[zbus(property)] fn set_gpu_performance_level(&self, value: u32) -> zbus::Result<()>; - /// CpuScalingGovernor property - #[zbus(property)] - fn cpu_scaling_governor(&self) -> zbus::Result; - #[zbus(property)] - fn set_cpu_scaling_governor(&self, value: String) -> zbus::Result<()>; - - /// AvailableCpuScalingGovernors property - #[zbus(property)] - fn available_cpu_scaling_governors(&self) -> zbus::Result>; - /// GpuPowerProfile property #[zbus(property)] fn gpu_power_profile(&self) -> zbus::Result; @@ -143,47 +142,3 @@ trait Manager { #[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; - - /// Pause method - fn pause(&self) -> zbus::Result<()>; - - /// Resume method - fn resume(&self) -> zbus::Result<()>; - - /// Wait method - fn wait(&self) -> zbus::Result; -} - -#[proxy( - default_service = "com.steampowered.SteamOSManager1", - default_path = "/com/steampowered/SteamOSManager1/Jobs", - interface = "com.steampowered.SteamOSManager1.JobManager" -)] -trait JobManager { - /// JobStarted signal - #[zbus(signal)] - fn job_started(&self, job: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>; -} diff --git a/src/proxy/manager2.rs b/src/proxy/manager2.rs new file mode 100644 index 0000000..9514e9b --- /dev/null +++ b/src/proxy/manager2.rs @@ -0,0 +1,28 @@ +//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.Manager2` +//! +//! 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( + interface = "com.steampowered.SteamOSManager1.Manager2", + default_service = "com.steampowered.SteamOSManager1", + default_path = "/com/steampowered/SteamOSManager1", + assume_defaults = true +)] +trait Manager2 { + /// ReloadConfig method + fn reload_config(&self) -> zbus::Result<()>; + + /// HardwareCurrentlySupported property + #[zbus(property)] + fn hardware_currently_supported(&self) -> zbus::Result; +} diff --git a/src/proxy/mod.rs b/src/proxy/mod.rs new file mode 100644 index 0000000..72f49a5 --- /dev/null +++ b/src/proxy/mod.rs @@ -0,0 +1,50 @@ +/* + * Copyright © 2023 Collabora Ltd. + * Copyright © 2024 Valve Software + * + * SPDX-License-Identifier: MIT + */ + +// Re-export relevant proxies + +// TODO Some of these should get renamed +mod job; +mod job_manager; +mod udev_events; +pub use crate::proxy::job::JobProxy; +pub use crate::proxy::job_manager::JobManagerProxy; +pub use crate::proxy::udev_events::UdevEventsProxy; + +// Deprecated interface +mod manager; +pub use crate::proxy::manager::ManagerProxy; + +// Optional interfaces +mod ambient_light_sensor1; +mod cpu_scaling1; +mod factory_reset1; +mod fan_control1; +mod gpu_performance_level1; +mod gpu_power_profile1; +mod gpu_tdp_limit1; +mod hdmi_cec1; +mod manager2; +mod storage1; +mod update_bios1; +mod update_dock1; +mod wifi_debug1; +mod wifi_power_management1; +pub use crate::proxy::ambient_light_sensor1::AmbientLightSensor1Proxy; +pub use crate::proxy::cpu_scaling1::CpuScaling1Proxy; +pub use crate::proxy::factory_reset1::FactoryReset1Proxy; +pub use crate::proxy::fan_control1::FanControl1Proxy; +pub use crate::proxy::gpu_performance_level1::GpuPerformanceLevel1Proxy; +pub use crate::proxy::gpu_power_profile1::GpuPowerProfile1Proxy; +pub use crate::proxy::gpu_tdp_limit1::GpuTdpLimit1Proxy; +pub use crate::proxy::hdmi_cec1::HdmiCec1Proxy; +pub use crate::proxy::manager2::Manager2Proxy; +pub use crate::proxy::storage1::Storage1Proxy; +pub use crate::proxy::update_bios1::UpdateBios1Proxy; +pub use crate::proxy::update_dock1::UpdateDock1Proxy; +pub use crate::proxy::wifi_debug1::WifiDebug1Proxy; +pub use crate::proxy::wifi_power_management1::WifiPowerManagement1Proxy; diff --git a/src/proxy/storage1.rs b/src/proxy/storage1.rs new file mode 100644 index 0000000..4f78182 --- /dev/null +++ b/src/proxy/storage1.rs @@ -0,0 +1,32 @@ +//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.Storage1` +//! +//! 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( + interface = "com.steampowered.SteamOSManager1.Storage1", + default_service = "com.steampowered.SteamOSManager1", + default_path = "/com/steampowered/SteamOSManager1", + assume_defaults = true +)] +trait Storage1 { + /// FormatDevice method + fn format_device( + &self, + device: &str, + label: &str, + validate: bool, + ) -> zbus::Result; + + /// TrimDevices method + fn trim_devices(&self) -> zbus::Result; +} diff --git a/src/proxy/udev_events.rs b/src/proxy/udev_events.rs new file mode 100644 index 0000000..bce44b2 --- /dev/null +++ b/src/proxy/udev_events.rs @@ -0,0 +1,25 @@ +//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.UdevEvents` +//! +//! 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( + interface = "com.steampowered.SteamOSManager1.UdevEvents", + default_service = "com.steampowered.SteamOSManager1", + default_path = "/com/steampowered/SteamOSManager1/UdevEvents", + assume_defaults = true +)] +trait UdevEvents { + /// OverCurrent signal + #[zbus(signal)] + fn over_current(&self, devpath: &str, port: &str, count: u64) -> zbus::Result<()>; +} diff --git a/src/proxy/update_bios1.rs b/src/proxy/update_bios1.rs new file mode 100644 index 0000000..096aee2 --- /dev/null +++ b/src/proxy/update_bios1.rs @@ -0,0 +1,24 @@ +//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.UpdateBios1` +//! +//! 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( + interface = "com.steampowered.SteamOSManager1.UpdateBios1", + default_service = "com.steampowered.SteamOSManager1", + default_path = "/com/steampowered/SteamOSManager1", + assume_defaults = true +)] +trait UpdateBios1 { + /// UpdateBios method + fn update_bios(&self) -> zbus::Result; +} diff --git a/src/proxy/update_dock1.rs b/src/proxy/update_dock1.rs new file mode 100644 index 0000000..5226fe1 --- /dev/null +++ b/src/proxy/update_dock1.rs @@ -0,0 +1,24 @@ +//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.UpdateDock1` +//! +//! 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( + interface = "com.steampowered.SteamOSManager1.UpdateDock1", + default_service = "com.steampowered.SteamOSManager1", + default_path = "/com/steampowered/SteamOSManager1", + assume_defaults = true +)] +trait UpdateDock1 { + /// UpdateDock method + fn update_dock(&self) -> zbus::Result; +} diff --git a/src/proxy/wifi_debug1.rs b/src/proxy/wifi_debug1.rs new file mode 100644 index 0000000..7c8cf35 --- /dev/null +++ b/src/proxy/wifi_debug1.rs @@ -0,0 +1,38 @@ +//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.WifiDebug1` +//! +//! 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( + interface = "com.steampowered.SteamOSManager1.WifiDebug1", + default_service = "com.steampowered.SteamOSManager1", + default_path = "/com/steampowered/SteamOSManager1", + assume_defaults = true +)] +trait WifiDebug1 { + /// SetWifiDebugMode method + fn set_wifi_debug_mode( + &self, + mode: u32, + options: std::collections::HashMap<&str, &zbus::zvariant::Value<'_>>, + ) -> zbus::Result<()>; + + /// WifiBackend property + #[zbus(property)] + fn wifi_backend(&self) -> zbus::Result; + #[zbus(property)] + fn set_wifi_backend(&self, value: &str) -> zbus::Result<()>; + + /// WifiDebugModeState property + #[zbus(property)] + fn wifi_debug_mode_state(&self) -> zbus::Result; +} diff --git a/src/proxy/wifi_power_management1.rs b/src/proxy/wifi_power_management1.rs new file mode 100644 index 0000000..aa59097 --- /dev/null +++ b/src/proxy/wifi_power_management1.rs @@ -0,0 +1,27 @@ +//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.WifiPowerManagement1` +//! +//! 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( + interface = "com.steampowered.SteamOSManager1.WifiPowerManagement1", + default_service = "com.steampowered.SteamOSManager1", + default_path = "/com/steampowered/SteamOSManager1", + assume_defaults = true +)] +trait WifiPowerManagement1 { + /// WifiPowerManagementState property + #[zbus(property)] + fn wifi_power_management_state(&self) -> zbus::Result; + #[zbus(property)] + fn set_wifi_power_management_state(&self, value: u32) -> zbus::Result<()>; +}