ams_c.h
Go to the documentation of this file.
1 /**
2 ****************************************************************************************
3 *
4 * @file ams_c.h
5 *
6 * @brief Apple Media Service Client API.
7 *
8 ****************************************************************************************
9 * @attention
10 #####Copyright (c) 2019 GOODIX
11 All rights reserved.
12
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions are met:
15 * Redistributions of source code must retain the above copyright
16 notice, this list of conditions and the following disclaimer.
17 * Redistributions in binary form must reproduce the above copyright
18 notice, this list of conditions and the following disclaimer in the
19 documentation and/or other materials provided with the distribution.
20 * Neither the name of GOODIX nor the names of its contributors may be used
21 to endorse or promote products derived from this software without
22 specific prior written permission.
23
24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 POSSIBILITY OF SUCH DAMAGE.
35 *****************************************************************************************
36 */
37 /**
38 * @addtogroup BLE_SRV BLE Services
39 * @{
40 */
41
42 /**
43 * @defgroup BLE_SDK_AMS_C Apple Media Service Client (AMS_C)
44 * @{
45 * @brief Apple Media Service Client module.
46 *
47 * @details The Apple Media Service Client contains the APIs and types, which can be used
48 * by the application to discover Apple Media Service of peer and interact with it.
49 *
50 * The application must provide an event handler to be registered, then call \ref ams_c_client_init() to initialize the client.
51 * After the application discovers peer Apple Media Service by calling \ref ams_c_disc_srvc_start(),
52 * application can call \ref ams_c_cmd_send() to send romote command to peer and \ref ams_c_attr_focus_set to
53 * set the attribute focus.
54 *
55 * Secondly, use \ref ams_c_cmd_notify_set() and \ref ams_c_attr_update_notify_set() to enable the notification
56 * for CMD update and attribute update.
57 *
58 * When the available CMDs or concerned attributes change, the module will receive notification from peer
59 * if notifications of them are enabled. If the notification containing the information of changed attribute
60 * is truncated, application can call \ref ams_c_attr_display_set to set the attribute that needs to be completely
61 * displayed and \ref ams_c_cplt_attr_read to get the completely information of the attribute.
62
63 */
64
65 #ifndef __AMS_C_H__
66 #define __AMS_C_H__
67
68 #include "gr_includes.h"
69 #include "ble_prf_types.h"
70 #include "custom_config.h"
71
72 /**
73 * @defgroup AMS_C_MACRO Defines
74 * @{
75 */
76 #define AMS_C_CONNECTION_MAX 10 /**< Maximum number of HRS Client connections. */
77 #define AMS_C_ATTR_COUNT_MAX 256 /**< The buffer size of command. */
78 #define AMS_C_TRUNCATED_FLAG (0x01<<0) /**< Bit of truncated. */
79 #define AMS_SRVC_UUID 0xdc, 0xf8, 0x55, 0xad, 0x02, 0xc5, 0xf4, 0x8e,\
80 0x3a, 0x43, 0x36, 0x0f, 0x2b, 0x50, 0xd3, 0x89 /**< UUID of Apple media service. */
81 #define AMS_CMD_UUID 0xc2, 0x51, 0xca, 0xf7, 0x56, 0x0e, 0xdf, 0xb8,\
82 0x8a, 0x4a, 0xb1, 0x57, 0xd8, 0x81, 0x3c, 0x9b /**< UUID of remote command. */
83 #define AMS_ATTR_UPDATE_UUID 0x02, 0xC1, 0x96, 0xBA, 0x92, 0xBB, 0x0C, 0x9A,\
84 0x1F, 0x41, 0x8D, 0x80, 0xCE, 0xAB, 0x7C, 0x2F /**< UUID of attribute update. */
85 #define AMS_ATTR_DISPLAY_UUID 0xd7, 0xd5, 0xbb, 0x70, 0xa8, 0xa3, 0xab, 0xa6,\
86 0xd8, 0x46, 0xab, 0x23, 0x8c, 0xf3, 0xb2, 0xc6 /**< UUID of attribute display. */
87 /** @} */
88
89 /**
90 * @defgroup AMS_C_ENUM Enumerations
91 * @{
92 */
93
94 /**@brief Apple Media Service Command ID. */
95 typedef enum
96 {
97 AMS_CMD_ID_PLAY, /**< Command index of play. */
98 AMS_CMD_ID_PAUSE, /**< Command index of pause. */
99 AMS_CMD_ID_TOGGLE_PLAY_PAUSE, /**< Command index of toggle. */
100 AMS_CMD_ID_NEXT_TRACK, /**< Command index of next track. */
101 AMS_CMD_ID_PREVIOUS_TRACK, /**< Command index of previous track. */
102 AMS_CMD_ID_VOLUME_UP, /**< Command index of volume up. */
103 AMS_CMD_ID_VOLUME_DOWN, /**< Command index of volume down. */
104 AMS_CMD_ID_ADVANCE_REPEAT_MODE, /**< Command index of repeat mode. */
105 AMS_CMD_ID_ADVANCE_SHUFFLE_MODE, /**< Command index of shuffle mode. */
106 AMS_CMD_ID_SKIP_FORWARD, /**< Command index of skip forward. */
107 AMS_CMD_ID_SKIP_BACKWARD, /**< Command index of skip backward. */
108 AMS_CMD_ID_LIKE_TRACK, /**< Command index of like track. */
109 AMS_CMD_ID_DISLIKE_TRACK, /**< Command index of dislike track. */
110 AMS_CMD_ID_BOOK_MARK_TRACK, /**< ComMand index of book mark. */
111 } ams_c_cmd_id_t;
112
113 /**@brief Apple Media Service entities index. */
114 typedef enum
115 {
116 AMS_ETT_ID_PLAYER, /**< Entity index of player. */
117 AMS_ETT_ID_QUEUE, /**< Entity index of queue. */
118 AMS_ETT_ID_TRACK, /**< Entity index of track. */
119 } ams_c_ett_id_t;
120
121 /**@brief Apple Media Service player attribute index. */
122 enum
123 {
124 AMS_PLAYER_ATTR_ID_NAME, /**< Player attribute index of name. */
125 AMS_PLAYER_ATTR_ID_PLAYBACK_INFO, /**< Player attribute index of playback information. */
126 AMS_PLAYER_ATTR_ID_VOLUME, /**< Player attribute index of volume. */
127 };
128
129 /**@brief Apple Media Service queue attribute index. */
130 enum
131 {
132 AMS_QUEUE_ATTR_ID_INDEX, /**< Queue attribute index of index. */
133 AMS_QUEUE_ATTR_ID_COUNT, /**< Queue attribute index of count. */
134 AMS_QUEUE_ATTR_ID_SHUFFLE_MODE, /**< Queue attribute index of shuffle mode. */
135 AMS_QUEUE_ATTR_ID_REPEAT_MODE, /**< Queue attribute index of repeat mode. */
136 };
137
138 /**@brief Apple Media Service track attribute index. */
139 enum
140 {
141 AMS_TRACK_ATTR_ID_ARTIST, /**< Track attribute index of artist. */
142 AMS_TRACK_ATTR_ID_ALBUM, /**< Track attribute index of album. */
143 AMS_TRACK_ATTR_ID_TITTLE, /**< Track attribute index of tittle. */
144 AMS_TRACK_ATTR_ID_DURATION, /**< Track attribute index of duration. */
145 };
146
147 /**@brief Apple Media Service Client Event type. */
148 typedef enum
149 {
150 AMS_C_EVT_INVALID, /**< AMS Client invalid event type. */
151 AMS_C_EVT_DISCOVERY_CPLT, /**< AMS Client has found AMS service and its characteristics. */
152 AMS_C_EVT_DISCOVERY_FAIL, /**< AMS Client found AMS service failed because of invalid operation or no found at the peer. */
153 AMS_C_EVT_CMD_SEND_SUCCESS, /**< AMS Client has sent command. */
154 AMS_C_EVT_CMD_UPDATE_RECEIVE, /**< AMS Client has recieved updated command list. */
155 AMS_C_EVT_CMD_UPDATE_NTF_SET_SUCCESS, /**< AMS Client has set command update notification. */
156 AMS_C_EVT_ATTR_FOCUS_SET_SUCCESS, /**< AMS Client has set focus attribute */
157 AMS_C_EVT_ATTR_UPDATE_RECEIVE, /**< AMS Client has received updated attribution data. */
158 AMS_C_EVT_ATTR_UPDATE_NTF_SET_SUCCESS, /**< AMS Client has set focus attribute notification. */
159 AMS_C_EVT_CPLT_ATTR_DISPLAY_SET_SUCCESS, /**< AMS Client has set the attribute which needs to be completely displayed. */
160 AMS_C_EVT_CPLT_ATTR_READ_RSP, /**< AMS Client has received a read response. */
161 AMS_C_EVT_WRITE_OP_ERR, /**< Write error. */
162 } ams_c_evt_type_t;
163 /** @} */
164
165 /**
166 * @defgroup AMS_C_STRUCT Structures
167 * @{
168 */
169
170 /**@brief Structure that stores the attribute to be concerned or to display completely. */
171 typedef struct
172 {
173 ams_c_ett_id_t ett_id; /**< Entity index. */
174 uint8_t attr_id[AMS_C_ATTR_COUNT_MAX]; /**< Attribute indexs. */
175 uint16_t attr_count; /**< Count of attribute. */
176 } ams_c_ett_attr_id_t;
177
178 /**@brief Structure that stores new command list. */
179 typedef struct
180 {
181 ams_c_cmd_id_t *p_cmd; /**< Command list. */
182 uint16_t length; /**< Count of Command. */
183 } ams_c_cmd_list_t;
184
185 /**@brief Structure that stores attribute information. */
186 typedef struct
187 {
188 ams_c_ett_id_t ett_id; /**< Entity index. */
189 uint8_t attr_id; /**< Attribute index. */
190 uint8_t flag; /**< Flag about attribute. */
191 uint8_t *p_data; /**< Attribute data. */
192 uint16_t length; /**< Length of attribute data. */
193 } ams_c_attr_info_t;
194
195 /**@brief Complete attribution's value . */
196 typedef struct
197 {
198 uint8_t *p_data; /**< complete attribute data. */
199 uint16_t length; /**< Length of complete attribute data. */
200 } ams_c_cplt_attr_data_t;
201
202 /**@brief Handles on the connected peer device needed to interact with it. */
203 typedef struct
204 {
205 uint16_t ams_srvc_start_handle; /**< AMS Service start handle. */
206 uint16_t ams_srvc_end_handle; /**< AMS Service end handle. */
207 uint16_t ams_cmd_handle; /**< AMS Service remote command handle. */
208 uint16_t ams_cmd_cccd_handle; /**< AMS Service remote command cccd handle. */
209 uint16_t ams_attr_update_handle; /**< AMS Service update attribute handle. */
210 uint16_t ams_attr_update_cccd_handle; /**< AMS Service update attribute cccd handle. */
211 uint16_t ams_attr_display_handle; /**< AMS Service complete attribute display handle. */
212 } ams_c_handles_t;
213
214 /**@brief Apple Media Service Client event. */
215 typedef struct
216 {
217 uint8_t conn_idx; /**< The index of the connection. */
218 ams_c_evt_type_t evt_type; /**< The AMS event type. */
219 union
220 {
221 ams_c_cmd_list_t cmd_list; /**< Command list. */
222 ams_c_attr_info_t attr_info; /**< Attribute information. */
223 ams_c_cplt_attr_data_t cplt_attr_data; /**< Complete attribute data. */
224 } param; /**< Data received. */
225 } ams_c_evt_t;
226 /** @} */
227
228 /**
229 * @defgroup AMS_C_TYPEDEF Typedefs
230 * @{
231 */
232 /**@brief Apple Media Service Client event handler type.*/
233 typedef void (*ams_c_evt_handler_t)(ams_c_evt_t *p_evt);
234 /** @} */
235
236 /**
237 * @defgroup AMS_FUNCTION Functions
238 * @{
239 */
240
241 /**
242 *****************************************************************************************
243 * @brief Register AMS Client event handler.
244 *
245 * @param[in] evt_handler: Apple Media Service Client event handler.
246 *
247 * @return Result of initialization.
248 *****************************************************************************************
249 */
250 sdk_err_t ams_c_client_init(ams_c_evt_handler_t evt_handler);;
251
252 /**
253 *****************************************************************************************
254 * @brief Discover Apple Media Service on peer.
255 *
256 * @param[in] conn_idx: Index of connection.
257 *
258 * @return Operation result.
259 *****************************************************************************************
260 */
261 sdk_err_t ams_c_disc_srvc_start(uint8_t conn_idx);
262
263 /**
264 *****************************************************************************************
265 * @brief Enable or disable peer new command list notify.
266 *
267 * @param[in] conn_idx: Index of connection.
268 * @param[in] is_enable: True for turn on, false for turn off.
269 *
270 * @return Operation result.
271 *****************************************************************************************
272 */
273 sdk_err_t ams_c_cmd_notify_set(uint8_t conn_idx, bool is_enable);
274
275 /**
276 *****************************************************************************************
277 * @brief Enable or disable peer updated attribute notify.
278 *
279 * @param[in] conn_idx: Index of connection.
280 * @param[in] is_enable: True for turn on, false for turn off.
281 *
282 * @return Operation result.
283 *****************************************************************************************
284 */
285 sdk_err_t ams_c_attr_update_notify_set(uint8_t conn_idx, bool is_enable);
286
287 /**
288 *****************************************************************************************
289 * @brief Read complete value of updated attrbute .
290 *
291 * @param[in] conn_idx: Index of connection.
292 *
293 * @return Operation result.
294 *****************************************************************************************
295 */
296 sdk_err_t ams_c_cplt_attr_read(uint8_t conn_idx);
297
298 /**
299 *****************************************************************************************
300 * @brief Send command to peer device.
301 *
302 * @param[in] conn_idx: Index of connection.
303 * @param[in] cmd_id: Index of command.
304 *
305 * @return Operation result.
306 *****************************************************************************************
307 */
308 sdk_err_t ams_c_cmd_send(uint8_t conn_idx, uint8_t cmd_id);
309
310 /**
311 *****************************************************************************************
312 * @brief Set concerned attribute.
313 *
314 * @param[in] conn_idx: Index of connection.
315 * @param[in] p_ett_attr_id: Point to the structure containing concerned attribute
316 *
317 * @return Operation result.
318 *****************************************************************************************
319 */
320 sdk_err_t ams_c_attr_focus_set(uint8_t conn_idx, const ams_c_ett_attr_id_t *p_ett_attr_id);
321
322 /**
323 *****************************************************************************************
324 * @brief Set the attribute that needs to be completely displayed.
325 *
326 * @param[in] conn_idx: Index of connection.
327 * @param[in] p_attr_info: Point to the structure containing concerned attribute
328 *
329 * @return Operation result.
330 *****************************************************************************************
331 */
332 sdk_err_t ams_c_attr_display_set(uint8_t conn_idx, const ams_c_attr_info_t *p_attr_info);
333
334 /**
335 *****************************************************************************************
336 * @brief Check if the command is available.
337 *
338 * @param[in] cmd_id: Index of command.
339 *
340 * @return Operation result.
341 *****************************************************************************************
342 */
343 bool ams_c_cmd_enable_check(ams_c_cmd_id_t cmd_id);
344 /** @} */
345
346 #endif
347 /** @} */
348 /** @} */
AMS_C_EVT_INVALID
@ AMS_C_EVT_INVALID
AMS Client invalid event type.
Definition: ams_c.h:150
ams_c_cmd_send
sdk_err_t ams_c_cmd_send(uint8_t conn_idx, uint8_t cmd_id)
Send command to peer device.
AMS_C_EVT_DISCOVERY_FAIL
@ AMS_C_EVT_DISCOVERY_FAIL
AMS Client found AMS service failed because of invalid operation or no found at the peer.
Definition: ams_c.h:152
ams_c_cmd_enable_check
bool ams_c_cmd_enable_check(ams_c_cmd_id_t cmd_id)
Check if the command is available.
ams_c_cmd_list_t
Structure that stores new command list.
Definition: ams_c.h:180
ams_c_evt_t::attr_info
ams_c_attr_info_t attr_info
Attribute information.
Definition: ams_c.h:222
ams_c_handles_t
Handles on the connected peer device needed to interact with it.
Definition: ams_c.h:204
AMS_CMD_ID_BOOK_MARK_TRACK
@ AMS_CMD_ID_BOOK_MARK_TRACK
ComMand index of book mark.
Definition: ams_c.h:110
ams_c_disc_srvc_start
sdk_err_t ams_c_disc_srvc_start(uint8_t conn_idx)
Discover Apple Media Service on peer.
ams_c_evt_type_t
ams_c_evt_type_t
Apple Media Service Client Event type.
Definition: ams_c.h:149
AMS_CMD_ID_VOLUME_UP
@ AMS_CMD_ID_VOLUME_UP
Command index of volume up.
Definition: ams_c.h:102
ams_c_handles_t::ams_cmd_handle
uint16_t ams_cmd_handle
AMS Service remote command handle.
Definition: ams_c.h:207
AMS_CMD_ID_SKIP_FORWARD
@ AMS_CMD_ID_SKIP_FORWARD
Command index of skip forward.
Definition: ams_c.h:106
AMS_ETT_ID_QUEUE
@ AMS_ETT_ID_QUEUE
Entity index of queue.
Definition: ams_c.h:117
ams_c_handles_t::ams_srvc_start_handle
uint16_t ams_srvc_start_handle
AMS Service start handle.
Definition: ams_c.h:205
ams_c_evt_t::cplt_attr_data
ams_c_cplt_attr_data_t cplt_attr_data
Complete attribute data.
Definition: ams_c.h:223
AMS_CMD_ID_PAUSE
@ AMS_CMD_ID_PAUSE
Command index of pause.
Definition: ams_c.h:98
AMS_CMD_ID_SKIP_BACKWARD
@ AMS_CMD_ID_SKIP_BACKWARD
Command index of skip backward.
Definition: ams_c.h:107
AMS_TRACK_ATTR_ID_TITTLE
@ AMS_TRACK_ATTR_ID_TITTLE
Track attribute index of tittle.
Definition: ams_c.h:143
ams_c_handles_t::ams_attr_update_handle
uint16_t ams_attr_update_handle
AMS Service update attribute handle.
Definition: ams_c.h:209
ams_c_ett_attr_id_t::attr_count
uint16_t attr_count
Count of attribute.
Definition: ams_c.h:175
AMS_QUEUE_ATTR_ID_INDEX
@ AMS_QUEUE_ATTR_ID_INDEX
Queue attribute index of index.
Definition: ams_c.h:132
ams_c_ett_attr_id_t::ett_id
ams_c_ett_id_t ett_id
Entity index.
Definition: ams_c.h:173
gr_includes.h
Include Files API.
ams_c_attr_info_t::attr_id
uint8_t attr_id
Attribute index.
Definition: ams_c.h:189
AMS_TRACK_ATTR_ID_DURATION
@ AMS_TRACK_ATTR_ID_DURATION
Track attribute index of duration.
Definition: ams_c.h:144
ams_c_attr_update_notify_set
sdk_err_t ams_c_attr_update_notify_set(uint8_t conn_idx, bool is_enable)
Enable or disable peer updated attribute notify.
AMS_QUEUE_ATTR_ID_SHUFFLE_MODE
@ AMS_QUEUE_ATTR_ID_SHUFFLE_MODE
Queue attribute index of shuffle mode.
Definition: ams_c.h:134
ams_c_attr_focus_set
sdk_err_t ams_c_attr_focus_set(uint8_t conn_idx, const ams_c_ett_attr_id_t *p_ett_attr_id)
Set concerned attribute.
ams_c_cmd_list_t::length
uint16_t length
Count of Command.
Definition: ams_c.h:182
ams_c_cplt_attr_data_t
Complete attribution's value .
Definition: ams_c.h:197
ams_c_evt_t::conn_idx
uint8_t conn_idx
The index of the connection.
Definition: ams_c.h:217
AMS_C_EVT_ATTR_UPDATE_NTF_SET_SUCCESS
@ AMS_C_EVT_ATTR_UPDATE_NTF_SET_SUCCESS
AMS Client has set focus attribute notification.
Definition: ams_c.h:158
AMS_C_EVT_WRITE_OP_ERR
@ AMS_C_EVT_WRITE_OP_ERR
Write error.
Definition: ams_c.h:161
ams_c_cmd_id_t
ams_c_cmd_id_t
Apple Media Service Command ID.
Definition: ams_c.h:96
AMS_C_EVT_CMD_UPDATE_RECEIVE
@ AMS_C_EVT_CMD_UPDATE_RECEIVE
AMS Client has recieved updated command list.
Definition: ams_c.h:154
ams_c_attr_info_t::length
uint16_t length
Length of attribute data.
Definition: ams_c.h:192
AMS_CMD_ID_NEXT_TRACK
@ AMS_CMD_ID_NEXT_TRACK
Command index of next track.
Definition: ams_c.h:100
ams_c_cplt_attr_read
sdk_err_t ams_c_cplt_attr_read(uint8_t conn_idx)
Read complete value of updated attrbute .
ams_c_handles_t::ams_attr_update_cccd_handle
uint16_t ams_attr_update_cccd_handle
AMS Service update attribute cccd handle.
Definition: ams_c.h:210
AMS_QUEUE_ATTR_ID_REPEAT_MODE
@ AMS_QUEUE_ATTR_ID_REPEAT_MODE
Queue attribute index of repeat mode.
Definition: ams_c.h:135
ams_c_evt_t::evt_type
ams_c_evt_type_t evt_type
The AMS event type.
Definition: ams_c.h:218
AMS_ETT_ID_TRACK
@ AMS_ETT_ID_TRACK
Entity index of track.
Definition: ams_c.h:118
ble_prf_types.h
Profile/Service Common Types.
ams_c_handles_t::ams_srvc_end_handle
uint16_t ams_srvc_end_handle
AMS Service end handle.
Definition: ams_c.h:206
sdk_err_t
uint16_t sdk_err_t
SDK API result type.
Definition: ble_error.h:274
AMS_ETT_ID_PLAYER
@ AMS_ETT_ID_PLAYER
Entity index of player.
Definition: ams_c.h:116
AMS_PLAYER_ATTR_ID_PLAYBACK_INFO
@ AMS_PLAYER_ATTR_ID_PLAYBACK_INFO
Player attribute index of playback information.
Definition: ams_c.h:125
AMS_C_ATTR_COUNT_MAX
#define AMS_C_ATTR_COUNT_MAX
The buffer size of command.
Definition: ams_c.h:77
ams_c_attr_info_t::flag
uint8_t flag
Flag about attribute.
Definition: ams_c.h:190
AMS_C_EVT_CPLT_ATTR_DISPLAY_SET_SUCCESS
@ AMS_C_EVT_CPLT_ATTR_DISPLAY_SET_SUCCESS
AMS Client has set the attribute which needs to be completely displayed.
Definition: ams_c.h:159
ams_c_attr_info_t
Structure that stores attribute information.
Definition: ams_c.h:187
AMS_CMD_ID_TOGGLE_PLAY_PAUSE
@ AMS_CMD_ID_TOGGLE_PLAY_PAUSE
Command index of toggle.
Definition: ams_c.h:99
ams_c_evt_handler_t
void(* ams_c_evt_handler_t)(ams_c_evt_t *p_evt)
Apple Media Service Client event handler type.
Definition: ams_c.h:233
ams_c_attr_display_set
sdk_err_t ams_c_attr_display_set(uint8_t conn_idx, const ams_c_attr_info_t *p_attr_info)
Set the attribute that needs to be completely displayed.
ams_c_cplt_attr_data_t::p_data
uint8_t * p_data
complete attribute data.
Definition: ams_c.h:198
AMS_CMD_ID_PLAY
@ AMS_CMD_ID_PLAY
Command index of play.
Definition: ams_c.h:97
AMS_CMD_ID_VOLUME_DOWN
@ AMS_CMD_ID_VOLUME_DOWN
Command index of volume down.
Definition: ams_c.h:103
ams_c_cmd_notify_set
sdk_err_t ams_c_cmd_notify_set(uint8_t conn_idx, bool is_enable)
Enable or disable peer new command list notify.
AMS_CMD_ID_ADVANCE_REPEAT_MODE
@ AMS_CMD_ID_ADVANCE_REPEAT_MODE
Command index of repeat mode.
Definition: ams_c.h:104
ams_c_cplt_attr_data_t::length
uint16_t length
Length of complete attribute data.
Definition: ams_c.h:199
AMS_CMD_ID_ADVANCE_SHUFFLE_MODE
@ AMS_CMD_ID_ADVANCE_SHUFFLE_MODE
Command index of shuffle mode.
Definition: ams_c.h:105
ams_c_cmd_list_t::p_cmd
ams_c_cmd_id_t * p_cmd
Command list.
Definition: ams_c.h:181
AMS_C_EVT_CMD_SEND_SUCCESS
@ AMS_C_EVT_CMD_SEND_SUCCESS
AMS Client has sent command.
Definition: ams_c.h:153
ams_c_evt_t::cmd_list
ams_c_cmd_list_t cmd_list
Command list.
Definition: ams_c.h:221
ams_c_evt_t
Apple Media Service Client event.
Definition: ams_c.h:216
ams_c_attr_info_t::p_data
uint8_t * p_data
Attribute data.
Definition: ams_c.h:191
ams_c_client_init
sdk_err_t ams_c_client_init(ams_c_evt_handler_t evt_handler)
Register AMS Client event handler.
AMS_CMD_ID_LIKE_TRACK
@ AMS_CMD_ID_LIKE_TRACK
Command index of like track.
Definition: ams_c.h:108
AMS_C_EVT_CMD_UPDATE_NTF_SET_SUCCESS
@ AMS_C_EVT_CMD_UPDATE_NTF_SET_SUCCESS
AMS Client has set command update notification.
Definition: ams_c.h:155
AMS_C_EVT_ATTR_FOCUS_SET_SUCCESS
@ AMS_C_EVT_ATTR_FOCUS_SET_SUCCESS
AMS Client has set focus attribute.
Definition: ams_c.h:156
ams_c_ett_attr_id_t
Structure that stores the attribute to be concerned or to display completely.
Definition: ams_c.h:172
AMS_C_EVT_DISCOVERY_CPLT
@ AMS_C_EVT_DISCOVERY_CPLT
AMS Client has found AMS service and its characteristics.
Definition: ams_c.h:151
AMS_PLAYER_ATTR_ID_VOLUME
@ AMS_PLAYER_ATTR_ID_VOLUME
Player attribute index of volume.
Definition: ams_c.h:126
ams_c_attr_info_t::ett_id
ams_c_ett_id_t ett_id
Entity index.
Definition: ams_c.h:188
AMS_C_EVT_CPLT_ATTR_READ_RSP
@ AMS_C_EVT_CPLT_ATTR_READ_RSP
AMS Client has received a read response.
Definition: ams_c.h:160
ams_c_handles_t::ams_cmd_cccd_handle
uint16_t ams_cmd_cccd_handle
AMS Service remote command cccd handle.
Definition: ams_c.h:208
AMS_CMD_ID_DISLIKE_TRACK
@ AMS_CMD_ID_DISLIKE_TRACK
Command index of dislike track.
Definition: ams_c.h:109
AMS_CMD_ID_PREVIOUS_TRACK
@ AMS_CMD_ID_PREVIOUS_TRACK
Command index of previous track.
Definition: ams_c.h:101
AMS_QUEUE_ATTR_ID_COUNT
@ AMS_QUEUE_ATTR_ID_COUNT
Queue attribute index of count.
Definition: ams_c.h:133
AMS_TRACK_ATTR_ID_ALBUM
@ AMS_TRACK_ATTR_ID_ALBUM
Track attribute index of album.
Definition: ams_c.h:142
ams_c_ett_id_t
ams_c_ett_id_t
Apple Media Service entities index.
Definition: ams_c.h:115
AMS_TRACK_ATTR_ID_ARTIST
@ AMS_TRACK_ATTR_ID_ARTIST
Track attribute index of artist.
Definition: ams_c.h:141
ams_c_handles_t::ams_attr_display_handle
uint16_t ams_attr_display_handle
AMS Service complete attribute display handle.
Definition: ams_c.h:211
AMS_PLAYER_ATTR_ID_NAME
@ AMS_PLAYER_ATTR_ID_NAME
Player attribute index of name.
Definition: ams_c.h:124
AMS_C_EVT_ATTR_UPDATE_RECEIVE
@ AMS_C_EVT_ATTR_UPDATE_RECEIVE
AMS Client has received updated attribution data.
Definition: ams_c.h:157