30 #include "../my_config.h" 70 #define LIBDAR_XXXXXXXX 73 #define LIBDAR_NOEXCEPT 0 74 #define LIBDAR_EMEMORY 1 78 #define LIBDAR_EINFININT 3 80 #define LIBDAR_ELIMITINT 4 82 #define LIBDAR_ERANGE 5 84 #define LIBDAR_EDECI 6 86 #define LIBDAR_EFEATURE 7 88 #define LIBDAR_EHARDWARE 8 90 #define LIBDAR_EUSER_ABORT 9 92 #define LIBDAR_EDATA 10 94 #define LIBDAR_ESCRIPT 11 96 #define LIBDAR_ELIBCALL 12 98 #define LIBDAR_UNKNOWN 13 100 #define LIBDAR_ECOMPILATION 14 102 #define LIBDAR_THREAD_CANCEL 15 159 constexpr
compression lzo1x_1_15 = compression::lzo1x_1_15;
160 constexpr
compression lzo1x_1 = compression::lzo1x_1;
169 constexpr
crypto_algo crypto_none = crypto_algo::none;
170 constexpr
crypto_algo crypto_scrambling = crypto_algo::scrambling;
171 constexpr
crypto_algo crypto_blowfish = crypto_algo::blowfish;
172 constexpr
crypto_algo crypto_aes256 = crypto_algo::aes256;
173 constexpr
crypto_algo crypto_twofish256 = crypto_algo::twofish256;
174 constexpr
crypto_algo crypto_serpent256 = crypto_algo::serpent256;
175 constexpr
crypto_algo crypto_camellia256 = crypto_algo::camellia256;
193 constexpr
capa_status capa_set = libdar::capa_status::capa_set;
194 constexpr
capa_status capa_clear = libdar::capa_status::capa_clear;
195 constexpr
capa_status capa_unknown = libdar::capa_status::capa_unknown;
241 using libdar::crit_or;
242 using libdar::crit_invert;
246 constexpr
over_action_data data_preserve = libdar::over_action_data::data_preserve;
247 constexpr
over_action_data data_overwrite = libdar::over_action_data::data_overwrite;
248 constexpr
over_action_data data_preserve_mark_already_saved = libdar::over_action_data::data_preserve_mark_already_saved;
249 constexpr
over_action_data data_overwrite_mark_already_saved = libdar::over_action_data::data_overwrite_mark_already_saved;
250 constexpr
over_action_data data_remove = libdar::over_action_data::data_remove;
251 constexpr
over_action_data data_undefined = libdar::over_action_data::data_undefined;
255 constexpr
over_action_ea EA_preserve = libdar::over_action_ea::EA_preserve;
256 constexpr
over_action_ea EA_overwrite = libdar::over_action_ea::EA_overwrite;
257 constexpr
over_action_ea EA_clear = libdar::over_action_ea::EA_clear;
258 constexpr
over_action_ea EA_preserve_mark_already_saved = libdar::over_action_ea::EA_preserve_mark_already_saved;
259 constexpr
over_action_ea EA_overwrite_mark_already_saved = libdar::over_action_ea::EA_overwrite_mark_already_saved;
260 constexpr
over_action_ea EA_merge_preserve = libdar::over_action_ea::EA_merge_preserve;
261 constexpr
over_action_ea EA_merge_overwrite = libdar::over_action_ea::EA_merge_overwrite;
262 constexpr
over_action_ea EA_undefined = libdar::over_action_ea::EA_undefined;
275 constexpr
hash_algo hash_none = hash_algo::none;
276 constexpr
hash_algo hash_md5 = hash_algo::md5;
277 constexpr
hash_algo hash_sha1 = hash_algo::sha1;
278 constexpr
hash_algo hash_sha512= hash_algo::sha512;
282 constexpr
fsa_family fsaf_hfs_plus = fsa_family::fsaf_hfs_plus;
283 constexpr
fsa_family fsaf_linux_extX = fsa_family::fsaf_linux_extX;
286 constexpr
fsa_nature fsan_unset = fsa_nature::fsan_unset;
287 constexpr
fsa_nature fsan_creation_date = fsa_nature::fsan_creation_date;
288 constexpr
fsa_nature fsan_append_only = fsa_nature::fsan_append_only;
289 constexpr
fsa_nature fsan_compressed = fsa_nature::fsan_compressed;
290 constexpr
fsa_nature fsan_no_dump = fsa_nature::fsan_no_dump;
291 constexpr
fsa_nature fsan_immutable = fsa_nature::fsan_immutable;
292 constexpr
fsa_nature fsan_data_journaling = fsa_nature::fsan_data_journaling;
293 constexpr
fsa_nature fsan_secure_deletion = fsa_nature::fsan_secure_deletion;
294 constexpr
fsa_nature fsan_no_tail_merging = fsa_nature::fsan_no_tail_merging;
295 constexpr
fsa_nature fsan_undeletable = fsa_nature::fsan_undeletable;
296 constexpr
fsa_nature fsan_noatime_update = fsa_nature::fsan_noatime_update;
297 constexpr
fsa_nature fsan_synchronous_directory = fsa_nature::fsan_synchronous_directory;
298 constexpr
fsa_nature fsan_synchronous_udpdate = fsa_nature::fsan_synchronous_update;
299 constexpr
fsa_nature fsan_top_of_dir_hierarchy = fsa_nature::fsan_top_of_dir_hierarchy;
307 constexpr
gf_mode gf_read_only = gf_mode::gf_read_only;
308 constexpr
gf_mode gf_write_only = gf_mode::gf_write_only;
309 constexpr
gf_mode gf_read_write = gf_mode::gf_read_write;
319 namespace compile_time
386 extern void get_version(U_I & major, U_I & medium, U_I & minor,
bool init_libgcrypt =
true);
401 extern void get_version_noexcept(U_I & major, U_I & medium, U_I & minor, U_16 & exception, std::string & except_msg,
bool init_libgcrypt =
true);
417 extern void close_and_clean();
435 const path & chem,
const std::string & basename,
436 const std::string & extension,
437 const archive_options_read & options,
439 std::string & except_msg);
448 const path & fs_root,
449 const path & sauv_path,
450 const std::string & filename,
451 const std::string & extension,
452 const archive_options_create & options,
455 std::string & except_msg);
466 const path &sauv_path,
467 const std::string & filename,
468 const std::string & extension,
469 const archive_options_isolate & options,
471 std::string & except_msg);
479 const path & sauv_path,
481 const std::string & filename,
482 const std::string & extension,
483 const archive_options_merge & options,
486 std::string & except_msg);
496 std::string & except_msg);
510 std::string & except_msg);
520 const archive_options_listing & options,
522 std::string & except_msg);
532 const path & fs_root,
533 const archive_options_diff & options,
536 std::string & except_msg);
549 std::string & except_msg);
559 const std::string & dir,
561 std::string & except_msg);
595 extern void cancel_thread(pthread_t tid,
bool immediate =
true, U_64 flag = 0);
601 extern bool cancel_status(pthread_t tid);
608 extern bool cancel_clear(pthread_t tid);
char * libdar_str2charptr_noexcept(const std::string &x, U_16 &exception, std::string &except_msg)
routine provided to convert std::string to char *
comparison_fields
how to consider file change during comparison and incremental backup
here lies a mask that selects files present in a given listThe mask_list classes defined here is to b...
archive * isolate_archive_noexcept(user_interaction &dialog, archive *ptr, const path &sauv_path, const std::string &filename, const std::string &extension, const archive_options_isolate &options, U_16 &exception, std::string &except_msg)
this is a wrapper around the archive constructor known as the "isolate" constructor ...
exception used to signal an error in the argument given to libdar call of the API ...
the generic class, parent of all masks
archive * open_archive_noexcept(user_interaction &dialog, const path &chem, const std::string &basename, const std::string &extension, const archive_options_read &options, U_16 &exception, std::string &except_msg)
this is a wrapper around the archive constructor known as the "read" constructor
return true if the entry is a sparse file (or hard linked sparse file)
makes the OR operator between two or more masks
libdar5 namespace encapsulate all libdar symbols
std::string tools_getcwd()
get current working directory
are defined here basic integer types that tend to be portable
API v5 backward compatible class archive.
holds the statistics contents of a catalogue
void op_listing_noexcept(user_interaction &dialog, archive *ptr, const archive_options_listing &options, U_16 &exception, std::string &except_msg)
this is wrapper around the op_listing method
const U_I LIBDAR_COMPILE_TIME_MAJOR
libdar Major version defined at compilation time
over_action_data
the possible actions for overwriting data
defines the implementation for local filesystem entrepot The entrepot_local is the only implementatio...
makes an AND operator between two or more masks
exception used to carry system error
returns true if the in place entry has its EA saved (not just marked as saved) in the archve of refer...
capa_status
the EFFECTIVE set the value of the associated capability for the calling thread
mycurl_protocol string_to_mycurl_protocol(const std::string &arg)
extract mycurl_protocol from a given URL
decimal class, convert infinint from and to decimal represention
exception used when hardware problem is found
exception used when a requested fearture has not beed activated at compilation time ...
class holding optional parameters used to test the structure coherence of an existing archive ...
std::string tools_printf(const char *format,...)
make printf-like formating to a std::string
archive * merge_archive_noexcept(user_interaction &dialog, const path &sauv_path, archive *ref_arch1, const std::string &filename, const std::string &extension, const archive_options_merge &options, statistics *progressive_report, U_16 &exception, std::string &except_msg)
this is a wrapper around the archive constructor known as the "merging" constructor ...
base classes used to store entree information in dar_manager databases
If the in_place entry is not an inode its date is considered equal to zero. Comparison is done on mti...
archive * create_archive_noexcept(user_interaction &dialog, const path &fs_root, const path &sauv_path, const std::string &filename, const std::string &extension, const archive_options_create &options, statistics *progressive_report, U_16 &exception, std::string &except_msg)
this is a wrapper around the archive constructor known as the "create" constructor ...
const U_I LIBDAR_COMPILE_TIME_MEDIUM
libdar Medium version defined at compilation time
statistics op_diff_noexcept(user_interaction &dialog, archive *ptr, const path &fs_root, const archive_options_diff &options, statistics *progressive_report, U_16 &exception, std::string &except_msg)
this is wrapper around the op_diff method
const U_I LIBDAR_COMPILE_TIME_MINOR
libdar Minor version defined at compilation time
returns true if the first entry is a plain file (whatever is the second)
matches regular expressions (see "man 7 regex")
returns true if the space used by EA of the first entry is greater or equal to the space used by the ...
nested namespace containing routines that give features activated at compile time ...
this is the parent class of all exception classes.
realises the negation of the criterium given in argument to its constructor
exception used when a limitint overflow is detected, the maximum value of the limitint has been excee...
the basic constant action
the crypto algoritm definition
fsa_scope all_fsa_families()
provides a scope containing all FSA families
class fichier_local definition. This is a full implementation/inherited class of class fichier_global...
gf_mode
generic_file openning modes
over_action_ea
the possible action for overwriting EA
realises the AND operator
returns true if the data of the first entry is bigger or equal to the one of the second entry ...
boolean mask, either always true or false
compression char2compression(char a)
convert a char as stored in archive to its compression value
generic_file stored in memory
exception used when an error concerning the treated data has been met
string matches if it is subdir of mask or mask is a subdir of expression
matches if string is exactly the given mask (no wilde card expression)
returns true if the first entry is a inode with several hard links (whatever is the second entry) ...
exception used when secure memory has been exhausted
return true if the entry is a dirty file (or hard linked dirty file)
the crit_chain class sequences crit_actions up to full definition of the action
crypto_algo
the different cypher available for encryption (strong or weak)
bool get_children_of_noexcept(user_interaction &dialog, archive *ptr, const std::string &dir, U_16 &exception, std::string &except_msg)
this is wrapper around the get_children_of method
defines the interaction interface between libdar and users.
matches as done on shell command lines (see "man 7 glob")
here is the definition of the path classthe path class handle path and provide several operation on t...
returns true if the EA of the first entry is more recent or equal to the one of the second entry ...
exception used when the thread libdar is running in is asked to stop
exception used when memory has been exhausted
exception used when a requested feature is not (yet) implemented
compression char2compression(char a)
convert a char as stored in archive to its compression value
infinint tools_get_extended_size(std::string s, U_I base)
convert the given string to infinint taking care of multiplication suffixes like k, M, T, etc.
exception used when arithmetic error is detected when operating on infinint
compression string2compression(const std::string &a)
convert a string representing a compression algorithm to its enum compression value ...
class handling access to the data summary of treated files after and during each operation ...
to be able to cancel libdar operation while running in a given thread.
this file holds the database class definition as defined in API version 5
char compression2char(compression c)
convert a compression value to a char for storing in archive
std::string compression2string(compression c)
convert a compression to its string representation
defines the implementation of pipe under the generic_file interface.mainly used between zapette and s...
matches if string is the given constructor string or a sub directory of it
the global action for overwriting
exception used to signal convertion problem between infinint and string (decimal representation) ...
returns true if the two entries are of the same type (plain-file/char dev/block dev/named pipe/symlin...
U_I tools_octal2int(const std::string &perm)
convert octal string to integer
API v5 backward compatible user_interaction_callback class.
compression string2compression(const std::string &a)
convert a string representing a compression algorithm to its enum compression value ...
void get_version_noexcept(U_I &major, U_I &medium, U_I &minor, U_16 &exception, std::string &except_msg, bool init_libgcrypt=true)
return the libdar version, and make libdar initialization (does not throw exceptions) ...
class to be used as parent to provide checkpoints to inherited classes
bool tools_my_atoi(const char *a, U_I &val)
ascii to integer conversion
std::set< fsa_family > fsa_scope
set of fsa families
return true if the entry has delta signatur
defines the implementation for remote filesystem entrepot using libcurl
switch module to limitint (32 ou 64 bits integers) or infinint
here lies a collection of mask classes
manages the decimal representation of infinint
exception used to signal range error
modified_data_detection
how to detect data has changed when some fields
exception used to signal a bug. A bug is triggered when reaching some code that should never be reach...
mycurl_protocol string_to_mycurl_protocol(const std::string &arg)
extract mycurl_protocol from a given URL
compression
the different compression algorithm available
this is the interface class from which all other data transfer classes inherit
the generic criterium class, parent of all criterium
nested namespace inside libdar
compression engine implementation
statistics op_test_noexcept(user_interaction &dialog, archive *ptr, const archive_options_test &options, statistics *progressive_report, U_16 &exception, std::string &except_msg)
this is wrapper around the op_test method
class archive_num stores the position of an archive inside a dar_manager database ...
exception used to signal that the user has aborted the operation
returns true if the first entry is an inode (whatever is the second)
returns true if the data of the first entry is more recent or of the same date of the one of the seco...
hash_algo
hashing algorithm available
the archive class realizes the most general operations on archives
the testing class binds criterium to actions
if the entry is not an inode the result is also true
the arbitrary large positive integer class
exception used when error the inter-slice user command returned an error code
provide information about current thread (underlying using the widthdrawn POSIX.1e API) ...
mycurl_protocol
libcurl protocols supported by libdar
pipe implementation under the generic_file interface.
fsa_scope all_fsa_families()
provides a scope containing all FSA families
void get_version(U_I &major, U_I &medium, U_I &minor, bool init_libgcrypt=true)
return the libdar version, and make libdar initialization (may throw Exceptions)
returns true if the first entry has more or even EA (in number not in size) than the second entry ...
statistics op_extract_noexcept(user_interaction &dialog, archive *ptr, const path &fs_root, const archive_options_extract &options, statistics *progressive_report, U_16 &exception, std::string &except_msg)
this is wrapper around the op_extract method
This is a pure virtual class that is used by libdar when interaction with the user is required...
returns true if the first entry is a cat_directory (whatever is the second)
void close_archive_noexcept(archive *ptr, U_16 &exception, std::string &except_msg)
this is wrapper around the archive destructor
the mask_list class, matches string that are present in a given file
set of datastructures used to interact with a catalogue object
returns true if the EA of the first entry is more recent or equal to the fixed date given in argument...
class used by libdar::archive class to give a summary of treated file during and after an operation ...
the class path is here to manipulate paths in the Unix notation: using'/'