summaryrefslogtreecommitdiff
path: root/android/hal-handsfree-client.c
diff options
context:
space:
mode:
authorLukasz Rymanowski <lukasz.rymanowski@tieto.com>2014-09-15 13:51:24 +0200
committerSzymon Janc <szymon.janc@tieto.com>2014-09-18 16:36:04 +0200
commit2d5408941e6268b5d98d4c93a690da13c5cafc97 (patch)
treed7e5b5fef96d8fd03a881854738fa240c8ab9220 /android/hal-handsfree-client.c
parent800b2b23a3a2f369ba5f2da5e077dce8dd2aa39c (diff)
downloadbluez-2d5408941e6268b5d98d4c93a690da13c5cafc97.tar.gz
android/handsfree-client: Add Call Action command
Diffstat (limited to 'android/hal-handsfree-client.c')
-rw-r--r--android/hal-handsfree-client.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/android/hal-handsfree-client.c b/android/hal-handsfree-client.c
index 23cbd539b..35929c586 100644
--- a/android/hal-handsfree-client.c
+++ b/android/hal-handsfree-client.c
@@ -229,6 +229,23 @@ static bt_status_t dial_memory(int location)
sizeof(cmd), &cmd, NULL, NULL, NULL);
}
+static bt_status_t call_action(bthf_client_call_action_t action, int index)
+{
+ struct hal_cmd_hf_client_call_action cmd;
+
+ DBG("");
+
+ if (!interface_ready())
+ return BT_STATUS_NOT_READY;
+
+ cmd.action = action;
+ cmd.index = index;
+
+ return hal_ipc_cmd(HAL_SERVICE_ID_HANDSFREE_CLIENT,
+ HAL_OP_HF_CLIENT_CALL_ACTION, sizeof(cmd), &cmd,
+ NULL, NULL, NULL);
+}
+
static void cleanup(void)
{
struct hal_cmd_unregister_module cmd;
@@ -260,6 +277,7 @@ static bthf_client_interface_t iface = {
.volume_control = volume_control,
.dial = dial,
.dial_memory = dial_memory,
+ .handle_call_action = call_action,
.cleanup = cleanup
};