dundee: Add support for driver connect
authorPaulo Borges <paulo.borges@openbossa.org>
Wed, 20 Mar 2013 22:26:40 +0000 (19:26 -0300)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Sun, 24 Mar 2013 12:23:07 +0000 (13:23 +0100)
This patch glues together the dundee driver interface with the
D-Bus Profile1 interface.

When the dundee driver requests a connection, it will call the
Device1's ConnectProfile.

dundee/bluez5.c

index e927835..3ecc9cf 100644 (file)
@@ -114,7 +114,12 @@ static void bluetooth_device_destroy(gpointer user_data)
 static void bluetooth_device_connect(struct dundee_device *device,
                        dundee_device_connect_cb_t cb, void *data)
 {
-       DBG("");
+       struct bluetooth_device *bt_device = dundee_device_get_data(device);
+
+       DBG("%s", bt_device->path);
+
+       bt_connect_profile(ofono_dbus_get_connection(), bt_device->path,
+                                               DUN_GW_UUID, NULL, NULL);
 }
 
 static void bluetooth_device_disconnect(struct dundee_device *device,