22#include <vrs/VrsExport.h>
23#include <vrs/WriteFileHandler.h>
24#include <vrs/os/CompilerAttributes.h>
44 virtual void newChunk(
const string& path,
size_t index,
bool isLastChunk) = 0;
58 MAYBE_UNUSED
int error,
59 MAYBE_UNUSED
const std::vector<std::string>& unnotifiedChunks) {}
70 : chunkHandler_{chunkHandler.get()} {
71 if (chunkHandler_ !=
nullptr) {
75 void notify(
size_t indexOffset = 0,
bool isLastChunk =
false) {
76 if (chunkHandler_ !=
nullptr) {
77 chunkHandler_->newChunk(path_, index_ + indexOffset, isLastChunk);
Listener to be notified when a new file chunk is finalized.
Definition NewChunkHandler.h:32
virtual void recordingFailed(MAYBE_UNUSED int error, MAYBE_UNUSED const std::vector< std::string > &unnotifiedChunks)
Definition NewChunkHandler.h:57
virtual void newChunk(const string &path, size_t index, bool isLastChunk)=0
Helper to make new chunks notifications simpler and safer.
Definition NewChunkHandler.h:67
The WriteFileHandler interface adds write operations to the FileHandler interface.
Definition WriteFileHandler.h:43
virtual bool getCurrentChunk(string &outChunkPath, size_t &outChunkIndex) const =0
Get the path of the current chunk, or an empty string if no chunk is open.
Definition Compressor.cpp:128