diff options
author | Lukasz Rymanowski <lukasz.rymanowski@tieto.com> | 2014-09-15 13:51:27 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-09-18 16:36:04 +0200 |
commit | bb4743231daf105d5c55d56fb9ece5fba065b62a (patch) | |
tree | 3bfd0254911b3cb01777927e25cd342bf97ac749 /android/hal-handsfree-client.c | |
parent | 350273a7504401bae31a56e413b07a04cea61d22 (diff) | |
download | bluez-bb4743231daf105d5c55d56fb9ece5fba065b62a.tar.gz |
android/handsfree-client: Add Send DTMF command
Diffstat (limited to 'android/hal-handsfree-client.c')
-rw-r--r-- | android/hal-handsfree-client.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/android/hal-handsfree-client.c b/android/hal-handsfree-client.c index d5683d1f7..7c1cfeafa 100644 --- a/android/hal-handsfree-client.c +++ b/android/hal-handsfree-client.c @@ -282,6 +282,22 @@ static bt_status_t retrieve_subsr_info(void) NULL, NULL, NULL); } +static bt_status_t send_dtmf(char tone) +{ + struct hal_cmd_hf_client_send_dtmf cmd; + + DBG(""); + + if (!interface_ready()) + return BT_STATUS_NOT_READY; + + cmd.tone = tone; + + return hal_ipc_cmd(HAL_SERVICE_ID_HANDSFREE_CLIENT, + HAL_OP_HF_CLIENT_SEND_DTMF, sizeof(cmd), &cmd, + NULL, NULL, NULL); +} + static void cleanup(void) { struct hal_cmd_unregister_module cmd; @@ -317,6 +333,7 @@ static bthf_client_interface_t iface = { .query_current_calls = query_current_calls, .query_current_operator_name = query_operator_name, .retrieve_subscriber_info = retrieve_subsr_info, + .send_dtmf = send_dtmf, .cleanup = cleanup }; |