karazeh
A cross-platform software updating library.
delta_encoder.hpp
Go to the documentation of this file.
1 
21 #ifndef H_KARAZEH_DELTA_ENCODER_H
22 #define H_KARAZEH_DELTA_ENCODER_H
23 
24 #include "karazeh_export.h"
25 #include "karazeh/karazeh.hpp"
26 #include "karazeh/logger.hpp"
27 #include "karazeh/file_manager.hpp"
28 
29 extern "C" {
30  #include "librsync-2.0.0/src/librsync.h"
31  #include "librsync-2.0.0/src/fileutil.h"
32 }
33 
34 namespace kzh {
35 
42  {
43  public:
44 
45  delta_encoder();
46  virtual ~delta_encoder();
47 
59  rs_result signature(path_t const& basis, path_t const& signature);
60 
74  rs_result delta(path_t const& signature, path_t const& new_file, path_t const& delta);
75 
89  rs_result patch(path_t const& basis, path_t const& delta, path_t const& target);
90 
91  protected:
94  };
95 
96 } // end of namespace kzh
97 
98 #endif
boost::filesystem::path path_t
Definition: karazeh.hpp:57
librsync implementation of delta encoding, used in rdiff.
Definition: delta_encoder.hpp:41
Definition: config.hpp:32
file_manager file_manager_
used for validating paths and file permissions
Definition: delta_encoder.hpp:93
Definition: logger.hpp:35
Definition: config.hpp:27
Definition: file_manager.hpp:33