![]() |
Disk ARchive
2.6.0
Full featured and portable backup and archiving tool
|
the cat_delta_signature file class More...
#include <cat_delta_signature.hpp>
Public Member Functions | |
cat_delta_signature (generic_file &f, bool sequential_read) | |
constructor reading the object METADATA (and also its DATA when in sequential mode) from an archive More... | |
cat_delta_signature () | |
constructor creating a brand new empty object | |
cat_delta_signature (const cat_delta_signature &ref) | |
copy constructor | |
cat_delta_signature (cat_delta_signature &&ref) noexcept | |
move constructor | |
cat_delta_signature & | operator= (const cat_delta_signature &ref) |
assignement operator | |
cat_delta_signature & | operator= (cat_delta_signature &&ref) noexcept |
move assignment operator | |
~cat_delta_signature () | |
destructor | |
void | read_metadata (generic_file &f, bool sequential_read) |
same action as the first constructor but on an existing object More... | |
void | read_data (generic_file &f) |
fetch data assuming the object has already read the metadata More... | |
bool | can_obtain_sig () |
the cat_delta_signature structure can only hold CRC without delta_signature, this call gives the situation about that point | |
memory_file * | obtain_sig () |
provide a memory_file object which the caller has the duty to destroy after use More... | |
void | will_have_signature () |
give the object where to fetch from the delta signature, object must exist up to the next call to dump_data More... | |
void | set_sig_ref (memory_file *ptr) |
void | set_sig_ref () |
variante used when the delta_signature object will only contain CRCs (no delta signature) | |
void | dump_data (generic_file &f, bool sequential_mode) const |
write down the data only (only for archive without sequential read mode support) | |
void | dump_metadata (generic_file &f) const |
bool | has_patch_base_crc () const |
returns whether the object has a base patch CRC (s_delta status objects) | |
bool | get_patch_base_crc (const crc *&c) const |
returns the CRC of the file to base the patch on, for s_delta objects | |
void | set_patch_base_crc (const crc &c) |
set the reference CRC of the file to base the patch on, for s_detla objects | |
bool | has_patch_result_crc () const |
returns whether the object has a CRC corresponding to data (for s_saved, s_delta, and when delta signature is present) | |
bool | get_patch_result_crc (const crc *&c) const |
returns the CRC the file will have once restored or patched (for s_saved, s_delta, and when delta signature is present) | |
void | set_patch_result_crc (const crc &c) |
set the CRC the file will have once restored or patched (for s_saved, s_delta, and when delta signature is present) | |
void | clear () |
reset the object | |
Private Member Functions | |
void | init () noexcept |
void | copy_from (const cat_delta_signature &ref) |
void | move_from (cat_delta_signature &&ref) noexcept |
void | clear_sig () noexcept |
void | destroy () noexcept |
Private Attributes | |
infinint | delta_sig_offset |
where to read data from to setup "sig" (set to zero when read in sequential mode, sig is setup on-fly) | |
infinint | delta_sig_size |
size of the data to setup "sig" (set to zero when reading in sequential mode, sig is then setup on-fly) | |
memory_file * | sig |
the signature data, if set nullptr it will be fetched from f in direct access mode only | |
bool | sig_is_ours |
whether sig has been created on our behalf or given as reference by another class | |
crc * | patch_base_check |
associated CRC for the file this signature has been computed on | |
crc * | patch_result_check |
associated CRC | |
bool | just_crc |
whether a delta signature is present or just checksum are stored | |
the cat_delta_signature file class
this class works in to implicit modes
Definition at line 87 of file cat_delta_signature.hpp.
libdar::cat_delta_signature::cat_delta_signature | ( | generic_file & | f, |
bool | sequential_read | ||
) |
constructor reading the object METADATA (and also its DATA when in sequential mode) from an archive
[in] | f | where to read the data from |
[in] | sequential_read | if true read the whole metadata+data as it was dropped in sequential read mode, else only read the metadata (found in a catalogue) |
void libdar::cat_delta_signature::dump_metadata | ( | generic_file & | f | ) | const |
write down the METADATA either in sequential_read mode (data+metadata) or in direct access mode (metadata only)
Referenced by set_sig_ref().
memory_file* libdar::cat_delta_signature::obtain_sig | ( | ) |
provide a memory_file object which the caller has the duty to destroy after use
Referenced by can_obtain_sig().
void libdar::cat_delta_signature::read_data | ( | generic_file & | f | ) |
fetch data assuming the object has already read the metadata
Referenced by ~cat_delta_signature().
void libdar::cat_delta_signature::read_metadata | ( | generic_file & | f, |
bool | sequential_read | ||
) |
same action as the first constructor but on an existing object
Referenced by ~cat_delta_signature().
|
inline |
give the object where to fetch from the delta signature, object must exist up to the next call to dump_data
Definition at line 141 of file cat_delta_signature.hpp.
References just_crc, and set_sig_ref().