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.
23 lines
442 B
C++
23 lines
442 B
C++
#pragma once
|
|
|
|
#include <QDateTime>
|
|
#include <QSqlDatabase>
|
|
|
|
struct DeviceInfo {
|
|
QString id;
|
|
QString status;
|
|
QString name;
|
|
QString android;
|
|
int screenWidth;
|
|
int screenHeight;
|
|
int battery;
|
|
QDateTime updateTime;
|
|
};
|
|
|
|
class DeviceDAO {
|
|
public:
|
|
[[nodiscard]] static bool upsertDevice(const DeviceInfo &device);
|
|
|
|
[[nodiscard]] static bool updateImage(const QString &deviceId, const QByteArray &imageData);
|
|
};
|