Android Hardware Abstraction Layer
Data Fields
bthf_interface_t Struct Reference

#include <bt_hf.h>

Data Fields

size_t size
 
bt_status_t(* init )(bthf_callbacks_t *callbacks)
 
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_status_t(* stop_voice_recognition )()
 
bt_status_t(* volume_control )(bthf_volume_type_t type, int volume)
 
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_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_status_t(* formatted_at_response )(const char *rsp)
 
bt_status_t(* at_response )(bthf_at_response_t response_code, int error_code)
 
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_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)
 

Detailed Description

Represents the standard BT-HF interface.

Definition at line 209 of file bt_hf.h.

Field Documentation

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

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

Definition at line 257 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)

Response for CIND command

Definition at line 247 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)

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 263 of file bt_hf.h.

void(* cleanup)(void)

Closes the interface.

Definition at line 279 of file bt_hf.h.

bt_status_t(* connect)(bt_bdaddr_t *bd_addr)

connect to headset

Definition at line 219 of file bt_hf.h.

bt_status_t(* connect_audio)(bt_bdaddr_t *bd_addr)

create an audio connection

Definition at line 225 of file bt_hf.h.

bt_status_t(* cops_response)(const char *cops)

Response for COPS command

Definition at line 244 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 240 of file bt_hf.h.

bt_status_t(* disconnect)(bt_bdaddr_t *bd_addr)

dis-connect from headset

Definition at line 222 of file bt_hf.h.

bt_status_t(* disconnect_audio)(bt_bdaddr_t *bd_addr)

close the audio connection

Definition at line 228 of file bt_hf.h.

bt_status_t(* formatted_at_response)(const char *rsp)

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

Definition at line 251 of file bt_hf.h.

bt_status_t(* init)(bthf_callbacks_t *callbacks)

Register the BtHf callbacks

Definition at line 216 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 275 of file bt_hf.h.

size_t size

set to sizeof(BtHfInterface)

Definition at line 212 of file bt_hf.h.

bt_status_t(* start_voice_recognition)()

start voice recognition

Definition at line 231 of file bt_hf.h.

bt_status_t(* stop_voice_recognition)()

stop voice recognition

Definition at line 234 of file bt_hf.h.

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

volume control

Definition at line 237 of file bt_hf.h.


The documentation for this struct was generated from the following file: