|
karazeh
A cross-platform software updating library.
|
librsync implementation of delta encoding, used in rdiff. More...
#include <delta_encoder.hpp>
Inheritance diagram for kzh::delta_encoder:
Collaboration diagram for kzh::delta_encoder:Public Member Functions | |
| delta_encoder () | |
| virtual | ~delta_encoder () |
| rs_result | delta (path_t const &signature, path_t const &new_file, path_t const &delta) |
| rs_result | patch (path_t const &basis, path_t const &delta, path_t const &target) |
| rs_result | signature (path_t const &basis, path_t const &signature) |
Public Member Functions inherited from kzh::logger | |
| logger (string_t context) | |
| virtual | ~logger () |
| logstream | alert () const |
| logstream | crit () const |
| logstream | debug () const |
| logstream | error () const |
| logstream | info () const |
| logstream | notice () const |
| logstream | plain () const |
| void | set_uuid_prefix (string_t const &) |
| string_t const & | uuid_prefix () const |
| logstream | warn () const |
Protected Attributes | |
| file_manager | file_manager_ |
| used for validating paths and file permissions More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from kzh::logger | |
| static void | deindent () |
| static void | enable_timestamps (bool on_or_off) |
| static void | indent () |
| static void | mute () |
| static void | set_app_name (string_t const &app_name) |
| static void | set_stream (std::ostream *) |
| static void | set_threshold (char level) |
| static void | unmute () |
Protected Member Functions inherited from kzh::logger | |
| void | rename_context (string_t const &) |
librsync implementation of delta encoding, used in rdiff.
| kzh::delta_encoder::delta_encoder | ( | ) |
|
virtual |
| rs_result kzh::delta_encoder::delta | ( | path_t const & | signature, |
| path_t const & | new_file, | ||
| path_t const & | delta | ||
| ) |
Generates a delta patch based on the given signature and the new file.
| signature | the signature of the basis file, generatable using signature() |
| new_file | the new version of basis |
| delta | path to where the delta file will be stored |
| kzh::invalid_resource | if basis does not exist or is unreadable |
| kzh::invalid_resource | if delta does not exist or is unreadable |
| kzh::invalid_state | if target destination is unwritable |
References file_manager_, kzh::file_manager::is_readable(), and kzh::file_manager::is_writable().
Referenced by TEST_CASE().
| rs_result kzh::delta_encoder::patch | ( | path_t const & | basis, |
| path_t const & | delta, | ||
| path_t const & | target | ||
| ) |
Applies a patch on the basis file and stores it somewhere else.
| basis | the base file to patch |
| delta | the delta to patch the basis with, generatable using delta() |
| target | the destination where the patched file will be stored |
| kzh::invalid_resource | if basis does not exist or is unreadable |
| kzh::invalid_resource | if delta does not exist or is unreadable |
| kzh::invalid_state | if target destination is unwritable |
References file_manager_, kzh::file_manager::is_readable(), and kzh::file_manager::is_writable().
Referenced by kzh::update_operation::deploy(), and TEST_CASE().
Generates the signature from the basis file.
| basis | path to the file you want to generate the signature for |
| signature | path to where the signature file should be stored |
| kzh::invalid_resource | if basis does not exist or is unreadable |
| kzh::invalid_state | if signature is not writable |
References file_manager_, kzh::file_manager::is_readable(), and kzh::file_manager::is_writable().
Referenced by kzh::update_operation::stage(), and TEST_CASE().
|
protected |
used for validating paths and file permissions
Referenced by delta(), patch(), and signature().