#pragma once
#include <QObject>
#include <dao/DeviceDAO.h>
#include <db/DeviceInfo.h>

class DeviceScreener final : public QObject {
    Q_OBJECT

public:
    explicit DeviceScreener(QObject *parent = nullptr);

    ~DeviceScreener() override;

public slots:
    void start();

    void stop();

signals:
    void finished();

private:
    bool m_running = true;

    static QList<QPair<QString, QString> > readAdbDevices();

    static bool takeScreenshot(const QString &deviceId);

    static DeviceInfo readDeviceInfo(const QString &deviceId);
};
