summaryrefslogtreecommitdiff
path: root/src/battery.c
Commit message (Collapse)AuthorAgeFilesLines
* battery: provided_battery_property_changed_cb: check iteratorChristian Eggers2022-09-231-4/+6
| | | | | | | | | | The passed iterator can be NULL as in gdbus/client.c::properties_changed(): ... proxy->prop_func(..., ..., iter=NULL, ...) +--src/battery.c::provided_battery_property_changed_cb(, , iter, ); +--dbus_message_iter_get_arg_type(iter); ...
* battery: Implement Battery Provider APISonny Sasaka2020-11-301-3/+384
| | | | | | | | | | | | 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>
* battery: Add Source property to Battery APISonny Sasaka2020-11-301-4/+31
| | | | | | | As Battery API will be generalized for other battery reporting protocols, the Source property is useful for diagnostics purposes. Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
* battery: Add the internal Battery APISonny Sasaka2020-11-301-0/+191
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>