summaryrefslogtreecommitdiff
path: root/include/mqtt.h
blob: fa7df1c4d1a02f0ea4eefdb1fcc00535d4e79896 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

// Project
#include <mosquitto.h>

struct mosquitto *connect(const char *clientid, // NOLINT
                          const char *username, // NOLINT
                          const char *password, // NOLINT
                          const char *hostname, // NOLINT
                          int         port,
                          void        callback(struct mosquitto *, void *, const struct mosquitto_message *),
                          void       *userdata);

void run(struct mosquitto *client, const char *topics[], const volatile bool *quit);

void shutdown(struct mosquitto *client);