1
0
forked from BRT/arc
arc/database/dao/DeviceDAO.h
trnsmkot 791eeeccd1 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

19 lines
546 B
C++

#pragma once
#include <db/DeviceInfo.h>
class DeviceDAO {
public:
[[nodiscard]] static DeviceInfo getDeviceById(const QString &deviceId);
[[nodiscard]] static bool upsertDevice(const DeviceInfo &device);
[[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();
};