/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright (C) 2019 Bernhard Trinnes . * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef DEVICEPLUGINSONOS_H #define DEVICEPLUGINSONOS_H #include "devices/deviceplugin.h" #include "plugintimer.h" #include #include #include class DevicePluginSonos : public DevicePlugin { Q_OBJECT Q_PLUGIN_METADATA(IID "io.nymea.DevicePlugin" FILE "devicepluginsonos.json") Q_INTERFACES(DevicePlugin) public: explicit DevicePluginSonos(); ~DevicePluginSonos() override; void init() override; Device::DeviceSetupStatus setupDevice(Device *device) override; void postSetupDevice(Device *device) override; void deviceRemoved(Device *device) override; Device::DeviceError discoverDevices(const DeviceClassId &deviceClassId, const ParamList ¶ms) override; Device::DeviceError executeAction(Device *device, const Action &action) override; private: SONOS::System *m_sonosSystem = nullptr; PluginTimer *m_pluginTimer; void updateZoneInfo(); void handleEventCB(void *handle); private slots: void onPluginTimer(); /*void onConnectionChanged(); void onStateChanged(); void onActionExecuted(int actionId, bool success); void versionDataReceived(const QVariantMap &data); void onSetupFinished(const QVariantMap &data); void onPlaybackStatusChanged(const QString &playbackStatus);*/ }; #endif // DEVICEPLUGINSONOS_H