diff options
author | Saman Mahmoodi <mahmoudi.saman1@gmail.com> | 2021-04-06 15:53:37 +0430 |
---|---|---|
committer | Saman Mahmoudi <mahmoudi.saman1@gmail.com> | 2021-05-03 07:56:38 +0430 |
commit | 10dc6edf1131c8c2b8a028de2a0f3e95709bca6b (patch) | |
tree | a4bcc3b29e1fc818ffcc1ce3c626c81319c85a60 /binding/telephony-binding.c | |
parent | 8987ae42114a8b15522734e40d117fd061e7bf3b (diff) |
Add new verb as get_callsneedlefish_13.93.0needlefish/13.93.0marlin_12.93.0marlin_12.92.0marlin_12.91.0marlin_12.90.1marlin_12.90.0marlin/12.93.0marlin/12.92.0marlin/12.91.0marlin/12.90.1marlin/12.90.0lamprey_11.92.0lamprey/11.92.013.93.012.93.012.92.012.91.012.90.112.90.011.92.0
get_calls verb return all active call properties.
Bug-AGL: SPEC-3870
Signed-off-by: Saman Mahmoodi <mahmoudi.saman1@gmail.com>
Change-Id: I7355b0ade66fdd84e55936cf63a4a2a62771a912
Diffstat (limited to 'binding/telephony-binding.c')
-rw-r--r-- | binding/telephony-binding.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/binding/telephony-binding.c b/binding/telephony-binding.c index 9e47c76..e764601 100644 --- a/binding/telephony-binding.c +++ b/binding/telephony-binding.c @@ -232,6 +232,15 @@ static void swap_calls(afb_req_t request) } } +static void get_calls(afb_req_t request) +{ + json_object *result = ofono_voicecallmanager_get_calls(vcm); + if (!result) + afb_req_fail(request, "failed", "Can not find any active voice calls"); + else + afb_req_success(request, result, NULL); +} + static void get_battery_level(afb_req_t request) { const gchar *device; @@ -638,6 +647,10 @@ static const afb_verb_t verbs[]= { .callback = release_and_answer, }, { + .verb = "get_calls", + .callback = get_calls, + }, + { .verb = "get_battery_level", .callback = get_battery_level, }, |