tic2mqtt/mqtt.h

14 lines
393 B
C
Raw Permalink Normal View History

2021-08-04 12:24:08 +02:00
#ifndef __MQTT_H__
#define __MQTT_H__
#define TOPIC_MAXLEN 255
#define TIC_QOS 0
extern struct mosquitto *mqtt_open(const char *host, int port, int keepalive);
extern void mqtt_close(struct mosquitto *mosq);
extern int mqtt_publish(struct mosquitto *mosq, const char *topic_prefix, const char *topic_suffix, const void *payload, int qos);
extern const char *mqtt_strerror(int err);
#endif