karazeh
A cross-platform software updating library.
update.hpp
Go to the documentation of this file.
1 
21 #ifndef H_KARAZEH_OPERATION_UPDATE_H
22 #define H_KARAZEH_OPERATION_UPDATE_H
23 
24 #include "karazeh_export.h"
25 #include "karazeh/operation.hpp"
26 #include "karazeh/logger.hpp"
28 
29 namespace kzh {
30 
31  class KARAZEH_EXPORT update_operation : public operation, protected logger {
32  public:
34  virtual ~update_operation();
35 
44  virtual STAGE_RC stage();
45 
51  virtual STAGE_RC deploy();
52 
56  virtual void rollback();
57 
61  virtual void commit();
62 
63  virtual string_t tostring();
64 
71  string_t patched_checksum; /* Checksum of the file post-patching (the new one) */
72  uint64_t patched_length; /* Size (in bytes) of the patched file */
73 
74  private:
76  path_t basis_path_;
77 
79  path_t signature_path_;
80 
82  path_t delta_path_;
83 
85  path_t patched_path_;
86 
88  path_t cache_dir_;
89 
90  delta_encoder encoder_;
91 
92  void cleanup();
93 
94  bool patched_;
95  };
96 
97 } // end of namespace kzh
98 
99 #endif
boost::filesystem::path path_t
Definition: karazeh.hpp:57
STAGE_RC
Definition: operation.hpp:33
Definition: operation.hpp:50
string_t basis_checksum
Definition: update.hpp:66
uint64_t delta_length
Definition: update.hpp:70
string_t delta_checksum
Definition: update.hpp:69
uint64_t basis_length
Definition: update.hpp:67
string_t basis
Definition: update.hpp:65
std::string string_t
Definition: karazeh.hpp:55
librsync implementation of delta encoding, used in rdiff.
Definition: delta_encoder.hpp:41
Definition: config.hpp:32
uint64_t patched_length
Definition: update.hpp:72
Definition: release_manifest.hpp:32
string_t patched_checksum
Definition: update.hpp:71
unsigned long uint64_t
Definition: karazeh.hpp:56
Definition: logger.hpp:35
Definition: config.hpp:27
string_t delta
Definition: update.hpp:68
Definition: update.hpp:31