att-database.h 788 B

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. *
  4. * BlueZ - Bluetooth protocol stack for Linux
  5. *
  6. * Copyright (C) 2012 Texas Instruments Corporation
  7. *
  8. */
  9. /* Requirements for read/write operations */
  10. enum {
  11. ATT_NONE, /* No restrictions */
  12. ATT_AUTHENTICATION, /* Authentication required */
  13. ATT_AUTHORIZATION, /* Authorization required */
  14. ATT_NOT_PERMITTED, /* Operation not permitted */
  15. };
  16. struct attribute {
  17. uint16_t handle;
  18. bt_uuid_t uuid;
  19. int read_req; /* Read requirement */
  20. int write_req; /* Write requirement */
  21. uint8_t (*read_cb)(struct attribute *a, struct btd_device *device,
  22. gpointer user_data);
  23. uint8_t (*write_cb)(struct attribute *a, struct btd_device *device,
  24. gpointer user_data);
  25. gpointer cb_user_data;
  26. size_t len;
  27. uint8_t *data;
  28. };