1 /* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 3. Neither the name of the copyright holders nor the names of 14 * contributors may be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * 4. Any redistribution, use, or modification is done solely for 17 * personal benefit and not for any commercial purpose or for 18 * monetary gain. 19 * 20 * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BLUEKITCHEN 24 * GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * Please inquire about commercial licensing options at 34 * [email protected] 35 * 36 */ 37 38 /** 39 * @title HFP Audio Gateway (AG) 40 * 41 */ 42 43 #ifndef BTSTACK_HFP_AG_H 44 #define BTSTACK_HFP_AG_H 45 46 #include "hci.h" 47 #include "classic/sdp_client_rfcomm.h" 48 #include "classic/hfp.h" 49 #include "classic/hfp_gsm_model.h" 50 51 #if defined __cplusplus 52 extern "C" { 53 #endif 54 55 /* API_START */ 56 typedef struct { 57 uint8_t type; 58 const char * number; 59 } hfp_phone_number_t; 60 61 /** 62 * @brief Create HFP Audio Gateway (AG) SDP service record. 63 * @param service 64 * @param rfcomm_channel_nr 65 * @param name or NULL for default value. Provide "" (empty string) to skip attribute 66 * @param ability_to_reject_call 67 * @param supported_features 32-bit bitmap, see HFP_AGSF_* values in hfp.h 68 * @param codecs_nr 69 * @param codecs 70 */ 71 void hfp_ag_create_sdp_record_with_codecs(uint8_t * service, uint32_t service_record_handle, int rfcomm_channel_nr, 72 const char * name, uint8_t ability_to_reject_call, uint16_t supported_features, 73 uint8_t codecs_nr, const uint8_t * codecs); 74 75 /** 76 * @brief Set up HFP Audio Gateway (AG) device without additional supported features. 77 * @param rfcomm_channel_nr 78 */ 79 void hfp_ag_init(uint8_t rfcomm_channel_nr); 80 81 /** 82 * @brief Set codecs. 83 * @param codecs_nr 84 * @param codecs 85 */ 86 void hfp_ag_init_codecs(uint8_t codecs_nr, const uint8_t * codecs); 87 88 /** 89 * @brief Set supported features. 90 * @param supported_features 32-bit bitmap, see HFP_AGSF_* values in hfp.h 91 */ 92 void hfp_ag_init_supported_features(uint32_t supported_features); 93 94 /** 95 * @brief Set AG indicators. 96 * @param indicators_nr 97 * @param indicators 98 */ 99 void hfp_ag_init_ag_indicators(int ag_indicators_nr, const hfp_ag_indicator_t * ag_indicators); 100 101 /** 102 * @brief Set HF indicators. 103 * @param indicators_nr 104 * @param indicators 105 */ 106 void hfp_ag_init_hf_indicators(int hf_indicators_nr, const hfp_generic_status_indicator_t * hf_indicators); 107 108 /** 109 * @brief Set Call Hold services. 110 * @param indicators_nr 111 * @param indicators 112 */ 113 void hfp_ag_init_call_hold_services(int call_hold_services_nr, const char * call_hold_services[]); 114 115 116 /** 117 * @brief Register callback for the HFP Audio Gateway (AG) client. 118 * @param callback 119 */ 120 void hfp_ag_register_packet_handler(btstack_packet_handler_t callback); 121 122 /** 123 * @brief Register custom AT command. 124 * @param hfp_custom_at_command (with 'AT+' prefix) 125 */ 126 void hfp_ag_register_custom_at_command(hfp_custom_at_command_t * custom_at_command); 127 128 /** 129 * @brief Enable/Disable in-band ring tone. 130 * 131 * @param use_in_band_ring_tone 132 */ 133 void hfp_ag_set_use_in_band_ring_tone(int use_in_band_ring_tone); 134 135 136 // actions used by local device / user 137 138 /** 139 * @brief Establish RFCOMM connection, and perform service level connection agreement: 140 * - exchange of supported features 141 * - report Audio Gateway (AG) indicators and their status 142 * - enable indicator status update in the AG 143 * - accept the information about available codecs in the Hands-Free (HF), if sent 144 * - report own information describing the call hold and multiparty services, if possible 145 * - report which HF indicators are enabled on the AG, if possible 146 * The status of SLC connection establishment is reported via 147 * HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED. 148 * 149 * @param bd_addr of HF 150 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 151 * - ERROR_CODE_COMMAND_DISALLOWED if connection already exists or connection in wrong state, or 152 * - BTSTACK_MEMORY_ALLOC_FAILED 153 * 154 */ 155 uint8_t hfp_ag_establish_service_level_connection(bd_addr_t bd_addr); 156 157 /** 158 * @brief Release the RFCOMM channel and the audio connection between the HF and the AG. 159 * If the audio connection exists, it will be released. 160 * The status of releasing the SLC connection is reported via 161 * HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED. 162 * 163 * @param acl_handle 164 * @return status ERROR_CODE_SUCCESS if successful, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist 165 */ 166 uint8_t hfp_ag_release_service_level_connection(hci_con_handle_t acl_handle); 167 168 /** 169 * @brief Establish audio connection. 170 * The status of Audio connection establishment is reported via HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE. 171 * 172 * @param acl_handle 173 * @return status ERROR_CODE_SUCCESS if successful, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist 174 */ 175 uint8_t hfp_ag_establish_audio_connection(hci_con_handle_t acl_handle); 176 177 /** 178 * @brief Release audio connection. 179 * The status of releasing the Audio connection is reported via HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE. 180 * 181 * @param acl_handle 182 * @return status ERROR_CODE_SUCCESS if successful, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist 183 */ 184 uint8_t hfp_ag_release_audio_connection(hci_con_handle_t acl_handle); 185 186 /** 187 * @brief Put the current call on hold, if it exists, and accept incoming call. 188 */ 189 void hfp_ag_answer_incoming_call(void); 190 191 /** 192 * @brief Join held call with active call. 193 */ 194 void hfp_ag_join_held_call(void); 195 196 /** 197 * @brief Reject incoming call, if exists, or terminate active call. 198 */ 199 void hfp_ag_terminate_call(void); 200 201 /** 202 * @brief Put incoming call on hold. 203 */ 204 void hfp_ag_hold_incoming_call(void); 205 206 /** 207 * @brief Accept the held incoming call. 208 */ 209 void hfp_ag_accept_held_incoming_call(void); 210 211 /** 212 * @brief Reject the held incoming call. 213 */ 214 void hfp_ag_reject_held_incoming_call(void); 215 216 /** 217 * @brief Set microphone gain. 218 * 219 * @param acl_handle 220 * @param gain Valid range: [0,15] 221 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 222 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 223 * - ERROR_CODE_COMMAND_DISALLOWED if invalid gain range 224 */ 225 uint8_t hfp_ag_set_microphone_gain(hci_con_handle_t acl_handle, int gain); 226 227 /** 228 * @brief Set speaker gain. 229 * 230 * @param acl_handle 231 * @param gain Valid range: [0,15] 232 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 233 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 234 * - ERROR_CODE_COMMAND_DISALLOWED if invalid gain range 235 */ 236 uint8_t hfp_ag_set_speaker_gain(hci_con_handle_t acl_handle, int gain); 237 238 /** 239 * @brief Set battery level. 240 * 241 * @param battery_level Valid range: [0,5] 242 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 243 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 244 * - ERROR_CODE_COMMAND_DISALLOWED if invalid battery level range 245 */ 246 uint8_t hfp_ag_set_battery_level(int battery_level); 247 248 /** 249 * @brief Clear last dialed number. 250 */ 251 void hfp_ag_clear_last_dialed_number(void); 252 253 /** 254 * @brief Set last dialed number. 255 */ 256 void hfp_ag_set_last_dialed_number(const char * number); 257 258 /** 259 * @brief Notify the HF that an incoming call is waiting 260 * during an ongoing call. The notification will be sent only if the HF has 261 * has previously enabled the "Call Waiting notification" in the AG. 262 * 263 * @param acl_handle 264 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 265 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 266 * - ERROR_CODE_COMMAND_DISALLOWED if call waiting notification is not enabled 267 */ 268 uint8_t hfp_ag_notify_incoming_call_waiting(hci_con_handle_t acl_handle); 269 270 // Voice Recognition 271 272 /** 273 * @brief Activate voice recognition and emit HFP_SUBEVENT_VOICE_RECOGNITION_ACTIVATED event with status ERROR_CODE_SUCCESS 274 * if successful. Prerequisite is established SLC. 275 * 276 * @param acl_handle 277 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 278 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 279 * - ERROR_CODE_COMMAND_DISALLOWED if feature HFP_(HF/AG)SF_VOICE_RECOGNITION_FUNCTION is not supported by HF and AG, or already activated 280 */ 281 uint8_t hfp_ag_activate_voice_recognition(hci_con_handle_t acl_handle); 282 283 /** 284 * @brief Deactivate voice recognition and emit HFP_SUBEVENT_VOICE_RECOGNITION_DEACTIVATED event with status ERROR_CODE_SUCCESS 285 * if successful. Prerequisite is established SLC. 286 * 287 * @param acl_handle 288 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 289 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 290 * - ERROR_CODE_COMMAND_DISALLOWED if feature HFP_(HF/AG)SF_VOICE_RECOGNITION_FUNCTION is not supported by HF and AG, or already deactivated 291 */ 292 uint8_t hfp_ag_deactivate_voice_recognition(hci_con_handle_t acl_handle); 293 294 /** 295 * @brief Notify HF that sound will be played and HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_IS_STARTING_SOUND event with status ERROR_CODE_SUCCESS 296 * if successful, otherwise ERROR_CODE_COMMAND_DISALLOWED. 297 * 298 * @param acl_handle 299 * @param activate 300 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 301 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 302 * - ERROR_CODE_COMMAND_DISALLOWED if feature HFP_(HF/AG)SF_ENHANCED_VOICE_RECOGNITION_STATUS is not supported by HF and AG 303 */ 304 uint8_t hfp_ag_enhanced_voice_recognition_report_sending_audio(hci_con_handle_t acl_handle); 305 306 /** 307 * @brief Notify HF that AG is ready for input and emit HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_READY_TO_ACCEPT_AUDIO_INPUT event with status ERROR_CODE_SUCCESS 308 * if successful, otherwise ERROR_CODE_COMMAND_DISALLOWED. 309 * 310 * @param acl_handle 311 * @param activate 312 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 313 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 314 * - ERROR_CODE_COMMAND_DISALLOWED if feature HFP_(HF/AG)SF_ENHANCED_VOICE_RECOGNITION_STATUS is not supported by HF and AG 315 */ 316 uint8_t hfp_ag_enhanced_voice_recognition_report_ready_for_audio(hci_con_handle_t acl_handle); 317 318 /** 319 * @brief Notify that AG is processing input and emit HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_IS_PROCESSING_AUDIO_INPUT event with status ERROR_CODE_SUCCESS 320 * if successful, otherwise ERROR_CODE_COMMAND_DISALLOWED. 321 * 322 * @param acl_handle 323 * @param activate 324 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 325 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 326 * - ERROR_CODE_COMMAND_DISALLOWED if feature HFP_(HF/AG)SF_ENHANCED_VOICE_RECOGNITION_STATUS is not supported by HF and AG 327 */ 328 uint8_t hfp_ag_enhanced_voice_recognition_report_processing_input(hci_con_handle_t acl_handle); 329 330 /** 331 * @brief Send enhanced audio recognition message and HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_MESSAGE_SENT event with status ERROR_CODE_SUCCESS 332 * if successful, otherwise ERROR_CODE_COMMAND_DISALLOWED. 333 * 334 * @param acl_handle 335 * @param activate 336 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 337 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, 338 - ERROR_CODE_UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE if the message size exceeds the HFP_MAX_VR_TEXT_SIZE, or the command does not fit into a single packet frame, 339 * - ERROR_CODE_COMMAND_DISALLOWED if HF and AG do not support features: HFP_(HF/AG)SF_ENHANCED_VOICE_RECOGNITION_STATUS and HFP_(HF/AG)SF_VOICE_RECOGNITION_TEXT 340 */ 341 uint8_t hfp_ag_enhanced_voice_recognition_send_message(hci_con_handle_t acl_handle, hfp_voice_recognition_state_t state, hfp_voice_recognition_message_t msg); 342 343 /** 344 * @brief Send a phone number back to the HF. 345 * 346 * @param acl_handle 347 * @param phone_number 348 * @return status ERROR_CODE_SUCCESS if successful, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist 349 */ 350 uint8_t hfp_ag_send_phone_number_for_voice_tag(hci_con_handle_t acl_handle, const char * phone_number); 351 352 /** 353 * @brief Reject sending a phone number to the HF. 354 * 355 * @param acl_handle 356 * @return status ERROR_CODE_SUCCESS if successful, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist 357 */ 358 uint8_t hfp_ag_reject_phone_number_for_voice_tag(hci_con_handle_t acl_handle); 359 360 /** 361 * @brief Store phone number with initiated call. 362 * @param type 363 * @param number 364 */ 365 void hfp_ag_set_clip(uint8_t type, const char * number); 366 367 368 // Cellular Actions 369 370 /** 371 * @brief Pass the accept incoming call event to the AG. 372 */ 373 void hfp_ag_incoming_call(void); 374 375 /** 376 * @brief Outgoing call initiated 377 */ 378 void hfp_ag_outgoing_call_initiated(void); 379 380 /** 381 * @brief Pass the reject outgoing call event to the AG. 382 */ 383 void hfp_ag_outgoing_call_rejected(void); 384 385 /** 386 * @brief Pass the accept outgoing call event to the AG. 387 */ 388 void hfp_ag_outgoing_call_accepted(void); 389 390 /** 391 * @brief Pass the outgoing call ringing event to the AG. 392 */ 393 void hfp_ag_outgoing_call_ringing(void); 394 395 /** 396 * @brief Pass the outgoing call established event to the AG. 397 */ 398 void hfp_ag_outgoing_call_established(void); 399 400 /** 401 * @brief Pass the call dropped event to the AG. 402 */ 403 void hfp_ag_call_dropped(void); 404 405 /** 406 * @brief Set network registration status. 407 * @param status 0 - not registered, 1 - registered 408 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 409 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 410 * - ERROR_CODE_COMMAND_DISALLOWED if invalid registration status 411 */ 412 uint8_t hfp_ag_set_registration_status(int registration_status); 413 414 /** 415 * @brief Set network signal strength. 416 * 417 * @param signal_strength [0-5] 418 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 419 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 420 * - ERROR_CODE_COMMAND_DISALLOWED if invalid signal strength range 421 */ 422 uint8_t hfp_ag_set_signal_strength(int signal_strength); 423 424 /** 425 * @brief Set roaming status. 426 * 427 * @param roaming_status 0 - no roaming, 1 - roaming active 428 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 429 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 430 * - ERROR_CODE_COMMAND_DISALLOWED if invalid roaming status 431 */ 432 uint8_t hfp_ag_set_roaming_status(int roaming_status); 433 434 /** 435 * @brief Set subcriber number information, e.g. the phone number 436 * @param numbers 437 * @param numbers_count 438 */ 439 void hfp_ag_set_subcriber_number_information(hfp_phone_number_t * numbers, int numbers_count); 440 441 /** 442 * @brief Called by cellular unit after a DTMF code was transmitted, so that the next one can be emitted. 443 * 444 * @param acl_handle 445 * @return status ERROR_CODE_SUCCESS if successful, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist 446 */ 447 uint8_t hfp_ag_send_dtmf_code_done(hci_con_handle_t acl_handle); 448 449 /** 450 * @brief Report Extended Audio Gateway Error result codes in the AG. 451 * Whenever there is an error relating to the functionality of the AG as a 452 * result of AT command, the AG shall send +CME ERROR: 453 * - +CME ERROR: 0 - AG failure 454 * - +CME ERROR: 1 - no connection to phone 455 * - +CME ERROR: 3 - operation not allowed 456 * - +CME ERROR: 4 - operation not supported 457 * - +CME ERROR: 5 - PH-SIM PIN required 458 * - +CME ERROR: 10 - SIM not inserted 459 * - +CME ERROR: 11 - SIM PIN required 460 * - +CME ERROR: 12 - SIM PUK required 461 * - +CME ERROR: 13 - SIM failure 462 * - +CME ERROR: 14 - SIM busy 463 * - +CME ERROR: 16 - incorrect password 464 * - +CME ERROR: 17 - SIM PIN2 required 465 * - +CME ERROR: 18 - SIM PUK2 required 466 * - +CME ERROR: 20 - memory full 467 * - +CME ERROR: 21 - invalid index 468 * - +CME ERROR: 23 - memory failure 469 * - +CME ERROR: 24 - text string too long 470 * - +CME ERROR: 25 - invalid characters in text string 471 * - +CME ERROR: 26 - dial string too long 472 * - +CME ERROR: 27 - invalid characters in dial string 473 * - +CME ERROR: 30 - no network service 474 * - +CME ERROR: 31 - network Timeout. 475 * - +CME ERROR: 32 - network not allowed – Emergency calls only 476 * 477 * @param acl_handle 478 * @param error 479 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 480 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 481 * - ERROR_CODE_COMMAND_DISALLOWED if extended audio gateway error report is disabled 482 */ 483 uint8_t hfp_ag_report_extended_audio_gateway_error_result_code(hci_con_handle_t acl_handle, hfp_cme_error_t error); 484 485 /** 486 * @brief Send unsolicited result code (most likely a response to a vendor-specific command not part of standard HFP). 487 * @note Emits HFP_SUBEVENT_CUSTOM_AT_MESSAGE_SENT when result code was sent 488 * 489 * @param unsolicited_result_code to send 490 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 491 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 492 * - ERROR_CODE_COMMAND_DISALLOWED if extended audio gateway error report is disabled 493 */ 494 uint8_t hfp_ag_send_unsolicited_result_code(hci_con_handle_t acl_handle, const char * unsolicited_result_code); 495 496 /** 497 * @brief Send result code for AT command received via HFP_SUBEVENT_CUSTOM_AT_COMMAND 498 * @note Emits HFP_SUBEVENT_COMPLETE when result code was sent 499 * 500 * @param ok for OK, or ERROR 501 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 502 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 503 * - ERROR_CODE_COMMAND_DISALLOWED if extended audio gateway error report is disabled 504 */ 505 uint8_t hfp_ag_send_command_result_code(hci_con_handle_t acl_handle, bool ok); 506 507 /** 508 * @brief De-Init HFP AG 509 */ 510 void hfp_ag_deinit(void); 511 512 /** 513 * @brief Create HFP Audio Gateway (AG) SDP service record. 514 * @deprecated Use hfp_ag_create_sdp_record_with_codecs instead 515 * @param service 516 * @param rfcomm_channel_nr 517 * @param name 518 * @param ability_to_reject_call 519 * @param suported_features 32-bit bitmap, see HFP_AGSF_* values in hfp.h 520 * @param wide_band_speech supported 521 */ 522 void hfp_ag_create_sdp_record(uint8_t * service, uint32_t service_record_handle, int rfcomm_channel_nr, const char * name, uint8_t ability_to_reject_call, uint16_t supported_features, int wide_band_speech); 523 524 /* API_END */ 525 526 // testing 527 hfp_ag_indicator_t * hfp_ag_get_ag_indicators(hfp_connection_t * hfp_connection); 528 529 // @return true to process even as normal, false to cause HFP AG to ignore event 530 void hfp_ag_register_custom_call_sm_handler(bool (*handler)(hfp_ag_call_event_t event)); 531 532 #if defined __cplusplus 533 } 534 #endif 535 536 #endif 537