diff options
author | Luiz Augusto von Dentz <luiz.dentz@indt.org.br> | 2008-08-18 19:20:42 -0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@indt.org.br> | 2008-08-18 19:20:42 -0300 |
commit | c560d02ccf1dd156f068b1da8a3e7d75d2319dfd (patch) | |
tree | f0925d7821b400fe061a97d9521f78daf0ff9f66 /src/device.c | |
parent | 0dda767d09a31eb13976371730e4cfe5e437869e (diff) |
Remove driver.c driver.h and remove workaround for to force a symbol resolution.
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); +} |