mesh.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: LGPL-2.1-or-later */
  2. /*
  3. *
  4. * BlueZ - Bluetooth protocol stack for Linux
  5. *
  6. * Copyright (C) 2018-2019 Intel Corporation. All rights reserved.
  7. *
  8. *
  9. */
  10. #define BLUEZ_MESH_NAME "org.bluez.mesh"
  11. #define MESH_NETWORK_INTERFACE "org.bluez.mesh.Network1"
  12. #define MESH_NODE_INTERFACE "org.bluez.mesh.Node1"
  13. #define MESH_MANAGEMENT_INTERFACE "org.bluez.mesh.Management1"
  14. #define MESH_ELEMENT_INTERFACE "org.bluez.mesh.Element1"
  15. #define MESH_APPLICATION_INTERFACE "org.bluez.mesh.Application1"
  16. #define MESH_PROVISION_AGENT_INTERFACE "org.bluez.mesh.ProvisionAgent1"
  17. #define MESH_PROVISIONER_INTERFACE "org.bluez.mesh.Provisioner1"
  18. #define ERROR_INTERFACE "org.bluez.mesh.Error"
  19. enum mesh_io_type;
  20. typedef void (*mesh_ready_func_t)(void *user_data, bool success);
  21. typedef void (*prov_rx_cb_t)(void *user_data, const uint8_t *data,
  22. uint16_t len);
  23. bool mesh_init(const char *config_dir, const char *mesh_conf_fname,
  24. enum mesh_io_type type, void *opts,
  25. mesh_ready_func_t cb, void *user_data);
  26. void mesh_cleanup(void);
  27. bool mesh_dbus_init(struct l_dbus *dbus);
  28. const char *mesh_status_str(uint8_t err);
  29. bool mesh_send_pkt(uint8_t count, uint16_t interval, void *data, uint16_t len);
  30. bool mesh_send_cancel(const uint8_t *filter, uint8_t len);
  31. bool mesh_reg_prov_rx(prov_rx_cb_t cb, void *user_data);
  32. void mesh_unreg_prov_rx(prov_rx_cb_t cb);
  33. const char *mesh_prov_status_str(uint8_t status);
  34. const char *mesh_get_storage_dir(void);
  35. bool mesh_beacon_enabled(void);
  36. bool mesh_relay_supported(void);
  37. bool mesh_friendship_supported(void);
  38. uint16_t mesh_get_crpl(void);
  39. uint8_t mesh_get_friend_queue_size(void);