1 /******************************************************************************
2  *
3  *  Copyright (C) 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 "stack/avdt_api.h"
30 #include "stack/avct_api.h"
31 #include "stack/avrc_api.h"
32 #include "stack/sdp_api.h"
33 #include "bta/bta_av_api.h"
34 #include "bta/bta_sys.h"
35 
36 #if (BTA_AR_INCLUDED == TRUE)
37 
38 /*****************************************************************************
39 **  Constants and data types
40 *****************************************************************************/
41 /* This event signal to AR user that other profile is connected */
42 #define BTA_AR_AVDT_CONN_EVT    (AVDT_MAX_EVT + 1)
43 
44 /*******************************************************************************
45 **
46 ** Function         bta_ar_init
47 **
48 ** Description      This function is called from bta_sys_init().
49 **                  to initialize the control block
50 **
51 ** Returns          void
52 **
53 *******************************************************************************/
54 extern void bta_ar_init(void);
55 
56 /*******************************************************************************
57 **
58 ** Function         bta_ar_reg_avdt
59 **
60 ** Description      This function is called to register to AVDTP.
61 **
62 ** Returns          void
63 **
64 *******************************************************************************/
65 extern void bta_ar_reg_avdt(tAVDT_REG *p_reg, tAVDT_CTRL_CBACK *p_cback, tBTA_SYS_ID sys_id);
66 
67 /*******************************************************************************
68 **
69 ** Function         bta_ar_dereg_avdt
70 **
71 ** Description      This function is called to de-register from AVDTP.
72 **
73 ** Returns          void
74 **
75 *******************************************************************************/
76 extern void bta_ar_dereg_avdt(tBTA_SYS_ID sys_id);
77 
78 /*******************************************************************************
79 **
80 ** Function         bta_ar_avdt_conn
81 **
82 ** Description      This function is called to let ar know that some AVDTP profile
83 **                  is connected for this sys_id.
84 **                  If the other sys modules started a timer for PENDING_EVT,
85 **                  the timer can be stopped now.
86 **
87 ** Returns          void
88 **
89 *******************************************************************************/
90 extern void bta_ar_avdt_conn(tBTA_SYS_ID sys_id, BD_ADDR bd_addr);
91 
92 /*******************************************************************************
93 **
94 ** Function         bta_ar_reg_avct
95 **
96 ** Description      This function is called to register to AVCTP.
97 **
98 ** Returns          void
99 **
100 *******************************************************************************/
101 extern void bta_ar_reg_avct(UINT16 mtu, UINT16 mtu_br, UINT8 sec_mask, tBTA_SYS_ID sys_id);
102 
103 /*******************************************************************************
104 **
105 ** Function         bta_ar_dereg_avct
106 **
107 ** Description      This function is called to deregister from AVCTP.
108 **
109 ** Returns          void
110 **
111 *******************************************************************************/
112 extern void bta_ar_dereg_avct(tBTA_SYS_ID sys_id);
113 
114 /******************************************************************************
115 **
116 ** Function         bta_ar_reg_avrc
117 **
118 ** Description      This function is called to register an SDP record for AVRCP.
119 **
120 ** Returns          void
121 **
122 ******************************************************************************/
123 extern void bta_ar_reg_avrc(UINT16 service_uuid, char *p_service_name,
124                             char *p_provider_name, UINT16 categories, tBTA_SYS_ID sys_id);
125 
126 /******************************************************************************
127 **
128 ** Function         bta_ar_dereg_avrc
129 **
130 ** Description      This function is called to de-register/delete an SDP record for AVRCP.
131 **
132 ** Returns          void
133 **
134 ******************************************************************************/
135 extern void bta_ar_dereg_avrc(UINT16 service_uuid, tBTA_SYS_ID sys_id);
136 
137 
138 #ifdef __cplusplus
139 }
140 #endif
141 
142 #endif  ///BTA_AR_INCLUDED == TRUE
143 
144 #endif /* BTA_AR_API_H */
145