mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-06 22:50:33 -04:00
Implement Version dbus api with value 1 for now.
This commit is contained in:
parent
aa86fdd810
commit
8f0f6e7976
1 changed files with 8 additions and 1 deletions
|
@ -26,13 +26,20 @@
|
||||||
use zbus_macros::dbus_interface;
|
use zbus_macros::dbus_interface;
|
||||||
use zbus::{ObjectServer, SignalContext, MessageHeader};
|
use zbus::{ObjectServer, SignalContext, MessageHeader};
|
||||||
pub struct SMManager {
|
pub struct SMManager {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[dbus_interface(name = "com.steampowered.SteamOSManager1")]
|
#[dbus_interface(name = "com.steampowered.SteamOSManager1")]
|
||||||
impl SMManager {
|
impl SMManager {
|
||||||
|
const API_VERSION: u32 = 1;
|
||||||
|
|
||||||
async fn say_hello(&self, name: &str) -> String {
|
async fn say_hello(&self, name: &str) -> String {
|
||||||
format!("Hello {}!", name)
|
format!("Hello {}!", name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A version property.
|
||||||
|
#[dbus_interface(property)]
|
||||||
|
async fn version(&self) -> u32 {
|
||||||
|
SMManager::API_VERSION
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue