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 * @brief Provide Apple Device information upon AT+XAPL 117 * @param device 118 * @param features 119 */ 120 void hfp_ag_init_apple_identification(const char * device, uint8_t features); 121 122 123 /** 124 * @brief Register callback for the HFP Audio Gateway (AG) client. 125 * @param callback 126 */ 127 void hfp_ag_register_packet_handler(btstack_packet_handler_t callback); 128 129 /** 130 * @brief Register custom AT command. 131 * @param hfp_custom_at_command (with 'AT+' prefix) 132 */ 133 void hfp_ag_register_custom_at_command(hfp_custom_at_command_t * custom_at_command); 134 135 /** 136 * @brief Enable/Disable in-band ring tone. 137 * 138 * @param use_in_band_ring_tone 139 */ 140 void hfp_ag_set_use_in_band_ring_tone(int use_in_band_ring_tone); 141 142 143 // actions used by local device / user 144 145 /** 146 * @brief Establish RFCOMM connection, and perform service level connection agreement: 147 * - exchange of supported features 148 * - report Audio Gateway (AG) indicators and their status 149 * - enable indicator status update in the AG 150 * - accept the information about available codecs in the Hands-Free (HF), if sent 151 * - report own information describing the call hold and multiparty services, if possible 152 * - report which HF indicators are enabled on the AG, if possible 153 * The status of SLC connection establishment is reported via 154 * HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED. 155 * 156 * @param bd_addr of HF 157 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 158 * - ERROR_CODE_COMMAND_DISALLOWED if connection already exists or connection in wrong state, or 159 * - BTSTACK_MEMORY_ALLOC_FAILED 160 * 161 */ 162 uint8_t hfp_ag_establish_service_level_connection(bd_addr_t bd_addr); 163 164 /** 165 * @brief Release the RFCOMM channel and the audio connection between the HF and the AG. 166 * If the audio connection exists, it will be released. 167 * The status of releasing the SLC connection is reported via 168 * HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED. 169 * 170 * @param acl_handle 171 * @return status ERROR_CODE_SUCCESS if successful, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist 172 */ 173 uint8_t hfp_ag_release_service_level_connection(hci_con_handle_t acl_handle); 174 175 /** 176 * @brief Establish audio connection. 177 * The status of Audio connection establishment is reported via HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE. 178 * 179 * @param acl_handle 180 * @return status ERROR_CODE_SUCCESS if successful, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist 181 */ 182 uint8_t hfp_ag_establish_audio_connection(hci_con_handle_t acl_handle); 183 184 /** 185 * @brief Release audio connection. 186 * The status of releasing the Audio connection is reported via HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE. 187 * 188 * @param acl_handle 189 * @return status ERROR_CODE_SUCCESS if successful, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist 190 */ 191 uint8_t hfp_ag_release_audio_connection(hci_con_handle_t acl_handle); 192 193 /** 194 * @brief Put the current call on hold, if it exists, and accept incoming call. 195 */ 196 void hfp_ag_answer_incoming_call(void); 197 198 /** 199 * @brief Join held call with active call. 200 */ 201 void hfp_ag_join_held_call(void); 202 203 /** 204 * @brief Reject incoming call, if exists, or terminate active call. 205 */ 206 void hfp_ag_terminate_call(void); 207 208 /** 209 * @brief Put incoming call on hold. 210 */ 211 void hfp_ag_hold_incoming_call(void); 212 213 /** 214 * @brief Accept the held incoming call. 215 */ 216 void hfp_ag_accept_held_incoming_call(void); 217 218 /** 219 * @brief Reject the held incoming call. 220 */ 221 void hfp_ag_reject_held_incoming_call(void); 222 223 /** 224 * @brief Set microphone gain. 225 * 226 * @param acl_handle 227 * @param gain Valid range: [0,15] 228 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 229 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 230 * - ERROR_CODE_COMMAND_DISALLOWED if invalid gain range 231 */ 232 uint8_t hfp_ag_set_microphone_gain(hci_con_handle_t acl_handle, int gain); 233 234 /** 235 * @brief Set speaker gain. 236 * 237 * @param acl_handle 238 * @param gain Valid range: [0,15] 239 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 240 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 241 * - ERROR_CODE_COMMAND_DISALLOWED if invalid gain range 242 */ 243 uint8_t hfp_ag_set_speaker_gain(hci_con_handle_t acl_handle, int gain); 244 245 /** 246 * @brief Set battery level. 247 * 248 * @param battery_level Valid range: [0,5] 249 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 250 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 251 * - ERROR_CODE_COMMAND_DISALLOWED if invalid battery level range 252 */ 253 uint8_t hfp_ag_set_battery_level(int battery_level); 254 255 /** 256 * @brief Clear last dialed number. 257 */ 258 void hfp_ag_clear_last_dialed_number(void); 259 260 /** 261 * @brief Set last dialed number. 262 */ 263 void hfp_ag_set_last_dialed_number(const char * number); 264 265 /** 266 * @brief Notify the HF that an incoming call is waiting 267 * during an ongoing call. The notification will be sent only if the HF has 268 * has previously enabled the "Call Waiting notification" in the AG. 269 * 270 * @param acl_handle 271 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 272 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 273 * - ERROR_CODE_COMMAND_DISALLOWED if call waiting notification is not enabled 274 */ 275 uint8_t hfp_ag_notify_incoming_call_waiting(hci_con_handle_t acl_handle); 276 277 // Voice Recognition 278 279 /** 280 * @brief Activate voice recognition and emit HFP_SUBEVENT_VOICE_RECOGNITION_ACTIVATED event with status ERROR_CODE_SUCCESS 281 * if successful. Prerequisite is established SLC. 282 * 283 * @param acl_handle 284 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 285 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 286 * - ERROR_CODE_COMMAND_DISALLOWED if feature HFP_(HF/AG)SF_VOICE_RECOGNITION_FUNCTION is not supported by HF and AG, or already activated 287 */ 288 uint8_t hfp_ag_activate_voice_recognition(hci_con_handle_t acl_handle); 289 290 /** 291 * @brief Deactivate voice recognition and emit HFP_SUBEVENT_VOICE_RECOGNITION_DEACTIVATED event with status ERROR_CODE_SUCCESS 292 * if successful. Prerequisite is established SLC. 293 * 294 * @param acl_handle 295 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 296 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 297 * - ERROR_CODE_COMMAND_DISALLOWED if feature HFP_(HF/AG)SF_VOICE_RECOGNITION_FUNCTION is not supported by HF and AG, or already deactivated 298 */ 299 uint8_t hfp_ag_deactivate_voice_recognition(hci_con_handle_t acl_handle); 300 301 /** 302 * @brief Notify HF that sound will be played and HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_IS_STARTING_SOUND event with status ERROR_CODE_SUCCESS 303 * if successful, otherwise ERROR_CODE_COMMAND_DISALLOWED. 304 * 305 * @param acl_handle 306 * @param activate 307 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 308 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 309 * - ERROR_CODE_COMMAND_DISALLOWED if feature HFP_(HF/AG)SF_ENHANCED_VOICE_RECOGNITION_STATUS is not supported by HF and AG 310 */ 311 uint8_t hfp_ag_enhanced_voice_recognition_report_sending_audio(hci_con_handle_t acl_handle); 312 313 /** 314 * @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 315 * if successful, otherwise ERROR_CODE_COMMAND_DISALLOWED. 316 * 317 * @param acl_handle 318 * @param activate 319 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 320 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 321 * - ERROR_CODE_COMMAND_DISALLOWED if feature HFP_(HF/AG)SF_ENHANCED_VOICE_RECOGNITION_STATUS is not supported by HF and AG 322 */ 323 uint8_t hfp_ag_enhanced_voice_recognition_report_ready_for_audio(hci_con_handle_t acl_handle); 324 325 /** 326 * @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 327 * if successful, otherwise ERROR_CODE_COMMAND_DISALLOWED. 328 * 329 * @param acl_handle 330 * @param activate 331 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 332 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 333 * - ERROR_CODE_COMMAND_DISALLOWED if feature HFP_(HF/AG)SF_ENHANCED_VOICE_RECOGNITION_STATUS is not supported by HF and AG 334 */ 335 uint8_t hfp_ag_enhanced_voice_recognition_report_processing_input(hci_con_handle_t acl_handle); 336 337 /** 338 * @brief Send enhanced audio recognition message and HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_MESSAGE_SENT event with status ERROR_CODE_SUCCESS 339 * if successful, otherwise ERROR_CODE_COMMAND_DISALLOWED. 340 * 341 * @param acl_handle 342 * @param activate 343 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 344 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, 345 - 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, 346 * - 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 347 */ 348 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); 349 350 /** 351 * @brief Send a phone number back to the HF. 352 * 353 * @param acl_handle 354 * @param phone_number 355 * @return status ERROR_CODE_SUCCESS if successful, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist 356 */ 357 uint8_t hfp_ag_send_phone_number_for_voice_tag(hci_con_handle_t acl_handle, const char * phone_number); 358 359 /** 360 * @brief Reject sending a phone number to the HF. 361 * 362 * @param acl_handle 363 * @return status ERROR_CODE_SUCCESS if successful, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist 364 */ 365 uint8_t hfp_ag_reject_phone_number_for_voice_tag(hci_con_handle_t acl_handle); 366 367 /** 368 * @brief Store phone number with initiated call. 369 * @param type 370 * @param number 371 */ 372 void hfp_ag_set_clip(uint8_t type, const char * number); 373 374 375 // Cellular Actions 376 377 /** 378 * @brief Pass the accept incoming call event to the AG. 379 */ 380 void hfp_ag_incoming_call(void); 381 382 /** 383 * @brief Outgoing call initiated 384 */ 385 void hfp_ag_outgoing_call_initiated(void); 386 387 /** 388 * @brief Pass the reject outgoing call event to the AG. 389 */ 390 void hfp_ag_outgoing_call_rejected(void); 391 392 /** 393 * @brief Pass the accept outgoing call event to the AG. 394 */ 395 void hfp_ag_outgoing_call_accepted(void); 396 397 /** 398 * @brief Pass the outgoing call ringing event to the AG. 399 */ 400 void hfp_ag_outgoing_call_ringing(void); 401 402 /** 403 * @brief Pass the outgoing call established event to the AG. 404 */ 405 void hfp_ag_outgoing_call_established(void); 406 407 /** 408 * @brief Pass the call dropped event to the AG. 409 */ 410 void hfp_ag_call_dropped(void); 411 412 /** 413 * @brief Set network registration status. 414 * @param status 0 - not registered, 1 - registered 415 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 416 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 417 * - ERROR_CODE_COMMAND_DISALLOWED if invalid registration status 418 */ 419 uint8_t hfp_ag_set_registration_status(int registration_status); 420 421 /** 422 * @brief Set network signal strength. 423 * 424 * @param signal_strength [0-5] 425 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 426 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 427 * - ERROR_CODE_COMMAND_DISALLOWED if invalid signal strength range 428 */ 429 uint8_t hfp_ag_set_signal_strength(int signal_strength); 430 431 /** 432 * @brief Set roaming status. 433 * 434 * @param roaming_status 0 - no roaming, 1 - roaming active 435 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 436 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 437 * - ERROR_CODE_COMMAND_DISALLOWED if invalid roaming status 438 */ 439 uint8_t hfp_ag_set_roaming_status(int roaming_status); 440 441 /** 442 * @brief Set subcriber number information, e.g. the phone number 443 * @param numbers 444 * @param numbers_count 445 */ 446 void hfp_ag_set_subcriber_number_information(hfp_phone_number_t * numbers, int numbers_count); 447 448 /** 449 * @brief Called by cellular unit after a DTMF code was transmitted, so that the next one can be emitted. 450 * 451 * @param acl_handle 452 * @return status ERROR_CODE_SUCCESS if successful, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist 453 */ 454 uint8_t hfp_ag_send_dtmf_code_done(hci_con_handle_t acl_handle); 455 456 /** 457 * @brief Report Extended Audio Gateway Error result codes in the AG. 458 * Whenever there is an error relating to the functionality of the AG as a 459 * result of AT command, the AG shall send +CME ERROR: 460 * - +CME ERROR: 0 - AG failure 461 * - +CME ERROR: 1 - no connection to phone 462 * - +CME ERROR: 3 - operation not allowed 463 * - +CME ERROR: 4 - operation not supported 464 * - +CME ERROR: 5 - PH-SIM PIN required 465 * - +CME ERROR: 10 - SIM not inserted 466 * - +CME ERROR: 11 - SIM PIN required 467 * - +CME ERROR: 12 - SIM PUK required 468 * - +CME ERROR: 13 - SIM failure 469 * - +CME ERROR: 14 - SIM busy 470 * - +CME ERROR: 16 - incorrect password 471 * - +CME ERROR: 17 - SIM PIN2 required 472 * - +CME ERROR: 18 - SIM PUK2 required 473 * - +CME ERROR: 20 - memory full 474 * - +CME ERROR: 21 - invalid index 475 * - +CME ERROR: 23 - memory failure 476 * - +CME ERROR: 24 - text string too long 477 * - +CME ERROR: 25 - invalid characters in text string 478 * - +CME ERROR: 26 - dial string too long 479 * - +CME ERROR: 27 - invalid characters in dial string 480 * - +CME ERROR: 30 - no network service 481 * - +CME ERROR: 31 - network Timeout. 482 * - +CME ERROR: 32 - network not allowed – Emergency calls only 483 * 484 * @param acl_handle 485 * @param error 486 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 487 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 488 * - ERROR_CODE_COMMAND_DISALLOWED if extended audio gateway error report is disabled 489 */ 490 uint8_t hfp_ag_report_extended_audio_gateway_error_result_code(hci_con_handle_t acl_handle, hfp_cme_error_t error); 491 492 /** 493 * @brief Send unsolicited result code (most likely a response to a vendor-specific command not part of standard HFP). 494 * @note Emits HFP_SUBEVENT_CUSTOM_AT_MESSAGE_SENT when result code was sent 495 * 496 * @param unsolicited_result_code to send 497 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 498 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 499 * - ERROR_CODE_COMMAND_DISALLOWED if extended audio gateway error report is disabled 500 */ 501 uint8_t hfp_ag_send_unsolicited_result_code(hci_con_handle_t acl_handle, const char * unsolicited_result_code); 502 503 /** 504 * @brief Send result code for AT command received via HFP_SUBEVENT_CUSTOM_AT_COMMAND 505 * @note Emits HFP_SUBEVENT_COMPLETE when result code was sent 506 * 507 * @param ok for OK, or ERROR 508 * @return status ERROR_CODE_SUCCESS if successful, otherwise: 509 * - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or 510 * - ERROR_CODE_COMMAND_DISALLOWED if extended audio gateway error report is disabled 511 */ 512 uint8_t hfp_ag_send_command_result_code(hci_con_handle_t acl_handle, bool ok); 513 514 /** 515 * @brief De-Init HFP AG 516 */ 517 void hfp_ag_deinit(void); 518 519 /** 520 * @brief Create HFP Audio Gateway (AG) SDP service record. 521 * @deprecated Use hfp_ag_create_sdp_record_with_codecs instead 522 * @param service 523 * @param rfcomm_channel_nr 524 * @param name 525 * @param ability_to_reject_call 526 * @param suported_features 32-bit bitmap, see HFP_AGSF_* values in hfp.h 527 * @param wide_band_speech supported 528 */ 529 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); 530 531 /* API_END */ 532 533 // testing 534 hfp_ag_indicator_t * hfp_ag_get_ag_indicators(hfp_connection_t * hfp_connection); 535 536 // @return true to process even as normal, false to cause HFP AG to ignore event 537 void hfp_ag_register_custom_call_sm_handler(bool (*handler)(hfp_ag_call_event_t event)); 538 539 #if defined __cplusplus 540 } 541 #endif 542 543 #endif 544