libxcks
0.1.0.1
|
Handler for writing XCKS files. More...
#include <handlers.hpp>
Public Member Functions | |
virtual | ~XCKSWriterHandler ()=default |
Destructor. More... | |
virtual void | onChecksumsFileStart (const std::string &version)=0 |
Called on write checksumsFile start tag. More... | |
virtual void | onChecksumsFileEnd ()=0 |
Called on write checksumsFile end tag. More... | |
virtual void | onGenerated (const std::string &by, const std::string &version, const std::time_t on)=0 |
Called on write generated element. More... | |
virtual void | onAlgorithm (const ChecksumAlgoId type)=0 |
Called on write algorithm element. More... | |
virtual void | onAlgorithmsStart ()=0 |
Called on write algorithms start tag. More... | |
virtual void | onAlgorithmsEnd ()=0 |
Called on write algorithms end tag. More... | |
virtual void | onAlgorithms (const ArrayChecksumAlgoId &types)=0 |
Called on write algorithms element. More... | |
virtual void | onLocalFilesStart ()=0 |
Called on write localFiles start tag. More... | |
virtual void | onLocalFilesEnd ()=0 |
Called on write localFiles end tag. More... | |
virtual void | onParentDirectoryStart ()=0 |
Called on write parentDirectory start tag. More... | |
virtual void | onParentDirectoryStart (const std::filesystem::path &path)=0 |
Called on write parentDirectory start tag. More... | |
virtual void | onParentDirectoryEnd ()=0 |
Called on write parentDirectory end tag. More... | |
virtual void | onDirectoryStart (const std::string name)=0 |
Called on write directory start tag. More... | |
virtual void | onDirectoryStart (const std::filesystem::path &path)=0 |
Called on write directory start tag. More... | |
virtual void | onDirectoryEnd ()=0 |
Called on write directory end tag. More... | |
virtual void | onFileStart (const std::string name)=0 |
Called on write file start tag. More... | |
virtual void | onFileStart (const std::filesystem::path &path)=0 |
Called on write file start tag. More... | |
virtual void | onFileEnd ()=0 |
Called on write file end tag. More... | |
virtual void | onFileInformation (const uintmax_t size=Invalid_File_Size, const time_t date=Invalid_DateTime)=0 |
Called on write information tag (for file). More... | |
virtual void | onFileChecksum (const ChecksumValue &value)=0 |
Called on write checksum element (for file). More... | |
virtual void | onFile (const std::filesystem::path &path, const ArrayChecksumValue &checksums, const uintmax_t size=Invalid_File_Size, const time_t date=Invalid_DateTime)=0 |
Called on write file element. More... | |
virtual void | onFileGetChecksumsError (const std::filesystem::path &relativePath, const std::filesystem::path &absolutePath, const XCKSWriterChecksumProvider::Status status, bool &stopWriting, const ChecksumAlgoId algoId=ChecksumAlgoId::Invalid)=0 |
Called on a failure on getting the checksums values for a file. More... | |
virtual void | onFileGetChecksumError (const std::filesystem::path &relativePath, const std::filesystem::path &absolutePath, const XCKSWriterChecksumProvider::Status status, const ChecksumValue &ckValue)=0 |
Called on a failure on verifying a checksums value for a file. More... | |
virtual void | onFatalError (const std::string &errorMessage)=0 |
Called on a non-recoverable error. More... | |
Handler for writing XCKS files.
Definition at line 422 of file handlers.hpp.
|
virtualdefault |
Destructor.
|
pure virtual |
Called on write algorithm element.
[in] | type | The algorithm of the checksum. |
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write algorithms element.
[in] | types | The algorithms of the checksum. |
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write algorithms end tag.
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write algorithms start tag.
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write checksumsFile end tag.
[in] | version | The version of the XCKS file. |
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write checksumsFile start tag.
[in] | version | The version of the XCKS file. |
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write directory end tag.
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write directory start tag.
[in] | path | The relative full path of the directory. |
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write directory start tag.
[in] | name | The name of the directory (without its path). |
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on a non-recoverable error.
errorMessage | The error message. |
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write file element.
[in] | path | The relative full path of the file. |
[in] | checksums | The checksums associated to the file. |
[in] | size | The size of the file. |
[in] | date | The date and time of the file. |
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write checksum element (for file).
[in] | value | The type and the value of the checksum. |
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write file end tag.
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on a failure on verifying a checksums value for a file.
status
can be BadChecksumValue
and BadDuplicateValue
.[in] | relativePath | The relative full path of the file. |
[in] | absolutePath | The absolute full path of the file. Must be set to true to stop the writing. |
[in] | status | The type of the error. |
[in] | ckValue | The incorrect value of checksum. |
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on a failure on getting the checksums values for a file.
stopWriting
is set to false
the file won't be added to the XCKS file. status
can be MissingAlgorithm
, FileNotFound
and ReadError
.[in] | relativePath | The relative full path of the file. |
[in] | absolutePath | The absolute full path of the file. |
[in] | status | The type of the error. |
[in,out] | stopWriting | Should the writing of the XCKS must be stopped? Must be set to true to stop the writing. |
[in] | algoId | The faulty algorithm id (if relevant). |
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write information tag (for file).
[in] | size | The size of the file. |
[in] | date | The date and time of the file. |
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write file start tag.
[in] | path | The relative full path of the file. |
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write file start tag.
[in] | name | The name of the file (without its path). |
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write generated element.
[in] | by | The name of the application that wrote the file. |
[in] | version | The version of the application that wrote the file. |
[in] | on | The writing date and time of the file. |
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write localFiles end tag.
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write localFiles start tag.
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write parentDirectory end tag.
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write parentDirectory start tag.
Implemented in libxcks::XCKSWriterDefaultHandler.
|
pure virtual |
Called on write parentDirectory start tag.
[in] | path | The relative full path of the directory. |
Implemented in libxcks::XCKSWriterDefaultHandler.