interface_mqtt.h 729 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #ifndef INTERFACE_MQTT_H
  3. #define INTERFACE_MQTT_H
  4. #include <string>
  5. #include <map>
  6. #include <functional>
  7. bool MQTT_Configure(void *callbackOnConnected);
  8. int MQTT_Init();
  9. void MQTTdestroy_client(bool _disable);
  10. bool MQTTPublish(std::string _key, std::string _content, int qos, bool retained_flag = 1); // retained Flag as Standart
  11. bool getMQTTisEnabled();
  12. bool getMQTTisConnected();
  13. void MQTTregisterConnectFunction(std::string name, std::function<void()> func);
  14. void MQTTunregisterConnectFunction(std::string name);
  15. void MQTTregisterSubscribeFunction(std::string topic, std::function<bool(std::string, char *, int)> func);
  16. void MQTTdestroySubscribeFunction();
  17. void MQTTconnected();
  18. #endif // INTERFACE_MQTT_H