diff --git a/src/mconnect/battery-proxy.vala b/src/mconnect/battery-proxy.vala index 83455ba..14da156 100644 --- a/src/mconnect/battery-proxy.vala +++ b/src/mconnect/battery-proxy.vala @@ -25,6 +25,9 @@ class BatteryHandlerProxy : Object, PacketHandlerInterfaceProxy { private BatteryHandler battery_handler = null; private uint register_id = 0; + public uint level { get; private set; default = 0; } + public bool charging { get; private set; default = false; } + public BatteryHandlerProxy.for_device_handler(Device dev, PacketHandlerInterface iface) { this.device = dev; @@ -38,6 +41,9 @@ class BatteryHandlerProxy : Object, PacketHandlerInterfaceProxy { if (this.device != dev) return; + this.level = level; + this.charging = charging; + battery(level, charging); }