gatt.h 904 B

12345678910111213141516171819202122232425262728293031
  1. /* SPDX-License-Identifier: LGPL-2.1-or-later */
  2. /*
  3. *
  4. * BlueZ - Bluetooth protocol stack for Linux
  5. *
  6. * Copyright (C) 2017 Intel Corporation. All rights reserved.
  7. *
  8. *
  9. */
  10. #include "gdbus/gdbus.h"
  11. /* Largest Possible GATT Packet: Provisioning Public Key + type + sar */
  12. #define MAX_GATT_SIZE (64 + 1 + 1)
  13. #define GATT_SAR_MASK 0xc0
  14. #define GATT_SAR_COMPLETE 0x00
  15. #define GATT_SAR_FIRST 0x40
  16. #define GATT_SAR_CONTINUE 0x80
  17. #define GATT_SAR_LAST 0xc0
  18. #define GATT_TYPE_INVALID 0xff
  19. #define GATT_TYPE_MASK 0x3f
  20. uint16_t mesh_gatt_sar(uint8_t **pkt, uint16_t size);
  21. bool mesh_gatt_is_child(GDBusProxy *proxy, GDBusProxy *parent,
  22. const char *name);
  23. bool mesh_gatt_write(GDBusProxy *proxy, uint8_t *buf, uint16_t len,
  24. GDBusReturnFunction cb, void *user_data);
  25. bool mesh_gatt_notify(GDBusProxy *proxy, bool enable, GDBusReturnFunction cb,
  26. void *user_data);
  27. void mesh_gatt_cleanup(void);