// SPDX-License-Identifier: GPL-3.0-or-later /* * Qt mutizone MQTT thermostat * * Copyright (C) 2019 Richard Genoud * */ #ifndef BACKGROUNDLOOP_H #define BACKGROUNDLOOP_H #include #include "qmqtt.h" class BackgroundLoop : public QThread { Q_OBJECT public: BackgroundLoop(); ~BackgroundLoop(); bool connectMQTT(); private: void run() override; QMQTT::Client *m_mqtt_client; private slots: void mqtt_connected(void); void mqtt_disconnected(void); void mqtt_error(const QMQTT::ClientError error); void mqtt_subscribed(const QString& topic, const quint8 qos); void mqtt_received(const QMQTT::Message& message); }; #endif // BACKGROUNDLOOP_H /* vim: set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab: */