1 /****************************************************************************** 2 * 3 * Copyright 2004-2012 Broadcom Corporation 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ******************************************************************************/ 18 19 /****************************************************************************** 20 * 21 * This is the public interface file for the simulatenous advanced 22 * audio/video streaming (AV) source and sink of BTA, Broadcom's Bluetooth 23 * application layer for mobile phones. 24 * 25 ******************************************************************************/ 26 #ifndef BTA_AR_API_H 27 #define BTA_AR_API_H 28 29 #include <cstdint> 30 31 #include "bta/sys/bta_sys.h" 32 #include "stack/include/avdt_api.h" 33 #include "types/raw_address.h" 34 35 /***************************************************************************** 36 * Constants and data types 37 ****************************************************************************/ 38 /* This event signal to AR user that other profile is connected */ 39 #define BTA_AR_AVDT_CONN_EVT (AVDT_MAX_EVT + 1) 40 41 /******************************************************************************* 42 * 43 * Function bta_ar_init 44 * 45 * Description This function is called from bta_sys_init(). 46 * to initialize the control block 47 * 48 * Returns void 49 * 50 ******************************************************************************/ 51 void bta_ar_init(void); 52 53 /******************************************************************************* 54 * 55 * Function bta_ar_reg_avdt 56 * 57 * Description This function is called to register to AVDTP. 58 * 59 * Returns void 60 * 61 ******************************************************************************/ 62 void bta_ar_reg_avdt(AvdtpRcb* p_reg, tAVDT_CTRL_CBACK* p_cback); 63 64 /******************************************************************************* 65 * 66 * Function bta_ar_dereg_avdt 67 * 68 * Description This function is called to de-register from AVDTP. 69 * 70 * Returns void 71 * 72 ******************************************************************************/ 73 void bta_ar_dereg_avdt(); 74 75 /******************************************************************************* 76 * 77 * Function bta_ar_reg_avct 78 * 79 * Description This function is called to register to AVCTP. 80 * 81 * Returns void 82 * 83 ******************************************************************************/ 84 void bta_ar_reg_avct(); 85 86 /******************************************************************************* 87 * 88 * Function bta_ar_dereg_avct 89 * 90 * Description This function is called to deregister from AVCTP. 91 * 92 * Returns void 93 * 94 ******************************************************************************/ 95 void bta_ar_dereg_avct(); 96 97 /****************************************************************************** 98 * 99 * Function bta_ar_reg_avrc 100 * 101 * Description This function is called to register an SDP record for AVRCP. 102 * 103 * Returns void 104 * 105 *****************************************************************************/ 106 void bta_ar_reg_avrc(uint16_t service_uuid, const char* p_service_name, const char* p_provider_name, 107 uint16_t categories, bool browse_supported, uint16_t profile_version); 108 109 /****************************************************************************** 110 * 111 * Function bta_ar_dereg_avrc 112 * 113 * Description This function is called to de-register/delete an SDP record 114 * for AVRCP. 115 * 116 * Returns void 117 * 118 *****************************************************************************/ 119 void bta_ar_dereg_avrc(uint16_t service_uuid); 120 121 /****************************************************************************** 122 * 123 * Function bta_ar_reg_avrc_for_src_sink_coexist 124 * 125 * Description This function is called to register an SDP record for AVRCP. 126 * Add sys_id to distinguish src or sink role and add also save 127 *tg_categories 128 * 129 * Returns void 130 * 131 *****************************************************************************/ 132 extern void bta_ar_reg_avrc_for_src_sink_coexist(uint16_t service_uuid, const char* service_name, 133 const char* provider_name, uint16_t categories, 134 tBTA_SYS_ID sys_id, bool browse_supported, 135 uint16_t profile_version); 136 137 #endif /* BTA_AR_API_H */ 138