diff options
author | Ojas Kavathe <[email protected]> | 2024-11-27 04:18:52 +0530 |
---|---|---|
committer | Ojas Kavathe <[email protected]> | 2024-11-27 04:22:41 +0530 |
commit | 358044bdfd357916bad9ae9298fd89b54291a7a6 (patch) | |
tree | 64fc44167dce2c711037de048d567ca5b237fd2a /lib/bluetooth/device.vala | |
parent | 12fa0fbf1c05319a6b7a9a772a7b1f03e7ca4cae (diff) |
feat: add battery_percent to bluetooth devices
Diffstat (limited to 'lib/bluetooth/device.vala')
-rw-r--r-- | lib/bluetooth/device.vala | 7 |
1 files changed, 7 insertions, 0 deletions
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; } @@ -104,6 +105,12 @@ public class AstalBluetooth.Device : Object { } /** + * 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. * * In case no alias is set, it will return the remote device [[email protected]:name]. |