summaryrefslogtreecommitdiffstats
path: root/binding-bluetooth/bluetooth-manager.c
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-08-22 14:35:06 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2017-08-22 15:29:22 -0700
commitee0b6c81188c1b3a10b877e6244c186e65d9b8a1 (patch)
tree88e1b698d36ccc3e30c922c2bb29964b35c3ab18 /binding-bluetooth/bluetooth-manager.c
parent2260e85751467db9c361346e5bea5bd6b41b1718 (diff)
binding: bluetooth: add verb to export paired device priorities
Add device_priorities verb to export paired device priorities in an array. Bug-AGL: SPEC-839 Change-Id: I83dc17a2a8f755235b0b35a12d2cae8388b69c85 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding-bluetooth/bluetooth-manager.c')
-rw-r--r--binding-bluetooth/bluetooth-manager.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/binding-bluetooth/bluetooth-manager.c b/binding-bluetooth/bluetooth-manager.c
index 2ff8925..f1d7895 100644
--- a/binding-bluetooth/bluetooth-manager.c
+++ b/binding-bluetooth/bluetooth-manager.c
@@ -190,6 +190,25 @@ GSList *bt_priority_list()
return list;
}
+int device_priority_list(void *(object_cb)(void *, gchar *), void *ptr)
+{
+ GSList *tmp;
+
+ devices_list_lock();
+
+ tmp = BluetoothManage.priorities;
+
+ while (tmp)
+ {
+ object_cb(ptr, tmp->data);
+ tmp = tmp->next;
+ }
+
+ devices_list_unlock();
+
+ return 0;
+}
+
static int device_path_cmp(struct btd_device * device, const gchar* pPath )
{
return !g_str_has_prefix (pPath, device->path);