blob: a31de0fc1676876a430a1db457487962c7fb2ecf [file] [log] [blame]
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -07001/*
2 * Copyright (C) 2012-2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_INCLUDE_BT_HF_CLIENT_H
18#define ANDROID_INCLUDE_BT_HF_CLIENT_H
19
20__BEGIN_DECLS
21
22typedef enum {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070023 BTHF_CLIENT_CONNECTION_STATE_DISCONNECTED = 0,
24 BTHF_CLIENT_CONNECTION_STATE_CONNECTING,
25 BTHF_CLIENT_CONNECTION_STATE_CONNECTED,
26 BTHF_CLIENT_CONNECTION_STATE_SLC_CONNECTED,
27 BTHF_CLIENT_CONNECTION_STATE_DISCONNECTING
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070028} bthf_client_connection_state_t;
29
30typedef enum {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070031 BTHF_CLIENT_AUDIO_STATE_DISCONNECTED = 0,
32 BTHF_CLIENT_AUDIO_STATE_CONNECTING,
33 BTHF_CLIENT_AUDIO_STATE_CONNECTED,
34 BTHF_CLIENT_AUDIO_STATE_CONNECTED_MSBC,
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070035} bthf_client_audio_state_t;
36
37typedef enum {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070038 BTHF_CLIENT_VR_STATE_STOPPED = 0,
39 BTHF_CLIENT_VR_STATE_STARTED
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070040} bthf_client_vr_state_t;
41
42typedef enum {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070043 BTHF_CLIENT_VOLUME_TYPE_SPK = 0,
44 BTHF_CLIENT_VOLUME_TYPE_MIC
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070045} bthf_client_volume_type_t;
46
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070047typedef enum {
48 BTHF_CLIENT_NETWORK_STATE_NOT_AVAILABLE = 0,
49 BTHF_CLIENT_NETWORK_STATE_AVAILABLE
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070050} bthf_client_network_state_t;
51
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070052typedef enum {
53 BTHF_CLIENT_SERVICE_TYPE_HOME = 0,
54 BTHF_CLIENT_SERVICE_TYPE_ROAMING
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070055} bthf_client_service_type_t;
56
57typedef enum {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070058 BTHF_CLIENT_CALL_STATE_ACTIVE = 0,
59 BTHF_CLIENT_CALL_STATE_HELD,
60 BTHF_CLIENT_CALL_STATE_DIALING,
61 BTHF_CLIENT_CALL_STATE_ALERTING,
62 BTHF_CLIENT_CALL_STATE_INCOMING,
63 BTHF_CLIENT_CALL_STATE_WAITING,
64 BTHF_CLIENT_CALL_STATE_HELD_BY_RESP_HOLD,
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070065} bthf_client_call_state_t;
66
67typedef enum {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070068 BTHF_CLIENT_CALL_NO_CALLS_IN_PROGRESS = 0,
69 BTHF_CLIENT_CALL_CALLS_IN_PROGRESS
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070070} bthf_client_call_t;
71
72typedef enum {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070073 BTHF_CLIENT_CALLSETUP_NONE = 0,
74 BTHF_CLIENT_CALLSETUP_INCOMING,
75 BTHF_CLIENT_CALLSETUP_OUTGOING,
76 BTHF_CLIENT_CALLSETUP_ALERTING
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070077
78} bthf_client_callsetup_t;
79
80typedef enum {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070081 BTHF_CLIENT_CALLHELD_NONE = 0,
82 BTHF_CLIENT_CALLHELD_HOLD_AND_ACTIVE,
83 BTHF_CLIENT_CALLHELD_HOLD,
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070084} bthf_client_callheld_t;
85
86typedef enum {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070087 BTHF_CLIENT_RESP_AND_HOLD_HELD = 0,
88 BTRH_CLIENT_RESP_AND_HOLD_ACCEPT,
89 BTRH_CLIENT_RESP_AND_HOLD_REJECT,
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070090} bthf_client_resp_and_hold_t;
91
92typedef enum {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070093 BTHF_CLIENT_CALL_DIRECTION_OUTGOING = 0,
94 BTHF_CLIENT_CALL_DIRECTION_INCOMING
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070095} bthf_client_call_direction_t;
96
97typedef enum {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070098 BTHF_CLIENT_CALL_MPTY_TYPE_SINGLE = 0,
99 BTHF_CLIENT_CALL_MPTY_TYPE_MULTI
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700100} bthf_client_call_mpty_type_t;
101
102typedef enum {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700103 BTHF_CLIENT_CMD_COMPLETE_OK = 0,
104 BTHF_CLIENT_CMD_COMPLETE_ERROR,
105 BTHF_CLIENT_CMD_COMPLETE_ERROR_NO_CARRIER,
106 BTHF_CLIENT_CMD_COMPLETE_ERROR_BUSY,
107 BTHF_CLIENT_CMD_COMPLETE_ERROR_NO_ANSWER,
108 BTHF_CLIENT_CMD_COMPLETE_ERROR_DELAYED,
109 BTHF_CLIENT_CMD_COMPLETE_ERROR_BLACKLISTED,
110 BTHF_CLIENT_CMD_COMPLETE_ERROR_CME
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700111} bthf_client_cmd_complete_t;
112
113typedef enum {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700114 BTHF_CLIENT_CALL_ACTION_CHLD_0 = 0,
115 BTHF_CLIENT_CALL_ACTION_CHLD_1,
116 BTHF_CLIENT_CALL_ACTION_CHLD_2,
117 BTHF_CLIENT_CALL_ACTION_CHLD_3,
118 BTHF_CLIENT_CALL_ACTION_CHLD_4,
119 BTHF_CLIENT_CALL_ACTION_CHLD_1x,
120 BTHF_CLIENT_CALL_ACTION_CHLD_2x,
121 BTHF_CLIENT_CALL_ACTION_ATA,
122 BTHF_CLIENT_CALL_ACTION_CHUP,
123 BTHF_CLIENT_CALL_ACTION_BTRH_0,
124 BTHF_CLIENT_CALL_ACTION_BTRH_1,
125 BTHF_CLIENT_CALL_ACTION_BTRH_2,
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700126} bthf_client_call_action_t;
127
128typedef enum {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700129 BTHF_CLIENT_SERVICE_UNKNOWN = 0,
130 BTHF_CLIENT_SERVICE_VOICE,
131 BTHF_CLIENT_SERVICE_FAX
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700132} bthf_client_subscriber_service_type_t;
133
134typedef enum {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700135 BTHF_CLIENT_IN_BAND_RINGTONE_NOT_PROVIDED = 0,
136 BTHF_CLIENT_IN_BAND_RINGTONE_PROVIDED,
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700137} bthf_client_in_band_ring_state_t;
138
139/* Peer features masks */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700140#define BTHF_CLIENT_PEER_FEAT_3WAY 0x00000001 /* Three-way calling */
141#define BTHF_CLIENT_PEER_FEAT_ECNR \
142 0x00000002 /* Echo cancellation and/or noise reduction */
143#define BTHF_CLIENT_PEER_FEAT_VREC 0x00000004 /* Voice recognition */
144#define BTHF_CLIENT_PEER_FEAT_INBAND 0x00000008 /* In-band ring tone */
145#define BTHF_CLIENT_PEER_FEAT_VTAG \
146 0x00000010 /* Attach a phone number to a voice tag */
147#define BTHF_CLIENT_PEER_FEAT_REJECT \
148 0x00000020 /* Ability to reject incoming call */
149#define BTHF_CLIENT_PEER_FEAT_ECS 0x00000040 /* Enhanced Call Status */
150#define BTHF_CLIENT_PEER_FEAT_ECC 0x00000080 /* Enhanced Call Control */
151#define BTHF_CLIENT_PEER_FEAT_EXTERR 0x00000100 /* Extended error codes */
152#define BTHF_CLIENT_PEER_FEAT_CODEC 0x00000200 /* Codec Negotiation */
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700153
154/* Peer call handling features masks */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700155#define BTHF_CLIENT_CHLD_FEAT_REL \
156 0x00000001 /* 0 Release waiting call or held calls */
157#define BTHF_CLIENT_CHLD_FEAT_REL_ACC \
158 0x00000002 /* 1 Release active calls and accept other \
159 (waiting or held) cal */
160#define BTHF_CLIENT_CHLD_FEAT_REL_X \
161 0x00000004 /* 1x Release specified active call only */
162#define BTHF_CLIENT_CHLD_FEAT_HOLD_ACC \
163 0x00000008 /* 2 Active calls on hold and accept other \
164 (waiting or held) call */
165#define BTHF_CLIENT_CHLD_FEAT_PRIV_X \
166 0x00000010 /* 2x Request private mode with specified \
167 call (put the rest on hold) */
168#define BTHF_CLIENT_CHLD_FEAT_MERGE \
169 0x00000020 /* 3 Add held call to multiparty */
170#define BTHF_CLIENT_CHLD_FEAT_MERGE_DETACH \
171 0x00000040 /* 4 Connect two calls and leave \
172 (disconnect from) multiparty */
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700173
174/** Callback for connection state change.
175 * state will have one of the values from BtHfConnectionState
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700176 * peer/chld_features are valid only for
177 * BTHF_CLIENT_CONNECTION_STATE_SLC_CONNECTED state
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700178 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700179typedef void (*bthf_client_connection_state_callback)(
180 const RawAddress* bd_addr, bthf_client_connection_state_t state,
181 unsigned int peer_feat, unsigned int chld_feat);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700182
183/** Callback for audio connection state change.
184 * state will have one of the values from BtHfAudioState
185 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700186typedef void (*bthf_client_audio_state_callback)(
187 const RawAddress* bd_addr, bthf_client_audio_state_t state);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700188
189/** Callback for VR connection state change.
190 * state will have one of the values from BtHfVRState
191 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700192typedef void (*bthf_client_vr_cmd_callback)(const RawAddress* bd_addr,
193 bthf_client_vr_state_t state);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700194
195/** Callback for network state change
196 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700197typedef void (*bthf_client_network_state_callback)(
198 const RawAddress* bd_addr, bthf_client_network_state_t state);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700199
200/** Callback for network roaming status change
201 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700202typedef void (*bthf_client_network_roaming_callback)(
203 const RawAddress* bd_addr, bthf_client_service_type_t type);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700204
205/** Callback for signal strength indication
206 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700207typedef void (*bthf_client_network_signal_callback)(const RawAddress* bd_addr,
208 int signal_strength);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700209
210/** Callback for battery level indication
211 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700212typedef void (*bthf_client_battery_level_callback)(const RawAddress* bd_addr,
213 int battery_level);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700214
215/** Callback for current operator name
216 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700217typedef void (*bthf_client_current_operator_callback)(const RawAddress* bd_addr,
218 const char* name);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700219
220/** Callback for call indicator
221 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700222typedef void (*bthf_client_call_callback)(const RawAddress* bd_addr,
223 bthf_client_call_t call);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700224
225/** Callback for callsetup indicator
226 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700227typedef void (*bthf_client_callsetup_callback)(
228 const RawAddress* bd_addr, bthf_client_callsetup_t callsetup);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700229
230/** Callback for callheld indicator
231 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700232typedef void (*bthf_client_callheld_callback)(const RawAddress* bd_addr,
233 bthf_client_callheld_t callheld);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700234
235/** Callback for response and hold
236 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700237typedef void (*bthf_client_resp_and_hold_callback)(
238 const RawAddress* bd_addr, bthf_client_resp_and_hold_t resp_and_hold);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700239
240/** Callback for Calling Line Identification notification
241 * Will be called only when there is an incoming call and number is provided.
242 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700243typedef void (*bthf_client_clip_callback)(const RawAddress* bd_addr,
244 const char* number);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700245
246/**
247 * Callback for Call Waiting notification
248 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700249typedef void (*bthf_client_call_waiting_callback)(const RawAddress* bd_addr,
250 const char* number);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700251
252/**
253 * Callback for listing current calls. Can be called multiple time.
254 * If number is unknown NULL is passed.
255 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700256typedef void (*bthf_client_current_calls)(const RawAddress* bd_addr, int index,
257 bthf_client_call_direction_t dir,
258 bthf_client_call_state_t state,
259 bthf_client_call_mpty_type_t mpty,
260 const char* number);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700261
262/** Callback for audio volume change
263 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700264typedef void (*bthf_client_volume_change_callback)(
265 const RawAddress* bd_addr, bthf_client_volume_type_t type, int volume);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700266
267/** Callback for command complete event
268 * cme is valid only for BTHF_CLIENT_CMD_COMPLETE_ERROR_CME type
269 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700270typedef void (*bthf_client_cmd_complete_callback)(
271 const RawAddress* bd_addr, bthf_client_cmd_complete_t type, int cme);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700272
273/** Callback for subscriber information
274 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700275typedef void (*bthf_client_subscriber_info_callback)(
276 const RawAddress* bd_addr, const char* name,
277 bthf_client_subscriber_service_type_t type);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700278
279/** Callback for in-band ring tone settings
280 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700281typedef void (*bthf_client_in_band_ring_tone_callback)(
282 const RawAddress* bd_addr, bthf_client_in_band_ring_state_t state);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700283
284/**
285 * Callback for requested number from AG
286 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700287typedef void (*bthf_client_last_voice_tag_number_callback)(
288 const RawAddress* bd_addr, const char* number);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700289
290/**
291 * Callback for sending ring indication to app
292 */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700293typedef void (*bthf_client_ring_indication_callback)(const RawAddress* bd_addr);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700294
295/** BT-HF callback structure. */
296typedef struct {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700297 /** set to sizeof(BtHfClientCallbacks) */
298 size_t size;
299 bthf_client_connection_state_callback connection_state_cb;
300 bthf_client_audio_state_callback audio_state_cb;
301 bthf_client_vr_cmd_callback vr_cmd_cb;
302 bthf_client_network_state_callback network_state_cb;
303 bthf_client_network_roaming_callback network_roaming_cb;
304 bthf_client_network_signal_callback network_signal_cb;
305 bthf_client_battery_level_callback battery_level_cb;
306 bthf_client_current_operator_callback current_operator_cb;
307 bthf_client_call_callback call_cb;
308 bthf_client_callsetup_callback callsetup_cb;
309 bthf_client_callheld_callback callheld_cb;
310 bthf_client_resp_and_hold_callback resp_and_hold_cb;
311 bthf_client_clip_callback clip_cb;
312 bthf_client_call_waiting_callback call_waiting_cb;
313 bthf_client_current_calls current_calls_cb;
314 bthf_client_volume_change_callback volume_change_cb;
315 bthf_client_cmd_complete_callback cmd_complete_cb;
316 bthf_client_subscriber_info_callback subscriber_info_cb;
317 bthf_client_in_band_ring_tone_callback in_band_ring_tone_cb;
318 bthf_client_last_voice_tag_number_callback last_voice_tag_number_callback;
319 bthf_client_ring_indication_callback ring_indication_cb;
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700320} bthf_client_callbacks_t;
321
322/** Represents the standard BT-HF interface. */
323typedef struct {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700324 /** set to sizeof(BtHfClientInterface) */
325 size_t size;
326 /**
327 * Register the BtHf callbacks
328 */
329 bt_status_t (*init)(bthf_client_callbacks_t* callbacks);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700330
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700331 /** connect to audio gateway */
332 bt_status_t (*connect)(RawAddress* bd_addr);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700333
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700334 /** disconnect from audio gateway */
335 bt_status_t (*disconnect)(const RawAddress* bd_addr);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700336
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700337 /** create an audio connection */
338 bt_status_t (*connect_audio)(const RawAddress* bd_addr);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700339
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700340 /** close the audio connection */
341 bt_status_t (*disconnect_audio)(const RawAddress* bd_addr);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700342
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700343 /** start voice recognition */
344 bt_status_t (*start_voice_recognition)(const RawAddress* bd_addr);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700345
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700346 /** stop voice recognition */
347 bt_status_t (*stop_voice_recognition)(const RawAddress* bd_addr);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700348
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700349 /** volume control */
350 bt_status_t (*volume_control)(const RawAddress* bd_addr,
351 bthf_client_volume_type_t type, int volume);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700352
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700353 /** place a call with number a number
354 * if number is NULL last called number is called (aka re-dial)*/
355 bt_status_t (*dial)(const RawAddress* bd_addr, const char* number);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700356
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700357 /** place a call with number specified by location (speed dial) */
358 bt_status_t (*dial_memory)(const RawAddress* bd_addr, int location);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700359
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700360 /** perform specified call related action
361 * idx is limited only for enhanced call control related action
362 */
363 bt_status_t (*handle_call_action)(const RawAddress* bd_addr,
364 bthf_client_call_action_t action, int idx);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700365
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700366 /** query list of current calls */
367 bt_status_t (*query_current_calls)(const RawAddress* bd_addr);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700368
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700369 /** query name of current selected operator */
370 bt_status_t (*query_current_operator_name)(const RawAddress* bd_addr);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700371
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700372 /** Retrieve subscriber information */
373 bt_status_t (*retrieve_subscriber_info)(const RawAddress* bd_addr);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700374
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700375 /** Send DTMF code*/
376 bt_status_t (*send_dtmf)(const RawAddress* bd_addr, char code);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700377
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700378 /** Request a phone number from AG corresponding to last voice tag recorded */
379 bt_status_t (*request_last_voice_tag_number)(const RawAddress* bd_addr);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700380
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700381 /** Closes the interface. */
382 void (*cleanup)(void);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700383
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -0700384 /** Send AT Command. */
385 bt_status_t (*send_at_cmd)(const RawAddress* bd_addr, int cmd, int val1,
386 int val2, const char* arg);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -0700387} bthf_client_interface_t;
388
389__END_DECLS
390
391#endif /* ANDROID_INCLUDE_BT_HF_CLIENT_H */