This patch adds the call of the connect callback implemented in the
driver when "Connect" method of the Audio Card gets called.
---
src/handsfree-audio.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c
index c11c325..8a0d97d 100644
--- a/src/handsfree-audio.c
+++ b/src/handsfree-audio.c
@@ -237,7 +237,18 @@ static DBusMessage *card_get_properties(DBusConnection
*conn,
static DBusMessage *card_connect(DBusConnection *conn,
DBusMessage *msg, void *data)
{
- return __ofono_error_not_implemented(msg);
+ struct ofono_handsfree_card *card = data;
+ const struct ofono_handsfree_card_driver *driver = card->driver;
+ int sk;
+
+ if (driver == NULL)
+ return __ofono_error_not_implemented(msg);
+
+ sk = driver->audio_connect(card->remote, card->local);
+ if (sk < 0)
+ return __ofono_error_failed(msg);
+
+ return NULL;
}
static const GDBusMethodTable card_methods[] = {
--
1.7.11.7
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono