forked from abrasive/shairport
-
-
Notifications
You must be signed in to change notification settings - Fork 663
Expand file tree
/
Copy pathmqtt.h
More file actions
20 lines (18 loc) · 908 Bytes
/
Copy pathmqtt.h
File metadata and controls
20 lines (18 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#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);
void metadata_mqtt_queue_init();
void metadata_mqtt_queue_stop();
int send_metadata_to_mqtt_queue(const uint32_t type, const uint32_t code, const char *data,
const uint32_t length, rtsp_message *carrier, int block);
#endif /* #ifndef MQTT_H */