#ifndef AVRECEIVER_H
#define AVRECEIVER_H

#include <QTimer>
#include "AvReceiverData.h"
#include "VolumeController.h"

class CAvReceiverNetworkCtrlInterface;

#include "AvReceiverGui.h"

class CAvReceiver : public QObject
{
    Q_OBJECT
public:
    CAvReceiver(CAvReceiverGui *ReceiverGui);
    virtual ~CAvReceiver();

    int Start();

    int Zone2ToggleSwitchPressed(bool state);
    int MainUnitToggleSwitchPressed(bool state);
    int ReceiverGeneralStatusReceived(QByteArray StatusData);
    int SelectScenePressed(char Zone, char Scene);
    int MainZoneVolumeChanged(float Value);
    int Zone2VolumeChanged(float Value);
    int Zone2InputSrcChanged(QString InputSrc);
    int SyncZonesVolumesChanged(bool Sync);



    CAvReceiverNetworkCtrlInterface *mNetworkInterface;
    CAvReceiverGui *mReceiverGui;
    QTimer *mReceiverPollTimer;
    CVolumeController mVolumeController;

private:
    CAvReceiverMainStatus mReceiverStatus;
    CAvReceiverMainStatus mZone2Status;
    float mTempReceiverVolume;

public slots:
    void PollTimerExpired();
    void ExternalVolumeChanged(float Value);
};

#endif // AVRECEIVER_H
