feat: zbus 4.2.1 update

This commit is contained in:
Ashley Wulber 2024-05-16 15:24:53 -04:00 committed by GitHub
parent ce9c789fe6
commit f05789c4ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 390 additions and 389 deletions

View file

@ -1,11 +1,11 @@
// Copyright 2021 System76 <info@system76.com>
// SPDX-License-Identifier: MPL-2.0
use zbus::dbus_proxy;
use zbus::proxy;
use crate::device::{DeviceProxy, DeviceProxyBlocking};
#[dbus_proxy(interface = "org.freedesktop.UPower", assume_defaults = true)]
#[proxy(interface = "org.freedesktop.UPower", assume_defaults = true)]
trait UPower {
/// EnumerateDevices method
fn enumerate_devices(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
@ -14,30 +14,30 @@ trait UPower {
fn get_critical_action(&self) -> zbus::Result<String>;
/// GetDisplayDevice method
#[dbus_proxy(object = "Device")]
#[zbus(object = "Device")]
fn get_display_device(&self);
/// DeviceAdded signal
#[dbus_proxy(signal)]
#[zbus(signal)]
fn device_added(&self, device: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
/// DeviceRemoved signal
#[dbus_proxy(signal)]
#[zbus(signal)]
fn device_removed(&self, device: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
/// DaemonVersion property
#[dbus_proxy(property)]
#[zbus(property)]
fn daemon_version(&self) -> zbus::Result<String>;
/// LidIsClosed property
#[dbus_proxy(property)]
#[zbus(property)]
fn lid_is_closed(&self) -> zbus::Result<bool>;
/// LidIsPresent property
#[dbus_proxy(property)]
#[zbus(property)]
fn lid_is_present(&self) -> zbus::Result<bool>;
/// OnBattery property
#[dbus_proxy(property)]
#[zbus(property)]
fn on_battery(&self) -> zbus::Result<bool>;
}