1 /*
2  * Copyright (C) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * @file interface_profile_avrcp_tg.h
18  *
19  * @brief Declares the basic class of the AVRCP service, including attributes, and methods.
20  *
21  * @since 6
22  */
23 
24 #ifndef INTERFACE_PROFILE_AVRCP_TG_H
25 #define INTERFACE_PROFILE_AVRCP_TG_H
26 
27 #include <deque>
28 #include <vector>
29 #include "bt_def.h"
30 #include "avrcp_media.h"
31 #include "interface_profile.h"
32 
33 namespace OHOS {
34 namespace bluetooth {
35 /**
36  * @brief This class provides data interaction for asynchronous actions.
37  *
38  * @since 6
39  */
40 class IProfileAvrcpTg : public IProfile {
41 public:
42     /**
43      * @brief This abstract class declares a set of methods for observing the class of the <b>IProfileAvrcpTg</b>.
44      *
45      * @since 6
46      */
47     class IObserver {
48     public:
49         /**
50          * @brief A constructor used to create an <b>IProfileAvrcpTg::IObserver</b> instance.
51          *
52          * @since 6
53          */
54         IObserver() = default;
55 
56         /**
57          * @brief A destructor used to delete the <b>IProfileAvrcpTg::IObserver</b> instance.
58          *
59          * @since 6
60          */
61         virtual ~IObserver() = default;
62 
63         /**
64          * @brief Informs the state of the connection.
65          *
66          * @param[in] device The bluetooth device.
67          * @param[in] state  The connection state. Refer to <b>BTConnectState</b>.
68          *
69          * @since 6
70          */
71         virtual void OnConnectionStateChanged(const RawAddress &rawAddr, int state) = 0;
72     };
73 
74     /******************************************************************
75      * REGISTER / UNREGISTER OBSERVER                                 *
76      ******************************************************************/
77 
78     /**
79      * @brief Registers the observer into the instance of the class <b>AvrcpController</b>.
80      *
81      * @param[in] observer The observer which wants to register.
82      * @since 6
83      */
84     virtual void RegisterObserver(IObserver *observer) = 0;
85 
86     /**
87      * @brief Unregisters the observer from the instance of the class <b>AvrcpController</b>.
88      *
89      * @param[in] observer The observer which already registered.
90      *
91      * @since 6
92      */
93     virtual void UnregisterObserver(void) = 0;
94 
95     /******************************************************************
96      * ENABLE / DISABLE                                               *
97      ******************************************************************/
98 
99     /**
100      * @brief Checks whether the AVRCP TG service is enabled.
101      *
102      * @return The result of the method execution.
103      * @retval true  The service is enabled.
104      * @retval false The service is disabled.
105      *
106      * @since 6
107      */
108     virtual bool IsEnabled(void) = 0;
109 
110     /******************************************************************
111      * CONNECTION                                                     *
112      ******************************************************************/
113 
114     /**
115      * @brief Sets the active device.
116      *
117      * @detail Only one CT can interact witch TG.
118      *
119      * @since 6
120      */
121     virtual void SetActiveDevice(const RawAddress &rawAddr) = 0;
122 
123     /**
124      * @brief Gets the devices of the specified states.
125      *
126      * @param[in] states The connection states. Refer to <b>BTConnectState</b>.
127      * @return The list of the instance of the <b>RawAddress</b> class.
128      *
129      * @since 6
130      */
131     virtual std::vector<RawAddress> GetConnectedDevices(void) = 0;
132 
133     /**
134      * @brief Gets the devices of the specified states.
135      *
136      * @param[in] states The connection states. Refer to <b>BTConnectState</b>.
137      * @return The list of the instance of the <b>RawAddress</b> class.
138      *
139      * @since 6
140      */
141     virtual std::vector<RawAddress> GetDevicesByStates(const std::vector<int> &states) = 0;
142 
143     /**
144      * @brief Gets the connection state of the specified bluetooth device.
145      *
146      * @param[in] rawAddr The address of the bluetooth device.
147      * @return The connection state. Refer to <b>BTConnectState</b>.
148      *
149      * @since 6
150      */
151     virtual int GetDeviceState(const RawAddress &rawAddr) = 0;
152 
153     /******************************************************************
154      * Media Player Selection                                         *
155      ******************************************************************/
156 
157     /**
158      * @brief Responds the data of the <b>SetAddressedPlayer</b>.
159      *
160      * @details Switch to the thread of the AVRCP TG service in this function.
161      * @param[in] rawAddr The address of the bluetooth device.
162      * @param[in] label   The label which is used to distinguish different call.
163      * @param[in] status  The detail result of the execution. Refer to <b>AvrcEsCode</b>.<br>
164      *            @a AVRC_ES_CODE_NO_ERROR<br>
165      *            @a AVRC_ES_CODE_INTERNAL_ERROR<br>
166      *            @a AVRC_ES_CODE_UID_CHANGED<br>
167      *            @a AVRC_ES_CODE_INVALID_PLAYER_ID<br>
168      *            @a AVRC_ES_CODE_NO_AVAILABLE_PLAYERS
169      *
170      * @since 6
171      */
172     virtual void OnSetAddressedPlayer(const RawAddress &rawAddr, uint8_t label, int status) = 0;
173 
174     /**
175      * @brief Responds the data of the <b>SetBrowsedPlayer</b>.
176      *
177      * @details Switch to the thread of the AVRCP TG service in this function.
178      * @param[in] rawAddr     The address of the bluetooth device.
179      * @param[in] uidCounter  The value of the uid counter.
180      * @param[in] numOfItems  The number of items in the directory.
181      * @param[in] folderNames The current browsed path of the player. The first element in folderNames is the parent
182      * folder. The root folder has no name. The names are in UTF-8.
183      * @param[in] label       The label which is used to distinguish different call.
184      * @param[in] detail      The detail result of the execution. Refer to <b>AvrcEsCode</b>.<br>
185      *            @a AVRC_ES_CODE_NO_ERROR<br>
186      *            @a AVRC_ES_CODE_INTERNAL_ERROR<br>
187      *            @a AVRC_ES_CODE_UID_CHANGED<br>
188      *            @a AVRC_ES_CODE_INVALID_PLAYER_ID<br>
189      *            @a AVRC_ES_CODE_PLAYER_NOT_BROWSABLE<br>
190      *            @a AVRC_ES_CODE_PLAYER_NOT_ADDRESSED<br>
191      *            @a AVRC_ES_CODE_NO_AVAILABLE_PLAYERS
192      *
193      * @since 6
194      */
195     virtual void OnSetBrowsedPlayer(const RawAddress &rawAddr, uint16_t uidCounter, uint32_t numOfItems,
196         const std::vector<std::string> &folderNames, uint8_t label, int status) = 0;
197 
198     /******************************************************************
199      * PLAYER APPLICATION SETTINGS                                    *
200      ******************************************************************/
201 
202     /**
203      * @brief Responds the data of the <b>GetPlayerAppSettingAttributes</b>.
204      *
205      * @details Switch to the thread of the AVRCP TG service in this function.
206      * @param[in] rawAddr       The address of the bluetooth device.
207      * @param[in] attributes    The attribute of player application settings.
208      * @param[in] label         The label which is used to distinguish different call.
209      *
210      * @since 6
211      */
212     virtual void OnGetPlayerAppSettingAttributes(
213         const RawAddress &rawAddr, const std::deque<uint8_t> &attributes, uint8_t label) = 0;
214 
215     /**
216      * @brief Responds the data of the <b>GetPlayerAppSettingValues</b>.
217      *
218      * @details Switch to the thread of the AVRCP TG service in this function.
219      * @param[in] rawAddr   The address of the bluetooth device.
220      * @param[in] values    The values associated witch the attribute.
221      * @param[in] label     The label which is used to distinguish different call.
222      *
223      * @since 6
224      */
225     virtual void OnGetPlayerAppSettingValues(
226         const RawAddress &rawAddr, const std::deque<uint8_t> &values, uint8_t label) = 0;
227 
228     /**
229      * @brief Responds the data of the <b>GetPlayerAppSettingCurrentValue</b>.
230      *
231      * @details Switch to the thread of the AVRCP TG service in this function.
232      * @param[in] rawAddr    The address of the bluetooth device.
233      * @param[in] attributes The attribute of the player application settings. Refer to <b>AvrcPlayerAttribute</b>.
234      * @param[in] values     The values associated witch the attribute.
235      * @param[in] label      The label which is used to distinguish different call.
236      * @param[in] context    The context which is used to distinguish different purpose.
237      *
238      * @since 6
239      */
240     virtual void OnGetPlayerAppSettingCurrentValue(const RawAddress &rawAddr, const std::deque<uint8_t> &attributes,
241         const std::deque<uint8_t> &values, uint8_t label, uint8_t context) = 0;
242 
243     /**
244      * @brief Responds the data of the <b>SetPlayerAppSettingCurrentValue</b>.
245      *
246      * @details Switch to the thread of the AVRCP TG service in this function.
247      * @param[in] rawAddr The address of the bluetooth device.
248      * @param[in] label   The label which is used to distinguish different call.
249      *
250      * @since 6
251      */
252     virtual void OnSetPlayerAppSettingCurrentValue(const RawAddress &rawAddr, uint8_t label) = 0;
253 
254     /**
255      * @brief Responds the data of the <b>GetPlayerAppSettingAttributeTest</b>.
256      *
257      * @param[in] addr       The address of the bluetooth device.
258      * @param[in] attributes The attribute of the player application settings.
259      * @param[in] attrStr    The values associated witch the attribute.
260      * @param[in] label      The label which is used to distinguish different call.
261      *
262      * @since 6
263      */
264     virtual void OnGetPlayerAppSettingAttributeText(const RawAddress &rawAddr, const std::vector<uint8_t> &attributes,
265         const std::vector<std::string> &attrStr, uint8_t label) = 0;
266 
267     /**
268      * @brief Responds the data of the <b>GetPlayerAppSettingValueTest</b>.
269      *
270      * @param[in] addr       The address of the bluetooth device.
271      * @param[in] values     The attribute of the player application settings.
272      * @param[in] valueStr   The values associated witch the attribute.
273      * @param[in] label      The label which is used to distinguish different call.
274      *
275      * @since 6
276      */
277     virtual void OnGetPlayerAppSettingValueText(const RawAddress &rawAddr, const std::vector<uint8_t> &values,
278         const std::vector<std::string> &valueStr, uint8_t label) = 0;
279 
280     /******************************************************************
281      * MEDIA INFORMATION PDUS                                         *
282      ******************************************************************/
283 
284     /**
285      * @brief Responds the data of the <b>GetElementAttributes</b>.
286      *
287      * @details Switch to the thread of the AVRCP CT service in this function.
288      * @param[in] rawAddr    The address of the bluetooth device.
289      * @param[in] attributes  Specifies the attribute ID forthe attributes to be retrieved.
290      * @param[in] values     The list of the value of this attribute.
291      * @param[in] label      The label which is used to distinguish different call.
292      *
293      * @since 6
294      */
295     virtual void OnGetElementAttributes(const RawAddress &rawAddr, const std::vector<uint32_t> &attribtues,
296         const std::vector<std::string> &values, uint8_t label) = 0;
297 
298     /******************************************************************
299      * PLAY                                                           *
300      ******************************************************************/
301 
302     /**
303      * @brief Responds the data of the <b>GetPlayStatus</b>.
304      *
305      * @details Switch to the thread of the AVRCP TG service in this function.
306      * @param[in] rawAddr      The address of the bluetooth device.
307      * @param[in] songLength   The total length of the playing song in milliseconds.
308      * @param[in] songPosition The current position of the playing in milliseconds elapsed.
309      * @param[in] playStatus   The current status of playing. Refer to <b>AvrcPlayStatus</b>.
310      * @param[in] label        The label which is used to distinguish different call.
311      * @param[in] context      The context which is used to distinguish different purpose.
312      *
313      * @since 6
314      */
315     virtual void OnGetPlayStatus(const RawAddress &rawAddr, uint32_t songLength, uint32_t songPosition,
316         uint8_t playStatus, uint8_t label, uint8_t context) = 0;
317 
318     /**
319      * @brief Responds the data of the <b>PlayItem</b>.
320      *
321      * @details Switch to the thread of the AVRCP TG service in this function.
322      * @param[in] rawAddr The address of the bluetooth device.
323      * @param[in] status  The current status of media.
324      * @param[in] label   The label which is used to distinguish different call.
325      * @param[in] result  The result of the action.
326      *            @c RET_NO_ERROR   : The request was accepted.
327      *            @c RET_NO_SUPPORT : The request was not support.
328      *            @c RET_BAD_STATUS : The request was rejected.
329      */
330     virtual void OnPlayItem(const RawAddress &rawAddr, uint8_t label, int status) = 0;
331 
332     /**
333      * @brief Responds the data of the <b>AddToNowPlaying</b>.
334      *
335      * @details Switch to the thread of the AVRCP TG service in this function.
336      * @param[in] rawAddr The address of the bluetooth device.
337      * @param[in] label   The label which is used to distinguish different call.
338      * @param[in] status  The detail result of the execution. Refer to <b>AvrcEsCode</b>.<br>
339      *            @a AVRC_ES_CODE_NO_ERROR<br>
340      *            @a AVRC_ES_CODE_INTERNAL_ERROR<br>
341      *            @a AVRC_ES_CODE_UID_CHANGED<br>
342      *            @a AVRC_ES_CODE_DOES_NOT_EXIST<br>
343      *            @a AVRC_ES_CODE_INVALID_SCOPE<br>
344      *            @a AVRC_ES_CODE_FOLDER_ITEM_IS_NOT_PLAYABLE<br>
345      *            @a AVRC_ES_CODE_MEDIA_IN_USE<br>
346      *            @a AVRC_ES_CODE_NOW_PLAYING_LIST_FULL<br>
347      *            @a AVRC_ES_CODE_NO_AVAILABLE_PLAYERS
348      *
349      * @since 6
350      */
351     virtual void OnAddToNowPlaying(const RawAddress &rawAddr, uint8_t label, int status) = 0;
352 
353     /******************************************************************
354      * OPERATE THE VIRTUAL FILE SYSTEM                                *
355      ******************************************************************/
356 
357     /**
358      * @brief Responds the data of the <b>ChangePath</b>.
359      *
360      * @details Switch to the thread of the AVRCP TG service in this function.
361      * @param[in] rawAddr    The address of the bluetooth device.
362      * @param[in] numOfItems The number of items in the directory.
363      * @param[in] label      The label which is used to distinguish different call.
364      * @param[in] status     The detail result of the execution. Refer to <b>AvrcEsCode</b>.<br>
365      *            @a AVRC_ES_CODE_NO_ERROR<br>
366      *            @a AVRC_ES_CODE_INTERNAL_ERROR<br>
367      *            @a AVRC_ES_CODE_UID_CHANGED<br>
368      *            @a AVRC_ES_CODE_INVALID_DIRECTION<br>
369      *            @a AVRC_ES_CODE_NOT_A_DIRECTORY<br>
370      *            @a AVRC_ES_CODE_DOES_NOT_EXIST<br>
371      *            @a AVRC_ES_CODE_NO_AVAILABLE_PLAYERS
372      *
373      * @since 6
374      */
375     virtual void OnChangePath(const RawAddress &rawAddr, uint32_t numOfItems, uint8_t label, int status) = 0;
376 
377     /**
378      * @brief Responds the data of the <b>GetFolderItems</b>.
379      *
380      * @details Switch to the thread of the AVRCP TG service in this function.
381      * @param[in] rawAddr    The address of the bluetooth device.
382      * @param[in] uidCounter The value of the uid counter.
383      * @param[in] items      The list of media player.
384      * @param[in] label      The label which is used to distinguish different call.
385      * @param[in] status     The detail result of the execution. Refer to <b>AvrcEsCode</b>.<br>
386      *            @a AVRC_ES_CODE_NO_ERROR<br>
387      *            @a AVRC_ES_CODE_INTERNAL_ERROR<br>
388      *            @a AVRC_ES_CODE_UID_CHANGED<br>
389      *            @a AVRC_ES_CODE_DOES_NOT_EXIST<br>
390      *            @a AVRC_ES_CODE_INVALID_SCOPE<br>
391      *            @a AVRC_ES_CODE_NO_AVAILABLE_PLAYERS
392      *
393      * @since 6
394      */
395     virtual void OnGetMediaPlayers(const RawAddress &rawAddr, uint16_t uidCounter, const std::vector<AvrcMpItem> &items,
396         uint8_t label, int status) = 0;
397 
398     /**
399      * @brief Responds the data of the <b>GetFolderItems</b>.
400      *
401      * @details Switch to the thread of the AVRCP TG service in this function.
402      * @param[in] rawAddr    The address of the bluetooth device.
403      * @param[in] uidCounter The value of the uid counter.
404      * @param[in] items      The list of media items.
405      * @param[in] label      The label which is used to distinguish different call.
406      * @param[in] status     The detail result of the execution. Refer to <b>AvrcEsCode</b>.<br>
407      *            @a AVRC_ES_CODE_NO_ERROR<br>
408      *            @a AVRC_ES_CODE_INTERNAL_ERROR<br>
409      *            @a AVRC_ES_CODE_UID_CHANGED<br>
410      *            @a AVRC_ES_CODE_DOES_NOT_EXIST<br>
411      *            @a AVRC_ES_CODE_INVALID_SCOPE<br>
412      *            @a AVRC_ES_CODE_NO_AVAILABLE_PLAYERS
413      *
414      * @since 6
415      */
416     virtual void OnGetFolderItems(const RawAddress &rawAddr, uint16_t uidCounter, const std::vector<AvrcMeItem> &items,
417         uint8_t label, int status) = 0;
418 
419     /**
420      * @brief Responds the data of the <b>GetItemAttributes</b>.
421      *
422      * @details Switch to the thread of the AVRCP TG service in this function.
423      * @param[in] rawAddr    The address of the bluetooth device.
424      * @param[in] attributes The list of media attributes.
425      * @param[in] values     The list of the value of this attribute.
426      * @param[in] label      The label which is used to distinguish different call.
427      * @param[in] status     The detail result of the execution. Refer to <b>AvrcEsCode</b>.<br>
428      *            @a AVRC_ES_CODE_NO_ERROR<br>
429      *            @a AVRC_ES_CODE_INTERNAL_ERROR<br>
430      *            @a AVRC_ES_CODE_UID_CHANGED<br>
431      *            @a AVRC_ES_CODE_DOES_NOT_EXIST<br>
432      *            @a AVRC_ES_CODE_INVALID_SCOPE<br>
433      *            @a AVRC_ES_CODE_NO_AVAILABLE_PLAYERS
434      *
435      * @since 6
436      */
437     virtual void OnGetItemAttributes(const RawAddress &rawAddr, const std::vector<uint32_t> &attributes,
438         const std::vector<std::string> &values, uint8_t label, int status) = 0;
439 
440     /**
441      * @brief Responds the data of the <b>GetTotalNumberOfItems</b>.
442      *
443      * @details Switch to the thread of the AVRCP TG service in this function.
444      * @param[in] rawAddr    The address of the bluetooth device.
445      * @param[in] uidCounter The value of the uid counter.
446      * @param[in] numOfItems The number of items in the directory.
447      * @param[in] label      The label which is used to distinguish different call.
448      * @param[in] status     The detail result of the execution. Refer to <b>AvrcEsCode</b>.<br>
449      *            @a AVRC_ES_CODE_NO_ERROR<br>
450      *            @a AVRC_ES_CODE_INTERNAL_ERROR<br>
451      *            @a AVRC_ES_CODE_UID_CHANGED<br>
452      *            @a AVRC_ES_CODE_NO_AVAILABLE_PLAYERS
453      *
454      * @since 6
455      */
456     virtual void OnGetTotalNumberOfItems(
457         const RawAddress &rawAddr, uint16_t uidCounter, uint32_t numOfItems, uint8_t label, int status) = 0;
458 
459     /******************************************************************
460      * ABSOLUTE VOLUME                                                *
461      ******************************************************************/
462 
463     /**
464      * @brief Responds the data of the <b>SetAbsoluteVolume</b>.
465      *
466      * @details Switch to the thread of the AVRCP TG service in this function.
467      * @param[in] rawAddr The address of the bluetooth device.
468      * @param[in] volume  The percentage of the absolute volume. Refer to <b>AvrcAbsoluteVolume</b>.
469      * @param[in] label   The label which is used to distinguish different call.
470      *
471      * @since 6
472      */
473     virtual void OnSetAbsoluteVolume(const RawAddress &rawAddr, uint8_t volume, uint8_t label) = 0;
474 
475     /******************************************************************
476      * NOTIFICATION                                                   *
477      ******************************************************************/
478 
479     virtual void OnGetSelectedTrack(const RawAddress &rawAddr, uint64_t uid, uint8_t label) = 0;
480 
481     virtual void OnGetAddressedPlayer(
482         const RawAddress &rawAddr, uint16_t playerId, uint16_t uidCounter, uint8_t label) = 0;
483 
484     virtual void OnGetUidCounter(const RawAddress &rawAddr, uint16_t uidCounter, uint8_t label) = 0;
485 
486     virtual void OnGetCurrentAbsoluteVolume(const RawAddress &rawAddr, uint8_t volume, uint8_t label) = 0;
487 
488     /**
489      * @brief Notifies the playback status is changed.
490      *
491      * @param[in] playStatus  The current status of playing. Refer to <b>AvrcPlayStatus</b>.
492      * @param[in] playbackPos Current playback position in millisecond.
493      * @param[in] label       The label which is used to distinguish different call.
494      *
495      * @since 6
496      */
497     virtual void NotifyPlaybackStatusChanged(
498         uint8_t playStatus, uint32_t playbackPos, uint8_t label = AVRC_DEFAULT_LABEL) = 0;
499 
500     /**
501      * @brief Notifies the track reached end is changed.
502      *
503      * @param[in] uid         The unique ID of media item.
504      * @param[in] playbackPos Current playback position in millisecond.
505      * @param[in] label       The label which is used to distinguish different call.
506      *
507      * @since 6
508      */
509     virtual void NotifyTrackChanged(uint64_t uid, uint32_t playbackPos, uint8_t label = AVRC_DEFAULT_LABEL) = 0;
510 
511     /**
512      * @brief Notifies the track reached end is changed.
513      *
514      * @param[in] playbackPos Current playback position in millisecond.
515      * @param[in] label       The label which is used to distinguish different call.
516      *
517      * @since 6
518      */
519     virtual void NotifyTrackReachedEnd(uint32_t playbackPos, uint8_t label = AVRC_DEFAULT_LABEL) = 0;
520 
521     /**
522      * @brief Notifies the track reached start is changed.
523      *
524      * @param[in] playbackPos Current playback position in millisecond.
525      * @param[in] label       The label which is used to distinguish different call.
526      *
527      * @since 6
528      */
529     virtual void NotifyTrackReachedStart(uint32_t playbackPos, uint8_t label = AVRC_DEFAULT_LABEL) = 0;
530 
531     /**
532      * @brief Notifies the player application setting is changed.
533      *
534      * @param[in] playbackPos Current playback position in millisecond.
535      * @param[in] label       The label which is used to distinguish different call.
536      *
537      * @since 6
538      */
539     virtual void NotifyPlaybackPosChanged(uint32_t playbackPos, uint8_t label = AVRC_DEFAULT_LABEL) = 0;
540 
541     /**
542      * @brief Notifies the player application setting is changed.
543      *
544      * @param[in] attribute The attribute of the player application setting. Refer to <b>AvrcPlayerAttribute</b>.
545      * @param[in] values    The values associated witch the attribute.
546      * @param[in] label     The label which is used to distinguish different call.
547      *
548      * @since 6
549      */
550     virtual void NotifyPlayerAppSettingChanged(const std::deque<uint8_t> &attributes, const std::deque<uint8_t> &values,
551         uint8_t label = AVRC_DEFAULT_LABEL) = 0;
552 
553     /**
554      * @brief Notifies the now playing content is changed.
555      *
556      * @param[in] label The label which is used to distinguish different call.
557      *
558      * @since 6
559      */
560     virtual void NotifyNowPlayingContentChanged(uint8_t label = AVRC_DEFAULT_LABEL) = 0;
561 
562     /**
563      * @brief Notifies the available player is changed.
564      *
565      * @param[in] label The label which is used to distinguish different call.
566      *
567      * @since 6
568      */
569     virtual void NotifyAvailablePlayersChanged(uint8_t label = AVRC_DEFAULT_LABEL) = 0;
570 
571     /**
572      * @brief Notifies the addressed player is changed.
573      *
574      * @param[in] playerId   The unique media player id.
575      * @param[in] uidCounter The UID counter shall be incremented every time the TG makes an update.
576      * @param[in] label      The label which is used to distinguish different call.
577      *
578      * @since 6
579      */
580     virtual void NotifyAddressedPlayerChanged(
581         uint16_t playerId, uint16_t uidCounter, uint8_t label = AVRC_DEFAULT_LABEL) = 0;
582 
583     /**
584      * @brief Notifies the uids is changed.
585      *
586      * @param[in] uidCounter The UID counter shall be incremented every time the TG makes an update.
587      * @param[in] label      The label which is used to distinguish different call.
588      *
589      * @since 6
590      */
591     virtual void NotifyUidChanged(uint16_t uidCounter, uint8_t label = AVRC_DEFAULT_LABEL) = 0;
592 
593     /**
594      * @brief Notifies the absolute volume is changed.
595      *
596      * @param[in] volume The percentage of the absolute volume. Refer to <b>AvrcAbsoluteVolume</b>.
597      * @param[in] label  The label which is used to distinguish different call.
598      *
599      * @since 6
600      */
601     virtual void NotifyVolumeChanged(uint8_t volume, uint8_t label = AVRC_DEFAULT_LABEL) = 0;
602 
603     /**
604      * @brief Notifies the AVSession is created.
605      */
606     virtual void OnSessionCreate(std::string sessionId) = 0;
607 
608     /**
609      * @brief Notifies the AVSession is release.
610      */
611     virtual void OnSessionRelease(std::string sessionId) = 0;
612 
613     /**
614      * @brief Notifies the TopAVSession is changed.
615      */
616 
617     virtual void OnTopSessionChange(std::string sessionId) = 0;
618     /**
619      * @brief Notifies the playback state is changed.
620      */
621     virtual void OnPlaybackStateChange(int32_t state) = 0;
622 };
623 }  // namespace bluetooth
624 }  // namespace OHOS
625 
626 #endif  // INTERFACE_PROFILE_AVRCP_TG_H
627