summaryrefslogtreecommitdiffstats
path: root/audio/telephony-dummy.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-09-04 14:15:20 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2008-09-04 14:15:20 +0300
commit842ed094ea0d3d591685ea3ac3423b3a57009246 (patch)
tree907bf1daef4fae6632a22ceb5e31e563505904ac /audio/telephony-dummy.c
parent3bb7bf627c5d0f8adb44fe8f0d9c88cc3fc8a070 (diff)
Implement basic HFP response and hold support
Diffstat (limited to 'audio/telephony-dummy.c')
-rw-r--r--audio/telephony-dummy.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/audio/telephony-dummy.c b/audio/telephony-dummy.c
index 59eacc89..73d367c1 100644
--- a/audio/telephony-dummy.c
+++ b/audio/telephony-dummy.c
@@ -35,6 +35,14 @@
static gboolean events_enabled = FALSE;
+/* Response and hold state
+ * -1 = none
+ * 0 = incoming call is put on hold in the AG
+ * 1 = held incoming call is accepted in the AG
+ * 2 = held incoming call is rejected in the AG
+ */
+static int response_and_hold = -1;
+
static struct indicator indicators[] =
{
{ "battchg", "0-5", 5 },
@@ -61,9 +69,23 @@ struct indicator *telephony_indicators_req(void)
return indicators;
}
-int telephony_set_event_reporting(int ind)
+int telephony_event_reporting_req(int ind)
{
events_enabled = ind == 1 ? TRUE : FALSE;
+
+ if (events_enabled)
+ telephony_response_and_hold_ind(response_and_hold);
+
+ return 0;
+}
+
+int telephony_response_and_hold_req(int rh)
+{
+ response_and_hold = rh;
+
+ telephony_response_and_hold_ind(response_and_hold);
+
+ return 0;
}
int telephony_init(void)