Begin reimplement gex to use generated bindings and dbus xml

This commit is contained in:
Luke D. Jones
2023-06-28 21:54:17 +12:00
parent 439c830311
commit 4d2d5707a1
31 changed files with 2744 additions and 10 deletions

View File

@@ -18,6 +18,11 @@ impl SupportedFunctions {
pub fn supported_functions(&self) -> &rog_platform::supported::SupportedFunctions {
&self.0
}
#[dbus_interface(out_args("answer", "question"))]
fn meaning_of_life(&self) -> zbus::fdo::Result<(i32, String)> {
Ok((42, String::from("Meaning of life")))
}
}
#[async_trait]

View File

@@ -65,7 +65,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
async fn start_daemon() -> Result<(), Box<dyn Error>> {
let supported = SupportedFunctions::get_supported();
print_board_info();
println!("{}", supported.supported_functions());
println!("{:?}", supported.supported_functions());
// Start zbus server
let mut connection = Connection::system().await?;