mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-14 02:11:54 -04:00
manager: Fix method/property capitalization consistency
This commit is contained in:
parent
1df02e776f
commit
1e39dce571
2 changed files with 41 additions and 41 deletions
|
@ -76,7 +76,7 @@
|
|||
<property name="HardwareCurrentlySupported" type="u" access="read"/>
|
||||
|
||||
<!--
|
||||
ALSCalibrationGain:
|
||||
AlsCalibrationGain:
|
||||
|
||||
Provides the ALS calibration value.
|
||||
|
||||
|
@ -84,7 +84,7 @@
|
|||
|
||||
Version available: 7
|
||||
-->
|
||||
<property name="ALSCalibrationGain" type="d" access="read"/>
|
||||
<property name="AlsCalibrationGain" type="d" access="read"/>
|
||||
|
||||
<!--
|
||||
GetAlsIntegrationTimeFileDescriptor:
|
||||
|
@ -101,13 +101,13 @@
|
|||
</method>
|
||||
|
||||
<!--
|
||||
UpdateBIOS:
|
||||
UpdateBios:
|
||||
|
||||
Perform a BIOS update.
|
||||
|
||||
Version available: 7
|
||||
-->
|
||||
<method name="UpdateBIOS" />
|
||||
<method name="UpdateBios" />
|
||||
|
||||
<!--
|
||||
UpdateDock:
|
||||
|
@ -147,7 +147,7 @@
|
|||
</method>
|
||||
|
||||
<!--
|
||||
GPUPerformanceLevel:
|
||||
GpuPerformanceLevel:
|
||||
|
||||
The current GPU performance level.
|
||||
|
||||
|
@ -155,64 +155,64 @@
|
|||
|
||||
Version available: 7
|
||||
-->
|
||||
<property name="GPUPerformanceLevel" type="u" access="readwrite"/>
|
||||
<property name="GpuPerformanceLevel" type="u" access="readwrite"/>
|
||||
|
||||
<!--
|
||||
ManualGPUClock:
|
||||
ManualGpuClock:
|
||||
|
||||
Controls the GPU clock frequency in MHz when GPUPerformanceLevel is set to Manual
|
||||
|
||||
Version available: 7
|
||||
-->
|
||||
<property name="ManualGPUClock" type="u" access="readwrite"/>
|
||||
<property name="ManualGpuClock" type="u" access="readwrite"/>
|
||||
|
||||
<!--
|
||||
ManualGPUClockMin:
|
||||
ManualGpuClockMin:
|
||||
|
||||
Minimum frequency allowed for GPU clocks.
|
||||
|
||||
Version available: 7
|
||||
-->
|
||||
<property name="ManualGPUClockMin" type="u" access="read"/>
|
||||
<property name="ManualGpuClockMin" type="u" access="read"/>
|
||||
|
||||
<!--
|
||||
ManualGPUClockMax:
|
||||
ManualGpuClockMax:
|
||||
|
||||
Maximum frequency allowed for GPU clocks.
|
||||
|
||||
Version available: 7
|
||||
-->
|
||||
<property name="ManualGPUClockMax" type="u" access="read"/>
|
||||
<property name="ManualGpuClockMax" type="u" access="read"/>
|
||||
|
||||
|
||||
<!--
|
||||
TDPLimit:
|
||||
TdpLimit:
|
||||
|
||||
Controls the system TDP limit.
|
||||
|
||||
Valid states: In range of [ TDPLimitMin, TDPLimitMax ]
|
||||
Valid states: In range of [ TdpLimitMin, TdpLimitMax ]
|
||||
|
||||
Version available: 7
|
||||
-->
|
||||
<property name="TDPLimit" type="u" access="readwrite"/>
|
||||
<property name="TdpLimit" type="u" access="readwrite"/>
|
||||
|
||||
<!--
|
||||
TDPLimitMin:
|
||||
TdpLimitMin:
|
||||
|
||||
Minimum allowed TDP Limit
|
||||
|
||||
Version available: 7
|
||||
-->
|
||||
<property name="TDPLimitMin" type="u" access="read"/>
|
||||
<property name="TdpLimitMin" type="u" access="read"/>
|
||||
|
||||
<!--
|
||||
TDPLimitMax:
|
||||
TdpLimitMax:
|
||||
|
||||
Maximum allowed TDP Limit
|
||||
|
||||
Version available: 7
|
||||
-->
|
||||
<property name="TDPLimitMax" type="u" access="read"/>
|
||||
<property name="TdpLimitMax" type="u" access="read"/>
|
||||
|
||||
|
||||
<!--
|
||||
|
|
|
@ -187,7 +187,7 @@ impl SteamOSManager {
|
|||
.map_err(anyhow_to_zbus_fdo)
|
||||
}
|
||||
|
||||
#[zbus(property(emits_changed_signal = "false"), name = "GPUPerformanceLevel")]
|
||||
#[zbus(property(emits_changed_signal = "false"))]
|
||||
async fn gpu_performance_level(&self) -> zbus::fdo::Result<u32> {
|
||||
match get_gpu_performance_level().await {
|
||||
Ok(level) => Ok(level as u32),
|
||||
|
@ -198,7 +198,7 @@ impl SteamOSManager {
|
|||
}
|
||||
}
|
||||
|
||||
#[zbus(property, name = "GPUPerformanceLevel")]
|
||||
#[zbus(property)]
|
||||
async fn set_gpu_performance_level(&self, level: u32) -> zbus::Result<()> {
|
||||
let level = match GPUPerformanceLevel::try_from(level) {
|
||||
Ok(level) => level,
|
||||
|
@ -210,7 +210,7 @@ impl SteamOSManager {
|
|||
.map_err(anyhow_to_zbus)
|
||||
}
|
||||
|
||||
#[zbus(property(emits_changed_signal = "false"), name = "ManualGPUClock")]
|
||||
#[zbus(property(emits_changed_signal = "false"))]
|
||||
async fn manual_gpu_clock(&self) -> zbus::fdo::Result<u32> {
|
||||
get_gpu_clocks()
|
||||
.await
|
||||
|
@ -218,7 +218,7 @@ impl SteamOSManager {
|
|||
.map_err(anyhow_to_zbus_fdo)
|
||||
}
|
||||
|
||||
#[zbus(property, name = "ManualGPUClock")]
|
||||
#[zbus(property)]
|
||||
async fn set_manual_gpu_clock(&self, clocks: u32) -> zbus::Result<()> {
|
||||
set_gpu_clocks(clocks)
|
||||
.await
|
||||
|
@ -226,35 +226,35 @@ impl SteamOSManager {
|
|||
.map_err(anyhow_to_zbus)
|
||||
}
|
||||
|
||||
#[zbus(property(emits_changed_signal = "const"), name = "ManualGPUClockMin")]
|
||||
#[zbus(property(emits_changed_signal = "const"))]
|
||||
async fn manual_gpu_clock_min(&self) -> u32 {
|
||||
// TODO: Can this be queried from somewhere?
|
||||
200
|
||||
}
|
||||
|
||||
#[zbus(property(emits_changed_signal = "const"), name = "ManualGPUClockMax")]
|
||||
#[zbus(property(emits_changed_signal = "const"))]
|
||||
async fn manual_gpu_clock_max(&self) -> u32 {
|
||||
// TODO: Can this be queried from somewhere?
|
||||
1600
|
||||
}
|
||||
|
||||
#[zbus(property(emits_changed_signal = "false"), name = "TDPLimit")]
|
||||
#[zbus(property(emits_changed_signal = "false"))]
|
||||
async fn tdp_limit(&self) -> zbus::fdo::Result<u32> {
|
||||
get_tdp_limit().await.map_err(anyhow_to_zbus_fdo)
|
||||
}
|
||||
|
||||
#[zbus(property, name = "TDPLimit")]
|
||||
#[zbus(property)]
|
||||
async fn set_tdp_limit(&self, limit: u32) -> zbus::Result<()> {
|
||||
set_tdp_limit(limit).await.map_err(anyhow_to_zbus)
|
||||
}
|
||||
|
||||
#[zbus(property(emits_changed_signal = "const"), name = "TDPLimitMin")]
|
||||
#[zbus(property(emits_changed_signal = "const"))]
|
||||
async fn tdp_limit_min(&self) -> u32 {
|
||||
// TODO: Can this be queried from somewhere?
|
||||
3
|
||||
}
|
||||
|
||||
#[zbus(property(emits_changed_signal = "const"), name = "TDPLimitMax")]
|
||||
#[zbus(property(emits_changed_signal = "const"))]
|
||||
async fn tdp_limit_max(&self) -> u32 {
|
||||
// TODO: Can this be queried from somewhere?
|
||||
15
|
||||
|
@ -387,23 +387,23 @@ mod test {
|
|||
|
||||
#[zbus::proxy(
|
||||
interface = "com.steampowered.SteamOSManager1.Manager",
|
||||
default_service = "com.steampowered.SteamOSManager1.Test.GPUPerformanceLevel",
|
||||
default_service = "com.steampowered.SteamOSManager1.Test.GpuPerformanceLevel",
|
||||
default_path = "/com/steampowered/SteamOSManager1"
|
||||
)]
|
||||
trait GPUPerformanceLevel {
|
||||
#[zbus(property, name = "GPUPerformanceLevel")]
|
||||
trait GpuPerformanceLevel {
|
||||
#[zbus(property)]
|
||||
fn gpu_performance_level(&self) -> zbus::Result<u32>;
|
||||
|
||||
#[zbus(property, name = "GPUPerformanceLevel")]
|
||||
#[zbus(property)]
|
||||
fn set_gpu_performance_level(&self, level: u32) -> zbus::Result<()>;
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn gpu_performance_level() {
|
||||
let test = start("GPUPerformanceLevel").await;
|
||||
let test = start("GpuPerformanceLevel").await;
|
||||
power::test::setup().await;
|
||||
|
||||
let proxy = GPUPerformanceLevelProxy::new(&test.connection)
|
||||
let proxy = GpuPerformanceLevelProxy::new(&test.connection)
|
||||
.await
|
||||
.unwrap();
|
||||
set_gpu_performance_level(GPUPerformanceLevel::Auto)
|
||||
|
@ -426,22 +426,22 @@ mod test {
|
|||
|
||||
#[zbus::proxy(
|
||||
interface = "com.steampowered.SteamOSManager1.Manager",
|
||||
default_service = "com.steampowered.SteamOSManager1.Test.ManualGPUClock",
|
||||
default_service = "com.steampowered.SteamOSManager1.Test.ManualGpuClock",
|
||||
default_path = "/com/steampowered/SteamOSManager1"
|
||||
)]
|
||||
trait ManualGPUClock {
|
||||
#[zbus(property, name = "ManualGPUClock")]
|
||||
trait ManualGpuClock {
|
||||
#[zbus(property)]
|
||||
fn manual_gpu_clock(&self) -> zbus::Result<u32>;
|
||||
|
||||
#[zbus(property, name = "ManualGPUClock")]
|
||||
#[zbus(property)]
|
||||
fn set_manual_gpu_clock(&self, clocks: u32) -> zbus::Result<()>;
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn manual_gpu_clock() {
|
||||
let test = start("ManualGPUClock").await;
|
||||
let test = start("ManualGpuClock").await;
|
||||
|
||||
let proxy = ManualGPUClockProxy::new(&test.connection).await.unwrap();
|
||||
let proxy = ManualGpuClockProxy::new(&test.connection).await.unwrap();
|
||||
|
||||
assert!(proxy.manual_gpu_clock().await.is_err());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue