summaryrefslogtreecommitdiffstats
path: root/telephony-binding/telephony-binding.c
diff options
context:
space:
mode:
Diffstat (limited to 'telephony-binding/telephony-binding.c')
-rw-r--r--telephony-binding/telephony-binding.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/telephony-binding/telephony-binding.c b/telephony-binding/telephony-binding.c
index 134432c..00115d2 100644
--- a/telephony-binding/telephony-binding.c
+++ b/telephony-binding/telephony-binding.c
@@ -70,6 +70,16 @@ static void hangup(struct afb_req request)
}
}
+static void answer(struct afb_req request)
+{
+ if (incoming_call) {
+ DEBUG(interface, "Answer voice call\n");
+ voice_call = incoming_call;
+ ofono_voicecall_answer(voice_call);
+ } else {
+ ERROR(interface, "Answer: no incoming call");
+ }
+}
static void incoming_call_cb(OrgOfonoVoiceCallManager *manager, gchar *op, gchar *clip)
{
@@ -147,6 +157,12 @@ static const struct afb_verb_desc_v1 verbs[]= {
.callback = hangup,
.info = "Hangup phone"
},
+ {
+ .name = "answer",
+ .session = AFB_SESSION_NONE,
+ .callback = answer,
+ .info = "Answer phone"
+ },
{NULL}
};