gatt.h 898 B

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: LGPL-2.1-or-later */
  2. /*
  3. *
  4. * BlueZ - Bluetooth protocol stack for Linux
  5. *
  6. * Copyright (C) 2014 Intel Corporation. All rights reserved.
  7. *
  8. *
  9. */
  10. bool bt_gatt_register(struct ipc *ipc, const bdaddr_t *addr);
  11. void bt_gatt_unregister(void);
  12. typedef enum {
  13. GATT_CLIENT,
  14. GATT_SERVER,
  15. } gatt_type_t;
  16. typedef void (*gatt_conn_cb_t)(const bdaddr_t *addr, int err, void *attrib);
  17. unsigned int bt_gatt_register_app(const char *uuid, gatt_type_t type,
  18. gatt_conn_cb_t func);
  19. bool bt_gatt_unregister_app(unsigned int id);
  20. bool bt_gatt_connect_app(unsigned int id, const bdaddr_t *addr);
  21. bool bt_gatt_disconnect_app(unsigned int id, const bdaddr_t *addr);
  22. bool bt_gatt_set_security(const bdaddr_t *bdaddr, int sec_level);
  23. bool bt_gatt_add_autoconnect(unsigned int id, const bdaddr_t *addr);
  24. void bt_gatt_remove_autoconnect(unsigned int id, const bdaddr_t *addr);