From 358044bdfd357916bad9ae9298fd89b54291a7a6 Mon Sep 17 00:00:00 2001 From: Ojas Kavathe Date: Wed, 27 Nov 2024 04:18:52 +0530 Subject: feat: add battery_percent to bluetooth devices --- lib/bluetooth/device.vala | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/bluetooth/device.vala') diff --git a/lib/bluetooth/device.vala b/lib/bluetooth/device.vala index 3f00cd9..e4df528 100644 --- a/lib/bluetooth/device.vala +++ b/lib/bluetooth/device.vala @@ -3,6 +3,7 @@ */ public class AstalBluetooth.Device : Object { private IDevice proxy; + public Battery battery; internal ObjectPath object_path { owned get; private set; } @@ -103,6 +104,12 @@ public class AstalBluetooth.Device : Object { set { proxy.trusted = value; } } + /** + * The percentage of battery left as an unsigned 8-bit integer. + */ + public uint battery_percentage { get { return battery.percentage; } } + + /** * The name alias for the remote device. * -- cgit v1.2.3