bta_ar_api.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. * This is the public interface file for the simulatenous advanced
  21. * audio/video streaming (AV) source and sink of BTA, Broadcom's Bluetooth
  22. * application layer for mobile phones.
  23. *
  24. ******************************************************************************/
  25. #ifndef BTA_AR_API_H
  26. #define BTA_AR_API_H
  27. #include "avct_api.h"
  28. #include "avdt_api.h"
  29. #include "avrc_api.h"
  30. #include "bta_av_api.h"
  31. #include "bta_sys.h"
  32. #include "sdp_api.h"
  33. /*****************************************************************************
  34. * Constants and data types
  35. ****************************************************************************/
  36. /* This event signal to AR user that other profile is connected */
  37. #define BTA_AR_AVDT_CONN_EVT (AVDT_MAX_EVT + 1)
  38. /*******************************************************************************
  39. *
  40. * Function bta_ar_init
  41. *
  42. * Description This function is called from bta_sys_init().
  43. * to initialize the control block
  44. *
  45. * Returns void
  46. *
  47. ******************************************************************************/
  48. extern void bta_ar_init(void);
  49. /*******************************************************************************
  50. *
  51. * Function bta_ar_reg_avdt
  52. *
  53. * Description This function is called to register to AVDTP.
  54. *
  55. * Returns void
  56. *
  57. ******************************************************************************/
  58. extern void bta_ar_reg_avdt(AvdtpRcb* p_reg, tAVDT_CTRL_CBACK* p_cback,
  59. tBTA_SYS_ID sys_id);
  60. /*******************************************************************************
  61. *
  62. * Function bta_ar_dereg_avdt
  63. *
  64. * Description This function is called to de-register from AVDTP.
  65. *
  66. * Returns void
  67. *
  68. ******************************************************************************/
  69. extern void bta_ar_dereg_avdt(tBTA_SYS_ID sys_id);
  70. /*******************************************************************************
  71. *
  72. * Function bta_ar_avdt_conn
  73. *
  74. * Description This function is called to let ar know that some AVDTP
  75. * profile is connected for this sys_id.
  76. * If the other sys modules started a timer for PENDING_EVT,
  77. * the timer can be stopped now.
  78. *
  79. * Returns void
  80. *
  81. ******************************************************************************/
  82. extern void bta_ar_avdt_conn(tBTA_SYS_ID sys_id, const RawAddress& bd_addr,
  83. uint8_t scb_index);
  84. /*******************************************************************************
  85. *
  86. * Function bta_ar_reg_avct
  87. *
  88. * Description This function is called to register to AVCTP.
  89. *
  90. * Returns void
  91. *
  92. ******************************************************************************/
  93. extern void bta_ar_reg_avct(uint16_t mtu, uint16_t mtu_br, uint8_t sec_mask,
  94. tBTA_SYS_ID sys_id);
  95. /*******************************************************************************
  96. *
  97. * Function bta_ar_dereg_avct
  98. *
  99. * Description This function is called to deregister from AVCTP.
  100. *
  101. * Returns void
  102. *
  103. ******************************************************************************/
  104. extern void bta_ar_dereg_avct(tBTA_SYS_ID sys_id);
  105. /******************************************************************************
  106. *
  107. * Function bta_ar_reg_avrc
  108. *
  109. * Description This function is called to register an SDP record for AVRCP.
  110. *
  111. * Returns void
  112. *
  113. *****************************************************************************/
  114. extern void bta_ar_reg_avrc(uint16_t service_uuid, const char* p_service_name,
  115. const char* p_provider_name, uint16_t categories,
  116. tBTA_SYS_ID sys_id, bool browse_supported,
  117. uint16_t profile_version);
  118. /******************************************************************************
  119. *
  120. * Function bta_ar_dereg_avrc
  121. *
  122. * Description This function is called to de-register/delete an SDP record
  123. * for AVRCP.
  124. *
  125. * Returns void
  126. *
  127. *****************************************************************************/
  128. extern void bta_ar_dereg_avrc(uint16_t service_uuid, tBTA_SYS_ID sys_id);
  129. #endif /* BTA_AR_API_H */