1 /******************************************************************************
2  *
3  *  Copyright (C) 2003-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 interface file for audio gateway call-out functions.
22  *
23  ******************************************************************************/
24 #ifndef BTA_AG_CO_H
25 #define BTA_AG_CO_H
26 
27 #include "bta_ag_api.h"
28 
29 /*******************************************************************************
30  *
31  * Function         bta_ag_co_init
32  *
33  * Description      This callout function is executed by AG when it is
34  *                  started by calling BTA_AgEnable().  This function can be
35  *                  used by the phone to initialize audio paths or for other
36  *                  initialization purposes.
37  *
38  *
39  * Returns          Void.
40  *
41  ******************************************************************************/
42 extern void bta_ag_co_init(void);
43 
44 /*******************************************************************************
45  *
46  * Function         bta_ag_co_data_open
47  *
48  * Description      This function is executed by AG when a service level
49  *                  connection
50  *                  is opened.  The phone can use this function to set
51  *                  up data paths or perform any required initialization or
52  *                  set up particular to the connected service.
53  *
54  *
55  * Returns          void
56  *
57  ******************************************************************************/
58 extern void bta_ag_co_data_open(uint16_t handle, tBTA_SERVICE_ID service);
59 
60 /*******************************************************************************
61  *
62  * Function         bta_ag_co_data_close
63  *
64  * Description      This function is called by AG when a service level
65  *                  connection is closed
66  *
67  *
68  * Returns          void
69  *
70  ******************************************************************************/
71 extern void bta_ag_co_data_close(uint16_t handle);
72 
73 /*******************************************************************************
74  *
75  * Function         bta_ag_co_tx_write
76  *
77  * Description      This function is called by the AG to send data to the
78  *                  phone when the AG is configured for AT command pass-through.
79  *                  The implementation of this function must copy the data to
80  *                  the phone's memory.
81  *
82  * Returns          void
83  *
84  ******************************************************************************/
85 extern void bta_ag_co_tx_write(uint16_t handle, uint8_t* p_data, uint16_t len);
86 
87 #endif /* BTA_AG_CO_H */
88