battery: Add the internal Battery API
authorSonny Sasaka <sonnysasaka@chromium.org>
Mon, 30 Nov 2020 21:55:56 +0000 (13:55 -0800)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:34 +0000 (19:08 +0530)
commit545af8dd4c9e42c91fbb22f3f86b148d70a41b44
tree71616802943fc4b78df476e23d432f057edad1a4
parent8c66e53fd1678df47a5623c6adb18b5d7a4ebcd3
battery: Add the internal Battery API

This patch adds an API for internal BlueZ code to expose battery
information to org.bluez.Battery1 interface. The motivation behind this
is that there is going to be other places than GATT BAS handler that
exposes battery information, for example internal plugins and the
BatteryProvider1 D-Bus API for external clients.

Reviewed-by: Daniel Winkler <danielwinkler@google.com>
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
Makefile.am
src/battery.c [new file with mode: 0644]
src/battery.h [new file with mode: 0644]