avdtc_api.h 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. /******************************************************************************
  2. *
  3. * Copyright (C) 2002-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. * This interface file contains the interface AVDTP conformance API. These
  21. * additional API functions and callback events are provided for
  22. * conformance testing purposes only. They are not intended to be used by
  23. * an application.
  24. *
  25. ******************************************************************************/
  26. #ifndef AVDT_CAPI_H
  27. #define AVDT_CAPI_H
  28. #include "avdt_api.h"
  29. /* start AVDTC events here to distinguish from AVDT events */
  30. #define AVDTC_EVT_BEGIN 0x80
  31. #define AVDTC_DISCOVER_IND_EVT (0 + AVDTC_EVT_BEGIN) /* Discover indication */
  32. #define AVDTC_GETCAP_IND_EVT (1 + AVDTC_EVT_BEGIN) /* Get capabilities indication */
  33. #define AVDTC_SETCONFIG_CFM_EVT (2 + AVDTC_EVT_BEGIN) /* Set configuration confirm */
  34. #define AVDTC_GETCONFIG_IND_EVT (3 + AVDTC_EVT_BEGIN) /* Get configuration indication */
  35. #define AVDTC_GETCONFIG_CFM_EVT (4 + AVDTC_EVT_BEGIN) /* Get configuration confirm */
  36. #define AVDTC_OPEN_IND_EVT (5 + AVDTC_EVT_BEGIN) /* Open indication */
  37. #define AVDTC_START_IND_EVT (6 + AVDTC_EVT_BEGIN) /* Start indication */
  38. #define AVDTC_CLOSE_IND_EVT (7 + AVDTC_EVT_BEGIN) /* Close indication */
  39. #define AVDTC_SUSPEND_IND_EVT (8 + AVDTC_EVT_BEGIN) /* Suspend indication */
  40. #define AVDTC_ABORT_IND_EVT (9 + AVDTC_EVT_BEGIN) /* Abort indication */
  41. #define AVDTC_ABORT_CFM_EVT (10 + AVDTC_EVT_BEGIN) /* Abort confirm */
  42. typedef struct {
  43. tAVDT_EVT_HDR hdr; /* Event header */
  44. UINT8 seid_list[AVDT_NUM_SEPS]; /* Array of SEID values */
  45. UINT8 num_seps; /* Number of values in array */
  46. } tAVDT_MULTI;
  47. /* Union of all control callback event data structures */
  48. typedef union {
  49. tAVDT_EVT_HDR hdr;
  50. tAVDT_CONFIG getconfig_cfm;
  51. tAVDT_MULTI start_ind;
  52. tAVDT_MULTI suspend_ind;
  53. } tAVDTC_CTRL;
  54. typedef void tAVDTC_CTRL_CBACK(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAVDTC_CTRL *p_data);
  55. #ifdef __cplusplus
  56. extern "C"
  57. {
  58. #endif
  59. /*******************************************************************************
  60. **
  61. ** Function AVDTC_Init
  62. **
  63. ** Description This function is called to begin using the conformance API.
  64. ** It must be called after AVDT_Register() and before any
  65. ** other API or conformance API functions are called.
  66. **
  67. ** Returns void
  68. **
  69. *******************************************************************************/
  70. extern void AVDTC_Init(tAVDTC_CTRL_CBACK *p_cback);
  71. /*******************************************************************************
  72. **
  73. ** Function AVDTC_DiscoverRsp
  74. **
  75. ** Description Send a discover response.
  76. **
  77. ** Returns void
  78. **
  79. *******************************************************************************/
  80. extern void AVDTC_DiscoverRsp(BD_ADDR bd_addr, UINT8 label,
  81. tAVDT_SEP_INFO sep_info[], UINT8 num_seps);
  82. /*******************************************************************************
  83. **
  84. ** Function AVDTC_GetCapRsp
  85. **
  86. ** Description Send a get capabilities response.
  87. **
  88. ** Returns void
  89. **
  90. *******************************************************************************/
  91. extern void AVDTC_GetCapRsp(BD_ADDR bd_addr, UINT8 label, tAVDT_CFG *p_cap);
  92. /*******************************************************************************
  93. **
  94. ** Function AVDTC_GetAllCapRsp
  95. **
  96. ** Description Send a get all capabilities response.
  97. **
  98. ** Returns void
  99. **
  100. *******************************************************************************/
  101. extern void AVDTC_GetAllCapRsp(BD_ADDR bd_addr, UINT8 label, tAVDT_CFG *p_cap);
  102. /*******************************************************************************
  103. **
  104. ** Function AVDTC_GetConfigReq
  105. **
  106. ** Description Send a get configuration request.
  107. **
  108. ** Returns void
  109. **
  110. *******************************************************************************/
  111. extern void AVDTC_GetConfigReq(UINT8 handle);
  112. /*******************************************************************************
  113. **
  114. ** Function AVDTC_GetConfigRsp
  115. **
  116. ** Description Send a get configuration response.
  117. **
  118. ** Returns void
  119. **
  120. *******************************************************************************/
  121. extern void AVDTC_GetConfigRsp(UINT8 handle, UINT8 label, tAVDT_CFG *p_cfg);
  122. /*******************************************************************************
  123. **
  124. ** Function AVDTC_OpenReq
  125. **
  126. ** Description Send an open request.
  127. **
  128. ** Returns void
  129. **
  130. *******************************************************************************/
  131. extern void AVDTC_OpenReq(UINT8 handle);
  132. /*******************************************************************************
  133. **
  134. ** Function AVDTC_OpenRsp
  135. **
  136. ** Description Send an open response.
  137. **
  138. ** Returns void
  139. **
  140. *******************************************************************************/
  141. extern void AVDTC_OpenRsp(UINT8 handle, UINT8 label);
  142. /*******************************************************************************
  143. **
  144. ** Function AVDTC_StartRsp
  145. **
  146. ** Description Send a start response.
  147. **
  148. ** Returns void
  149. **
  150. *******************************************************************************/
  151. extern void AVDTC_StartRsp(UINT8 *p_handles, UINT8 num_handles, UINT8 label);
  152. /*******************************************************************************
  153. **
  154. ** Function AVDTC_CloseRsp
  155. **
  156. ** Description Send a close response.
  157. **
  158. ** Returns void
  159. **
  160. *******************************************************************************/
  161. extern void AVDTC_CloseRsp(UINT8 handle, UINT8 label);
  162. /*******************************************************************************
  163. **
  164. ** Function AVDTC_SuspendRsp
  165. **
  166. ** Description Send a suspend response.
  167. **
  168. ** Returns void
  169. **
  170. *******************************************************************************/
  171. extern void AVDTC_SuspendRsp(UINT8 *p_handles, UINT8 num_handles, UINT8 label);
  172. /*******************************************************************************
  173. **
  174. ** Function AVDTC_AbortReq
  175. **
  176. ** Description Send an abort request.
  177. **
  178. ** Returns void
  179. **
  180. *******************************************************************************/
  181. extern void AVDTC_AbortReq(UINT8 handle);
  182. /*******************************************************************************
  183. **
  184. ** Function AVDTC_AbortRsp
  185. **
  186. ** Description Send an abort response.
  187. **
  188. ** Returns void
  189. **
  190. *******************************************************************************/
  191. extern void AVDTC_AbortRsp(UINT8 handle, UINT8 label);
  192. /*******************************************************************************
  193. **
  194. ** Function AVDTC_Rej
  195. **
  196. ** Description Send a reject message.
  197. **
  198. ** Returns void
  199. **
  200. *******************************************************************************/
  201. extern void AVDTC_Rej(UINT8 handle, BD_ADDR bd_addr, UINT8 cmd, UINT8 label,
  202. UINT8 err_code, UINT8 err_param);
  203. #ifdef __cplusplus
  204. }
  205. #endif
  206. #endif /* AVDT_CAPI_H */