From 0b4fbfbb27bd22d70eb9de5dc1c2770844cf77a1 Mon Sep 17 00:00:00 2001 From: Sumit Bajpai Date: Fri, 9 Jan 2015 14:48:00 +0530 Subject: BT-HFP: HFP1.7 AG support. Added interfaces to communicate HF indicators information to application. CRs-fixed: 715684 Change-Id: Iab63acef89aa9e36f04e46dbd9f869d7f0f8949e --- include/hardware/bt_hf.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/include/hardware/bt_hf.h b/include/hardware/bt_hf.h index 7dcb40a..6a86f86 100644 --- a/include/hardware/bt_hf.h +++ b/include/hardware/bt_hf.h @@ -65,6 +65,15 @@ typedef enum BTHF_WBS_YES }bthf_wbs_config_t; +/* BIND type*/ +typedef enum +{ + BTHF_BIND_SET, + BTHF_BIND_READ, + BTHF_BIND_TEST +}bthf_bind_type_t; + + /* CHLD - Call held handling */ typedef enum { @@ -152,6 +161,15 @@ typedef void (* bthf_unknown_at_cmd_callback)(char *at_string, bt_bdaddr_t *bd_a */ typedef void (* bthf_key_pressed_cmd_callback)(bt_bdaddr_t *bd_addr); +/** Callback for HF indicators (BIND) + */ +typedef void (* bthf_bind_cmd_callback)(char* hf_ind, bthf_bind_type_t type, bt_bdaddr_t *bd_addr); + +/** Callback for HF indicator value (BIEV) + */ +typedef void (* bthf_biev_cmd_callback)(char* hf_ind_val, bt_bdaddr_t *bd_addr); + + /** BT-HF callback structure. */ typedef struct { /** set to sizeof(BtHfCallbacks) */ @@ -173,6 +191,8 @@ typedef struct { bthf_clcc_cmd_callback clcc_cmd_cb; bthf_unknown_at_cmd_callback unknown_at_cmd_cb; bthf_key_pressed_cmd_callback key_pressed_cmd_cb; + bthf_bind_cmd_callback bind_cmd_cb; + bthf_biev_cmd_callback biev_cmd_cb; } bthf_callbacks_t; /** Network Status */ @@ -216,6 +236,11 @@ typedef enum { } bthf_call_mpty_type_t; typedef enum { + BTHF_HF_INDICATOR_STATE_DISABLED = 0, + BTHF_HF_INDICATOR_STATE_ENABLED +} bthf_hf_indicator_status_t; + +typedef enum { BTHF_CALL_ADDRTYPE_UNKNOWN = 0x81, BTHF_CALL_ADDRTYPE_INTERNATIONAL = 0x91 } bthf_call_addrtype_t; @@ -294,6 +319,13 @@ typedef struct { /** configureation for the SCO codec */ bt_status_t (*configure_wbs)( bt_bdaddr_t *bd_addr ,bthf_wbs_config_t config ); + + /** Response for BIND READ command and activation/deactivation of HF indicator */ + bt_status_t (*bind_response) (int anum, bthf_hf_indicator_status_t status, + bt_bdaddr_t *bd_addr); + + /** Response for BIND TEST command */ + bt_status_t (*bind_string_response) (const char* result, bt_bdaddr_t *bd_addr); } bthf_interface_t; __END_DECLS -- cgit v1.1