1 /* @file
2  * @brief Media Control Service internal header file
3  *
4  * Copyright (c) 2020 - 2021 Nordic Semiconductor ASA
5  *
6  * SPDX-License-Identifier: Apache-2.0
7  */
8 #ifndef ZEPHYR_SUBSYS_BLUETOOTH_HOST_AUDIO_MCS_INTERNAL_H_
9 #define ZEPHYR_SUBSYS_BLUETOOTH_HOST_AUDIO_MCS_INTERNAL_H_
10 
11 #include <zephyr/bluetooth/services/ots.h>
12 #include <zephyr/sys/util.h>
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 /* This differs from BT_OTS_VALID_OBJ_ID as MCS does not use the directory list object */
19 #define BT_MCS_VALID_OBJ_ID(id) (IN_RANGE((id), BT_OTS_OBJ_ID_MIN, BT_OTS_OBJ_ID_MAX))
20 
21 #define BT_MCS_VALID_OP(opcode) \
22 	(IN_RANGE((opcode), BT_MCS_OPC_PLAY, BT_MCS_OPC_STOP) || \
23 	 (opcode == BT_MCS_OPC_MOVE_RELATIVE) || \
24 	 IN_RANGE((opcode), BT_MCS_OPC_PREV_SEGMENT, BT_MCS_OPC_GOTO_SEGMENT) || \
25 	 IN_RANGE((opcode), BT_MCS_OPC_PREV_TRACK, BT_MCS_OPC_GOTO_TRACK) || \
26 	 IN_RANGE((opcode), BT_MCS_OPC_PREV_GROUP, BT_MCS_OPC_GOTO_GROUP))
27 
28 int bt_mcs_init(struct bt_ots_cb *ots_cbs);
29 
30 #ifdef __cplusplus
31 }
32 #endif
33 
34 #endif /* ZEPHYR_SUBSYS_BLUETOOTH_HOST_AUDIO_MCS_INTERNAL_H_ */
35