Finalise zbus3 conversion

This commit is contained in:
Luke D. Jones
2022-01-16 22:28:53 +13:00
parent bac2ba6f09
commit a85e2f6130
33 changed files with 1093 additions and 1077 deletions

View File

@@ -1,8 +1,10 @@
use async_trait::async_trait;
use log::warn;
use serde_derive::{Deserialize, Serialize};
use zbus::dbus_interface;
use zbus::Connection;
use zvariant::ObjectPath;
use zvariant_derive::Type;
use zvariant::Type;
use crate::{
ctrl_anime::CtrlAnime, ctrl_aura::controller::CtrlKbdLed, ctrl_charge::CtrlCharge,
@@ -30,13 +32,16 @@ impl SupportedFunctions {
}
}
#[async_trait]
impl crate::ZbusAdd for SupportedFunctions {
fn add_to_server(self, server: &mut zbus::ObjectServer) {
async fn add_to_server(self, server: &mut Connection) {
server
.object_server()
.at(
&ObjectPath::from_str_unchecked("/org/asuslinux/Supported"),
self,
)
.await
.map_err(|err| {
warn!("SupportedFunctions: add_to_server {}", err);
err