mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-07 15:10:29 -04:00
manager/user: Expose device and variant info over DBus
This commit is contained in:
parent
b1dc04daa8
commit
2555b95258
4 changed files with 31 additions and 1 deletions
|
@ -19,7 +19,9 @@ use crate::cec::{HdmiCecControl, HdmiCecState};
|
|||
use crate::daemon::user::Command;
|
||||
use crate::daemon::DaemonCommand;
|
||||
use crate::error::{to_zbus_error, to_zbus_fdo_error, zbus_to_zbus_fdo};
|
||||
use crate::hardware::{device_type, steam_deck_variant, DeviceType, SteamDeckVariant};
|
||||
use crate::hardware::{
|
||||
device_type, device_variant, steam_deck_variant, DeviceType, SteamDeckVariant,
|
||||
};
|
||||
use crate::job::JobManagerCommand;
|
||||
use crate::platform::platform_config;
|
||||
use crate::power::{
|
||||
|
@ -440,6 +442,12 @@ impl Manager2 {
|
|||
.map_err(to_zbus_fdo_error)?;
|
||||
method!(self, "ReloadConfig")
|
||||
}
|
||||
|
||||
#[zbus(property(emits_changed_signal = "const"))]
|
||||
async fn device_model(&self) -> fdo::Result<(String, String)> {
|
||||
let (device, variant) = device_variant().await.map_err(to_zbus_fdo_error)?;
|
||||
Ok((device.to_string(), variant))
|
||||
}
|
||||
}
|
||||
|
||||
#[interface(name = "com.steampowered.SteamOSManager1.Storage1")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue