bt_hf.h File Reference

Go to the source code of this file.

Data Structures

struct  bthf_callbacks_t
 
struct  bthf_interface_t
 

Typedefs

typedef void(* bthf_connection_state_callback )(bthf_connection_state_t state, bt_bdaddr_t *bd_addr)
 
typedef void(* bthf_audio_state_callback )(bthf_audio_state_t state, bt_bdaddr_t *bd_addr)
 
typedef void(* bthf_vr_cmd_callback )(bthf_vr_state_t state, bt_bdaddr_t *bd_addr)
 
typedef void(* bthf_answer_call_cmd_callback )(bt_bdaddr_t *bd_addr)
 
typedef void(* bthf_hangup_call_cmd_callback )(bt_bdaddr_t *bd_addr)
 
typedef void(* bthf_volume_cmd_callback )(bthf_volume_type_t type, int volume, bt_bdaddr_t *bd_addr)
 
typedef void(* bthf_dial_call_cmd_callback )(char *number, bt_bdaddr_t *bd_addr)
 
typedef void(* bthf_dtmf_cmd_callback )(char tone, bt_bdaddr_t *bd_addr)
 
typedef void(* bthf_nrec_cmd_callback )(bthf_nrec_t nrec, bt_bdaddr_t *bd_addr)
 
typedef void(* bthf_wbs_callback )(bthf_wbs_config_t wbs, bt_bdaddr_t *bd_addr)
 
typedef void(* bthf_chld_cmd_callback )(bthf_chld_type_t chld, bt_bdaddr_t *bd_addr)
 
typedef void(* bthf_cnum_cmd_callback )(bt_bdaddr_t *bd_addr)
 
typedef void(* bthf_cind_cmd_callback )(bt_bdaddr_t *bd_addr)
 
typedef void(* bthf_cops_cmd_callback )(bt_bdaddr_t *bd_addr)
 
typedef void(* bthf_clcc_cmd_callback )(bt_bdaddr_t *bd_addr)
 
typedef void(* bthf_unknown_at_cmd_callback )(char *at_string, bt_bdaddr_t *bd_addr)
 
typedef void(* bthf_key_pressed_cmd_callback )(bt_bdaddr_t *bd_addr)
 

Enumerations

enum  bthf_at_response_t { BTHF_AT_RESPONSE_ERROR = 0, BTHF_AT_RESPONSE_OK }
 
enum  bthf_connection_state_t {
  BTHF_CONNECTION_STATE_DISCONNECTED = 0, BTHF_CONNECTION_STATE_CONNECTING, BTHF_CONNECTION_STATE_CONNECTED, BTHF_CONNECTION_STATE_SLC_CONNECTED,
  BTHF_CONNECTION_STATE_DISCONNECTING
}
 
enum  bthf_audio_state_t { BTHF_AUDIO_STATE_DISCONNECTED = 0, BTHF_AUDIO_STATE_CONNECTING, BTHF_AUDIO_STATE_CONNECTED, BTHF_AUDIO_STATE_DISCONNECTING }
 
enum  bthf_vr_state_t { BTHF_VR_STATE_STOPPED = 0, BTHF_VR_STATE_STARTED }
 
enum  bthf_volume_type_t { BTHF_VOLUME_TYPE_SPK = 0, BTHF_VOLUME_TYPE_MIC }
 
enum  bthf_nrec_t { BTHF_NREC_STOP, BTHF_NREC_START }
 
enum  bthf_wbs_config_t { BTHF_WBS_NONE, BTHF_WBS_NO, BTHF_WBS_YES }
 
enum  bthf_chld_type_t { BTHF_CHLD_TYPE_RELEASEHELD, BTHF_CHLD_TYPE_RELEASEACTIVE_ACCEPTHELD, BTHF_CHLD_TYPE_HOLDACTIVE_ACCEPTHELD, BTHF_CHLD_TYPE_ADDHELDTOCONF }
 
enum  bthf_network_state_t { BTHF_NETWORK_STATE_NOT_AVAILABLE = 0, BTHF_NETWORK_STATE_AVAILABLE }
 
enum  bthf_service_type_t { BTHF_SERVICE_TYPE_HOME = 0, BTHF_SERVICE_TYPE_ROAMING }
 
enum  bthf_call_state_t {
  BTHF_CALL_STATE_ACTIVE = 0, BTHF_CALL_STATE_HELD, BTHF_CALL_STATE_DIALING, BTHF_CALL_STATE_ALERTING,
  BTHF_CALL_STATE_INCOMING, BTHF_CALL_STATE_WAITING, BTHF_CALL_STATE_IDLE
}
 
enum  bthf_call_direction_t { BTHF_CALL_DIRECTION_OUTGOING = 0, BTHF_CALL_DIRECTION_INCOMING }
 
enum  bthf_call_mode_t { BTHF_CALL_TYPE_VOICE = 0, BTHF_CALL_TYPE_DATA, BTHF_CALL_TYPE_FAX }
 
enum  bthf_call_mpty_type_t { BTHF_CALL_MPTY_TYPE_SINGLE = 0, BTHF_CALL_MPTY_TYPE_MULTI }
 
enum  bthf_call_addrtype_t { BTHF_CALL_ADDRTYPE_UNKNOWN = 0x81, BTHF_CALL_ADDRTYPE_INTERNATIONAL = 0x91 }
 

Typedef Documentation

typedef void(* bthf_answer_call_cmd_callback)(bt_bdaddr_t *bd_addr)

Callback for answer incoming call (ATA)

Definition at line 94 of file bt_hf.h.

typedef void(* bthf_audio_state_callback)(bthf_audio_state_t state, bt_bdaddr_t *bd_addr)

Callback for audio connection state change. state will have one of the values from BtHfAudioState

Definition at line 85 of file bt_hf.h.

typedef void(* bthf_chld_cmd_callback)(bthf_chld_type_t chld, bt_bdaddr_t *bd_addr)

Callback for call hold handling (AT+CHLD) value will contain the call hold command (0, 1, 2, 3)

Definition at line 128 of file bt_hf.h.

typedef void(* bthf_cind_cmd_callback)(bt_bdaddr_t *bd_addr)

Callback for indicators (CIND)

Definition at line 136 of file bt_hf.h.

typedef void(* bthf_clcc_cmd_callback)(bt_bdaddr_t *bd_addr)

Callback for call list (AT+CLCC)

Definition at line 144 of file bt_hf.h.

typedef void(* bthf_cnum_cmd_callback)(bt_bdaddr_t *bd_addr)

Callback for CNUM (subscriber number)

Definition at line 132 of file bt_hf.h.

typedef void(* bthf_connection_state_callback)(bthf_connection_state_t state, bt_bdaddr_t *bd_addr)

Callback for connection state change. state will have one of the values from BtHfConnectionState

Definition at line 80 of file bt_hf.h.

typedef void(* bthf_cops_cmd_callback)(bt_bdaddr_t *bd_addr)

Callback for operator selection (COPS)

Definition at line 140 of file bt_hf.h.

typedef void(* bthf_dial_call_cmd_callback)(char *number, bt_bdaddr_t *bd_addr)

Callback for dialing an outgoing call If number is NULL, redial

Definition at line 108 of file bt_hf.h.

typedef void(* bthf_dtmf_cmd_callback)(char tone, bt_bdaddr_t *bd_addr)

Callback for sending DTMF tones tone contains the dtmf character to be sent

Definition at line 113 of file bt_hf.h.

typedef void(* bthf_hangup_call_cmd_callback)(bt_bdaddr_t *bd_addr)

Callback for disconnect call (AT+CHUP)

Definition at line 98 of file bt_hf.h.

typedef void(* bthf_key_pressed_cmd_callback)(bt_bdaddr_t *bd_addr)

Callback for keypressed (HSP) event.

Definition at line 153 of file bt_hf.h.

typedef void(* bthf_nrec_cmd_callback)(bthf_nrec_t nrec, bt_bdaddr_t *bd_addr)

Callback for enabling/disabling noise reduction/echo cancellation value will be 1 to enable, 0 to disable

Definition at line 118 of file bt_hf.h.

typedef void(* bthf_unknown_at_cmd_callback)(char *at_string, bt_bdaddr_t *bd_addr)

Callback for unknown AT command recd from HF at_string will contain the unparsed AT string

Definition at line 149 of file bt_hf.h.

typedef void(* bthf_volume_cmd_callback)(bthf_volume_type_t type, int volume, bt_bdaddr_t *bd_addr)

Callback for disconnect call (AT+CHUP) type will denote Speaker/Mic gain (BtHfVolumeControl).

Definition at line 103 of file bt_hf.h.

typedef void(* bthf_vr_cmd_callback)(bthf_vr_state_t state, bt_bdaddr_t *bd_addr)

Callback for VR connection state change. state will have one of the values from BtHfVRState

Definition at line 90 of file bt_hf.h.

typedef void(* bthf_wbs_callback)(bthf_wbs_config_t wbs, bt_bdaddr_t *bd_addr)

Callback for AT+BCS and event from BAC WBS enable, WBS disable

Definition at line 123 of file bt_hf.h.

Enumeration Type Documentation

Enumerator
BTHF_AT_RESPONSE_ERROR 
BTHF_AT_RESPONSE_OK 

Definition at line 23 of file bt_hf.h.

Enumerator
BTHF_AUDIO_STATE_DISCONNECTED 
BTHF_AUDIO_STATE_CONNECTING 
BTHF_AUDIO_STATE_CONNECTED 
BTHF_AUDIO_STATE_DISCONNECTING 

Definition at line 36 of file bt_hf.h.

Enumerator
BTHF_CALL_ADDRTYPE_UNKNOWN 
BTHF_CALL_ADDRTYPE_INTERNATIONAL 

Definition at line 218 of file bt_hf.h.

Enumerator
BTHF_CALL_DIRECTION_OUTGOING 
BTHF_CALL_DIRECTION_INCOMING 

Definition at line 202 of file bt_hf.h.

Enumerator
BTHF_CALL_TYPE_VOICE 
BTHF_CALL_TYPE_DATA 
BTHF_CALL_TYPE_FAX 

Definition at line 207 of file bt_hf.h.

Enumerator
BTHF_CALL_MPTY_TYPE_SINGLE 
BTHF_CALL_MPTY_TYPE_MULTI 

Definition at line 213 of file bt_hf.h.

Enumerator
BTHF_CALL_STATE_ACTIVE 
BTHF_CALL_STATE_HELD 
BTHF_CALL_STATE_DIALING 
BTHF_CALL_STATE_ALERTING 
BTHF_CALL_STATE_INCOMING 
BTHF_CALL_STATE_WAITING 
BTHF_CALL_STATE_IDLE 

Definition at line 192 of file bt_hf.h.

Enumerator
BTHF_CHLD_TYPE_RELEASEHELD 
BTHF_CHLD_TYPE_RELEASEACTIVE_ACCEPTHELD 
BTHF_CHLD_TYPE_HOLDACTIVE_ACCEPTHELD 
BTHF_CHLD_TYPE_ADDHELDTOCONF 

Definition at line 69 of file bt_hf.h.

Enumerator
BTHF_CONNECTION_STATE_DISCONNECTED 
BTHF_CONNECTION_STATE_CONNECTING 
BTHF_CONNECTION_STATE_CONNECTED 
BTHF_CONNECTION_STATE_SLC_CONNECTED 
BTHF_CONNECTION_STATE_DISCONNECTING 

Definition at line 28 of file bt_hf.h.

Network Status

Enumerator
BTHF_NETWORK_STATE_NOT_AVAILABLE 
BTHF_NETWORK_STATE_AVAILABLE 

Definition at line 179 of file bt_hf.h.

Enumerator
BTHF_NREC_STOP 
BTHF_NREC_START 

Definition at line 54 of file bt_hf.h.

Service type

Enumerator
BTHF_SERVICE_TYPE_HOME 
BTHF_SERVICE_TYPE_ROAMING 

Definition at line 186 of file bt_hf.h.

Enumerator
BTHF_VOLUME_TYPE_SPK 
BTHF_VOLUME_TYPE_MIC 

Definition at line 48 of file bt_hf.h.

Enumerator
BTHF_VR_STATE_STOPPED 
BTHF_VR_STATE_STARTED 

Definition at line 43 of file bt_hf.h.

Enumerator
BTHF_WBS_NONE 
BTHF_WBS_NO 
BTHF_WBS_YES 

Definition at line 61 of file bt_hf.h.