libxcks
0.1.0.1
|
Default handler for writing XCKS files. More...
#include <handlers.hpp>
Public Member Functions | |
virtual | ~XCKSWriterDefaultHandler ()=default |
Destructor. More... | |
void | onChecksumsFileStart (const std::string &version) override |
Called on write checksumsFile start tag. More... | |
void | onChecksumsFileEnd () override |
Called on write checksumsFile end tag. More... | |
void | onGenerated (const std::string &by, const std::string &version, const std::time_t on) override |
Called on write generated element. More... | |
void | onAlgorithm (const ChecksumAlgoId type) override |
Called on write algorithm element. More... | |
void | onAlgorithmsStart () override |
Called on write algorithms start tag. More... | |
void | onAlgorithmsEnd () override |
Called on write algorithms end tag. More... | |
void | onAlgorithms (const ArrayChecksumAlgoId &types) override |
Called on write algorithms element. More... | |
void | onLocalFilesStart () override |
Called on write localFiles start tag. More... | |
void | onLocalFilesEnd () override |
Called on write localFiles end tag. More... | |
void | onParentDirectoryStart () override |
Called on write parentDirectory start tag. More... | |
void | onParentDirectoryStart (const std::filesystem::path &path) override |
Called on write parentDirectory start tag. More... | |
void | onParentDirectoryEnd () override |
Called on write parentDirectory end tag. More... | |
void | onDirectoryStart (const std::string name) override |
Called on write directory start tag. More... | |
void | onDirectoryStart (const std::filesystem::path &path) override |
Called on write directory start tag. More... | |
void | onDirectoryEnd () override |
Called on write directory end tag. More... | |
void | onFileStart (const std::string name) override |
Called on write file start tag. More... | |
void | onFileStart (const std::filesystem::path &path) override |
Called on write file start tag. More... | |
void | onFileEnd () override |
Called on write file end tag. More... | |
void | onFileInformation (const uintmax_t size=Invalid_File_Size, const time_t date=Invalid_DateTime) override |
Called on write information tag (for file). More... | |
void | onFileChecksum (const ChecksumValue &value) override |
Called on write checksum element (for file). More... | |
void | onFile (const std::filesystem::path &path, const ArrayChecksumValue &checksums, const uintmax_t size=Invalid_File_Size, const time_t date=Invalid_DateTime) override |
Called on write file element. More... | |
void | onFileGetChecksumsError (const std::filesystem::path &relativePath, const std::filesystem::path &absolutePath, const XCKSWriterChecksumProvider::Status status, bool &stopWriting, const ChecksumAlgoId algoId=ChecksumAlgoId::Invalid) override |
Called on a failure on getting the checksums values for a file. More... | |
void | onFileGetChecksumError (const std::filesystem::path &relativePath, const std::filesystem::path &absolutePath, const XCKSWriterChecksumProvider::Status status, const ChecksumValue &ckValue) override |
Called on a failure on verifying a checksums value for a file. More... | |
void | onFatalError (const std::string &errorMessage) override |
Called on a non-recoverable error. More... | |
Public Member Functions inherited from libxcks::XCKSWriterHandler | |
virtual | ~XCKSWriterHandler ()=default |
Destructor. More... | |
Default handler for writing XCKS files.
Definition at line 619 of file handlers.hpp.
|
virtualdefault |
Destructor.
|
inlineoverridevirtual |
Called on write algorithm element.
[in] | type | The algorithm of the checksum. |
Implements libxcks::XCKSWriterHandler.
Definition at line 654 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write algorithms element.
[in] | types | The algorithms of the checksum. |
Implements libxcks::XCKSWriterHandler.
Definition at line 671 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write algorithms end tag.
Implements libxcks::XCKSWriterHandler.
Definition at line 664 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write algorithms start tag.
Implements libxcks::XCKSWriterHandler.
Definition at line 659 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write checksumsFile end tag.
[in] | version | The version of the XCKS file. |
Implements libxcks::XCKSWriterHandler.
Definition at line 637 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write checksumsFile start tag.
[in] | version | The version of the XCKS file. |
Implements libxcks::XCKSWriterHandler.
Definition at line 630 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write directory end tag.
Implements libxcks::XCKSWriterHandler.
Definition at line 717 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write directory start tag.
[in] | path | The relative full path of the directory. |
Implements libxcks::XCKSWriterHandler.
Definition at line 712 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write directory start tag.
[in] | name | The name of the directory (without its path). |
Implements libxcks::XCKSWriterHandler.
Definition at line 705 of file handlers.hpp.
|
inlineoverridevirtual |
Called on a non-recoverable error.
errorMessage | The error message. |
Implements libxcks::XCKSWriterHandler.
Definition at line 808 of file handlers.hpp.
|
inlineoverridevirtual |
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. |
Implements libxcks::XCKSWriterHandler.
Definition at line 762 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write checksum element (for file).
[in] | value | The type and the value of the checksum. |
Implements libxcks::XCKSWriterHandler.
Definition at line 752 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write file end tag.
Implements libxcks::XCKSWriterHandler.
Definition at line 736 of file handlers.hpp.
|
inlineoverridevirtual |
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. |
Implements libxcks::XCKSWriterHandler.
Definition at line 798 of file handlers.hpp.
|
inlineoverridevirtual |
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). |
Implements libxcks::XCKSWriterHandler.
Definition at line 781 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write information tag (for file).
[in] | size | The size of the file. |
[in] | date | The date and time of the file. |
Implements libxcks::XCKSWriterHandler.
Definition at line 744 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write file start tag.
[in] | path | The relative full path of the file. |
Implements libxcks::XCKSWriterHandler.
Definition at line 731 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write file start tag.
[in] | name | The name of the file (without its path). |
Implements libxcks::XCKSWriterHandler.
Definition at line 724 of file handlers.hpp.
|
inlineoverridevirtual |
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. |
Implements libxcks::XCKSWriterHandler.
Definition at line 646 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write localFiles end tag.
Implements libxcks::XCKSWriterHandler.
Definition at line 681 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write localFiles start tag.
Implements libxcks::XCKSWriterHandler.
Definition at line 676 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write parentDirectory end tag.
Implements libxcks::XCKSWriterHandler.
Definition at line 698 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write parentDirectory start tag.
Implements libxcks::XCKSWriterHandler.
Definition at line 686 of file handlers.hpp.
|
inlineoverridevirtual |
Called on write parentDirectory start tag.
[in] | path | The relative full path of the directory. |
Implements libxcks::XCKSWriterHandler.
Definition at line 693 of file handlers.hpp.