/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 2019 Bernhard Trinnes . *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef DEVICEPLUGINSONOS_H
#define DEVICEPLUGINSONOS_H
#include "devices/deviceplugin.h"
#include "plugintimer.h"
#include "sonos.h"
#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;
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 *sonos = nullptr;
private slots:
void onPluginTimer();
void onConnectionChanged();
};
#endif // DEVICEPLUGINSONOS_H