diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-08-05 23:36:14 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-08-05 23:36:14 +0200 |
commit | 32cf081aa948793869822c9634751bced245f01c (patch) | |
tree | bd6281604d6d256625c615b98cf2a3d19fe0be0e /src/device.c | |
parent | 161915e640404db7a46321e59127a666b992b0df (diff) | |
parent | 00acfa685e3e73c619146b7ca39068eb304f1ce8 (diff) |
Merge branch 'bluez4' of git://git.infradead.org/users/vudentz/bluez-utils
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/src/device.c b/src/device.c index 4ef90803..ac578f2b 100644 --- a/src/device.c +++ b/src/device.c @@ -57,11 +57,11 @@ #include "device.h" #include "dbus-common.h" #include "dbus-hci.h" -#include "dbus-service.h" #include "error.h" #include "glib-helper.h" #include "agent.h" #include "sdp-xml.h" +#include "driver.h" #define DEFAULT_XML_BUF_SIZE 1024 #define DISCONNECT_TIMER 2 @@ -101,8 +101,6 @@ struct browse_req { gboolean browse; }; -static GSList *drivers = NULL; - static uint16_t uuid_list[] = { PUBLIC_BROWSE_GROUP, HID_SVCLASS_ID, @@ -620,13 +618,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; + GSList *list = btd_get_device_drivers(); const char **uuid; int err; debug("Probe drivers for %s", device->path); - for (list = drivers; list; list = list->next) { + for (; list; list = list->next) { struct btd_device_driver *driver = list->data; GSList *records = NULL; @@ -1085,23 +1083,3 @@ uint8_t device_get_auth(struct btd_device *device) { return device->auth; } - -int btd_register_device_driver(struct btd_device_driver *driver) -{ - const char **uuid; - - /* FIXME: hack to make hci to resolve service_req_auth symbol*/ - service_req_auth(NULL, NULL, NULL, NULL, NULL); - drivers = g_slist_append(drivers, driver); - - for (uuid = driver->uuids; *uuid; uuid++) { - debug("name %s uuid %s", driver->name, *uuid); - } - - return 0; -} - -void btd_unregister_device_driver(struct btd_device_driver *driver) -{ - drivers = g_slist_remove(drivers, driver); -} |