Open Source Telephony
 help / color / mirror / Atom feed
From: =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau <frederic.dalleau@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH v2 8/9] emulator: implement audio connection API
Date: Thu, 17 Mar 2011 19:55:47 +0100	[thread overview]
Message-ID: <1300388148-925-9-git-send-email-frederic.dalleau@linux.intel.com> (raw)
In-Reply-To: <1300388148-925-1-git-send-email-frederic.dalleau@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1298 bytes --]

---
 src/emulator.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/emulator.c b/src/emulator.c
index 1d4fbc6..2f39599 100644
--- a/src/emulator.c
+++ b/src/emulator.c
@@ -49,6 +49,9 @@ struct ofono_emulator {
 	int events_mode;
 	gboolean events_ind;
 	GSList *indicators;
+	void *user_data;
+	ofono_emulator_audio_conn_cb_t conn_cb;
+	void *conn_user_data;
 };
 
 struct indicator {
@@ -390,6 +393,8 @@ fail:
 static void ckpd_cb(GAtServer *server, GAtServerRequestType type,
 			GAtResult *result, gpointer user_data)
 {
+	struct ofono_emulator *em = user_data;
+
 	switch (type) {
 	case G_AT_SERVER_REQUEST_TYPE_SET:
 	{
@@ -404,6 +409,9 @@ static void ckpd_cb(GAtServer *server, GAtServerRequestType type,
 		if (key != 200)
 			goto fail;
 
+		if(em->conn_cb != NULL)
+			em->conn_cb(em, em->conn_user_data);
+
 		g_at_server_send_final(server, G_AT_SERVER_RESULT_OK);
 		break;
 	}
@@ -734,3 +742,11 @@ void ofono_emulator_set_indicator(struct ofono_emulator *em,
 		return;
 	}
 }
+
+void ofono_emulator_set_audio_connect_handler(struct ofono_emulator *em,
+					ofono_emulator_audio_conn_cb_t cb,
+					void *user_data)
+{
+	em->conn_cb = cb;
+	em->conn_user_data = user_data;
+}
-- 
1.7.1


  parent reply	other threads:[~2011-03-17 18:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17 18:55 [PATCH v2 0/9] HSP profile implementation =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-17 18:55 ` [PATCH v2 1/9] bluetooth: add functions for sco connection =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-18 20:27   ` Denis Kenzior
2011-03-19 11:06     ` Johan Hedberg
2011-03-21 17:08       ` =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-17 18:55 ` [PATCH v2 2/9] emulator: add hsp emulator type =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-17 18:55 ` [PATCH v2 3/9] hsp_ag: add hsp atom type =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-17 18:55 ` [PATCH v2 4/9] hsp_ag: Initial plugin commit =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-17 18:55 ` [PATCH v2 5/9] hsp_ag: add modem watch =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-17 18:55 ` [PATCH v2 6/9] emulator: add CKPD support =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-18 20:25   ` Denis Kenzior
2011-03-21 18:15     ` =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-21 18:28       ` Denis Kenzior
2011-03-17 18:55 ` [PATCH v2 7/9] emulator: add audio connection API =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-17 18:55 ` =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau [this message]
2011-03-17 18:55 ` [PATCH v2 9/9] hsp_ag: add audio connection support =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-21 12:53 ` [PATCH v2 0/9] HSP profile implementation Luiz Augusto von Dentz
2011-03-21 18:10   ` =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1300388148-925-9-git-send-email-frederic.dalleau@linux.intel.com \
    --to=frederic.dalleau@linux.intel.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox