ImagingTools Core SDK
IDeviceDataPersistence.h
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ImtCore-Commercial
2#pragma once
3
4
5// ACF includes
6#include <idoc/IDocumentMetaInfo.h>
7
8
9namespace ibase
10{
11 class IProgressManager;
12}
13
14
15namespace imtdev
16{
17
18
86class IDeviceDataPersistence: virtual public istd::IPolymorphic
87{
88public:
95 {
100 };
101
109 {
111 MIT_SERIAL_NUMBER = idoc::IDocumentMetaInfo::MIT_USER,
116 };
117
128 virtual bool ReadDeviceMetaInfo(idoc::IDocumentMetaInfo& metaInfo) const = 0;
129
143 virtual bool ReadDataFromStorage(QByteArray& data, StorageType storageType, ibase::IProgressManager* progressPtr = nullptr) const = 0;
144
159 virtual bool WriteDataToStorage(const QByteArray& data, StorageType storageType, ibase::IProgressManager* progressPtr = nullptr) = 0;
160
172 virtual bool RemoveAllData(StorageType storageType) = 0;
173
185 virtual bool ResetStorage(StorageType storageType) = 0;
186
195 virtual bool IsDeviceReady() const = 0;
196};
197
198
199} // namespace imtdev
200
201
Interface for device data persistence.
virtual bool RemoveAllData(StorageType storageType)=0
Delete all data from device storage.
virtual bool WriteDataToStorage(const QByteArray &data, StorageType storageType, ibase::IProgressManager *progressPtr=nullptr)=0
Write all data to device storage.
MetaInfo
Device metadata information types.
@ MIT_FIRMWARE_VERSION
Firmware version string.
@ MIT_VERSION_NUMBER
Device version number.
virtual bool ResetStorage(StorageType storageType)=0
Reset storage to initial/factory state.
@ ST_EEPROM
Electrically erasable programmable ROM (user configuration)
@ ST_ROM
Read-only memory (firmware, factory data)
virtual bool IsDeviceReady() const =0
Check if device is ready for operations.
virtual bool ReadDataFromStorage(QByteArray &data, StorageType storageType, ibase::IProgressManager *progressPtr=nullptr) const =0
Read all data from device storage.
virtual bool ReadDeviceMetaInfo(idoc::IDocumentMetaInfo &metaInfo) const =0
Read metadata from the device.