#include <QObject>
#include <QTimer>
#include <QImage>

#include "hgx11net.h"
#include "WaylandGrabber.h"

class HyperionGrabber : public QObject
{
    Q_OBJECT
public:
    HyperionGrabber(QHash<QString, QString> opts);
    ~HyperionGrabber();

private:
    hgx11net *_hclient_p;
    QTimer *_timer_p;
    WaylandGrabber *_waylandGrabber_p;

    int _inactiveTime_m = 0;
    QString _hyperionPriority_m;
    unsigned short _scale_m = 8;

    QString _parseColorArr(QString, bool);

private slots:
    void _inActivity();
    void _processFrame(const QImage &frame);
    void _setImgSize(int width, int height);
};