ACF $AcfVersion:0$
IDeviceBasedPersistence.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QIODevice>
7
8// ACF includes
9#include <istd/IPolymorphic.h>
10
11
12namespace ibase
13{
14 class IProgressManager;
15}
16
17namespace istd
18{
19 class IChangeable;
20}
21
22
23namespace ifile
24{
25
26
33{
34public:
55
61
97
102 virtual bool IsDeviceOperationSupported(const istd::IChangeable& dataObject, const QIODevice& device, int deviceOperation) const = 0;
103
109 istd::IChangeable& data,
110 QIODevice& device,
111 ibase::IProgressManager* progressManagerPtr = nullptr) const = 0;
112
118 const istd::IChangeable& data,
119 QIODevice& device,
120 ibase::IProgressManager* progressManagerPtr = nullptr) const = 0;
121};
122
123
124} // namespace ifile
125
126
Consume information about progress of some process.
Interface providing reading and writing data objects via I/O-devices.
virtual bool IsDeviceOperationSupported(const istd::IChangeable &dataObject, const QIODevice &device, int deviceOperation) const =0
Returns true if object dataObject can be processed via defined I/O-device.
ErrorType
Possible operation errors.
@ UnsupportedArchiveVersion
The archive has a wrong/unsupported version.
@ NoDeviceAccess
Device could not be opened.
@ NoReadPermissions
No read access granted.
@ NoWritePermissions
No write access granted.
@ WriteOperationFailed
Writing the data was failed.
@ ReadOperationFailed
Reading the data was failed.
OperationState
Result of device-related operation.
@ Successful
Operation was successful.
@ Canceled
Operation was aborted by user.
virtual OperationState ReadFromDevice(istd::IChangeable &data, QIODevice &device, ibase::IProgressManager *progressManagerPtr=nullptr) const =0
This function loads data data from the given I/O-device device.
virtual OperationState WriteToDevice(const istd::IChangeable &data, QIODevice &device, ibase::IProgressManager *progressManagerPtr=nullptr) const =0
This function writes data data to the given I/O-device device.
Common interface for data model objects, which can be changed.
Definition IChangeable.h:28
Base interface for all used interfaces and implementations.
This namespace contains basic implementations of standard primitives on the component level.
Contains interfaces and implementations of file system related components.
Standard library.
Definition IComponent.h:17