1
0
forked from BRT/arc
arc/services/DeviceScreener.h
slava 5cb32ec4f1 Refactor and enhance device and event handling logic
Refactored `DeviceScreener`, `NetworkService`, and event-related logic for improved maintainability and flexibility. Introduced `EventHandler` for thread management and made changes to include configurable URLs via `config.ini`. Modified database schema to support device-level event linking.
2025-05-22 21:33:25 +07:00

34 lines
645 B
C++

#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;
QString m_urlAppUpdate;
static QList<QPair<QString, QString> > readAdbDevices();
static QByteArray takeScreenshot(const QString &deviceId);
static DeviceInfo readDeviceInfo(const QString &deviceId);
void postDevicesData(const QList<DeviceInfo> &devices);
};