mirror of https://github.com/nymea/nymea.git
65 lines
2.9 KiB
C++
65 lines
2.9 KiB
C++
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
* *
|
|
* Copyright (C) 2016 Simon Stürz <simon.stuerz@guh.guru> *
|
|
* *
|
|
* This file is part of guh. *
|
|
* *
|
|
* Guh is free software: you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation, version 2 of the License. *
|
|
* *
|
|
* Guh is distributed in the hope that it will be useful, *
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
* GNU General Public License for more details. *
|
|
* *
|
|
* You should have received a copy of the GNU General Public License *
|
|
* along with guh. If not, see <http://www.gnu.org/licenses/>. *
|
|
* *
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
#ifndef CONFIGURATIONHANDLER_H
|
|
#define CONFIGURATIONHANDLER_H
|
|
|
|
#include <QObject>
|
|
|
|
#include "jsonhandler.h"
|
|
|
|
namespace guhserver {
|
|
|
|
class ConfigurationHandler : public JsonHandler
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
ConfigurationHandler(QObject *parent = 0);
|
|
QString name() const;
|
|
|
|
Q_INVOKABLE JsonReply *GetConfigurations(const QVariantMap ¶ms) const;
|
|
Q_INVOKABLE JsonReply *GetTimeZones(const QVariantMap ¶ms) const;
|
|
Q_INVOKABLE JsonReply *GetAvailableLanguages(const QVariantMap ¶ms) const;
|
|
Q_INVOKABLE JsonReply *SetServerName(const QVariantMap ¶ms) const;
|
|
Q_INVOKABLE JsonReply *SetTimeZone(const QVariantMap ¶ms) const;
|
|
Q_INVOKABLE JsonReply *SetLanguage(const QVariantMap ¶ms) const;
|
|
Q_INVOKABLE JsonReply *SetTcpServerConfiguration(const QVariantMap ¶ms) const;
|
|
Q_INVOKABLE JsonReply *SetWebServerConfiguration(const QVariantMap ¶ms) const;
|
|
Q_INVOKABLE JsonReply *SetWebSocketServerConfiguration(const QVariantMap ¶ms) const;
|
|
|
|
signals:
|
|
void BasicConfigurationChanged(const QVariantMap ¶ms);
|
|
void TcpServerConfigurationChanged(const QVariantMap ¶ms);
|
|
void WebServerConfigurationChanged(const QVariantMap ¶ms);
|
|
void WebSocketServerConfigurationChanged(const QVariantMap ¶ms);
|
|
|
|
private slots:
|
|
void onBasicConfigurationChanged();
|
|
void onTcpServerConfigurationChanged();
|
|
void onWebServerConfigurationChanged();
|
|
void onWebSocketServerConfigurationChanged();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif // CONFIGURATIONHANDLER_H
|