bluetooth: unify BlueZ 4 and BlueZ 5 UUID handling

A hashmap is more convenient than a linked list for storing the UUIDs,
so change the BlueZ 4 code accordingly.

Rename the BlueZ 4 UUID constants to match the BlueZ 5 naming.

The only changes to the BlueZ 5 code are the addition of one comment
and making another comment a bit clearer.
This commit is contained in:
Tanu Kaskinen 2016-08-07 18:45:52 +03:00
parent 570288ccc9
commit 52a9ee618f
5 changed files with 38 additions and 81 deletions

View file

@ -732,8 +732,8 @@ static void parse_device_property(pa_bluetooth_device *d, DBusMessageIter *i) {
dbus_message_iter_recurse(&variant_i, &ai);
if (dbus_message_iter_get_arg_type(&ai) == DBUS_TYPE_STRING && pa_streq(key, "UUIDs")) {
/* bluetoothd never removes UUIDs from a device object so there
* is no need to handle it here. */
/* bluetoothd never removes UUIDs from a device object so we
* don't need to check for disappeared UUIDs here. */
while (dbus_message_iter_get_arg_type(&ai) != DBUS_TYPE_INVALID) {
const char *value;
char *uuid;