1 /*  Bluetooth Audio Content Control Identifier */
2 
3 /*
4  * Copyright (c) 2020 Bose Corporation
5  * Copyright (c) 2021 Nordic Semiconductor ASA
6  *
7  * SPDX-License-Identifier: Apache-2.0
8  */
9 
10 #ifndef ZEPHYR_INCLUDE_BLUETOOTH_CCID_H_
11 #define ZEPHYR_INCLUDE_BLUETOOTH_CCID_H_
12 
13 #include <stdint.h>
14 
15 #include <zephyr/bluetooth/gatt.h>
16 
17 /**
18  * @brief Gets a free CCID value.
19  *
20  * The maximum number of CCID values that can retrieved on the device is 0xFE,
21  * one less than per the GSS specification.
22  *
23  * @return uint8_t A content control ID value.
24  */
25 uint8_t bt_ccid_get_value(void);
26 
27 /**
28  * @brief Get the GATT attribute of a CCID value
29  *
30  * Searches the current GATT database for a CCID characteristic that has the supplied CCID value.
31  *
32  * @param ccid The CCID the search for
33  *
34  * @retval NULL if none was found
35  * @retval A pointer to a GATT attribute if found
36  */
37 const struct bt_gatt_attr *bt_ccid_find_attr(uint8_t ccid);
38 
39 #endif /* ZEPHYR_INCLUDE_BLUETOOTH_CCID_H_ */
40