26 #ifndef MACRO_TOOLS_HPP
27 #define MACRO_TOOLS_HPP
29 #include "../my_config.h"
59 #define BUFFER_SIZE 102400
61 #if SSIZE_MAX < BUFFER_SIZE
63 #define BUFFER_SIZE SSIZE_MAX
67 #define GLOBAL_ELASTIC_BUFFER_SIZE 10240
72 extern const archive_version macro_tools_supported_version;
73 extern const std::string LIBDAR_STACK_LABEL_UNCOMPRESSED;
74 extern const std::string LIBDAR_STACK_LABEL_CLEAR;
75 extern const std::string LIBDAR_STACK_LABEL_UNCYPHERED;
76 extern const std::string LIBDAR_STACK_LABEL_LEVEL1;
83 const label & internal_name,
84 const label & data_name,
85 bool slice_header_format_07,
86 const std::string & execute);
118 const entrepot &where,
119 const std::string &basename,
120 const infinint & min_digits,
121 const std::string &extension,
123 const secu_string &pass,
127 const std::string &input_pipe,
128 const std::string &output_pipe,
129 const std::string & execute,
130 infinint & second_terminateur_offset,
132 bool sequential_read,
134 std::list<signator> & gnupg_signed,
136 bool multi_threaded);
144 const header_version & ver,
147 const infinint & second_terminateur_offset,
148 std::list<signator> & signatories,
155 const header_version & ver,
158 const infinint & second_terminateur_offset,
159 std::list<signator> & signatories,
165 const header_version & ver,
166 const pile_descriptor & cata_pdesc,
167 const infinint & cat_size,
168 std::list<signator> & signatories,
170 const label & lax_layer1_data_name,
173 extern catalogue *macro_tools_lax_search_catalogue(user_interaction & dialog,
176 const archive_version & edition,
179 bool even_partial_catalogues,
180 const label & layer1_data_name);
183 extern infinint macro_tools_get_terminator_start(generic_file & f,
const archive_version & reading_ver);
247 header_version & ver,
248 slice_layout & slicing,
249 const slice_layout *ref_slicing,
251 const entrepot & sauv_path_t,
252 const std::string & filename,
253 const std::string & extension,
257 const infinint & pause,
259 U_I compression_level,
260 const infinint & file_size,
261 const infinint & first_file_size,
262 const std::string & execute,
264 const secu_string & pass,
266 const std::vector<std::string> & gnupg_recipients,
267 const std::vector<std::string> & gnupg_signatories,
269 const std::string & slice_permission,
270 bool add_marks_for_sequential_reading,
271 const std::string & user_comment,
273 const infinint & slice_min_digits,
274 const label & internal_name,
275 const label & data_name,
276 bool multi_threaded);
292 const header_version & ver,
293 const catalogue & cat,
297 const std::vector<std::string> & gnupg_recipients,
298 const std::vector<std::string> & gnupg_signatories,
defines the entrepot interface. Entrepot interface defines a generic way to interact with files (slic...
void macro_tools_close_layers(user_interaction &dialog, pile &layers, const header_version &ver, const catalogue &cat, bool info_details, crypto_algo crypto, compression algo, const std::vector< std::string > &gnupg_recipients, const std::vector< std::string > &gnupg_signatories, bool empty)
catalogue * macro_tools_get_catalogue_from(user_interaction &dialog, memory_pool *pool, pile &stack, const header_version &ver, bool info_details, infinint &cat_size, const infinint &second_terminateur_offset, std::list< signator > &signatories, bool lax_mode)
uses terminator to skip to the position where to find the catalogue and read it
class generic_file is defined here as well as class fichierthe generic_file interface is widely used ...
class pile definition. Used to manage a stack of generic_file objects
range macro_tools_get_slices(const cat_nomme *obj, slice_layout sl)
the trivial_sar classes manages the slicing layer when single slice is used
the crypto algoritm definition
gf_mode
generic_file openning modes
object describing the slicing of an archive
void macro_tools_create_layers(user_interaction &dialog, pile &layers, header_version &ver, slice_layout &slicing, const slice_layout *ref_slicing, memory_pool *pool, const entrepot &sauv_path_t, const std::string &filename, const std::string &extension, bool allow_over, bool warn_over, bool info_details, const infinint &pause, compression algo, U_I compression_level, const infinint &file_size, const infinint &first_file_size, const std::string &execute, crypto_algo crypto, const secu_string &pass, U_32 crypto_size, const std::vector< std::string > &gnupg_recipients, const std::vector< std::string > &gnupg_signatories, bool empty, const std::string &slice_permission, bool add_marks_for_sequential_reading, const std::string &user_comment, hash_algo hash, const infinint &slice_min_digits, const label &internal_name, const label &data_name, bool multi_threaded)
crypto_algo
the different cypher available for encryption (strong or weak)
catalogue * macro_tools_read_catalogue(user_interaction &dialog, memory_pool *pool, const header_version &ver, const pile_descriptor &cata_pdesc, const infinint &cat_size, std::list< signator > &signatories, bool lax_mode, const label &lax_layer1_data_name, bool only_detruits)
read the catalogue from cata_stack assuming the cata_stack is positionned at the beginning of the are...
class escape definition, used for sequential reading of archivesThe class escape is used to insert es...
trivial_sar * macro_tools_open_archive_tuyau(user_interaction &dialog, memory_pool *pool, S_I fd, gf_mode mode, const label &internal_name, const label &data_name, bool slice_header_format_07, const std::string &execute)
create an container to write an archive to a pipe
void macro_tools_open_archive(user_interaction &dialog, memory_pool *pool, const entrepot &where, const std::string &basename, const infinint &min_digits, const std::string &extension, crypto_algo crypto, const secu_string &pass, U_32 crypto_size, pile &stack, header_version &ver, const std::string &input_pipe, const std::string &output_pipe, const std::string &execute, infinint &second_terminateur_offset, bool lax, bool sequential_read, bool info_details, std::list< signator > &gnupg_signed, slice_layout &sl, bool multi_threaded)
switch module to limitint (32 ou 64 bits integers) or infinint
compression
the different compression algorithm available
compression engine implementation
contains the definition of the scrambler class, a very weak encryption scheme
class than provide a way to manipulate and represent range of integer numbers (infinint) ...
libdar namespace encapsulate all libdar symbols
catalogue * macro_tools_get_derivated_catalogue_from(user_interaction &dialog, memory_pool *pool, pile &data_stack, pile &cata_stack, const header_version &ver, bool info_details, infinint &cat_size, const infinint &second_terminateur_offset, std::list< signator > &signatories, bool lax_mode)
uses terminator to skip to the position where to find the catalogue and read it, taking care of havin...
here is defined the many classed which is build of the catalogue