mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-06 19:46:54 +03:00
23 lines
858 B
C++
23 lines
858 B
C++
#ifndef INTERFACE_MQTT_H
|
|
#define INTERFACE_MQTT_H
|
|
|
|
#include <string>
|
|
#include <map>
|
|
#include <functional>
|
|
|
|
bool MQTTInit(std::string _mqttURI, std::string _clientid, std::string _user, std::string _password, std::string _LWTContext, int _keepalive);
|
|
void MQTTdestroy();
|
|
|
|
//void MQTTInit(std::string _mqttURI, std::string _clientid, std::string _user = "", std::string _password = "");
|
|
|
|
bool MQTTPublish(std::string _key, std::string _content, int retained_flag = 1); // retained Flag as Standart
|
|
|
|
bool MQTTisConnected();
|
|
|
|
void MQTTregisterConnectFunction(std::string name, std::function<void()> func);
|
|
void MQTTunregisterConnectFunction(std::string name);
|
|
void MQTTregisterSubscribeFunction(std::string topic, std::function<bool(std::string, char*, int)> func);
|
|
void MQTTdestroySubscribeFunction();
|
|
void MQTTconnected();
|
|
|
|
#endif //INTERFACE_MQTT_H
|