summaryrefslogtreecommitdiffstats
path: root/src/device.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@indt.org.br>2008-08-05 18:13:42 -0300
committerLuiz Augusto von Dentz <luiz.dentz@indt.org.br>2008-08-05 18:13:42 -0300
commit76751aa2c4065f2d9492f97f5145e6f54d56b451 (patch)
tree96f8895f29617202266ebefa83e566cf016ba59a /src/device.c
parent037e751359421436c382a750b960854602424d58 (diff)
Introduce driver.c and driver.h files.
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c28
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);
-}