/Ontech/twitter/lib/avrcp/avrcp.h

http://thebirdfree-personal.googlecode.com/ · C Header · 817 lines · 250 code · 83 blank · 484 comment · 0 complexity · 71ed5cbc1f5dd38cee57acdf563a2ccd MD5 · raw file

  1. /****************************************************************************
  2. Copyright (C) Cambridge Silicon Radio Ltd. 2004-2009
  3. Part of Audio-Adaptor-SDK 2009.R1
  4. FILE NAME
  5. avrcp.h
  6. DESCRIPTION
  7. Header file for the Audio/Visual Remote Control Profile library. This
  8. profile library implements the AVRCP using the services of the AVCTP
  9. library which is hidden from the Client application by this library
  10. The library exposes a functional downstream API and an upstream message
  11. based API.
  12. CLIENT APPLICATION
  13. | |
  14. | AVRCP Library
  15. | |
  16. | |
  17. CONNECTION Library
  18. |
  19. BLUESTACK
  20. */
  21. /*!
  22. @file avrcp.h
  23. @brief Interface to the Audio Video Remote Control Profile library.
  24. This profile library implements the AVRCP. This library permits one
  25. device known as the controller (CT) to send dedicated user actions to
  26. another device known as the target (TG).
  27. Note: This library does not handle audio streaming, this is implemented
  28. in the GAVDP library.
  29. The library exposes a functional downstream API and an upstream message
  30. based API.
  31. */
  32. #ifndef AVRCP_H_
  33. #define AVRCP_H_
  34. #include <bdaddr_.h>
  35. #include <message.h>
  36. #include <stream.h>
  37. #include <connection.h>
  38. struct __AVRCP;
  39. /*!
  40. @brief The Audio Video Remote Control Profile structure.
  41. */
  42. typedef struct __AVRCP AVRCP;
  43. /*!
  44. @brief The page data length.
  45. */
  46. #define PAGE_DATA_LENGTH (4)
  47. /*!
  48. @brief AVRCP responses
  49. */
  50. typedef enum
  51. {
  52. /*! The request is not implemented */
  53. avctp_response_not_implemented = 0x08,
  54. /*! The request has been accepted */
  55. avctp_response_accepted = 0x09,
  56. /*! The request has been rejected */
  57. avctp_response_rejected = 0x0a,
  58. /*! The target is in a state of transition */
  59. avctp_response_in_transition = 0x0b,
  60. /*! A stable response */
  61. avctp_response_stable = 0x0c,
  62. /*! The target devices state has changed */
  63. avctp_response_changed = 0x0d,
  64. /*! The response is an interim response */
  65. avctp_response_interim = 0x0f,
  66. /*! The specified profile is not acceptable */
  67. avctp_response_bad_profile
  68. } avrcp_response_type;
  69. /*!
  70. @brief AVRCP status codes
  71. */
  72. typedef enum
  73. {
  74. /*! Operation was successful. */
  75. avrcp_success = (0),
  76. /*! Operation failed. */
  77. avrcp_fail,
  78. /*! Not enough resources. */
  79. avrcp_no_resource,
  80. /*! Request is not supported in the current state. */
  81. avrcp_bad_state,
  82. /*! Operation timed out before completion. */
  83. avrcp_timeout,
  84. /*! Device specified is not connected. */
  85. avrcp_device_not_connected,
  86. /*! Operation is already in progress. */
  87. avrcp_busy,
  88. /*! Requested operation is not supported. */
  89. avrcp_unsupported,
  90. /*! Sink supplied was invalid. */
  91. avrcp_invalid_sink,
  92. /*! Link loss occurred. */
  93. avrcp_link_loss,
  94. /*! Link key missing on remote device*/
  95. avrcp_key_missing
  96. } avrcp_status_code;
  97. /*!
  98. @brief Operation ID, used to identify operation. See table 9.21 AV/C Panel
  99. Subunit spec. 1.1 #
  100. */
  101. typedef enum
  102. {
  103. opid_select = (0x0),
  104. opid_up,
  105. opid_down,
  106. opid_left,
  107. opid_right,
  108. opid_right_up,
  109. opid_right_down,
  110. opid_left_up,
  111. opid_left_down,
  112. opid_root_menu,
  113. opid_setup_menu,
  114. opid_contents_menu,
  115. opid_favourite_menu,
  116. opid_exit,
  117. /* 0x0e to 0x1f Reserved */
  118. opid_0 = (0x20),
  119. opid_1,
  120. opid_2,
  121. opid_3,
  122. opid_4,
  123. opid_5,
  124. opid_6,
  125. opid_7,
  126. opid_8,
  127. opid_9,
  128. opid_dot,
  129. opid_enter,
  130. opid_clear,
  131. /* 0x2d - 0x2f Reserved */
  132. opid_channel_up = (0x30),
  133. opid_channel_down,
  134. opid_sound_select,
  135. opid_input_select,
  136. opid_display_information,
  137. opid_help,
  138. opid_page_up,
  139. opid_page_down,
  140. /* 0x39 - 0x3f Reserved */
  141. opid_power = (0x40),
  142. opid_volume_up,
  143. opid_volume_down,
  144. opid_mute,
  145. opid_play,
  146. opid_stop,
  147. opid_pause,
  148. opid_record,
  149. opid_rewind,
  150. opid_fast_forward,
  151. opid_eject,
  152. opid_forward,
  153. opid_backward,
  154. /* 0x4d - 0x4f Reserved */
  155. opid_angle = (0x50),
  156. opid_subpicture,
  157. /* 0x52 - 0x70 Reserved */
  158. opid_f1 = (0x71),
  159. opid_f2,
  160. opid_f3,
  161. opid_f4,
  162. opid_f5,
  163. opid_vendor_unique = (0x7e)
  164. /* Ox7f Reserved */
  165. } avc_operation_id;
  166. /*!
  167. @brief Subunit types
  168. */
  169. typedef enum
  170. {
  171. subunit_monitor = (0x0),
  172. subunit_audio,
  173. subunit_printer,
  174. subunit_disc,
  175. subunit_tape_recorder_player,
  176. subunit_tuner,
  177. subunit_CA,
  178. subunit_camera,
  179. subunit_reserved,
  180. subunit_panel,
  181. subunit_bulletin_board,
  182. subunit_camera_storage,
  183. /* 0x0c - 0x1b Reserved */
  184. subunit_vendor_unique = (0x1c),
  185. subunit_reserved_for_all,
  186. subunit_extended,
  187. subunit_unit
  188. } avc_subunit_type;
  189. /*!
  190. @brief AVRCP device type
  191. The avrcp library can be configured to be either a target or a controller
  192. device.
  193. */
  194. typedef enum
  195. {
  196. avrcp_device_none,
  197. avrcp_target,
  198. avrcp_controller,
  199. avrcp_target_and_controller
  200. } avrcp_device_type;
  201. /*!
  202. @brief AVRCP initialisation parameters
  203. The initialisation parameters allow the profile instance to be configured
  204. either as a controller or target.
  205. */
  206. typedef struct
  207. {
  208. avrcp_device_type device_type;
  209. } avrcp_init_params;
  210. /*!
  211. @brief AV/C protocol - Used to form the targets address
  212. */
  213. typedef uint16 avc_subunit_id;
  214. /*!
  215. @brief Upstream AVRCP library messages base.
  216. */
  217. #define AVRCP_MESSAGE_BASE 0x6b00
  218. /*
  219. Do not document this enum.
  220. */
  221. #ifndef DO_NOT_DOCUMENT
  222. typedef enum
  223. {
  224. /* Library initialisation */
  225. AVRCP_INIT_CFM = AVRCP_MESSAGE_BASE,
  226. /* Connection/ disconnection management */
  227. AVRCP_CONNECT_CFM,
  228. AVRCP_CONNECT_IND,
  229. AVRCP_DISCONNECT_IND,
  230. /* AV/C Specific */
  231. AVRCP_PASSTHROUGH_CFM,
  232. AVRCP_PASSTHROUGH_IND,
  233. AVRCP_UNITINFO_CFM,
  234. AVRCP_UNITINFO_IND,
  235. AVRCP_SUBUNITINFO_IND,
  236. AVRCP_SUBUNITINFO_CFM,
  237. AVRCP_VENDORDEPENDENT_CFM,
  238. AVRCP_VENDORDEPENDENT_IND,
  239. AVRCP_MESSAGE_TOP
  240. } AvrcpMessageId;
  241. #endif
  242. /* Upstream messages from the AVRCP library */
  243. /*!
  244. @brief This message is generated as a result of a call to AvrcpInit.
  245. */
  246. typedef struct
  247. {
  248. /*! Pointer to AVRCP profile instance that was initialised.*/
  249. AVRCP *avrcp;
  250. /*! The current AVRCP status. */
  251. avrcp_status_code status;
  252. } AVRCP_INIT_CFM_T;
  253. /*!
  254. @brief This message is generated as a result of a call to AvrcpConnect.
  255. */
  256. typedef struct
  257. {
  258. AVRCP *avrcp; /*!< Pointer to AVRCP profile instance. */
  259. avrcp_status_code status; /*!< The current AVRCP status. */
  260. Sink sink; /*!< Connection handle */
  261. } AVRCP_CONNECT_CFM_T;
  262. /*!
  263. @brief This message indicates that a remote device wishes to connect.
  264. */
  265. typedef struct
  266. {
  267. /*! Pointer to AVRCP profile instance. */
  268. AVRCP *avrcp;
  269. /*! The Bluetooth Device Address of device connecting */
  270. bdaddr bd_addr;
  271. /*! Connection identifier */
  272. uint16 connection_id;
  273. } AVRCP_CONNECT_IND_T;
  274. /*!
  275. @brief This message indicates that a remote device wishes to disconnect.
  276. */
  277. typedef struct
  278. {
  279. AVRCP *avrcp; /*!< Pointer to AVRCP profile instance. */
  280. avrcp_status_code status; /*!< The current AVRCP status. */
  281. Sink sink; /*!< Connection handle */
  282. } AVRCP_DISCONNECT_IND_T;
  283. /*!
  284. @brief This message is generated as a result of a call to AvrcpPassthrough.
  285. */
  286. typedef struct
  287. {
  288. AVRCP *avrcp; /*!< Pointer to AVRCP profile instance. */
  289. avrcp_status_code status; /*!< The current AVRCP status. */
  290. Sink sink; /*!< Connection handle */
  291. } AVRCP_PASSTHROUGH_CFM_T;
  292. /*!
  293. @brief This message indicates that the CT device has send a Passthrough
  294. command
  295. */
  296. typedef struct
  297. {
  298. /*! Pointer to avrcp profile instance. */
  299. AVRCP *avrcp;
  300. /*! The transaction. */
  301. uint16 transaction;
  302. /*! The number of packets. */
  303. uint16 no_packets;
  304. /*! The sink. */
  305. Sink sink;
  306. /*! AV/C protocol - Used to form the targets address.*/
  307. avc_subunit_type subunit_type;
  308. /*! The subunit identifier. */
  309. avc_subunit_id subunit_id;
  310. /*! Identifies the button pressed. */
  311. avc_operation_id opid;
  312. /*! Indicates the user action of pressing or releasing the button
  313. identified by opid. Active low.*/
  314. bool state;
  315. /*! Length of following operation_data */
  316. uint16 size_op_data;
  317. /*! The op_data field is required for the Vendor Unique operation. For
  318. other operations, op_data length and data fields should be zero. The
  319. client should not attempt to free this pointer, the memory will be freed
  320. when the message is destroyed. If the client needs access to this data
  321. after the message has been destroyed it is the client's responsibility to
  322. copy it. */
  323. uint8 op_data[1];
  324. } AVRCP_PASSTHROUGH_IND_T;
  325. /*!
  326. @brief This message is generated as a result of a call to AvrcpUnitInfo.
  327. Only valid when the result is avrcp_res_success
  328. */
  329. typedef struct
  330. {
  331. /*! Pointer to AVRCP profile instance. */
  332. AVRCP *avrcp;
  333. /*! The current AVRCP status. */
  334. avrcp_status_code status;
  335. /*! The sink. */
  336. Sink sink;
  337. /*! The unit type. */
  338. avc_subunit_type unit_type;
  339. /*! The unit. */
  340. uint16 unit;
  341. /*! The company identifier. */
  342. uint32 company_id;
  343. } AVRCP_UNITINFO_CFM_T;
  344. /*!
  345. @brief This message indicates that a remote device is requesting unit
  346. information.
  347. */
  348. typedef struct
  349. {
  350. /*! Pointer to AVRCP profile instance. */
  351. AVRCP *avrcp;
  352. /*! The sink */
  353. Sink sink;
  354. } AVRCP_UNITINFO_IND_T;
  355. /*!
  356. @brief This message is generated as a result of a call to AvrcpSubUnitInfo
  357. */
  358. typedef struct
  359. {
  360. /*! Pointer to AVRCP profile instance. */
  361. AVRCP *avrcp;
  362. /*! The current AVRCP status. */
  363. avrcp_status_code status;
  364. /*! Connection handle */
  365. Sink sink;
  366. /*! Requested page on the target device. */
  367. uint8 page;
  368. /*! Four entries from the subunit table for the requested page on the
  369. target device.*/
  370. uint8 page_data[PAGE_DATA_LENGTH];
  371. } AVRCP_SUBUNITINFO_CFM_T;
  372. /*!
  373. @brief This message indicates that a remote device is requesting subunit
  374. information.
  375. */
  376. typedef struct
  377. {
  378. AVRCP *avrcp; /*!< Pointer to avrcp profile instance. */
  379. Sink sink; /*!< Connection handle */
  380. uint8 page; /*!< Accept/Reject this request. */
  381. } AVRCP_SUBUNITINFO_IND_T;
  382. /*!
  383. @brief This message is generated as a result of a call to
  384. AvrcpVendorDependent.
  385. */
  386. typedef struct
  387. {
  388. /*! Pointer to AVRCP profile instance. */
  389. AVRCP *avrcp;
  390. /*! The current AVRCP status. */
  391. avrcp_status_code status;
  392. /*! Connection handle */
  393. Sink sink;
  394. /*! Response from remote end if applicable. */
  395. uint8 response;
  396. } AVRCP_VENDORDEPENDENT_CFM_T;
  397. /*!
  398. @brief This message indicates that a remote device is requesting vendor
  399. dependant information.
  400. */
  401. typedef struct
  402. {
  403. /*! Pointer to avrcp profile instance. */
  404. AVRCP *avrcp;
  405. /*! The transaction. */
  406. uint16 transaction;
  407. /*! The number of packets. */
  408. uint16 no_packets;
  409. /*! The subunit type. */
  410. avc_subunit_type subunit_type;
  411. /*! The subunit identifier. */
  412. avc_subunit_id subunit_id;
  413. /*! The company identifier. */
  414. uint32 company_id;
  415. /*! The command type. */
  416. uint8 command_type;
  417. /*! The sink. */
  418. Sink sink;
  419. /*! The length of op_data. */
  420. uint16 size_op_data;
  421. /*! The operation data. The client should not attempt to free this pointer,
  422. the memory will be freed when the message is destroyed. If the client
  423. needs access to this data after the message has been destroyed it is the
  424. client's responsibility to copy it. */
  425. uint8 op_data[1];
  426. } AVRCP_VENDORDEPENDENT_IND_T;
  427. /*!
  428. @brief Initialise the AVRCP library.
  429. @param theAppTask The current application task.
  430. @param config Specifies how the AVRCP library should be configured.
  431. This function also takes care of registering a service record for an AVRCP
  432. device. No further library functions should be called until the
  433. AVRCP_INIT_CFM message has been received by the client.
  434. AVRCP_INIT_CFM message will be received by the application.
  435. */
  436. void AvrcpInit(Task theAppTask, const avrcp_init_params *config);
  437. /*!
  438. @brief Initialise the AVRCP library to use dynamic tasks (lazy) mode.
  439. @param clientTask The task where the AVRCP_INIT_CFM message will be sent.
  440. @param connectionTask The task where incoming connection indications
  441. will be sent. For applications using the Avrcp library this will be the
  442. same as the clientTask.
  443. @param config Configuration parameters for initialising the Avrcp library
  444. instance. This must not be set to null.
  445. This function initialises the Avrcp library in dynamic tasks mode. It
  446. does everything the AvrcpInit() function does.
  447. An AVRCP_INIT_CFM message will be returned to the clientTask once
  448. initialisation has completed. Avrcp library functions should not be
  449. called until a successful initialisation has completed.
  450. */
  451. void AvrcpInitLazy(Task clientTask, Task connectionTask, const avrcp_init_params *config);
  452. /*!
  453. @brief Initiate an AVRCP connection to a remote device.
  454. @param avrcp The profile instance which will be used.
  455. @param bd_addr The Bluetooth address of the remote device.
  456. AVRCP_CONNECT_CFM message will be received by the application.
  457. */
  458. void AvrcpConnect(AVRCP *avrcp, const bdaddr *bd_addr);
  459. /*!
  460. @brief Initiate an AVRCP connection to a remote device.
  461. @param clientTask The task where all messages relating to this
  462. connection will be sent.
  463. @param bd_addr The Bluetooth address of the remote device.
  464. @param config Configuration parameters for initialising the Avrcp library
  465. instance. @param config Configuration parameters for initialising the Avrcp library
  466. instance. As the library instance is created dynamically the library client has
  467. to set the type of device. This must not be set to null.
  468. AVRCP_CONNECT_CFM message will be received by the application.
  469. */
  470. void AvrcpConnectLazy(Task clientTask, const bdaddr *bd_addr, const avrcp_init_params *config);
  471. /*!
  472. @brief Either accept or reject the incoming connection from the
  473. remote device.
  474. @param avrcp The profile instance which will be used.
  475. @param connection_id Connection identifier
  476. @param accept Yes(TRUE) or No(FALSE)
  477. This function is called on receipt of an AVRCP_CONNECT_IND message. The
  478. AVRCP_CONNECT_IND message contains the remote devices Bluetooth address.
  479. AVRCP_CONNECT_IND message will be received by the application.
  480. */
  481. void AvrcpConnectResponse(AVRCP *avrcp, uint16 connection_id, bool accept);
  482. /*!
  483. @brief Response function to accept or reject an incoming AVRCP connection.
  484. @param avrcp The AVRCP profile instance.
  485. @param connection_id Connection identifier
  486. @param accept Yes(TRUE) or No(FALSE)
  487. @param config Configuration parameters for initialising the Avrcp library
  488. instance. As the library instance is created dynamically on an incoming
  489. connection, it is not fully initialised until the library client has
  490. set the type of device. This must not be set to null.
  491. This function is called on receipt of an AVRCP_CONNECT_IND message. The
  492. AVRCP_CONNECT_IND message contains the remote devices Bluetooth address.
  493. AVRCP_CONNECT_IND message will be received by the application.
  494. */
  495. void AvrcpConnectResponseLazy(Task clientTask, AVRCP *avrcp, uint16 connection_id, bool accept, const avrcp_init_params *config);
  496. /*!
  497. @brief Request an AVRCP disconnection.
  498. @param avrcp The profile instance which will be used.
  499. AVRCP_DISCONNECT_IND message will be received by the application.
  500. */
  501. void AvrcpDisconnect(AVRCP *avrcp);
  502. /*!
  503. @brief Request that a Pass Through control command is sent to the target on
  504. the the connection identified by the specified sink.
  505. @param avrcp The profile instance which will be used.
  506. @param subunit_type The subunit type.
  507. @param subunit_id AV/C protocol. Used to form the targets address.
  508. @param state Indicates the user action of pressing or releasing the button
  509. identified by opid. Active low.
  510. @param opid Identifies the button pressed.
  511. @param size_operation_data Size of operation_data. Should be zero if no
  512. operation_data passed.
  513. @param operation_data Required for the Vendor Unique operation. The app
  514. should use StreamRegionSource as defined in stream.h, and pass the source
  515. returned as this parameter.
  516. The Passthrough command is used to convey the proper user operation to
  517. the target(transparently to the user).
  518. AVRCP_PASSTHROUGH_CFM message will be received by the application.
  519. */
  520. /*
  521. -----------------------------------------------
  522. | MSB | | | | | | | LSB |
  523. |-----------------------------------------------|
  524. opcode | PASSTHROUGH (0x7C) |
  525. -----------------------------------------------
  526. operand(0) |state| operation_id |
  527. -----------------------------------------------
  528. operand(1) | operation data field length |
  529. -----------------------------------------------
  530. operand(2) | operation data(operation id dependant) |
  531. : | |
  532. -----------------------------------------------
  533. */
  534. void AvrcpPassthrough(AVRCP *avrcp, avc_subunit_type subunit_type, avc_subunit_id subunit_id, bool state, avc_operation_id opid, uint16 size_operation_data, Source operation_data);
  535. /*!
  536. @brief Verify the data that was sent.
  537. @param avrcp The profile instance which will be used.
  538. @param response The AVRCP response.
  539. This function is called in response to an AVRCP_PASSTHROUGH_IND message.
  540. */
  541. void AvrcpPassthroughResponse(AVRCP *avrcp, avrcp_response_type response);
  542. /*!
  543. @brief Request that a UnitInfo control commandis sent to the target on the
  544. connection identified by the specified sink.
  545. @param avrcp The profile instance which will be used.
  546. The UnitInfo command is used to obtain information that pertains to the
  547. AV/C unit as a whole
  548. AVRCP_UNITINFO_CFM message will be received by the application.
  549. This message contains the unit_type and a unique 24-bit Company ID.
  550. */
  551. /*
  552. -----------------------------------------------
  553. | MSB | | | | | | | LSB |
  554. |-----------------------------------------------|
  555. opcode | UNITINFO (0x30) |
  556. -----------------------------------------------
  557. operand[0] | 0xFF |
  558. -----------------------------------------------
  559. operand[1] | 0xFF |
  560. -----------------------------------------------
  561. operand[2] | 0xFF |
  562. -----------------------------------------------
  563. operand[3] | 0xFF |
  564. -----------------------------------------------
  565. operand[4] | 0xFF |
  566. -----------------------------------------------
  567. */
  568. void AvrcpUnitInfo(AVRCP *avrcp);
  569. /*!
  570. @brief Respond to an AVRCP_UNITINFO_IND message requesting information
  571. about this device.
  572. @param avrcp The profile instance which will be used.
  573. @param accept Yes(TRUE) or No(FALSE).
  574. @param unit_type The unit type.
  575. @param company_id The company identifier.
  576. */
  577. void AvrcpUnitInfoResponse(AVRCP *avrcp, bool accept, avc_subunit_type unit_type, uint8 unit, uint32 company_id);
  578. /*!
  579. @brief Request that a SubUnitInfo control command is sent to the target on
  580. the connection identified by the specified sink.
  581. @param avrcp The profile instance which will be used.
  582. @param page Specifies which part of the subunit table is to be returned.
  583. Each page consists of at most four subunits, and each AV/C unit contains up
  584. to 32 AV/C subunits
  585. The UnitInfo command is used to obtain information about the subunit(s) of
  586. a device. The extension code is not used at present, should always be 0x7.
  587. AVRCP_SUBUNITINFO_CFM message will be received by the application.
  588. */
  589. /*
  590. -----------------------------------------------
  591. | MSB | | | | | | | LSB |
  592. |-----------------------------------------------|
  593. opcode | SUBUNITINFO (0x31) |
  594. -----------------------------------------------
  595. operand[0] | 0 | Page | 0 | Extension code |
  596. -----------------------------------------------
  597. operand[1] | 0xFF |
  598. -----------------------------------------------
  599. operand[2] | 0xFF |
  600. -----------------------------------------------
  601. operand[3] | 0xFF |
  602. -----------------------------------------------
  603. operand[4] | 0xFF |
  604. -----------------------------------------------
  605. */
  606. void AvrcpSubUnitInfo(AVRCP *avrcp, uint8 page);
  607. /*!
  608. @brief Obtain information about the subunit(s) of a device.
  609. @param avrcp The profile instance which will be used.
  610. @param accept Flag accepting or rejecting request for SubUnitInfo.
  611. @param page_data Four entries from the subunit table for the requested page
  612. on the target device.
  613. */
  614. void AvrcpSubUnitInfoResponse(AVRCP *avrcp, bool accept, const uint8 *page_data);
  615. /*!
  616. @brief Call to send vendor specific data to the peer entity.
  617. If the data_length is greater than the l2cap mtu then the message becomes
  618. fragmented.
  619. @param avrcp The profile instance which will be used.
  620. @param subunit_type The subunit type.
  621. @param subunit_id AV/C protocol. Used to form the targets address.
  622. @param ctype The ctype.
  623. @param company_id 24-bit unique ID obtained from IEEE RAC.
  624. @param size_data Length of the data field.
  625. @param data Required for the Vendor Unique operation. The app should use
  626. StreamRegionSource as defined in stream.h, and pass the source returned as
  627. this parameter.
  628. AVRCP_VENDORDEPENDENT_CFM message is returned, indicating the status of the
  629. connection request.
  630. */
  631. /*
  632. -----------------------------------------------
  633. | MSB | | | | | | | LSB |
  634. |-----------------------------------------------|
  635. opcode | VENDOR-DEPENDENT (0x00) |
  636. -----------------------------------------------
  637. operand(0) |MSB |
  638. operand(1) | company_id |
  639. operand(2) | LSB |
  640. |-----------------------------------------------|
  641. operand(3) | |
  642. : | vendor_dependent_data |
  643. operand(n) | |
  644. -----------------------------------------------
  645. */
  646. void AvrcpVendorDependent(AVRCP *avrcp, avc_subunit_type subunit_type, avc_subunit_id subunit_id, uint8 ctype, uint32 company_id, uint16 size_data, Source data);
  647. /*!
  648. @brief Verify the data that was sent.
  649. @param avrcp The profile instance which will be used.
  650. @param response The AVRCP response.
  651. @param identifier The identifier.
  652. This function is called in response to an AVRCP_VENDORDEPENDENT_IND
  653. message.
  654. */
  655. void AvrcpVendorDependentResponse(AVRCP *avrcp, avrcp_response_type response);
  656. /*!
  657. @brief Retrieve the Sink of the AVRCP connection. This will be 0 if no connection exists.
  658. @param avrcp The profile instance which will be used.
  659. */
  660. Sink AvrcpGetSink(AVRCP *avrcp);
  661. #endif /* AVRCP_H_ */