forked from mikebrady/shairport-sync
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmqtt.h
More file actions
15 lines (14 loc) · 659 Bytes
/
mqtt.h
File metadata and controls
15 lines (14 loc) · 659 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef MQTT_H
#define MQTT_H
#include <mosquitto.h>
#include <stdint.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 send_autodiscovery_messages(struct mosquitto *mosq);
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 */