mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Rename dbus. Add asus_armoury client source
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
pub use asusd::{DBUS_IFACE, DBUS_NAME, DBUS_PATH};
|
||||
|
||||
pub mod asus_armoury;
|
||||
pub mod scsi_aura;
|
||||
pub mod zbus_anime;
|
||||
pub mod zbus_aura;
|
||||
@@ -11,7 +12,7 @@ pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
pub fn list_iface_blocking() -> Result<Vec<String>, Box<dyn std::error::Error>> {
|
||||
let conn = zbus::blocking::Connection::system()?;
|
||||
let f = zbus::blocking::fdo::ObjectManagerProxy::new(&conn, "org.asuslinux.Daemon", "/")?;
|
||||
let f = zbus::blocking::fdo::ObjectManagerProxy::new(&conn, "xyz.ljones.Asusd", "/")?;
|
||||
let interfaces = f.get_managed_objects()?;
|
||||
let mut ifaces = Vec::new();
|
||||
for v in interfaces.iter() {
|
||||
@@ -24,7 +25,7 @@ pub fn list_iface_blocking() -> Result<Vec<String>, Box<dyn std::error::Error>>
|
||||
|
||||
pub fn has_iface_blocking(iface: &str) -> Result<bool, Box<dyn std::error::Error>> {
|
||||
let conn = zbus::blocking::Connection::system()?;
|
||||
let f = zbus::blocking::fdo::ObjectManagerProxy::new(&conn, "org.asuslinux.Daemon", "/")?;
|
||||
let f = zbus::blocking::fdo::ObjectManagerProxy::new(&conn, "xyz.ljones.Asusd", "/")?;
|
||||
let interfaces = f.get_managed_objects()?;
|
||||
for v in interfaces.iter() {
|
||||
for k in v.1.keys() {
|
||||
@@ -38,7 +39,7 @@ pub fn has_iface_blocking(iface: &str) -> Result<bool, Box<dyn std::error::Error
|
||||
|
||||
pub async fn has_iface(iface: &str) -> Result<bool, Box<dyn std::error::Error>> {
|
||||
let conn = zbus::Connection::system().await?;
|
||||
let f = zbus::fdo::ObjectManagerProxy::new(&conn, "org.asuslinux.Daemon", "/").await?;
|
||||
let f = zbus::fdo::ObjectManagerProxy::new(&conn, "xyz.ljones.Asusd", "/").await?;
|
||||
let interfaces = f.get_managed_objects().await?;
|
||||
for v in interfaces.iter() {
|
||||
for k in v.1.keys() {
|
||||
|
||||
Reference in New Issue
Block a user