diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-09 14:11:16 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-09 15:13:28 +0200 |
commit | 548026e08bd9b83b3685d515a916e2cf674184f3 (patch) | |
tree | 75f707ae2a4b825ae7f60cef44f54a74579e21a0 /serial/manager.c | |
parent | 99c24bafe1619e6ace7e89be2ddea2e8f2eaf98f (diff) |
Make device driver probe calls take UUID's instead of full records
This is preparation for allowing the device object to be correctly set up even
when we don't have the full service records but only the remote UUID's.
Diffstat (limited to 'serial/manager.c')
-rw-r--r-- | serial/manager.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/serial/manager.c b/serial/manager.c index 235b2534..e9166504 100644 --- a/serial/manager.c +++ b/serial/manager.c @@ -74,7 +74,7 @@ static DBusConnection *connection = NULL; -static int serial_probe(struct btd_device *device, sdp_record_t *rec, +static int serial_probe(struct btd_device *device, const sdp_record_t *rec, const char *name, const char *uuid) { struct btd_adapter *adapter = device_get_adapter(device); @@ -114,9 +114,15 @@ static void serial_remove(struct btd_device *device, const char *uuid) } -static int port_probe(struct btd_device *device, GSList *records) +static int port_probe(struct btd_device *device, GSList *uuids) { - return serial_probe(device, records->data, SERIAL_PORT_NAME, + const sdp_record_t *record; + + record = btd_device_get_record(device, uuids->data); + if (!record) + return -1; + + return serial_probe(device, record, SERIAL_PORT_NAME, SERIAL_PORT_UUID); } @@ -125,10 +131,15 @@ static void port_remove(struct btd_device *device) return serial_remove(device, SERIAL_PORT_UUID); } -static int dialup_probe(struct btd_device *device, GSList *records) +static int dialup_probe(struct btd_device *device, GSList *uuids) { - return serial_probe(device, records->data, DIALUP_NET_NAME, - DIALUP_NET_UUID); + const sdp_record_t *record; + + record = btd_device_get_record(device, uuids->data); + if (!record) + return -1; + + return serial_probe(device, record, DIALUP_NET_NAME, DIALUP_NET_UUID); } static void dialup_remove(struct btd_device *device) |