Added SQLite database support for managing device information and common data. Implemented DAOs for handling device and common data operations, such as inserting/updating devices and tracking the last scan time. Enhanced `DeviceScreener` to read device info, update database records, and take screenshots.
30 lines
539 B
C++
30 lines
539 B
C++
#pragma once
|
|
#include <QObject>
|
|
#include <../../database/dao/device_dao.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);
|
|
};
|