mirror of https://github.com/nymea/nymea.git
62 lines
2.6 KiB
C++
62 lines
2.6 KiB
C++
/****************************************************************************
|
|
* *
|
|
* 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 DEVICEHANDLER_H
|
|
#define DEVICEHANDLER_H
|
|
|
|
#include "jsonhandler.h"
|
|
|
|
class DeviceHandler : public JsonHandler
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit DeviceHandler(QObject *parent = 0);
|
|
|
|
QString name() const override;
|
|
|
|
Q_INVOKABLE QVariantMap GetSupportedVendors(const QVariantMap ¶ms) const;
|
|
|
|
Q_INVOKABLE QVariantMap GetSupportedDevices(const QVariantMap ¶ms) const;
|
|
|
|
Q_INVOKABLE QVariantMap GetPlugins(const QVariantMap ¶ms) const;
|
|
|
|
Q_INVOKABLE QVariantMap SetPluginParams(const QVariantMap ¶ms);
|
|
|
|
Q_INVOKABLE QVariantMap AddConfiguredDevice(const QVariantMap ¶ms);
|
|
|
|
Q_INVOKABLE QVariantMap GetConfiguredDevices(const QVariantMap ¶ms) const;
|
|
|
|
Q_INVOKABLE QVariantMap RemoveConfiguredDevice(const QVariantMap ¶ms);
|
|
|
|
Q_INVOKABLE QVariantMap GetEventTypes(const QVariantMap ¶ms) const;
|
|
|
|
Q_INVOKABLE QVariantMap GetActionTypes(const QVariantMap ¶ms) const;
|
|
|
|
Q_INVOKABLE QVariantMap GetStateTypes(const QVariantMap ¶ms) const;
|
|
|
|
Q_INVOKABLE QVariantMap GetStateValue(const QVariantMap ¶ms) const;
|
|
|
|
signals:
|
|
void StateChanged(const QVariantMap ¶ms);
|
|
|
|
private slots:
|
|
void deviceStateChanged(Device *device, const QUuid &stateTypeId, const QVariant &value);
|
|
};
|
|
|
|
#endif // DEVICEHANDLER_H
|