From 868d0a1ecbfbcd1f04b5c03403d6cffb439ce8fe Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Tue, 29 Oct 2024 22:34:23 +0100 Subject: Verschiebe MQTT Code in ein eigenes Modul --- include/mqtt.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 include/mqtt.h (limited to 'include') diff --git a/include/mqtt.h b/include/mqtt.h new file mode 100644 index 0000000..fa7df1c --- /dev/null +++ b/include/mqtt.h @@ -0,0 +1,16 @@ +#pragma once + +// Project +#include + +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); -- cgit v1.3