29 lines
917 B
C++
29 lines
917 B
C++
#pragma once
|
|
|
|
#include <db/DeviceInfo.h>
|
|
|
|
class DeviceDAO {
|
|
public:
|
|
[[nodiscard]] static DeviceInfo getDeviceById(const QString &deviceId);
|
|
|
|
[[nodiscard]] static DeviceInfo findByAdbSerial(const QString &adbSerial);
|
|
|
|
[[nodiscard]] static DeviceInfo findByName(const QString &name);
|
|
|
|
[[nodiscard]] static DeviceInfo findUnmatchedDevice();
|
|
|
|
[[nodiscard]] static bool upsertDevice(const DeviceInfo &device);
|
|
|
|
[[nodiscard]] static bool updateApiId(const QString &deviceId, const QString &apiId);
|
|
|
|
[[nodiscard]] static bool markDevicesOfflineExcept(const QStringList &onlineDeviceIds);
|
|
|
|
[[nodiscard]] static bool updateImage(const QString &deviceId, const QByteArray &imageData);
|
|
|
|
[[nodiscard]] static QList<DeviceInfo> getAllDevices(bool online);
|
|
|
|
[[nodiscard]] static QList<QString> getOnlineDeviceCodes();
|
|
|
|
[[nodiscard]] static bool deleteDevice(const QString &deviceId);
|
|
};
|