This repository has been archived on 2026-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2014-04-01 01:24:15 +02:00

40 lines
653 B
C++

#ifndef HTTPDAEMON_H
#define HTTPDAEMON_H
#include <QTcpServer>
class Device;
class DevicePlugin;
class HttpDaemon : public QTcpServer
{
Q_OBJECT
public:
HttpDaemon(Device *device, DevicePlugin* parent = 0);
void incomingConnection(qintptr socket) override;
void pause();
void resume();
signals:
void setState(const QUuid &stateTypeId, const QVariant &value);
void triggerEvent(const QUuid &eventTypeId);
private slots:
void readClient();
void discardClient();
private:
QString generateWebPage();
private:
bool disabled;
DevicePlugin *m_plugin;
Device *m_device;
};
#endif // HTTPDAEMON_H