bluez5-util: Add support for using RegisterApplication D-Bus API

A2DP codec switching needs new version of bluez as older version does not
provide needed org.freedesktop.DBus.ObjectManager and RegisterApplication
DBus APIs. As a preparation for the next step of adding codecs and then
codec switching, add support for using the new API.

Getting list of supported codecs by remote device is supported only by new
version of bluez daemon. If the RegisterApplication API fails, we
fallback to the older RegisterEndpoint API and only register the SBC
codec.

For more information, see
https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/media-api.txt

This changeset has been taken from Pali Rohár's A2DP codec patch
series but separated out to only include the D-Bus specific changes.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
This commit is contained in:
Sanchayan Maity 2020-12-15 16:51:11 +05:30
parent fca6a2fd68
commit 5284b450e7
2 changed files with 256 additions and 16 deletions

View file

@ -129,6 +129,7 @@ struct pa_bluetooth_adapter {
char *address;
bool valid;
bool application_registered;
};
#ifdef HAVE_BLUEZ_5_OFONO_HEADSET