OSDN Git Service

HFP 1.7 profile update (2/4)
authorMudumba Ananth <ananthm%broadcom.com@gtempaccount.com>
Mon, 29 Feb 2016 10:14:09 +0000 (02:14 -0800)
committerAndre Eisenbach <eisenbach@google.com>
Wed, 1 Jun 2016 21:37:30 +0000 (14:37 -0700)
-> Updated the HF HAL interface to support two
   new commands (AT + BIND, AT + BIEV) added
   in the profile update

Bug: 19983867
Change-Id: I672232522e9634d93ae86e5db81544b17b13576d

include/hardware/bt_hf.h

index 7dcb40a..0a77675 100644 (file)
@@ -74,6 +74,20 @@ typedef enum
     BTHF_CHLD_TYPE_ADDHELDTOCONF,            // Add all held calls to a conference
 } bthf_chld_type_t;
 
+
+/* HF Indicators HFP 1.7 */
+typedef enum
+{
+    BTHF_HF_IND_ENHANCED_DRIVER_SAFETY = 1,
+    BTHF_HF_IND_BATTERY_LEVEL_STATUS = 2,
+} bthf_hf_ind_type_t;
+
+typedef enum
+{
+    BTHF_HF_IND_DISABLED = 0,
+    BTHF_HF_IND_ENABLED,
+} bthf_hf_ind_status_t;
+
 /** Callback for connection state change.
  *  state will have one of the values from BtHfConnectionState
  */
@@ -152,6 +166,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 BIND. Pass the remote HF Indicators supported.
+ */
+typedef void (* bthf_bind_cmd_callback)(char *at_string, bt_bdaddr_t *bd_addr);
+
+/** Callback for BIEV. Pass the change in the Remote HF indicator values
+ */
+typedef void (* bthf_biev_cmd_callback)(bthf_hf_ind_type_t ind_id, int ind_value,
+                                        bt_bdaddr_t *bd_addr);
+
 /** BT-HF callback structure. */
 typedef struct {
     /** set to sizeof(BtHfCallbacks) */
@@ -172,6 +195,8 @@ typedef struct {
     bthf_cops_cmd_callback          cops_cmd_cb;
     bthf_clcc_cmd_callback          clcc_cmd_cb;
     bthf_unknown_at_cmd_callback    unknown_at_cmd_cb;
+    bthf_bind_cmd_callback          bind_cb;
+    bthf_biev_cmd_callback          biev_cb;
     bthf_key_pressed_cmd_callback   key_pressed_cmd_cb;
 } bthf_callbacks_t;
 
@@ -294,6 +319,10 @@ typedef struct {
 
     /** configureation for the SCO codec */
     bt_status_t (*configure_wbs)( bt_bdaddr_t *bd_addr ,bthf_wbs_config_t config );
+
+    /** Response for HF Indicator change (+BIND) */
+    bt_status_t (*bind_response)(bthf_hf_ind_type_t ind_id, bthf_hf_ind_status_t ind_status,
+                                 bt_bdaddr_t *bd_addr);
 } bthf_interface_t;
 
 __END_DECLS