/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 . * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef DEVICEPLUGINPHILIPSHUE_H #define DEVICEPLUGINPHILIPSHUE_H #include "plugin/deviceplugin.h" #include "discovery.h" #include "huebridgeconnection.h" class QNetworkAccessManager; class QNetworkReply; class DevicePluginPhilipsHue: public DevicePlugin { Q_OBJECT Q_PLUGIN_METADATA(IID "guru.guh.DevicePlugin" FILE "devicepluginphilipshue.json") Q_INTERFACES(DevicePlugin) public: explicit DevicePluginPhilipsHue(); QList supportedVendors() const override; QList supportedDevices() const override; DeviceManager::HardwareResources requiredHardware() const override; bool configureAutoDevice(QList loadedDevices, Device *device) const override; QString pluginName() const override; PluginId pluginId() const override; QList configurationDescription() const override; DeviceManager::DeviceError discoverDevices(const DeviceClassId &deviceClassId, const QVariantMap ¶ms) const override; QPair confirmPairing(const QUuid &pairingTransactionId, const DeviceClassId &deviceClassId, const QList ¶ms) override; public slots: QPair executeAction(Device *device, const Action &action); private slots: void discoveryDone(const QList &bridges); void createUserFinished(); private: QList m_config; Discovery *m_discovery; QNetworkAccessManager *m_nam; QHash > m_pairings; QList m_bridges; }; #endif // DEVICEPLUGINBOBLIGHT_H