diff options
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/device.c b/src/device.c index b22695e1..a8f40f8e 100644 --- a/src/device.c +++ b/src/device.c @@ -61,7 +61,6 @@ #include "glib-helper.h" #include "agent.h" #include "sdp-xml.h" -#include "driver.h" #define DEFAULT_XML_BUF_SIZE 1024 #define DISCONNECT_TIMER 2 @@ -110,6 +109,8 @@ static uint16_t uuid_list[] = { 0 }; +static GSList *device_drivers = NULL; + static void device_free(gpointer user_data) { struct btd_device *device = user_data; @@ -618,13 +619,13 @@ sdp_record_t *get_record(sdp_list_t *recs, const char *uuid) void device_probe_drivers(struct btd_device *device, GSList *uuids, sdp_list_t *recs) { - GSList *list = btd_get_device_drivers(); + GSList *list; const char **uuid; int err; debug("Probe drivers for %s", device->path); - for (; list; list = list->next) { + for (list = device_drivers; list; list = list->next) { struct btd_device_driver *driver = list->data; GSList *records = NULL; @@ -1083,3 +1084,15 @@ uint8_t device_get_auth(struct btd_device *device) { return device->auth; } + +int btd_register_device_driver(struct btd_device_driver *driver) +{ + device_drivers = g_slist_append(device_drivers, driver); + + return 0; +} + +void btd_unregister_device_driver(struct btd_device_driver *driver) +{ + device_drivers = g_slist_remove(device_drivers, driver); +} |