feat: add bindings for BlueZ

This commit is contained in:
Antoine C 2024-09-06 19:49:32 +01:00 committed by Michael Aaron Murphy
parent e0d6a04d6e
commit 8059e6bdaa
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
7 changed files with 763 additions and 0 deletions

31
bluez/src/battery1.rs Normal file
View file

@ -0,0 +1,31 @@
//! # D-Bus interface proxy for: `org.bluez.Battery1`
//!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data.
//! Source: `Interface '/org/bluez/hci0/dev_14_3F_A6_A8_16_68' from service 'org.bluez' on system bus`.
//!
//! You may prefer to adapt it, instead of using it verbatim.
//!
//! More information can be found in the [Writing a client proxy] section of the zbus
//! documentation.
//!
//! This type implements the [D-Bus standard interfaces], (`org.freedesktop.DBus.*`) for which the
//! following zbus API can be used:
//!
//! * [`zbus::fdo::IntrospectableProxy`]
//! * [`zbus::fdo::PropertiesProxy`]
//!
//! Consequently `zbus-xmlgen` did not generate code for the above interfaces.
//!
//! [Writing a client proxy]: https://dbus2.github.io/zbus/client.html
//! [D-Bus standard interfaces]: https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces,
use zbus::proxy;
#[proxy(interface = "org.bluez.Battery1", default_service = "org.bluez")]
trait Battery1 {
/// Percentage property
#[zbus(property)]
fn percentage(&self) -> zbus::Result<u8>;
/// Source property
#[zbus(property)]
fn source(&self) -> zbus::Result<String>;
}