bthf_interface_t Struct Reference

bthf_interface_t Struct Reference

#include < bt_hf.h >

Data Fields

size_t  size
 
bt_status_t (*  init )( bthf_callbacks_t *callbacks, int max_hf_clients)
 
bt_status_t (*  connect )(bt_bdaddr_t *bd_addr)
 
bt_status_t (*  disconnect )(bt_bdaddr_t *bd_addr)
 
bt_status_t (*  connect_audio )(bt_bdaddr_t *bd_addr)
 
bt_status_t (*  disconnect_audio )(bt_bdaddr_t *bd_addr)
 
bt_status_t (*  start_voice_recognition )(bt_bdaddr_t *bd_addr)
 
bt_status_t (*  stop_voice_recognition )(bt_bdaddr_t *bd_addr)
 
bt_status_t (*  volume_control )( bthf_volume_type_t type, int volume, bt_bdaddr_t *bd_addr)
 
bt_status_t (*  device_status_notification )( bthf_network_state_t ntk_state, bthf_service_type_t svc_type, int signal, int batt_chg)
 
bt_status_t (*  cops_response )(const char *cops, bt_bdaddr_t *bd_addr)
 
bt_status_t (*  cind_response )(int svc, int num_active, int num_held, bthf_call_state_t call_setup_state, int signal, int roam, int batt_chg, bt_bdaddr_t *bd_addr)
 
bt_status_t (*  formatted_at_response )(const char *rsp, bt_bdaddr_t *bd_addr)
 
bt_status_t (*  at_response )( bthf_at_response_t response_code, int error_code, bt_bdaddr_t *bd_addr)
 
bt_status_t (*  clcc_response )(int index, bthf_call_direction_t dir, bthf_call_state_t state, bthf_call_mode_t mode, bthf_call_mpty_type_t mpty, const char *number, bthf_call_addrtype_t type, bt_bdaddr_t *bd_addr)
 
bt_status_t (*  phone_state_change )(int num_active, int num_held, bthf_call_state_t call_setup_state, const char *number, bthf_call_addrtype_t type)
 
void(*  cleanup )(void)
 
bt_status_t (*  configure_wbs )(bt_bdaddr_t *bd_addr, bthf_wbs_config_t config)
 

Detailed Description

Represents the standard BT-HF interface.

Definition at line 223 of file bt_hf.h .

Field Documentation

bt_status_t (* at_response)( bthf_at_response_t response_code, int error_code, bt_bdaddr_t *bd_addr)

ok/error response ERROR (0) OK (1)

Definition at line 271 of file bt_hf.h .

bt_status_t (* cind_response)(int svc, int num_active, int num_held, bthf_call_state_t call_setup_state, int signal, int roam, int batt_chg, bt_bdaddr_t *bd_addr)

Response for CIND command

Definition at line 261 of file bt_hf.h .

bt_status_t (* clcc_response)(int index, bthf_call_direction_t dir, bthf_call_state_t state, bthf_call_mode_t mode, bthf_call_mpty_type_t mpty, const char *number, bthf_call_addrtype_t type, bt_bdaddr_t *bd_addr)

response for CLCC command Can be iteratively called for each call index Call index of 0 will be treated as NULL termination (Completes response)

Definition at line 277 of file bt_hf.h .

void(* cleanup)(void)

Closes the interface.

Definition at line 293 of file bt_hf.h .

bt_status_t (* configure_wbs)(bt_bdaddr_t *bd_addr, bthf_wbs_config_t config)

configureation for the SCO codec

Definition at line 296 of file bt_hf.h .

bt_status_t (* connect)(bt_bdaddr_t *bd_addr)

connect to headset

Definition at line 233 of file bt_hf.h .

bt_status_t (* connect_audio)(bt_bdaddr_t *bd_addr)

create an audio connection

Definition at line 239 of file bt_hf.h .

bt_status_t (* cops_response)(const char *cops, bt_bdaddr_t *bd_addr)

Response for COPS command

Definition at line 258 of file bt_hf.h .

bt_status_t (* device_status_notification)( bthf_network_state_t ntk_state, bthf_service_type_t svc_type, int signal, int batt_chg)

Combined device status change notification

Definition at line 254 of file bt_hf.h .

bt_status_t (* disconnect)(bt_bdaddr_t *bd_addr)

dis-connect from headset

Definition at line 236 of file bt_hf.h .

bt_status_t (* disconnect_audio)(bt_bdaddr_t *bd_addr)

close the audio connection

Definition at line 242 of file bt_hf.h .

bt_status_t (* formatted_at_response)(const char *rsp, bt_bdaddr_t *bd_addr)

Pre-formatted AT response, typically in response to unknown AT cmd

Definition at line 265 of file bt_hf.h .

bt_status_t (* init)( bthf_callbacks_t *callbacks, int max_hf_clients)

Register the BtHf callbacks

Definition at line 230 of file bt_hf.h .

bt_status_t (* phone_state_change)(int num_active, int num_held, bthf_call_state_t call_setup_state, const char *number, bthf_call_addrtype_t type)

notify of a call state change Each update notifies

  1. Number of active/held/ringing calls
  2. call_state: This denotes the state change that triggered this msg This will take one of the values from BtHfCallState
  3. number & type: valid only for incoming & waiting call

Definition at line 289 of file bt_hf.h .

size_t size

set to sizeof(BtHfInterface)

Definition at line 226 of file bt_hf.h .

bt_status_t (* start_voice_recognition)(bt_bdaddr_t *bd_addr)

start voice recognition

Definition at line 245 of file bt_hf.h .

bt_status_t (* stop_voice_recognition)(bt_bdaddr_t *bd_addr)

stop voice recognition

Definition at line 248 of file bt_hf.h .

bt_status_t (* volume_control)( bthf_volume_type_t type, int volume, bt_bdaddr_t *bd_addr)

volume control

Definition at line 251 of file bt_hf.h .


The documentation for this struct was generated from the following file:
  • hardware/libhardware/include/hardware/ bt_hf.h