mqtt.h 711 B

12345678910111213141516171819202122232425
  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. #ifndef NETDATA_MQTT_H
  3. #define NETDATA_MQTT_H
  4. #ifdef ENABLE_ACLK
  5. #include "externaldeps/mosquitto/mosquitto.h"
  6. #endif
  7. void _show_mqtt_info();
  8. int _link_event_loop();
  9. void _link_shutdown();
  10. int mqtt_attempt_connection(char *aclk_hostname, int aclk_port, char *username, char *password);
  11. //int _link_lib_init();
  12. int _mqtt_lib_init();
  13. int _link_subscribe(char *topic, int qos);
  14. int _link_send_message(char *topic, unsigned char *message, int *mid);
  15. const char *_link_strerror(int rc);
  16. int _link_set_lwt(char *topic, int qos);
  17. int aclk_handle_cloud_request(char *);
  18. extern char *get_topic(char *sub_topic, char *final_topic, int max_size);
  19. #endif //NETDATA_MQTT_H