summaryrefslogtreecommitdiff
path: root/src/modules/bluetooth/bluez5-util.h
diff options
context:
space:
mode:
authorMarijn Suijten <marijns95@gmail.com>2021-01-18 11:04:43 +0100
committerMarijn Suijten <marijns95@gmail.com>2021-07-28 09:11:43 +0200
commitf7955eeb48f7e1bc0fe966ab2904832143cd754e (patch)
treed1c2ee1d3cde6075fdecf77c883c63225d0968fd /src/modules/bluetooth/bluez5-util.h
parentc667befe9a2e03a35a69c012e0e2330481f05e1d (diff)
downloadpulseaudio-f7955eeb48f7e1bc0fe966ab2904832143cd754e.tar.gz
bluetooth: Register as BlueZ experimental BatteryProvider1
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/482>
Diffstat (limited to 'src/modules/bluetooth/bluez5-util.h')
-rw-r--r--src/modules/bluetooth/bluez5-util.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/bluetooth/bluez5-util.h b/src/modules/bluetooth/bluez5-util.h
index ac9c8da10..b07c1eacf 100644
--- a/src/modules/bluetooth/bluez5-util.h
+++ b/src/modules/bluetooth/bluez5-util.h
@@ -27,6 +27,8 @@
#define BLUEZ_SERVICE "org.bluez"
#define BLUEZ_ADAPTER_INTERFACE BLUEZ_SERVICE ".Adapter1"
+#define BLUEZ_BATTERY_PROVIDER_INTERFACE BLUEZ_SERVICE ".BatteryProvider1"
+#define BLUEZ_BATTERY_PROVIDER_MANAGER_INTERFACE BLUEZ_SERVICE ".BatteryProviderManager1"
#define BLUEZ_DEVICE_INTERFACE BLUEZ_SERVICE ".Device1"
#define BLUEZ_MEDIA_ENDPOINT_INTERFACE BLUEZ_SERVICE ".MediaEndpoint1"
#define BLUEZ_MEDIA_INTERFACE BLUEZ_SERVICE ".Media1"
@@ -154,6 +156,7 @@ struct pa_bluetooth_device {
bool has_battery_level;
uint8_t battery_level;
+ const char *battery_source;
};
struct pa_bluetooth_adapter {
@@ -163,6 +166,7 @@ struct pa_bluetooth_adapter {
bool valid;
bool application_registered;
+ bool battery_provider_registered;
};
#ifdef HAVE_BLUEZ_5_OFONO_HEADSET
@@ -201,7 +205,7 @@ void pa_bluetooth_transport_load_a2dp_sink_volume(pa_bluetooth_transport *t);
bool pa_bluetooth_device_any_transport_connected(const pa_bluetooth_device *d);
bool pa_bluetooth_device_switch_codec(pa_bluetooth_device *device, pa_bluetooth_profile_t profile, pa_hashmap *capabilities_hashmap, const pa_a2dp_endpoint_conf *endpoint_conf, void (*codec_switch_cb)(bool, pa_bluetooth_profile_t profile, void *), void *userdata);
-void pa_bluetooth_device_report_battery_level(pa_bluetooth_device *d, uint8_t level);
+void pa_bluetooth_device_report_battery_level(pa_bluetooth_device *d, uint8_t level, const char *reporting_source);
pa_bluetooth_device* pa_bluetooth_discovery_get_device_by_path(pa_bluetooth_discovery *y, const char *path);
pa_bluetooth_device* pa_bluetooth_discovery_get_device_by_address(pa_bluetooth_discovery *y, const char *remote, const char *local);