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

@ -2,7 +2,7 @@
// SPDX-License-Identifier: MPL-2.0
use serde_repr::{Deserialize_repr, Serialize_repr};
use zbus::dbus_proxy;
use zbus::proxy;
use zbus::zvariant::OwnedValue;
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Deserialize_repr, Serialize_repr, OwnedValue)]
@ -43,80 +43,80 @@ pub enum BatteryLevel {
Full = 8,
}
#[dbus_proxy(
#[proxy(
interface = "org.freedesktop.UPower.Device",
default_service = "org.freedesktop.UPower",
assume_defaults = false
)]
trait Device {
#[dbus_proxy(property)]
#[zbus(property)]
fn battery_level(&self) -> zbus::Result<BatteryLevel>;
#[dbus_proxy(property)]
#[zbus(property)]
fn capacity(&self) -> zbus::Result<f64>;
#[dbus_proxy(property)]
#[zbus(property)]
fn energy(&self) -> zbus::Result<f64>;
#[dbus_proxy(property)]
#[zbus(property)]
fn energy_empty(&self) -> zbus::Result<f64>;
#[dbus_proxy(property)]
#[zbus(property)]
fn energy_full(&self) -> zbus::Result<f64>;
#[dbus_proxy(property)]
#[zbus(property)]
fn energy_full_design(&self) -> zbus::Result<f64>;
#[dbus_proxy(property)]
#[zbus(property)]
fn has_history(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
#[zbus(property)]
fn has_statistics(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
#[zbus(property)]
fn icon_name(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
#[zbus(property)]
fn is_present(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
#[zbus(property)]
fn is_rechargeable(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
#[zbus(property)]
fn luminosity(&self) -> zbus::Result<f64>;
#[dbus_proxy(property)]
#[zbus(property)]
fn model(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
#[zbus(property)]
fn native_path(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
#[zbus(property)]
fn online(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
#[zbus(property)]
fn percentage(&self) -> zbus::Result<f64>;
#[dbus_proxy(property)]
#[zbus(property)]
fn power_supply(&self) -> zbus::Result<bool>;
fn refresh(&self) -> zbus::Result<()>;
#[dbus_proxy(property)]
#[zbus(property)]
fn serial(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
#[zbus(property)]
fn state(&self) -> zbus::Result<BatteryState>;
#[dbus_proxy(property)]
#[zbus(property)]
fn temperature(&self) -> zbus::Result<f64>;
#[dbus_proxy(property, name = "Type")]
#[zbus(property, name = "Type")]
fn type_(&self) -> zbus::Result<BatteryType>;
#[dbus_proxy(property)]
#[zbus(property)]
fn vendor(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
#[zbus(property)]
fn voltage(&self) -> zbus::Result<f64>;
}