diff options
author | Till Zimmermann <tillz@tillz.net> | 2018-06-19 19:40:08 +0200 |
---|---|---|
committer | Till Zimmermann <tillz@tillz.net> | 2018-06-19 19:40:08 +0200 |
commit | 02694948f3e0229529e42102a817b35fd144bf63 (patch) | |
tree | 7bf79d19be1c3d08a98965c4b11fca8c05eed683 /mqtt.h | |
parent | de180967626e641a27c05b31f8c52f171a77d8d5 (diff) |
Initial MQTT Version
Diffstat (limited to 'mqtt.h')
-rw-r--r-- | mqtt.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -0,0 +1,15 @@ +#ifndef MQTT_H +#define MQTT_H +#include <stdint.h> +#include <mosquitto.h> + + +int initialise_mqtt(); +void mqtt_process_metadata(uint32_t type, uint32_t code, char *data, uint32_t length); +void mqtt_publish(char* topic, char* data, uint32_t length); +void mqtt_setup(); +void on_connect(struct mosquitto* mosq, void* userdata, int rc); +void on_disconnect(struct mosquitto* mosq, void* userdata, int rc); +void on_message(struct mosquitto* mosq, void* userdata, const struct mosquitto_message* msg); +void _cb_log(struct mosquitto *mosq, void *userdata, int level, const char *str); +#endif /* #ifndef MQTT_H */ |