battery: Implement Battery Provider API
authorSonny Sasaka <sonnysasaka@chromium.org>
Mon, 30 Nov 2020 21:56:02 +0000 (13:56 -0800)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:34 +0000 (19:08 +0530)
commit650361c0ded4d1c1c2f53261c85153ffbc14f0fb
tree10e84d80135cd89cb98680f909c308f6e170b053
parentc31756973cdec19103589aa28e7c5da2f55fb6a0
battery: Implement Battery Provider API

This patch implements the BatteryProvider1 and BatteryProviderManager1
API. This is a means for external clients to feed battery information to
BlueZ if they handle some profile and can decode battery reporting.

The battery information is then exposed externally via the existing
Battery1 interface. UI components can consume this API to display
Bluetooth peripherals' battery via a unified BlueZ API.

Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
profiles/battery/battery.c
src/adapter.c
src/battery.c
src/battery.h