26 #ifndef CAT_DELTA_SIGNATURE_HPP 27 #define CAT_DELTA_SIGNATURE_HPP 29 #include "../my_config.h" 177 void clear() { destroy(); init(); };
188 void init() noexcept;
191 void clear_sig() noexcept;
192 void destroy() noexcept;
crc * patch_base_check
associated CRC for the file this signature has been computed on
cat_delta_signature & operator=(const cat_delta_signature &ref)
assignement operator
bool has_patch_base_crc() const
returns whether the object has a base patch CRC (s_delta status objects)
class crc definition, used to handle Cyclic Redundancy Checks
bool has_patch_result_crc() const
returns whether the object has a CRC corresponding to data (for s_saved, s_delta, and when delta sign...
bool get_patch_base_crc(const crc *&c) const
returns the CRC of the file to base the patch on, for s_delta objects
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)
memory_file * sig
the signature data, if set nullptr it will be fetched from f in direct access mode only ...
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 signatu...
generic_file stored in memory
void set_sig_ref()
variante used when the delta_signature object will only contain CRCs (no delta signature) ...
crc * patch_result_check
associated CRC
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...
Memory_file is a generic_file class that only uses virtual memory.
the cat_delta_signature file class
bool can_obtain_sig()
the cat_delta_signature structure can only hold CRC without delta_signature, this call gives the situ...
memory_file * obtain_sig()
provide a memory_file object which the caller has the duty to destroy after use
void dump_metadata(generic_file &f) const
void set_patch_base_crc(const crc &c)
set the reference CRC of the file to base the patch on, for s_detla objects
void will_have_signature()
give the object where to fetch from the delta signature, object must exist up to the next call to dum...
infinint delta_sig_size
size of the data to setup "sig" (set to zero when reading in sequential mode, sig is then setup on-fl...
cat_delta_signature(const cat_delta_signature &ref)
copy constructor
this is the interface class from which all other data transfer classes inherit
bool just_crc
whether a delta signature is present or just checksum are stored
bool sig_is_ours
whether sig has been created on our behalf or given as reference by another class ...
cat_delta_signature()
constructor creating a brand new empty object
void dump_data(generic_file &f, bool sequential_mode) const
write down the data only (only for archive without sequential read mode support)
~cat_delta_signature()
destructor
the arbitrary large positive integer class
void read_data(generic_file &f)
fetch data assuming the object has already read the metadata
pure virtual class defining interface of a CRC object
void clear()
reset the object
libdar namespace encapsulate all libdar symbols
void read_metadata(generic_file &f, bool sequential_read)
same action as the first constructor but on an existing object
cat_delta_signature(cat_delta_signature &&ref) noexcept
move constructor