Bluetooth: Add check given services is register API

Add API for chech given services is register.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
This commit is contained in:
Lingao Meng 2021-08-18 19:19:03 +08:00 committed by Carles Cufí
commit fd5c30c68b
2 changed files with 27 additions and 1 deletions

View file

@ -362,13 +362,21 @@ void bt_gatt_cb_register(struct bt_gatt_cb *cb);
int bt_gatt_service_register(struct bt_gatt_service *svc);
/** @brief Unregister GATT service.
* *
*
* @param svc Service to be unregistered.
*
* @return 0 in case of success or negative value in case of error.
*/
int bt_gatt_service_unregister(struct bt_gatt_service *svc);
/** @brief Check if GATT service is registered.
*
* @param svc Service to be checked.
*
* @return true if registered or false if not register.
*/
bool bt_gatt_service_is_registered(const struct bt_gatt_service *svc);
enum {
BT_GATT_ITER_STOP = 0,
BT_GATT_ITER_CONTINUE,