ImagingTools Core SDK
IFileUploadHandler.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 <istd/IPolymorphic.h>
7#include <istd/TRange.h>
8
9
10namespace imtservergql
11{
12
13
49class IFileUploadHandler : virtual public istd::IPolymorphic
50{
51public:
62 {
70
78
87
96
105
113
122 };
123
194 const QByteArray& fileId,
195 const istd::CIntRange& range,
196 const QByteArray& data) = 0;
197};
198
199
200} // namespace imtservergql
201
202
Interface for handling chunked file uploads.
virtual FilelUploadStatus ReceiveFileChunk(const QByteArray &fileId, const istd::CIntRange &range, const QByteArray &data)=0
Receive and store a chunk of file data.
FilelUploadStatus
Status codes returned by ReceiveFileChunk().
@ FUS_FAILED_TO_SEEK
Failed to seek to the chunk's position in the file.
@ FUS_CHUNK_OUT_OF_RANGE
The chunk range is outside the expected file size.
@ FUS_OK_COMPLETE
Chunk received successfully, upload is complete.
@ FUS_FAILED_TO_OPEN
Failed to open the target file for writing.
@ FUS_FAILED_TO_WRITE
Failed to write the chunk data to the file.
@ FUS_OK_PARTIAL
Chunk received successfully, more chunks expected.
@ FUS_INVALID_FILE_ID
The provided file ID is not recognized.