Disk ARchive  2.6.8
Full featured and portable backup and archiving tool
archive_options.hpp
Go to the documentation of this file.
1 /*********************************************************************/
2 // dar - disk archive - a backup/restoration program
3 // Copyright (C) 2002-2020 Denis Corbin
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 //
19 // to contact the author : http://dar.linux.free.fr/email.html
20 /*********************************************************************/
21 
25 
26 #ifndef ARCHIVE_OPTIONS_HPP
27 #define ARCHIVE_OPTIONS_HPP
28 
29 #include "../my_config.h"
30 #include "crypto.hpp"
31 #include "integers.hpp"
32 #include "mask.hpp"
33 #include "mask_list.hpp"
34 #include "crit_action.hpp"
35 #include "secu_string.hpp"
36 #include "entrepot.hpp"
37 #include "fsa_family.hpp"
39 #include "archive_aux.hpp"
40 #include "compression.hpp"
41 #include "delta_sig_block_size.hpp"
42 
43 #include <string>
44 #include <vector>
45 #include <set>
46 #include <memory>
47 
48 namespace libdar
49 {
50  class archive; // needed to be able to use pointer on archive object.
51 
52 
56 
59 
60 
62 
64  {
65  public:
68 
70  archive_options_read(const archive_options_read & ref) : x_ref_chem(ref.x_ref_chem) { copy_from(ref); };
72  archive_options_read & operator = (const archive_options_read & ref) { copy_from(ref); return *this; };
73  archive_options_read & operator = (archive_options_read && ref) noexcept { move_from(std::move(ref)); return *this; };
74  ~archive_options_read() = default;
75 
76 
78  // set back to default (this is the state just after the object is constructed
79  // this method is to be used to reuse a given object
80 
82  void clear();
83 
84 
86  // setting methods
87 
88 
90 
96  void set_crypto_algo(crypto_algo val) { x_crypto = val; };
97 
99  void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
100 
102  void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
103 
106 
108 
111  void set_input_pipe(const std::string & input_pipe) { x_input_pipe = input_pipe; };
112 
114 
117  void set_output_pipe(const std::string & output_pipe) { x_output_pipe = output_pipe; };
118 
120 
130  void set_execute(const std::string & execute) { x_execute = execute; };
131 
133  void set_info_details(bool info_details) { x_info_details = info_details; };
134 
136 
140  void set_lax(bool val) { x_lax = val; };
141 
143 
145 
146  void set_sequential_read(bool val) { x_sequential_read = val; };
147 
149 
150  void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
151 
152 
154  void set_entrepot(const std::shared_ptr<entrepot> & entr) { if(!entr) throw Erange("archive_options_read::set_entrepot", "null entrepot pointer given in argument"); x_entrepot = entr; };
155 
157  void set_ignore_signature_check_failure(bool val) { x_ignore_signature_check_failure = val; };
158 
160  void set_multi_threaded(bool val) { x_multi_threaded = val; };
161 
162 
164 
166  void set_external_catalogue(const path & ref_chem, const std::string & ref_basename) { x_ref_chem = ref_chem, x_ref_basename = ref_basename; external_cat = true; };
169 
171  void set_ref_crypto_algo(crypto_algo ref_crypto) { x_ref_crypto = ref_crypto; };
172 
174  void set_ref_crypto_pass(const secu_string & ref_pass) { x_ref_pass = ref_pass; };
175 
177  void set_ref_crypto_size(U_32 ref_crypto_size) { x_ref_crypto_size = ref_crypto_size; };
178 
180 
190  void set_ref_execute(const std::string & ref_execute) { x_ref_execute = ref_execute; };
191 
192 
194 
195  void set_ref_slice_min_digits(infinint val) { x_ref_slice_min_digits = val; };
196 
198  void set_ref_entrepot(const std::shared_ptr<entrepot> & entr) { if(!entr) throw Erange("archive_options_read::set_ref_entrepot", "null entrepot pointer given in argument"); x_ref_entrepot = entr; };
199 
201  void set_header_only(bool val) { x_header_only = val; };
202 
203 
204 
206  // getting methods (mainly used inside libdar, but kept public and part of the API in the case it is needed)
207 
208 
209  crypto_algo get_crypto_algo() const { return x_crypto; };
210  const secu_string & get_crypto_pass() const { return x_pass; };
211  U_32 get_crypto_size() const { return x_crypto_size; };
212  const std::string & get_input_pipe() const { return x_input_pipe; };
213  const std::string & get_output_pipe() const { return x_output_pipe; };
214  const std::string & get_execute() const { return x_execute; };
215  bool get_info_details() const { return x_info_details; };
216  bool get_lax() const { return x_lax; };
217  bool get_sequential_read() const { return x_sequential_read; };
218  infinint get_slice_min_digits() const { return x_slice_min_digits; };
219  const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
220  bool get_ignore_signature_check_failure() const { return x_ignore_signature_check_failure; };
221  bool get_multi_threaded() const { return x_multi_threaded; };
222 
223  // All methods that follow concern the archive where to fetch the (isolated) catalogue from
224  bool is_external_catalogue_set() const { return external_cat; };
225  const path & get_ref_path() const;
226  const std::string & get_ref_basename() const;
227  crypto_algo get_ref_crypto_algo() const { return x_ref_crypto; };
228  const secu_string & get_ref_crypto_pass() const { return x_ref_pass; };
229  U_32 get_ref_crypto_size() const { return x_ref_crypto_size; };
230  const std::string & get_ref_execute() const { return x_ref_execute; };
231  infinint get_ref_slice_min_digits() const { return x_ref_slice_min_digits; };
232  const std::shared_ptr<entrepot> & get_ref_entrepot() const { return x_ref_entrepot; };
233  bool get_header_only() const { return x_header_only; };
234 
235 
236  private:
237  crypto_algo x_crypto;
238  secu_string x_pass;
239  U_32 x_crypto_size;
240  std::string x_input_pipe;
241  std::string x_output_pipe;
242  std::string x_execute;
243  bool x_info_details;
244  bool x_lax;
245  bool x_sequential_read;
246  infinint x_slice_min_digits;
247  std::shared_ptr<entrepot> x_entrepot;
248  bool x_ignore_signature_check_failure;
249  bool x_multi_threaded;
250 
251 
252  // external catalogue relative fields
253  bool external_cat;
254  path x_ref_chem;
255  std::string x_ref_basename;
256  crypto_algo x_ref_crypto;
257  secu_string x_ref_pass;
258  U_32 x_ref_crypto_size;
259  std::string x_ref_execute;
260  infinint x_ref_slice_min_digits;
261  std::shared_ptr<entrepot> x_ref_entrepot;
262  bool x_header_only;
263 
264  void copy_from(const archive_options_read & ref);
265  void move_from(archive_options_read && ref) noexcept;
266  };
267 
268 
272 
274 
276  {
277  public:
278  // default constructors and destructor.
279 
282  archive_options_create(archive_options_create && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
283  archive_options_create & operator = (const archive_options_create & ref) { destroy(); copy_from(ref); return *this; };
284  archive_options_create & operator = (archive_options_create && ref) noexcept { move_from(std::move(ref)); return *this; };
285  ~archive_options_create() { destroy(); };
286 
288  // set back to default (this is the state just after the object is constructed
289  // this method is to be used to reuse a given object
290 
292  void clear();
293 
294 
296  // setting methods
297 
299  void set_reference(std::shared_ptr<archive> ref_arch) { x_ref_arch = ref_arch; };
300 
302  void set_selection(const mask & selection);
303 
305  void set_subtree(const mask & subtree);
306 
308  void set_allow_over(bool allow_over) { x_allow_over = allow_over; };
309 
311  void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
312 
314 
319  void set_info_details(bool info_details) { x_info_details = info_details; };
320 
322 
325  void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
326 
328  void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
329 
331  void set_display_finished(bool display_finished) { x_display_finished = display_finished; };
332 
334  void set_pause(const infinint & pause) { x_pause = pause; };
335 
337  void set_empty_dir(bool empty_dir) { x_empty_dir = empty_dir; };
338 
340  void set_compression(compression compr_algo) { x_compr_algo = compr_algo; };
341 
343  void set_compression_level(U_I compression_level) { x_compression_level = compression_level; };
344 
346 
350  void set_slicing(const infinint & file_size, const infinint & first_file_size = 0)
351  {
352  x_file_size = file_size;
353  if(first_file_size.is_zero())
354  x_first_file_size = file_size;
355  else
356  x_first_file_size = first_file_size;
357  };
358 
359 
361  void set_ea_mask(const mask & ea_mask);
362 
364 
374  void set_execute(const std::string & execute) { x_execute = execute; };
375 
377  void set_crypto_algo(crypto_algo crypto) { x_crypto = crypto; };
378 
381  void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
382 
384  void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
385 
387 
393  void set_gnupg_recipients(const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
394 
395 
397  void set_gnupg_signatories(const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
398 
400  void set_compr_mask(const mask & compr_mask);
401 
403  void set_min_compr_size(const infinint & min_compr_size) { x_min_compr_size = min_compr_size; };
404 
406  void set_nodump(bool nodump) { x_nodump = nodump; };
407 
410  void set_exclude_by_ea(const std::string & ea_name)
411  { exclude_by_ea = (ea_name == "" ? "user.libdar_no_backup" : ea_name); };
412 
414  void set_what_to_check(comparison_fields what_to_check) { x_what_to_check = what_to_check; };
415 
417  void set_hourshift(const infinint & hourshift) { x_hourshift = hourshift; };
418 
420  void set_empty(bool empty) { x_empty = empty; };
421 
423 
426  void set_alter_atime(bool alter_atime)
427  {
428  if(x_furtive_read)
429  x_old_alter_atime = alter_atime;
430  else
431  x_alter_atime = alter_atime;
432  };
433 
436 
438  void set_same_fs(bool same_fs) { x_same_fs = same_fs; };
439 
441  void set_snapshot(bool snapshot) { x_snapshot = snapshot; };
442 
444  void set_cache_directory_tagging(bool cache_directory_tagging) { x_cache_directory_tagging = cache_directory_tagging; };
445 
447  void set_fixed_date(const infinint & fixed_date) { x_fixed_date = fixed_date; };
448 
450  void set_slice_permission(const std::string & slice_permission) { x_slice_permission = slice_permission; };
451 
453  void set_slice_user_ownership(const std::string & slice_user_ownership) { x_slice_user_ownership = slice_user_ownership; };
454 
456  void set_slice_group_ownership(const std::string & slice_group_ownership) { x_slice_group_ownership = slice_group_ownership; };
457 
459  void set_retry_on_change(const infinint & count_max_per_file, const infinint & global_max_byte_overhead = 0) { x_repeat_count = count_max_per_file; x_repeat_byte = global_max_byte_overhead; };
460 
462  void set_sequential_marks(bool sequential) { x_sequential_marks = sequential; };
463 
465  void set_sparse_file_min_size(const infinint & size) { x_sparse_file_min_size = size; };
466 
468  void set_security_check(bool check) { x_security_check = check; };
469 
471  void set_user_comment(const std::string & comment) { x_user_comment = comment; };
472 
474 
477  void set_hash_algo(hash_algo hash) { x_hash = hash; };
478 
480  void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
481 
483  void set_backup_hook(const std::string & execute, const mask & which_files);
484 
486  void set_ignore_unknown_inode_type(bool val) { x_ignore_unknown = val; };
487 
489  void set_entrepot(const std::shared_ptr<entrepot> & entr) { if(!entr) throw Erange("archive_options_create::set_entrepot", "null entrepot pointer given in argument"); x_entrepot = entr; };
490 
492  void set_fsa_scope(const fsa_scope & scope) { x_scope = scope; };
493 
495  void set_multi_threaded(bool val) { x_multi_threaded = val; };
496 
498 
500  void set_delta_diff(bool val) { if(val && !compile_time::librsync()) throw Ecompilation("librsync"); x_delta_diff = val; };
501 
503  void set_delta_signature(bool val) { x_delta_signature = val; };
504 
506  void set_delta_mask(const mask & delta_mask);
507 
509 
511  void set_delta_sig_min_size(const infinint & val) { x_delta_sig_min_size = val; };
512 
514  void set_auto_zeroing_neg_dates(bool val) { x_auto_zeroing_neg_dates = val; };
515 
517 
520  void set_ignored_as_symlink(const std::set<std::string> & list) { x_ignored_as_symlink = list; };
521 
523 
524  void set_modified_data_detection(modified_data_detection val) { x_modified_data_detection = val; };
525 
527  void set_iteration_count(const infinint & val) { x_iteration_count = val; };
528 
530  void set_kdf_hash(hash_algo algo) { x_kdf_hash = algo; };
531 
533  void set_sig_block_len(delta_sig_block_size val) { val.check(); x_sig_block_len = val; };
534 
535 
537  // getting methods
538 
539  std::shared_ptr<archive> get_reference() const { return x_ref_arch; };
540  const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
541  const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
542  bool get_allow_over() const { return x_allow_over; };
543  bool get_warn_over() const { return x_warn_over; };
544  bool get_info_details() const { return x_info_details; };
545  bool get_display_treated() const { return x_display_treated; };
546  bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
547  bool get_display_skipped() const { return x_display_skipped; };
548  bool get_display_finished() const { return x_display_finished; };
549  const infinint & get_pause() const { return x_pause; };
550  bool get_empty_dir() const { return x_empty_dir; };
551  compression get_compression() const { return x_compr_algo; };
552  U_I get_compression_level() const { return x_compression_level; };
553  const infinint & get_slice_size() const { return x_file_size; };
554  const infinint & get_first_slice_size() const { return x_first_file_size; };
555  const mask & get_ea_mask() const { if(x_ea_mask == nullptr) throw SRC_BUG; return *x_ea_mask; };
556  const std::string & get_execute() const { return x_execute; };
557  crypto_algo get_crypto_algo() const { return x_crypto; };
558  const secu_string & get_crypto_pass() const { return x_pass; };
559  U_32 get_crypto_size() const { return x_crypto_size; };
560  const std::vector<std::string> & get_gnupg_recipients() const { return x_gnupg_recipients; };
561  const std::vector<std::string> & get_gnupg_signatories() const { return x_gnupg_signatories; };
562  const mask & get_compr_mask() const { if(x_compr_mask == nullptr) throw SRC_BUG; return *x_compr_mask; };
563  const infinint & get_min_compr_size() const { return x_min_compr_size; };
564  bool get_nodump() const { return x_nodump; };
565  const std::string & get_exclude_by_ea() const { return exclude_by_ea; };
566  comparison_fields get_comparison_fields() const { return x_what_to_check; };
567  const infinint & get_hourshift() const { return x_hourshift; };
568  bool get_empty() const { return x_empty; };
569  bool get_alter_atime() const { return x_alter_atime; };
570  bool get_furtive_read_mode() const { return x_furtive_read; };
571  bool get_same_fs() const { return x_same_fs; };
572  bool get_snapshot() const { return x_snapshot; };
573  bool get_cache_directory_tagging() const { return x_cache_directory_tagging; };
574  const infinint & get_fixed_date() const { return x_fixed_date; };
575  const std::string & get_slice_permission() const { return x_slice_permission; };
576  const std::string & get_slice_user_ownership() const { return x_slice_user_ownership; };
577  const std::string & get_slice_group_ownership() const { return x_slice_group_ownership; };
578  const infinint & get_repeat_count() const { return x_repeat_count; };
579  const infinint & get_repeat_byte() const { return x_repeat_byte; };
580  bool get_sequential_marks() const { return x_sequential_marks; };
581  infinint get_sparse_file_min_size() const { return x_sparse_file_min_size; };
582  bool get_security_check() const { return x_security_check; };
583  const std::string & get_user_comment() const { return x_user_comment; };
584  hash_algo get_hash_algo() const { return x_hash; };
585  infinint get_slice_min_digits() const { return x_slice_min_digits; };
586  const std::string & get_backup_hook_file_execute() const { return x_backup_hook_file_execute; };
587  const mask & get_backup_hook_file_mask() const { return *x_backup_hook_file_mask; };
588  bool get_ignore_unknown_inode_type() const { return x_ignore_unknown; };
589  const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
590  const fsa_scope & get_fsa_scope() const { return x_scope; };
591  bool get_multi_threaded() const { return x_multi_threaded; };
592  bool get_delta_diff() const { return x_delta_diff; };
593  bool get_delta_signature() const { return x_delta_signature; };
594  const mask & get_delta_mask() const { return *x_delta_mask; }
595  bool get_has_delta_mask_been_set() const { return has_delta_mask_been_set; };
596  const infinint & get_delta_sig_min_size() const { return x_delta_sig_min_size; };
597  bool get_auto_zeroing_neg_dates() const { return x_auto_zeroing_neg_dates; };
598  const std::set<std::string> & get_ignored_as_symlink() const { return x_ignored_as_symlink; };
599  modified_data_detection get_modified_data_detection() const { return x_modified_data_detection; };
600  const infinint & get_iteration_count() const { return x_iteration_count; };
601  hash_algo get_kdf_hash() const { return x_kdf_hash; };
602  delta_sig_block_size get_sig_block_len() const { return x_sig_block_len; };
603 
604  private:
605  std::shared_ptr<archive> x_ref_arch;
608  bool x_allow_over;
609  bool x_warn_over;
610  bool x_info_details;
611  bool x_display_treated;
612  bool x_display_treated_only_dir;
613  bool x_display_skipped;
614  bool x_display_finished;
615  infinint x_pause;
616  bool x_empty_dir;
617  compression x_compr_algo;
618  U_I x_compression_level;
619  infinint x_file_size;
620  infinint x_first_file_size;
622  std::string x_execute;
623  crypto_algo x_crypto;
624  secu_string x_pass;
625  U_32 x_crypto_size;
626  std::vector<std::string> x_gnupg_recipients;
627  std::vector<std::string> x_gnupg_signatories;
629  infinint x_min_compr_size;
630  bool x_nodump;
631  std::string exclude_by_ea;
632  comparison_fields x_what_to_check;
633  infinint x_hourshift;
634  bool x_empty;
635  bool x_alter_atime;
637  bool x_furtive_read;
638  bool x_same_fs;
639  bool x_snapshot;
640  bool x_cache_directory_tagging;
641  infinint x_fixed_date;
642  std::string x_slice_permission;
643  std::string x_slice_user_ownership;
644  std::string x_slice_group_ownership;
645  infinint x_repeat_count;
646  infinint x_repeat_byte;
647  bool x_sequential_marks;
648  infinint x_sparse_file_min_size;
649  bool x_security_check;
650  std::string x_user_comment;
651  hash_algo x_hash;
652  infinint x_slice_min_digits;
653  mask * x_backup_hook_file_mask;
654  std::string x_backup_hook_file_execute;
655  bool x_ignore_unknown;
656  std::shared_ptr<entrepot> x_entrepot;
657  fsa_scope x_scope;
658  bool x_multi_threaded;
659  bool x_delta_diff;
660  bool x_delta_signature;
661  mask *x_delta_mask;
662  bool has_delta_mask_been_set;
663  infinint x_delta_sig_min_size;
664  bool x_auto_zeroing_neg_dates;
665  std::set<std::string> x_ignored_as_symlink;
666  modified_data_detection x_modified_data_detection;
667  infinint x_iteration_count;
668  hash_algo x_kdf_hash;
669  delta_sig_block_size x_sig_block_len;
670 
671  void nullifyptr() noexcept;
672  void destroy() noexcept;
673  void copy_from(const archive_options_create & ref);
674  void move_from(archive_options_create && ref) noexcept;
675  void destroy_mask(mask * & ptr);
676  void clean_mask(mask * & ptr);
677  void check_mask(const mask & m);
678  };
679 
680 
681 
682 
683 
684 
688 
690 
692  {
693  public:
696  archive_options_isolate(archive_options_isolate && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
697  archive_options_isolate & operator = (const archive_options_isolate & ref) { destroy(); copy_from(ref); return *this; };
698  archive_options_isolate & operator = (archive_options_isolate && ref) noexcept { move_from(std::move(ref)); return *this; };
699  ~archive_options_isolate() { destroy(); };
700 
701 
702  void clear();
703 
705  // setting methods
706 
708  void set_allow_over(bool allow_over) { x_allow_over = allow_over; };
709 
711  void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
712 
714  void set_info_details(bool info_details) { x_info_details = info_details; };
715 
717  void set_pause(const infinint & pause) { x_pause = pause; };
718 
720  void set_compression(compression algo) { x_algo = algo; };
721 
723  void set_compression_level(U_I compression_level) { x_compression_level = compression_level; };
724 
726 
730  void set_slicing(const infinint & file_size, const infinint & first_file_size = 0)
731  {
732  x_file_size = file_size;
733  if(first_file_size.is_zero())
734  x_first_file_size = file_size;
735  else
736  x_first_file_size = first_file_size;
737  };
738 
740 
750  void set_execute(const std::string & execute) { x_execute = execute; };
751 
753  void set_crypto_algo(crypto_algo crypto) { x_crypto = crypto; };
754 
756  void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
757 
759  void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
760 
763  void set_gnupg_recipients(const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
764 
766  void set_gnupg_signatories(const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
767 
769  void set_empty(bool empty) { x_empty = empty; };
770 
772  void set_slice_permission(const std::string & slice_permission) { x_slice_permission = slice_permission; };
773 
775  void set_slice_user_ownership(const std::string & slice_user_ownership) { x_slice_user_ownership = slice_user_ownership; };
776 
778  void set_slice_group_ownership(const std::string & slice_group_ownership) { x_slice_group_ownership = slice_group_ownership; };
779 
781  void set_user_comment(const std::string & comment) { x_user_comment = comment; };
782 
784  void set_hash_algo(hash_algo hash) { x_hash = hash; };
785 
787  void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
788 
790  void set_sequential_marks(bool sequential) { x_sequential_marks = sequential; };
791 
793  void set_entrepot(const std::shared_ptr<entrepot> & entr) { if(!entr) throw Erange("archive_options_isolated::set_entrepot", "null entrepot pointer given in argument"); x_entrepot = entr; };
794 
796  void set_multi_threaded(bool val) { x_multi_threaded = val; };
797 
799  void set_delta_signature(bool val) { x_delta_signature = val; };
800 
802  void set_delta_mask(const mask & delta_mask);
803 
807  void set_delta_sig_min_size(const infinint & val) { x_delta_sig_min_size = val; };
808 
810  void set_iteration_count(const infinint & val) { x_iteration_count = val; };
811 
813  void set_kdf_hash(hash_algo algo) { x_kdf_hash = algo; };
814 
816  void set_sig_block_len(delta_sig_block_size val) { val.check(); x_sig_block_len = val; };
817 
819  // getting methods
820 
821  bool get_allow_over() const { return x_allow_over; };
822  bool get_warn_over() const { return x_warn_over; };
823  bool get_info_details() const { return x_info_details; };
824  const infinint & get_pause() const { return x_pause; };
825  compression get_compression() const { return x_algo; };
826  U_I get_compression_level() const { return x_compression_level; };
827  const infinint & get_slice_size() const { return x_file_size; };
828  const infinint & get_first_slice_size() const { return x_first_file_size; };
829  const std::string & get_execute() const { return x_execute; };
830  crypto_algo get_crypto_algo() const { return x_crypto; };
831  const secu_string & get_crypto_pass() const { return x_pass; };
832  U_32 get_crypto_size() const { return x_crypto_size; };
833  const std::vector<std::string> & get_gnupg_recipients() const { return x_gnupg_recipients; };
834  const std::vector<std::string> & get_gnupg_signatories() const { return x_gnupg_signatories; };
835  bool get_empty() const { return x_empty; };
836  const std::string & get_slice_permission() const { return x_slice_permission; };
837  const std::string & get_slice_user_ownership() const { return x_slice_user_ownership; };
838  const std::string & get_slice_group_ownership() const { return x_slice_group_ownership; };
839  const std::string & get_user_comment() const { return x_user_comment; };
840  hash_algo get_hash_algo() const { return x_hash; };
841  infinint get_slice_min_digits() const { return x_slice_min_digits; };
842  bool get_sequential_marks() const { return x_sequential_marks; };
843  const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
844  bool get_multi_threaded() const { return x_multi_threaded; };
845  bool get_delta_signature() const { return x_delta_signature; };
846  const mask & get_delta_mask() const { return *x_delta_mask; }
847  bool get_has_delta_mask_been_set() const { return has_delta_mask_been_set; };
848  const infinint & get_delta_sig_min_size() const { return x_delta_sig_min_size; };
849  const infinint & get_iteration_count() const { return x_iteration_count; };
850  hash_algo get_kdf_hash() const { return x_kdf_hash; };
851  delta_sig_block_size get_sig_block_len() const { return x_sig_block_len; };
852 
853 
854  private:
855  bool x_allow_over;
856  bool x_warn_over;
857  bool x_info_details;
858  infinint x_pause;
859  compression x_algo;
860  U_I x_compression_level;
861  infinint x_file_size;
862  infinint x_first_file_size;
863  std::string x_execute;
864  crypto_algo x_crypto;
865  secu_string x_pass;
866  U_32 x_crypto_size;
867  std::vector<std::string> x_gnupg_recipients;
868  std::vector<std::string> x_gnupg_signatories;
869  bool x_empty;
870  std::string x_slice_permission;
871  std::string x_slice_user_ownership;
872  std::string x_slice_group_ownership;
873  std::string x_user_comment;
874  hash_algo x_hash;
875  infinint x_slice_min_digits;
876  bool x_sequential_marks;
877  std::shared_ptr<entrepot> x_entrepot;
878  bool x_multi_threaded;
879  bool x_delta_signature;
880  mask *x_delta_mask;
881  bool has_delta_mask_been_set;
882  infinint x_delta_sig_min_size;
883  infinint x_iteration_count;
884  hash_algo x_kdf_hash;
885  delta_sig_block_size x_sig_block_len;
886 
887  void copy_from(const archive_options_isolate & ref);
888  void move_from(archive_options_isolate && ref) noexcept;
889  void destroy() noexcept;
890  void nullifyptr() noexcept;
891  };
892 
893 
894 
898 
901  {
902  public:
903 
904  archive_options_merge() { nullifyptr(); clear(); };
905  archive_options_merge(const archive_options_merge & ref) { copy_from(ref); };
906  archive_options_merge(archive_options_merge && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
907  archive_options_merge & operator = (const archive_options_merge & ref) { destroy(); copy_from(ref); return *this; };
908  archive_options_merge & operator = (archive_options_merge && ref) noexcept { move_from(std::move(ref)); return *this; };
909  ~archive_options_merge() { destroy(); };
910 
911  void clear();
912 
914  // setting methods
915 
916  void set_auxiliary_ref(std::shared_ptr<archive> ref) { x_ref = ref; };
917 
919  void set_selection(const mask & selection);
920 
922  void set_subtree(const mask & subtree);
923 
925  void set_allow_over(bool allow_over) { x_allow_over = allow_over; };
926 
928  void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
929 
931  void set_overwriting_rules(const crit_action & overwrite);
932 
934 
939  void set_info_details(bool info_details) { x_info_details = info_details; };
940 
942 
945  void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
946 
948  void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
949 
951  void set_pause(const infinint & pause) { x_pause = pause; };
952 
954  void set_empty_dir(bool empty_dir) { x_empty_dir = empty_dir; };
955 
957  void set_compression(compression compr_algo) { x_compr_algo = compr_algo; };
958 
960  void set_compression_level(U_I compression_level) { x_compression_level = compression_level; };
961 
963 
967  void set_slicing(const infinint & file_size, const infinint & first_file_size = 0)
968  {
969  x_file_size = file_size;
970  if(first_file_size.is_zero())
971  x_first_file_size = file_size;
972  else
973  x_first_file_size = first_file_size;
974  };
975 
977  void set_ea_mask(const mask & ea_mask);
978 
980 
990  void set_execute(const std::string & execute) { x_execute = execute; };
991 
993  void set_crypto_algo(crypto_algo crypto) { x_crypto = crypto; };
994 
997  void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
998 
1000  void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
1001 
1004  void set_gnupg_recipients(const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
1005 
1007  void set_gnupg_signatories(const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
1008 
1010  void set_compr_mask(const mask & compr_mask);
1011 
1013  void set_min_compr_size(const infinint & min_compr_size) { x_min_compr_size = min_compr_size; };
1014 
1016  void set_empty(bool empty) { x_empty = empty; };
1017 
1019  void set_keep_compressed(bool keep_compressed) { x_keep_compressed = keep_compressed; };
1020 
1022  void set_slice_permission(const std::string & slice_permission) { x_slice_permission = slice_permission; };
1023 
1025  void set_slice_user_ownership(const std::string & slice_user_ownership) { x_slice_user_ownership = slice_user_ownership; };
1026 
1028  void set_slice_group_ownership(const std::string & slice_group_ownership) { x_slice_group_ownership = slice_group_ownership; };
1029 
1031  void set_decremental_mode(bool mode) { x_decremental = mode; };
1032 
1034  void set_sequential_marks(bool sequential) { x_sequential_marks = sequential; };
1035 
1037  void set_sparse_file_min_size(const infinint & size) { x_sparse_file_min_size = size; };
1038 
1040  void set_user_comment(const std::string & comment) { x_user_comment = comment; };
1041 
1043  void set_hash_algo(hash_algo hash) { x_hash = hash; };
1044 
1046  void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
1047 
1049  void set_entrepot(const std::shared_ptr<entrepot> & entr) { if(!entr) throw Erange("archive_options_merge::set_entrepot", "null entrepot pointer given in argument"); x_entrepot = entr; };
1050 
1052  void set_fsa_scope(const fsa_scope & scope) { x_scope = scope; };
1053 
1055  void set_multi_threaded(bool val) { x_multi_threaded = val; };
1056 
1062  void set_delta_signature(bool val) { x_delta_signature = val; };
1063 
1065  void set_delta_mask(const mask & delta_mask);
1066 
1068 
1070  void set_delta_sig_min_size(const infinint & val) { x_delta_sig_min_size = val; };
1071 
1073  void set_iteration_count(const infinint & val) { x_iteration_count = val; };
1074 
1076  void set_kdf_hash(hash_algo algo) { x_kdf_hash = algo; };
1077 
1079  void set_sig_block_len(delta_sig_block_size val) { val.check(); x_sig_block_len = val; };
1080 
1081 
1083  // getting methods
1084 
1085  std::shared_ptr<archive> get_auxiliary_ref() const { return x_ref; };
1086  const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
1087  const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
1088  bool get_allow_over() const { return x_allow_over; };
1089  bool get_warn_over() const { return x_warn_over; };
1090  const crit_action & get_overwriting_rules() const { if(x_overwrite == nullptr) throw SRC_BUG; return *x_overwrite; };
1091  bool get_info_details() const { return x_info_details; };
1092  bool get_display_treated() const { return x_display_treated; };
1093  bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1094  bool get_display_skipped() const { return x_display_skipped; };
1095  const infinint & get_pause() const { return x_pause; };
1096  bool get_empty_dir() const { return x_empty_dir; };
1097  compression get_compression() const { return x_compr_algo; };
1098  U_I get_compression_level() const { return x_compression_level; };
1099  const infinint & get_slice_size() const { return x_file_size; };
1100  const infinint & get_first_slice_size() const { return x_first_file_size; };
1101  const mask & get_ea_mask() const { if(x_ea_mask == nullptr) throw SRC_BUG; return *x_ea_mask; };
1102  const std::string & get_execute() const { return x_execute; };
1103  crypto_algo get_crypto_algo() const { return x_crypto; };
1104  const secu_string & get_crypto_pass() const { return x_pass; };
1105  U_32 get_crypto_size() const { return x_crypto_size; };
1106  const std::vector<std::string> & get_gnupg_recipients() const { return x_gnupg_recipients; };
1107  const std::vector<std::string> & get_gnupg_signatories() const { return x_gnupg_signatories; };
1108  const mask & get_compr_mask() const { if(x_compr_mask == nullptr) throw SRC_BUG; return *x_compr_mask; };
1109  const infinint & get_min_compr_size() const { return x_min_compr_size; };
1110  bool get_empty() const { return x_empty; };
1111  bool get_keep_compressed() const { return x_keep_compressed; };
1112  const std::string & get_slice_permission() const { return x_slice_permission; };
1113  const std::string & get_slice_user_ownership() const { return x_slice_user_ownership; };
1114  const std::string & get_slice_group_ownership() const { return x_slice_group_ownership; };
1115  bool get_decremental_mode() const { return x_decremental; };
1116  bool get_sequential_marks() const { return x_sequential_marks; };
1117  infinint get_sparse_file_min_size() const { return x_sparse_file_min_size; };
1118  const std::string & get_user_comment() const { return x_user_comment; };
1119  hash_algo get_hash_algo() const { return x_hash; };
1120  infinint get_slice_min_digits() const { return x_slice_min_digits; };
1121  const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
1122  const fsa_scope & get_fsa_scope() const { return x_scope; };
1123  bool get_multi_threaded() const { return x_multi_threaded; };
1124  bool get_delta_signature() const { return x_delta_signature; };
1125  const mask & get_delta_mask() const { return *x_delta_mask; }
1126  bool get_has_delta_mask_been_set() const { return has_delta_mask_been_set; };
1127  const infinint & get_delta_sig_min_size() const { return x_delta_sig_min_size; };
1128  const infinint & get_iteration_count() const { return x_iteration_count; };
1129  hash_algo get_kdf_hash() const { return x_kdf_hash; };
1130  delta_sig_block_size get_sig_block_len() const { return x_sig_block_len; };
1131 
1132 
1133  private:
1134  std::shared_ptr<archive> x_ref;
1135  mask * x_selection;
1136  mask * x_subtree;
1137  bool x_allow_over;
1138  bool x_warn_over;
1139  crit_action * x_overwrite;
1140  bool x_info_details;
1141  bool x_display_treated;
1142  bool x_display_treated_only_dir;
1143  bool x_display_skipped;
1144  infinint x_pause;
1145  bool x_empty_dir;
1146  compression x_compr_algo;
1147  U_I x_compression_level;
1148  infinint x_file_size;
1149  infinint x_first_file_size;
1150  mask * x_ea_mask;
1151  std::string x_execute;
1152  crypto_algo x_crypto;
1153  secu_string x_pass;
1154  U_32 x_crypto_size;
1155  std::vector<std::string> x_gnupg_recipients;
1156  std::vector<std::string> x_gnupg_signatories;
1157  mask * x_compr_mask;
1158  infinint x_min_compr_size;
1159  bool x_empty;
1160  bool x_keep_compressed;
1161  std::string x_slice_permission;
1162  std::string x_slice_user_ownership;
1163  std::string x_slice_group_ownership;
1164  bool x_decremental;
1165  bool x_sequential_marks;
1166  infinint x_sparse_file_min_size;
1167  std::string x_user_comment;
1168  hash_algo x_hash;
1169  infinint x_slice_min_digits;
1170  std::shared_ptr<entrepot> x_entrepot;
1171  fsa_scope x_scope;
1172  bool x_multi_threaded;
1173  bool x_delta_signature;
1174  mask *x_delta_mask;
1175  bool has_delta_mask_been_set;
1176  infinint x_delta_sig_min_size;
1177  infinint x_iteration_count;
1178  hash_algo x_kdf_hash;
1179  delta_sig_block_size x_sig_block_len;
1180 
1181  void destroy() noexcept;
1182  void copy_from(const archive_options_merge & ref);
1183  void move_from(archive_options_merge && ref) noexcept;
1184  void nullifyptr() noexcept;
1185  };
1186 
1187 
1191 
1194  {
1195  public:
1196  enum t_dirty { dirty_ignore, dirty_warn, dirty_ok };
1197 
1198  archive_options_extract() { nullifyptr(); clear(); };
1199  archive_options_extract(const archive_options_extract & ref) { copy_from(ref); };
1200  archive_options_extract(archive_options_extract && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1201  archive_options_extract & operator = (const archive_options_extract & ref) { destroy(); copy_from(ref); return *this; };
1202  archive_options_extract & operator = (archive_options_extract && ref) noexcept { move_from(std::move(ref)); return *this; };
1203  ~archive_options_extract() { destroy(); };
1204 
1205  void clear();
1206 
1208  // setting methods
1209 
1211  void set_selection(const mask & selection);
1212 
1214  void set_subtree(const mask & subtree);
1215 
1217  void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
1218 
1225  void set_info_details(bool info_details) { x_info_details = info_details; };
1226 
1230  void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1231 
1233  void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1234 
1236  void set_ea_mask(const mask & ea_mask);
1237 
1239  void set_flat(bool flat) { x_flat = flat; };
1240 
1242  void set_what_to_check(comparison_fields what_to_check) { x_what_to_check = what_to_check; };
1243 
1245  void set_warn_remove_no_match(bool warn_remove_no_match) { x_warn_remove_no_match = warn_remove_no_match; };
1246 
1248  void set_empty(bool empty) { x_empty = empty; };
1249 
1251  void set_empty_dir(bool empty_dir) { x_empty_dir = empty_dir; };
1252 
1254 
1257  void set_dirty_behavior(bool ignore, bool warn) { x_dirty = ignore ? dirty_ignore : (warn ? dirty_warn : dirty_ok); };
1258 
1260  void set_dirty_behavior(t_dirty val) { x_dirty = val; };
1261 
1263  void set_overwriting_rules(const crit_action & over);
1264 
1266 
1268  void set_only_deleted(bool val) { x_only_deleted = val; };
1269 
1270 
1272 
1274  void set_ignore_deleted(bool val) { x_ignore_deleted = val; };
1275 
1277  void set_fsa_scope(const fsa_scope & scope) { x_scope = scope; };
1278 
1279 
1281  // getting methods
1282 
1283  const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
1284  const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
1285  bool get_warn_over() const { return x_warn_over; };
1286  bool get_info_details() const { return x_info_details; };
1287  bool get_display_treated() const { return x_display_treated; };
1288  bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1289  bool get_display_skipped() const { return x_display_skipped; };
1290  const mask & get_ea_mask() const { if(x_ea_mask == nullptr) throw SRC_BUG; return *x_ea_mask; };
1291  bool get_flat() const { return x_flat; };
1292  comparison_fields get_what_to_check() const { return x_what_to_check; };
1293  bool get_warn_remove_no_match() const { return x_warn_remove_no_match; };
1294  bool get_empty() const { return x_empty; };
1295  bool get_empty_dir() const { return x_empty_dir; };
1296  t_dirty get_dirty_behavior() const { return x_dirty; }
1297  const crit_action & get_overwriting_rules() const { if(x_overwrite == nullptr) throw SRC_BUG; return *x_overwrite; };
1298  bool get_only_deleted() const { return x_only_deleted; };
1299  bool get_ignore_deleted() const { return x_ignore_deleted; };
1300  const fsa_scope & get_fsa_scope() const { return x_scope; };
1301 
1302  private:
1303  mask * x_selection;
1304  mask * x_subtree;
1305  bool x_warn_over;
1306  bool x_info_details;
1307  bool x_display_treated;
1308  bool x_display_treated_only_dir;
1309  bool x_display_skipped;
1310  mask * x_ea_mask;
1311  bool x_flat;
1312  comparison_fields x_what_to_check;
1313  bool x_warn_remove_no_match;
1314  bool x_empty;
1315  bool x_empty_dir;
1316  t_dirty x_dirty;
1317  crit_action *x_overwrite;
1318  bool x_only_deleted;
1319  bool x_ignore_deleted;
1320  fsa_scope x_scope;
1321 
1322  void destroy() noexcept;
1323  void nullifyptr() noexcept;
1324  void copy_from(const archive_options_extract & ref);
1325  void move_from(archive_options_extract && ref) noexcept;
1326  };
1327 
1328 
1329 
1330 
1334 
1337  {
1338  public:
1339  archive_options_listing() { nullifyptr(); clear(); };
1340  archive_options_listing(const archive_options_listing & ref) { copy_from(ref); };
1341  archive_options_listing(archive_options_listing && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1342  archive_options_listing & operator = (const archive_options_listing & ref) { destroy(); copy_from(ref); return *this; };
1343  archive_options_listing & operator = (archive_options_listing && ref) noexcept { move_from(std::move(ref)); return *this; };
1344  virtual ~archive_options_listing() { destroy(); };
1345 
1346  virtual void clear();
1347 
1348 
1350  // setting methods
1351 
1353  void set_info_details(bool info_details) { x_info_details = info_details; };
1354 
1356 
1358  void set_selection(const mask & selection);
1359 
1361 
1363  void set_subtree(const mask & subtree);
1364 
1366  void set_filter_unsaved(bool filter_unsaved) { x_filter_unsaved = filter_unsaved; };
1367 
1369  void set_slicing_location(bool val) { x_slicing_location = val; };
1370 
1372 
1376  void set_user_slicing(const infinint & slicing_first, const infinint & slicing_others);
1377 
1379 
1381  void set_display_ea(bool display_ea) { x_display_ea = display_ea; };
1382 
1383 
1385  // getting methods
1386 
1387  bool get_info_details() const { return x_info_details; };
1388  const mask & get_selection() const;
1389  const mask & get_subtree() const;
1390  bool get_filter_unsaved() const { return x_filter_unsaved; };
1391  bool get_user_slicing(infinint & slicing_first, infinint & slicing_others) const;
1392  bool get_slicing_location() const { return x_slicing_location; };
1393  bool get_display_ea() const { return x_display_ea; };
1394 
1395  private:
1396  bool x_info_details;
1397  mask * x_selection;
1398  mask * x_subtree;
1399  bool x_filter_unsaved;
1400  infinint *x_slicing_first;
1401  infinint *x_slicing_others;
1402  bool x_slicing_location;
1403  bool x_display_ea;
1404 
1405  void destroy() noexcept;
1406  void nullifyptr() noexcept;
1407  void copy_from(const archive_options_listing & ref);
1408  void move_from(archive_options_listing && ref) noexcept;
1409  };
1410 
1414 
1415 
1416  class archive_options_diff
1417  {
1418  public:
1419  archive_options_diff() { nullifyptr(); clear(); };
1420  archive_options_diff(const archive_options_diff & ref) { copy_from(ref); };
1421  archive_options_diff(archive_options_diff && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1422  archive_options_diff & operator = (const archive_options_diff & ref) { destroy(); copy_from(ref); return *this; };
1423  archive_options_diff & operator = (archive_options_diff && ref) noexcept { move_from(std::move(ref)); return *this; };
1424  ~archive_options_diff() { destroy(); };
1425 
1426  void clear();
1427 
1429  // setting methods
1430 
1432  void set_selection(const mask & selection);
1433 
1435  void set_subtree(const mask & subtree);
1436 
1443  void set_info_details(bool info_details) { x_info_details = info_details; };
1444 
1448  void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1449 
1451  void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1452 
1454  void set_ea_mask(const mask & ea_mask);
1455 
1457  void set_what_to_check(comparison_fields what_to_check) { x_what_to_check = what_to_check; };
1458 
1460 
1463  void set_alter_atime(bool alter_atime)
1464  {
1465  if(x_furtive_read)
1466  x_old_alter_atime = alter_atime;
1467  else
1468  x_alter_atime = alter_atime;
1469  };
1470 
1473 
1475  void set_hourshift(const infinint & hourshift) { x_hourshift = hourshift; };
1476 
1478  void set_compare_symlink_date(bool compare_symlink_date) { x_compare_symlink_date = compare_symlink_date; };
1479 
1481  void set_fsa_scope(const fsa_scope & scope) { x_scope = scope; };
1482 
1483 
1485  // getting methods
1486 
1487  const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
1488  const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
1489  bool get_info_details() const { return x_info_details; };
1490  bool get_display_treated() const { return x_display_treated; };
1491  bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1492  bool get_display_skipped() const { return x_display_skipped; };
1493  const mask & get_ea_mask() const { if(x_ea_mask == nullptr) throw SRC_BUG; return *x_ea_mask; };
1494  comparison_fields get_what_to_check() const { return x_what_to_check; };
1495  bool get_alter_atime() const { return x_alter_atime; };
1496  bool get_furtive_read_mode() const { return x_furtive_read; };
1497  const infinint & get_hourshift() const { return x_hourshift; };
1498  bool get_compare_symlink_date() const { return x_compare_symlink_date; };
1499  const fsa_scope & get_fsa_scope() const { return x_scope; };
1500 
1501  private:
1502  mask * x_selection;
1503  mask * x_subtree;
1504  bool x_info_details;
1505  bool x_display_treated;
1506  bool x_display_treated_only_dir;
1507  bool x_display_skipped;
1508  mask * x_ea_mask;
1509  comparison_fields x_what_to_check;
1510  bool x_alter_atime;
1511  bool x_old_alter_atime;
1512  bool x_furtive_read;
1513  infinint x_hourshift;
1514  bool x_compare_symlink_date;
1515  fsa_scope x_scope;
1516 
1517  void destroy() noexcept;
1518  void nullifyptr() noexcept;
1519  void copy_from(const archive_options_diff & ref);
1520  void move_from(archive_options_diff && ref) noexcept;
1521  };
1522 
1523 
1524 
1525 
1529 
1532  {
1533  public:
1534  archive_options_test() { nullifyptr(); clear(); };
1535  archive_options_test(const archive_options_test & ref) { copy_from(ref); };
1536  archive_options_test(archive_options_test && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1537  archive_options_test & operator = (const archive_options_test & ref) { destroy(); copy_from(ref); return *this; };
1538  archive_options_test & operator = (archive_options_test && ref) noexcept { move_from(std::move(ref)); return *this; };
1539  ~archive_options_test() { destroy(); };
1540 
1541  void clear();
1542 
1544  // setting methods
1545 
1547  void set_selection(const mask & selection);
1548 
1550  void set_subtree(const mask & subtree);
1551 
1558  void set_info_details(bool info_details) { x_info_details = info_details; };
1559 
1561  void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1562 
1566  void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1567 
1569  void set_empty(bool empty) { x_empty = empty; };
1570 
1571 
1573  // getting methods
1574 
1575  const mask & get_selection() const { if(x_selection == nullptr) throw SRC_BUG; return *x_selection; };
1576  const mask & get_subtree() const { if(x_subtree == nullptr) throw SRC_BUG; return *x_subtree; };
1577  bool get_info_details() const { return x_info_details; };
1578  bool get_display_treated() const { return x_display_treated; };
1579  bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1580  bool get_display_skipped() const { return x_display_skipped; };
1581  bool get_empty() const { return x_empty; };
1582 
1583  private:
1584  mask * x_selection;
1585  mask * x_subtree;
1586  bool x_info_details;
1587  bool x_display_treated;
1588  bool x_display_treated_only_dir;
1589  bool x_display_skipped;
1590  bool x_empty;
1591 
1592  void destroy() noexcept;
1593  void nullifyptr() noexcept;
1594  void copy_from(const archive_options_test & ref);
1595  void move_from(archive_options_test && ref) noexcept;
1596  };
1597 
1598 
1602 
1605  {
1606  public:
1607  // default constructors and destructor.
1608 
1611  archive_options_repair(archive_options_repair && ref) noexcept { nullifyptr(); move_from(std::move(ref)); };
1612  archive_options_repair & operator = (const archive_options_repair & ref) { copy_from(ref); return *this; };
1613  archive_options_repair & operator = (archive_options_repair && ref) noexcept { move_from(std::move(ref)); return *this; };
1614  ~archive_options_repair() = default;
1615 
1617  // set back to default (this is the state just after the object is constructed
1618  // this method is to be used to reuse a given object
1619 
1621  void clear();
1622 
1623 
1625  // setting methods
1626 
1628  void set_allow_over(bool allow_over) { x_allow_over = allow_over; };
1629 
1631  void set_warn_over(bool warn_over) { x_warn_over = warn_over; };
1632 
1639  void set_info_details(bool info_details) { x_info_details = info_details; };
1640 
1645  void set_display_treated(bool display_treated, bool only_dir) { x_display_treated = display_treated; x_display_treated_only_dir = only_dir; };
1646 
1648  void set_display_skipped(bool display_skipped) { x_display_skipped = display_skipped; };
1649 
1651  void set_display_finished(bool display_finished) { x_display_finished = display_finished; };
1652 
1654  void set_pause(const infinint & pause) { x_pause = pause; };
1655 
1657 
1661  void set_slicing(const infinint & file_size, const infinint & first_file_size = 0)
1662  {
1663  x_file_size = file_size;
1664  if(first_file_size.is_zero())
1665  x_first_file_size = file_size;
1666  else
1667  x_first_file_size = first_file_size;
1668  };
1669 
1671 
1681  void set_execute(const std::string & execute) { x_execute = execute; };
1682 
1684  void set_crypto_algo(crypto_algo crypto) { x_crypto = crypto; };
1685 
1688  void set_crypto_pass(const secu_string & pass) { x_pass = pass; };
1689 
1691  void set_crypto_size(U_32 crypto_size) { x_crypto_size = crypto_size; };
1692 
1699  void set_gnupg_recipients(const std::vector<std::string> & gnupg_recipients) { x_gnupg_recipients = gnupg_recipients; };
1700 
1701 
1703  void set_gnupg_signatories(const std::vector<std::string> & gnupg_signatories) { x_gnupg_signatories = gnupg_signatories; };
1704 
1706  void set_empty(bool empty) { x_empty = empty; };
1707 
1709  void set_slice_permission(const std::string & slice_permission) { x_slice_permission = slice_permission; };
1710 
1712  void set_slice_user_ownership(const std::string & slice_user_ownership) { x_slice_user_ownership = slice_user_ownership; };
1713 
1715  void set_slice_group_ownership(const std::string & slice_group_ownership) { x_slice_group_ownership = slice_group_ownership; };
1716 
1718  void set_user_comment(const std::string & comment) { x_user_comment = comment; };
1719 
1723  void set_hash_algo(hash_algo hash) { x_hash = hash; };
1724 
1726  void set_slice_min_digits(infinint val) { x_slice_min_digits = val; };
1727 
1729  void set_entrepot(const std::shared_ptr<entrepot> & entr) { if(!entr) throw Erange("archive_options_repair::set_entrepot", "null entrepot pointer given in argument"); x_entrepot = entr; };
1730 
1732  void set_multi_threaded(bool val) { x_multi_threaded = val; };
1733 
1734 
1736  // getting methods
1737 
1738  bool get_allow_over() const { return x_allow_over; };
1739  bool get_warn_over() const { return x_warn_over; };
1740  bool get_info_details() const { return x_info_details; };
1741  bool get_display_treated() const { return x_display_treated; };
1742  bool get_display_treated_only_dir() const { return x_display_treated_only_dir; };
1743  bool get_display_skipped() const { return x_display_skipped; };
1744  bool get_display_finished() const { return x_display_finished; };
1745  const infinint & get_pause() const { return x_pause; };
1746  const infinint & get_slice_size() const { return x_file_size; };
1747  const infinint & get_first_slice_size() const { return x_first_file_size; };
1748  const std::string & get_execute() const { return x_execute; };
1749  crypto_algo get_crypto_algo() const { return x_crypto; };
1750  const secu_string & get_crypto_pass() const { return x_pass; };
1751  U_32 get_crypto_size() const { return x_crypto_size; };
1752  const std::vector<std::string> & get_gnupg_recipients() const { return x_gnupg_recipients; };
1753  const std::vector<std::string> & get_gnupg_signatories() const { return x_gnupg_signatories; };
1754  bool get_empty() const { return x_empty; };
1755  const std::string & get_slice_permission() const { return x_slice_permission; };
1756  const std::string & get_slice_user_ownership() const { return x_slice_user_ownership; };
1757  const std::string & get_slice_group_ownership() const { return x_slice_group_ownership; };
1758  const std::string & get_user_comment() const { return x_user_comment; };
1759  hash_algo get_hash_algo() const { return x_hash; };
1760  infinint get_slice_min_digits() const { return x_slice_min_digits; };
1761  const std::shared_ptr<entrepot> & get_entrepot() const { return x_entrepot; };
1762  bool get_multi_threaded() const { return x_multi_threaded; };
1763 
1764  private:
1765  bool x_allow_over;
1766  bool x_warn_over;
1767  bool x_info_details;
1768  bool x_display_treated;
1769  bool x_display_treated_only_dir;
1770  bool x_display_skipped;
1771  bool x_display_finished;
1772  infinint x_pause;
1773  infinint x_file_size;
1774  infinint x_first_file_size;
1775  std::string x_execute;
1776  crypto_algo x_crypto;
1777  secu_string x_pass;
1778  U_32 x_crypto_size;
1779  std::vector<std::string> x_gnupg_recipients;
1780  std::vector<std::string> x_gnupg_signatories;
1781  bool x_empty;
1782  std::string x_slice_permission;
1783  std::string x_slice_user_ownership;
1784  std::string x_slice_group_ownership;
1785  std::string x_user_comment;
1786  hash_algo x_hash;
1787  infinint x_slice_min_digits;
1788  std::shared_ptr<entrepot> x_entrepot;
1789  bool x_multi_threaded;
1790 
1791  void nullifyptr() noexcept {};
1792  void copy_from(const archive_options_repair & ref);
1793  void move_from(archive_options_repair && ref) noexcept;
1794  };
1795 
1797 
1798 } // end of namespace
1799 
1800 #endif
libdar::archive_options_merge::set_warn_over
void set_warn_over(bool warn_over)
defines whether a warning shall be issued before overwriting
Definition: archive_options.hpp:928
libdar::archive_options_read::set_ref_crypto_pass
void set_ref_crypto_pass(const secu_string &ref_pass)
defines the pass for the reference catalogue
Definition: archive_options.hpp:174
libdar::archive_options_isolate::set_gnupg_recipients
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
Definition: archive_options.hpp:763
libdar::hash_algo
hash_algo
hashing algorithm available
Definition: archive_aux.hpp:62
libdar::archive_options_isolate::set_crypto_algo
void set_crypto_algo(crypto_algo crypto)
cypher to use
Definition: archive_options.hpp:753
libdar::archive_options_create::set_entrepot
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use for slices
Definition: archive_options.hpp:489
libdar::archive_options_repair::set_slicing
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
Definition: archive_options.hpp:1661
libdar::archive_options_merge::set_slice_min_digits
void set_slice_min_digits(infinint val)
defines the minimum digit a slice must have concerning its number, zeros will be prepended as much as...
Definition: archive_options.hpp:1046
libdar::archive_options_create::set_crypto_size
void set_crypto_size(U_32 crypto_size)
set the size of the encryption by block to use
Definition: archive_options.hpp:384
libdar::archive_options_isolate::set_delta_signature
void set_delta_signature(bool val)
whether signature to base binary delta on the future has to be calculated and stored beside saved fil...
Definition: archive_options.hpp:799
libdar::archive_options_isolate::set_sig_block_len
void set_sig_block_len(delta_sig_block_size val)
block size to use to build delta signatures
Definition: archive_options.hpp:816
mask.hpp
here lies a collection of mask classes
libdar::archive_options_extract::set_display_treated
void set_display_treated(bool display_treated, bool only_dir)
Definition: archive_options.hpp:1230
libdar::archive_options_create::set_gnupg_signatories
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
the private keys matching the email of the provided list are used to sign the archive random key
Definition: archive_options.hpp:397
libdar::archive_options_create::set_warn_over
void set_warn_over(bool warn_over)
defines whether a warning shall be issued before overwriting
Definition: archive_options.hpp:311
libdar::compression
compression
the different compression algorithm available
Definition: compression.hpp:45
libdar::archive_options_create::set_delta_diff
void set_delta_diff(bool val)
whether binary delta has to be computed for differential/incremental backup
Definition: archive_options.hpp:500
libdar::archive_options_create::set_ea_mask
void set_ea_mask(const mask &ea_mask)
defines which Extended Attributes to save
libdar::archive_options_listing::set_info_details
void set_info_details(bool info_details)
whether output should be verbosed --> to be moved to shell output
Definition: archive_options.hpp:1353
libdar::archive_options_create::set_crypto_pass
void set_crypto_pass(const secu_string &pass)
Definition: archive_options.hpp:381
libdar::archive_options_create::set_what_to_check
void set_what_to_check(comparison_fields what_to_check)
set the fields to consider when comparing inodes with reference archive (see comparison_fields enumer...
Definition: archive_options.hpp:414
libdar::archive_options_create::set_sig_block_len
void set_sig_block_len(delta_sig_block_size val)
block size to use to build delta signatures
Definition: archive_options.hpp:533
libdar::archive_options_merge::set_slice_permission
void set_slice_permission(const std::string &slice_permission)
if not an empty string set the slice permission according to the octal value given.
Definition: archive_options.hpp:1022
libdar::archive_options_create::x_ref_arch
std::shared_ptr< archive > x_ref_arch
just contains the address of an existing object, no local copy of object is done here
Definition: archive_options.hpp:602
libdar::archive_options_isolate::set_info_details
void set_info_details(bool info_details)
whether the user needs detailed output of the operation
Definition: archive_options.hpp:714
libdar::archive_options_create::set_slice_group_ownership
void set_slice_group_ownership(const std::string &slice_group_ownership)
if not an empty string set the group ownership of slices accordingly
Definition: archive_options.hpp:456
libdar::archive_options_create::set_compression_level
void set_compression_level(U_I compression_level)
set the compression level (from 1 to 9)
Definition: archive_options.hpp:343
libdar::archive_options_merge::set_min_compr_size
void set_min_compr_size(const infinint &min_compr_size)
defines file size under which to never compress
Definition: archive_options.hpp:1013
libdar::archive_options_create::set_fixed_date
void set_fixed_date(const infinint &fixed_date)
whether to ignore any archive of reference and only save file which modification is more recent that ...
Definition: archive_options.hpp:447
libdar::archive_options_repair::set_slice_group_ownership
void set_slice_group_ownership(const std::string &slice_group_ownership)
if not an empty string set the group ownership of slices accordingly
Definition: archive_options.hpp:1715
libdar::archive_options_repair::set_info_details
void set_info_details(bool info_details)
Definition: archive_options.hpp:1639
libdar::archive_options_create::set_allow_over
void set_allow_over(bool allow_over)
defines whether overwritting is allowed or not
Definition: archive_options.hpp:308
libdar::archive_options_isolate::set_crypto_pass
void set_crypto_pass(const secu_string &pass)
password / passphrase to encrypt the data with (empty string for interactive question)
Definition: archive_options.hpp:756
libdar::archive_options_create::set_min_compr_size
void set_min_compr_size(const infinint &min_compr_size)
defines file size under which to never compress
Definition: archive_options.hpp:403
compression.hpp
compression parameters for API
libdar::archive_options_read::unset_external_catalogue
void unset_external_catalogue()
clear any reference to an external catalogue
libdar::archive_options_read::set_default_crypto_size
void set_default_crypto_size()
set the encryption block size to the default value
libdar::archive_options_read::set_ref_crypto_size
void set_ref_crypto_size(U_32 ref_crypto_size)
defines the crypto size for the reference catalogue
Definition: archive_options.hpp:177
libdar::archive_options_create::set_display_skipped
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
Definition: archive_options.hpp:328
libdar::archive_options_repair::set_display_treated
void set_display_treated(bool display_treated, bool only_dir)
Definition: archive_options.hpp:1645
integers.hpp
are defined here basic integer types that tend to be portable
libdar::archive_options_merge::set_slicing
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
Definition: archive_options.hpp:967
libdar::archive_options_create::set_furtive_read_mode
void set_furtive_read_mode(bool furtive_read)
whether to use furtive read mode (if activated, alter_atime() has no meaning/use)
libdar::archive_options_create::set_slice_user_ownership
void set_slice_user_ownership(const std::string &slice_user_ownership)
if not an empty string set the user ownership of slices accordingly
Definition: archive_options.hpp:453
libdar::archive_options_create::set_subtree
void set_subtree(const mask &subtree)
defines the directory and files to consider (this mask will be applied to the absolute path of files ...
libdar::archive_options_merge::set_compression
void set_compression(compression compr_algo)
set the compression algorithm to be used
Definition: archive_options.hpp:957
libdar::archive_options_create::set_display_finished
void set_display_finished(bool display_finished)
whether to display a summary for each completed directory with total saved data and compression ratio
Definition: archive_options.hpp:331
libdar::archive_options_create::set_ignored_as_symlink
void set_ignored_as_symlink(const std::set< std::string > &list)
provide a list of full path which if are symlinks will be considered as the inode they point to
Definition: archive_options.hpp:520
libdar::infinint
the arbitrary large positive integer class
Definition: real_infinint.hpp:61
libdar::archive_options_merge::set_entrepot
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use for slices
Definition: archive_options.hpp:1049
libdar::archive_options_create::set_user_comment
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
Definition: archive_options.hpp:471
libdar::archive_options_read::set_crypto_algo
void set_crypto_algo(crypto_algo val)
defines the the crypto cypher to use to read the archive (default is crypto_none)
Definition: archive_options.hpp:96
libdar::archive_options_merge::set_multi_threaded
void set_multi_threaded(bool val)
whether libdar is allowed to spawn several threads to possibily work faster on multicore CPU (require...
Definition: archive_options.hpp:1055
libdar::archive_options_isolate::set_execute
void set_execute(const std::string &execute)
command to execute after each slice creation
Definition: archive_options.hpp:750
libdar::archive_options_isolate::set_user_comment
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
Definition: archive_options.hpp:781
compile_time_features.hpp
nested namespace containing routines that give features activated at compile time
libdar::archive_options_merge::set_pause
void set_pause(const infinint &pause)
set a pause beteween slices. Set to zero does not pause at all, set to 1 makes libdar pauses each sli...
Definition: archive_options.hpp:951
libdar::archive_options_create::x_compr_mask
mask * x_compr_mask
points to a local copy of mask (must be allocated / releases by the archive_option_create objects)
Definition: archive_options.hpp:628
libdar::archive_options_create::set_exclude_by_ea
void set_exclude_by_ea(const std::string &ea_name)
Definition: archive_options.hpp:410
libdar::archive_options_repair::set_gnupg_recipients
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
Definition: archive_options.hpp:1699
libdar::archive_options_create::set_slice_permission
void set_slice_permission(const std::string &slice_permission)
if not an empty string set the slice permission according to the octal value given.
Definition: archive_options.hpp:450
libdar::archive_options_extract::set_warn_remove_no_match
void set_warn_remove_no_match(bool warn_remove_no_match)
whether a warning must be issue if a file to remove does not match the expected type of file
Definition: archive_options.hpp:1245
libdar::mask
the generic class, parent of all masks
Definition: mask.hpp:61
libdar::archive_options_read::set_header_only
void set_header_only(bool val)
whether we only read the archive header and exit
Definition: archive_options.hpp:201
libdar::archive_options_isolate::set_compression_level
void set_compression_level(U_I compression_level)
the compression level (from 1 to 9)
Definition: archive_options.hpp:723
libdar::archive_options_isolate::set_slice_group_ownership
void set_slice_group_ownership(const std::string &slice_group_ownership)
if not an empty string set the group ownership of slices accordingly
Definition: archive_options.hpp:778
libdar::archive_options_create::set_gnupg_recipients
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
set the list of recipients that will be able to read the archive
Definition: archive_options.hpp:393
libdar::archive_options_create::set_ignore_unknown_inode_type
void set_ignore_unknown_inode_type(bool val)
whether to ignore unknown inode types instead of issuing a warning
Definition: archive_options.hpp:486
libdar::archive_options_create::x_subtree
mask * x_subtree
points to a local copy of mask (must be allocated / releases by the archive_option_create objects)
Definition: archive_options.hpp:607
libdar::archive_options_extract::set_warn_over
void set_warn_over(bool warn_over)
defines whether a warning shall be issued before overwriting
Definition: archive_options.hpp:1217
libdar::compile_time::nodump
bool nodump() noexcept
returns whether nodump flag support has been activated at compilation time
libdar::archive_options_read::set_ref_slice_min_digits
void set_ref_slice_min_digits(infinint val)
defines the minim digit for slice number of the archive of reference (where the external catalogue is...
Definition: archive_options.hpp:195
libdar::archive_options_read::set_execute
void set_execute(const std::string &execute)
set the command to execute before reading each slice (empty string for no script)
Definition: archive_options.hpp:130
libdar::archive_options_merge::set_gnupg_recipients
void set_gnupg_recipients(const std::vector< std::string > &gnupg_recipients)
Definition: archive_options.hpp:1004
libdar::archive_options_isolate::set_iteration_count
void set_iteration_count(const infinint &val)
key derivation
Definition: archive_options.hpp:810
libdar::archive_options_read::set_ref_crypto_algo
void set_ref_crypto_algo(crypto_algo ref_crypto)
defines the crypto algo for the reference catalogue
Definition: archive_options.hpp:171
libdar::archive_options_merge::set_allow_over
void set_allow_over(bool allow_over)
defines whether overwritting is allowed or not
Definition: archive_options.hpp:925
libdar::archive_options_create::set_empty
void set_empty(bool empty)
whether to make a dry-run operation
Definition: archive_options.hpp:420
libdar::archive_options_merge::set_empty_dir
void set_empty_dir(bool empty_dir)
defines whether we need to store ignored directories as empty
Definition: archive_options.hpp:954
libdar::archive_options_read::set_lax
void set_lax(bool val)
defines whether any archive coherence error, system error or media error lead to the abortion of the ...
Definition: archive_options.hpp:140
libdar::archive_options_read::set_entrepot
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use to retrieve slices
Definition: archive_options.hpp:154
libdar::archive_options_isolate::set_slicing
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
Definition: archive_options.hpp:730
libdar::archive_options_merge::set_kdf_hash
void set_kdf_hash(hash_algo algo)
hash algo used for key derivation
Definition: archive_options.hpp:1076
libdar::archive_options_repair::set_crypto_size
void set_crypto_size(U_32 crypto_size)
set the size of the encryption by block to use
Definition: archive_options.hpp:1691
libdar::archive_options_create::set_info_details
void set_info_details(bool info_details)
defines whether the user needs detailed output of the operation
Definition: archive_options.hpp:319
libdar::archive_options_merge::set_sig_block_len
void set_sig_block_len(delta_sig_block_size val)
block size to use to build delta signatures
Definition: archive_options.hpp:1079
libdar::archive_options_extract::set_empty_dir
void set_empty_dir(bool empty_dir)
whether to restore directories where no file has been triggered for backup (no file/inode change,...
Definition: archive_options.hpp:1251
libdar::archive_options_extract::set_flat
void set_flat(bool flat)
whether to ignore directory structure and restore all files in the same directory
Definition: archive_options.hpp:1239
libdar::archive_options_repair::set_slice_user_ownership
void set_slice_user_ownership(const std::string &slice_user_ownership)
if not an empty string set the user ownership of slices accordingly
Definition: archive_options.hpp:1712
libdar::archive_options_create::set_execute
void set_execute(const std::string &execute)
set the command to execute after each slice creation
Definition: archive_options.hpp:374
libdar::archive_options_create::set_same_fs
void set_same_fs(bool same_fs)
whether to limit the backup to files located on the same filesystem as the directory taken as root of...
Definition: archive_options.hpp:438
libdar::archive_options_create::set_cache_directory_tagging
void set_cache_directory_tagging(bool cache_directory_tagging)
whether to consider the Cache Directory Tagging Standard
Definition: archive_options.hpp:444
libdar::archive_options_repair::set_multi_threaded
void set_multi_threaded(bool val)
whether libdar is allowed to spawn several threads to possibily work faster on multicore CPU (require...
Definition: archive_options.hpp:1732
libdar::archive_options_read::set_input_pipe
void set_input_pipe(const std::string &input_pipe)
set the name of the input pipe to read data from (when basename is set to "-")
Definition: archive_options.hpp:111
libdar::archive_options_create::set_hourshift
void set_hourshift(const infinint &hourshift)
ignore differences of at most this integer number of hours while looking for changes in dates
Definition: archive_options.hpp:417
libdar::archive_options_create::set_backup_hook
void set_backup_hook(const std::string &execute, const mask &which_files)
defines the backup hook for files
libdar::archive_options_repair::set_allow_over
void set_allow_over(bool allow_over)
defines whether overwritting is allowed or not
Definition: archive_options.hpp:1628
libdar::archive_options_test::set_empty
void set_empty(bool empty)
dry-run exectution if set to true
Definition: archive_options.hpp:1569
libdar::archive_options_create::set_delta_signature
void set_delta_signature(bool val)
whether signature to base binary delta on the future has to be calculated and stored beside saved fil...
Definition: archive_options.hpp:503
entrepot.hpp
defines the entrepot interface. Entrepot interface defines a generic way to interact with files (slic...
libdar::archive_options_create::set_delta_mask
void set_delta_mask(const mask &delta_mask)
whether to derogate to defaut delta file consideration while calculation delta signatures
libdar::archive_options_extract
class holding optional parameters used to extract files from an existing archive
Definition: archive_options.hpp:1193
libdar::archive_options_extract::set_what_to_check
void set_what_to_check(comparison_fields what_to_check)
fields to consider when comparing inodes with those on filesystem to determine if it is more recent (...
Definition: archive_options.hpp:1242
libdar::archive_options_create::set_selection
void set_selection(const mask &selection)
defines the filenames to only save (except directory) as those that match the given mask
libdar::archive_options_repair::set_pause
void set_pause(const infinint &pause)
set a pause beteween slices. Set to zero does not pause at all, set to 1 makes libdar pauses each sli...
Definition: archive_options.hpp:1654
libdar::archive_options_listing
class holding optional parameters used to list the contents of an existing archive
Definition: archive_options.hpp:1336
libdar::Ecompilation
exception used when a requested fearture has not beed activated at compilation time
Definition: erreurs.hpp:365
libdar::archive_options_merge::set_display_skipped
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
Definition: archive_options.hpp:948
delta_sig_block_size.hpp
structure used to define how to select block size for delta signature
libdar::archive_options_repair::set_empty
void set_empty(bool empty)
whether to make a dry-run operation
Definition: archive_options.hpp:1706
libdar::archive_options_extract::set_empty
void set_empty(bool empty)
defines whether we need to store ignored directories as empty
Definition: archive_options.hpp:1248
libdar::archive_options_read::set_crypto_size
void set_crypto_size(U_32 crypto_size)
the encryption block size to use to decrypt
Definition: archive_options.hpp:102
libdar::delta_sig_block_size
defines how to calculate delta signature block size based of file size to delta sign
Definition: delta_sig_block_size.hpp:46
libdar::archive_options_create::set_sparse_file_min_size
void set_sparse_file_min_size(const infinint &size)
whether to try to detect sparse files
Definition: archive_options.hpp:465
mask_list.hpp
here lies a mask that selects files present in a given list
libdar::archive_options_repair
class holding optional parameters used to create an archive
Definition: archive_options.hpp:1604
libdar::archive_options_isolate::set_entrepot
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use for slices
Definition: archive_options.hpp:793
libdar::archive_options_create::set_reference
void set_reference(std::shared_ptr< archive > ref_arch)
set the archive to take as reference (nullptr for a full backup)
Definition: archive_options.hpp:299
libdar::archive_options_read::archive_options_read
archive_options_read(const archive_options_read &ref)
the copy constructor, assignment operator and destructor
Definition: archive_options.hpp:70
libdar::path
the class path is here to manipulate paths in the Unix notation: using'/'
Definition: path.hpp:50
libdar::archive_options_create::set_snapshot
void set_snapshot(bool snapshot)
whether to make an emtpy archive only referencing the current state of files in the filesystem
Definition: archive_options.hpp:441
libdar::archive_options_create::set_crypto_algo
void set_crypto_algo(crypto_algo crypto)
set the cypher to use
Definition: archive_options.hpp:377
libdar::archive_options_read::set_ignore_signature_check_failure
void set_ignore_signature_check_failure(bool val)
whether to warn (true) or ignore (false) signature failure (default is true)
Definition: archive_options.hpp:157
libdar::archive_options_extract::set_ignore_deleted
void set_ignore_deleted(bool val)
do not consider deleted files (if set, no inode will be removed)
Definition: archive_options.hpp:1274
libdar::archive_options_merge::set_execute
void set_execute(const std::string &execute)
set the command to execute after each slice creation
Definition: archive_options.hpp:990
libdar::archive_options_create::set_fsa_scope
void set_fsa_scope(const fsa_scope &scope)
defines the FSA (Filesystem Specific Attribute) to only consider (by default all FSA activated at com...
Definition: archive_options.hpp:492
libdar::archive_options_read
class holding optional parameters used to read an existing archive
Definition: archive_options.hpp:63
libdar::archive_options_merge::set_sparse_file_min_size
void set_sparse_file_min_size(const infinint &size)
whether to try to detect sparse files
Definition: archive_options.hpp:1037
libdar::archive_options_create::set_sequential_marks
void set_sequential_marks(bool sequential)
whether to add escape sequence aka tape marks to allow sequential reading of the archive
Definition: archive_options.hpp:462
libdar::archive_options_merge::set_empty
void set_empty(bool empty)
defines whether we do a dry-run execution
Definition: archive_options.hpp:1016
libdar::archive_options_extract::set_display_skipped
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
Definition: archive_options.hpp:1233
libdar::archive_options_repair::set_gnupg_signatories
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
the private keys matching the email of the provided list are used to sign the archive random key
Definition: archive_options.hpp:1703
secu_string.hpp
this file contains the definition of secu_string class, a std::string like class but allocated in sec...
libdar::archive_options_create::set_pause
void set_pause(const infinint &pause)
set a pause beteween slices. Set to zero does not pause at all, set to 1 makes libdar pauses each sli...
Definition: archive_options.hpp:334
libdar::archive_options_isolate::set_multi_threaded
void set_multi_threaded(bool val)
whether libdar is allowed to created several thread to work possibily faster on multicore CPU (requir...
Definition: archive_options.hpp:796
libdar::archive_options_create::set_slice_min_digits
void set_slice_min_digits(infinint val)
defines the minimum digit a slice must have concerning its number, zeros will be prepended as much as...
Definition: archive_options.hpp:480
archive_aux.hpp
set of datastructures used to interact with a catalogue object
libdar::archive_options_test
class holding optional parameters used to test the structure coherence of an existing archive
Definition: archive_options.hpp:1531
libdar::archive_options_repair::set_hash_algo
void set_hash_algo(hash_algo hash)
Definition: archive_options.hpp:1723
libdar::archive_options_merge::set_fsa_scope
void set_fsa_scope(const fsa_scope &scope)
defines the FSA (Filesystem Specific Attribute) to only consider (by default all FSA are considered)
Definition: archive_options.hpp:1052
libdar::archive_options_test::set_display_skipped
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
Definition: archive_options.hpp:1561
libdar::archive_options_merge
class holding optional parameters used to proceed to the merge operation
Definition: archive_options.hpp:900
libdar::archive_options_isolate::set_kdf_hash
void set_kdf_hash(hash_algo algo)
hash algo used for key derivation
Definition: archive_options.hpp:813
libdar::archive_options_create::set_slicing
void set_slicing(const infinint &file_size, const infinint &first_file_size=0)
define the archive slicing
Definition: archive_options.hpp:350
libdar::archive_options_read::set_info_details
void set_info_details(bool info_details)
defines whether the user needs detailed output of the operation
Definition: archive_options.hpp:133
libdar::archive_options_read::clear
void clear()
reset all the options to their default values
libdar::archive_options_isolate::set_sequential_marks
void set_sequential_marks(bool sequential)
whether to add escape sequence aka tape marks to allow sequential reading of the archive
Definition: archive_options.hpp:790
libdar::Erange
exception used to signal range error
Definition: erreurs.hpp:219
libdar::archive_options_create::set_retry_on_change
void set_retry_on_change(const infinint &count_max_per_file, const infinint &global_max_byte_overhead=0)
how much time to retry saving a file if it changed while being read
Definition: archive_options.hpp:459
libdar::archive_options_isolate::set_delta_sig_min_size
void set_delta_sig_min_size(const infinint &val)
Definition: archive_options.hpp:807
libdar::archive_options_read::set_external_catalogue
void set_external_catalogue(const path &ref_chem, const std::string &ref_basename)
defines whether or not to use the catalogue from an extracted catalogue (instead of the one embedded ...
Definition: archive_options.hpp:166
libdar::archive_options_create::set_empty_dir
void set_empty_dir(bool empty_dir)
defines whether we need to store ignored directories as empty
Definition: archive_options.hpp:337
libdar::compile_time::librsync
bool librsync() noexcept
returns whether delta compression is available and delta diff stuff with it
libdar::archive_options_repair::set_display_finished
void set_display_finished(bool display_finished)
whether to display a summary for each completed directory with total saved data and compression ratio
Definition: archive_options.hpp:1651
libdar::archive_options_create::x_ea_mask
mask * x_ea_mask
points to a local copy of mask (must be allocated / releases by the archive_option_create objects)
Definition: archive_options.hpp:621
libdar::archive_options_create::set_delta_sig_min_size
void set_delta_sig_min_size(const infinint &val)
whether to never calculate delta signature for files which size is smaller or equal to the given argu...
Definition: archive_options.hpp:511
libdar::comparison_fields
comparison_fields
how to consider file change during comparison and incremental backup
Definition: archive_aux.hpp:52
libdar::archive_options_create::x_selection
mask * x_selection
points to a local copy of mask (must be allocated / releases by the archive_option_create object)
Definition: archive_options.hpp:606
libdar::archive_options_merge::set_decremental_mode
void set_decremental_mode(bool mode)
if set to true use a merging mode suitable to build a decremental backup from two full backups (see N...
Definition: archive_options.hpp:1031
libdar::archive_options_isolate::set_slice_user_ownership
void set_slice_user_ownership(const std::string &slice_user_ownership)
if not an empty string set the user ownership of slices accordingly
Definition: archive_options.hpp:775
libdar::archive_options_test::set_display_treated
void set_display_treated(bool display_treated, bool only_dir)
Definition: archive_options.hpp:1566
libdar::archive_options_listing::set_display_ea
void set_display_ea(bool display_ea)
whether to fetch EA for listing
Definition: archive_options.hpp:1381
libdar::archive_options_create::set_security_check
void set_security_check(bool check)
whether to check for ctime changes since with the archive of reference
Definition: archive_options.hpp:468
libdar::archive_options_extract::set_dirty_behavior
void set_dirty_behavior(bool ignore, bool warn)
whether to restore dirty files (those that changed during backup), warn before restoring or ignoring ...
Definition: archive_options.hpp:1257
fsa_family.hpp
filesystem specific attributes available families and fsa_scope definition
libdar::archive_options_merge::set_info_details
void set_info_details(bool info_details)
defines whether the user needs detailed output of the operation
Definition: archive_options.hpp:939
libdar::archive_options_extract::set_fsa_scope
void set_fsa_scope(const fsa_scope &scope)
defines the FSA (Filesystem Specific Attribute) to only consider (by default all FSA activated at com...
Definition: archive_options.hpp:1277
libdar::archive_options_create::set_compression
void set_compression(compression compr_algo)
set the compression algorithm to be used
Definition: archive_options.hpp:340
libdar::compile_time::furtive_read
bool furtive_read() noexcept
returns whether libdar can support furtive read mode when run by privileged user
libdar::secu_string
class secu_string
Definition: secu_string.hpp:57
libdar::archive_options_create
class holding optional parameters used to create an archive
Definition: archive_options.hpp:275
libdar::archive_options_isolate::set_crypto_size
void set_crypto_size(U_32 crypto_size)
size of the encryption by block to use
Definition: archive_options.hpp:759
libdar::archive_options_isolate::set_hash_algo
void set_hash_algo(hash_algo hash)
specify whether to produce a hash file of the slice and which hash algo to use
Definition: archive_options.hpp:784
libdar::archive_options_repair::set_user_comment
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
Definition: archive_options.hpp:1718
libdar::archive_options_isolate::set_allow_over
void set_allow_over(bool allow_over)
whether overwritting is allowed
Definition: archive_options.hpp:708
libdar::crypto_algo
crypto_algo
the different cypher available for encryption (strong or weak)
Definition: crypto.hpp:49
libdar::archive_options_isolate::set_pause
void set_pause(const infinint &pause)
Pause beteween slices. Set to zero does not pause at all, set to 1 makes libdar pauses each slice,...
Definition: archive_options.hpp:717
libdar::archive_options_isolate::set_slice_permission
void set_slice_permission(const std::string &slice_permission)
if not an empty string set the slice permission according to the octal value given.
Definition: archive_options.hpp:772
libdar::archive_options_extract::set_dirty_behavior
void set_dirty_behavior(t_dirty val)
alternative method to modify dirty behavior
Definition: archive_options.hpp:1260
libdar::archive_options_merge::set_slice_user_ownership
void set_slice_user_ownership(const std::string &slice_user_ownership)
if not an empty string set the user ownership of slices accordingly
Definition: archive_options.hpp:1025
libdar::archive_options_extract::set_info_details
void set_info_details(bool info_details)
Definition: archive_options.hpp:1225
libdar::archive_options_merge::set_compression_level
void set_compression_level(U_I compression_level)
set the compression level (from 1 to 9)
Definition: archive_options.hpp:960
libdar::archive_options_repair::set_display_skipped
void set_display_skipped(bool display_skipped)
whether to display files that have been excluded by filters
Definition: archive_options.hpp:1648
libdar::archive_options_repair::set_slice_min_digits
void set_slice_min_digits(infinint val)
defines the minimum digit a slice must have concerning its number, zeros will be prepended as much as...
Definition: archive_options.hpp:1726
libdar::archive_options_read::set_ref_execute
void set_ref_execute(const std::string &ref_execute)
set the command to execute before reading each slice of the reference catalogue
Definition: archive_options.hpp:190
libdar::archive_options_merge::set_delta_signature
void set_delta_signature(bool val)
Definition: archive_options.hpp:1062
libdar::archive_options_repair::set_crypto_pass
void set_crypto_pass(const secu_string &pass)
Definition: archive_options.hpp:1688
libdar::archive_options_isolate::set_gnupg_signatories
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
the private keys matching the email of the provided list are used to sign the archive random key
Definition: archive_options.hpp:766
libdar::archive_options_create::set_iteration_count
void set_iteration_count(const infinint &val)
key derivation
Definition: archive_options.hpp:527
libdar::archive_options_create::set_nodump
void set_nodump(bool nodump)
defines whether to ignore files with the nodump flag set
Definition: archive_options.hpp:406
libdar::archive_options_merge::set_crypto_pass
void set_crypto_pass(const secu_string &pass)
Definition: archive_options.hpp:997
libdar::archive_options_create::set_compr_mask
void set_compr_mask(const mask &compr_mask)
defines files to compress
libdar::archive_options_repair::set_slice_permission
void set_slice_permission(const std::string &slice_permission)
if not an empty string set the slice permission according to the octal value given.
Definition: archive_options.hpp:1709
libdar::archive_options_create::set_modified_data_detection
void set_modified_data_detection(modified_data_detection val)
defines when to resave a file's data which inode metadata changed
Definition: archive_options.hpp:524
libdar::archive_options_merge::set_display_treated
void set_display_treated(bool display_treated, bool only_dir)
defines whether to show treated files
Definition: archive_options.hpp:945
libdar::archive_options_isolate::set_warn_over
void set_warn_over(bool warn_over)
whether a warning shall be issued before overwriting
Definition: archive_options.hpp:711
libdar::archive_options_isolate::set_empty
void set_empty(bool empty)
whether to make a dry-run operation
Definition: archive_options.hpp:769
libdar::archive_options_merge::set_user_comment
void set_user_comment(const std::string &comment)
specify a user comment in the archive (always in clear text!)
Definition: archive_options.hpp:1040
libdar::archive_options_isolate
class holding optional parameters used to isolate an existing archive
Definition: archive_options.hpp:691
libdar::archive_options_isolate::set_compression
void set_compression(compression algo)
the compression algorithm used
Definition: archive_options.hpp:720
libdar::archive_options_create::clear
void clear()
reset all the options to their default values
libdar::archive_options_isolate::set_slice_min_digits
void set_slice_min_digits(infinint val)
defines the minimum digit a slice must have concerning its number, zeros will be prepended as much as...
Definition: archive_options.hpp:787
libdar::archive_options_listing::set_slicing_location
void set_slicing_location(bool val)
whether to calculate the slice location of each file
Definition: archive_options.hpp:1369
libdar::archive_options_create::set_kdf_hash
void set_kdf_hash(hash_algo algo)
hash algo used for key derivation
Definition: archive_options.hpp:530
libdar::archive_options_create::set_hash_algo
void set_hash_algo(hash_algo hash)
specify whether to produce a hash file of the slice and which hash algo to use
Definition: archive_options.hpp:477
libdar::archive_options_read::set_crypto_pass
void set_crypto_pass(const secu_string &pass)
defines the password or passphrase to decrypt (unused if encryption is not set)
Definition: archive_options.hpp:99
libdar::archive_options_read::set_multi_threaded
void set_multi_threaded(bool val)
whether libdar is allowed to create several thread to work possilbiy faster on multicore CPU (need li...
Definition: archive_options.hpp:160
crypto.hpp
the crypto algoritm definition
libdar::archive_options_create::set_auto_zeroing_neg_dates
void set_auto_zeroing_neg_dates(bool val)
whether to automatically zeroing negative dates read from the filesystem (just warn,...
Definition: archive_options.hpp:514
libdar::archive_options_repair::set_execute
void set_execute(const std::string &execute)
set the command to execute after each slice creation
Definition: archive_options.hpp:1681
libdar::delta_sig_block_size::check
void check() const
check the sanity of the provided values
libdar::archive_options_read::archive_options_read
archive_options_read()
build an object and set options to their default values
libdar::archive_options_create::x_old_alter_atime
bool x_old_alter_atime
used to backup origina alter_atime value when activating furtive read mode
Definition: archive_options.hpp:636
libdar::archive_options_listing::set_filter_unsaved
void set_filter_unsaved(bool filter_unsaved)
whether to only show entries that have their data fully saved
Definition: archive_options.hpp:1366
libdar::modified_data_detection
modified_data_detection
how to detect data has changed when some fields
Definition: archive_aux.hpp:43
libdar::archive_options_extract::set_only_deleted
void set_only_deleted(bool val)
only consider deleted files (if set, no data get restored)
Definition: archive_options.hpp:1268
libdar::archive_options_repair::set_warn_over
void set_warn_over(bool warn_over)
defines whether a warning shall be issued before overwriting
Definition: archive_options.hpp:1631
libdar::archive_options_merge::set_keep_compressed
void set_keep_compressed(bool keep_compressed)
make dar ignore the 'algo' argument and do not uncompress / compress files that are selected for merg...
Definition: archive_options.hpp:1019
libdar::archive_options_repair::set_entrepot
void set_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use for slices
Definition: archive_options.hpp:1729
libdar::archive_options_create::set_display_treated
void set_display_treated(bool display_treated, bool only_dir)
defines whether to show treated files
Definition: archive_options.hpp:325
libdar::archive_options_read::set_sequential_read
void set_sequential_read(bool val)
defines whether to try reading the archive sequentially (ala tar) or using the final catalogue
Definition: archive_options.hpp:146
libdar::archive_options_create::set_multi_threaded
void set_multi_threaded(bool val)
whether libdar is allowed to spawn several threads to possibily work faster on multicore CPU (require...
Definition: archive_options.hpp:495
libdar::archive_options_create::set_alter_atime
void set_alter_atime(bool alter_atime)
whether to alter atime or ctime in the filesystem when reading files to save
Definition: archive_options.hpp:426
libdar::archive_options_merge::set_gnupg_signatories
void set_gnupg_signatories(const std::vector< std::string > &gnupg_signatories)
the private keys matching the email of the provided list are used to sign the archive random key
Definition: archive_options.hpp:1007
libdar::archive_options_read::set_output_pipe
void set_output_pipe(const std::string &output_pipe)
set the name of the output pipe to send orders to (when basenale is set to "-")
Definition: archive_options.hpp:117
libdar::archive_options_merge::set_slice_group_ownership
void set_slice_group_ownership(const std::string &slice_group_ownership)
if not an empty string set the group ownership of slices accordingly
Definition: archive_options.hpp:1028
libdar::crit_action
the global action for overwriting
Definition: crit_action.hpp:80
libdar::archive_options_merge::set_delta_sig_min_size
void set_delta_sig_min_size(const infinint &val)
whether to never calculate delta signature for files which size is smaller or equal to the given argu...
Definition: archive_options.hpp:1070
libdar::archive_options_merge::set_iteration_count
void set_iteration_count(const infinint &val)
key derivation
Definition: archive_options.hpp:1073
crit_action.hpp
contains classes that let the user define the policy for overwriting files
libdar::archive_options_merge::set_crypto_size
void set_crypto_size(U_32 crypto_size)
set the size of the encryption by block to use
Definition: archive_options.hpp:1000
libdar::archive_options_test::set_info_details
void set_info_details(bool info_details)
Definition: archive_options.hpp:1558
libdar::archive_options_merge::set_sequential_marks
void set_sequential_marks(bool sequential)
whether to activate escape sequence aka tape marks to allow sequential reading of the archive
Definition: archive_options.hpp:1034
libdar::archive_options_repair::set_crypto_algo
void set_crypto_algo(crypto_algo crypto)
set the cypher to use
Definition: archive_options.hpp:1684
libdar::archive_options_merge::set_hash_algo
void set_hash_algo(hash_algo hash)
specify whether to produce a hash file of the slice and which hash algo to use
Definition: archive_options.hpp:1043
libdar::archive_options_merge::set_crypto_algo
void set_crypto_algo(crypto_algo crypto)
set the cypher to use
Definition: archive_options.hpp:993
libdar::archive_options_read::set_slice_min_digits
void set_slice_min_digits(infinint val)
defines the minimum digit a slice must have concerning its number, zeros will be prepended as much as...
Definition: archive_options.hpp:150
libdar::fsa_scope
std::set< fsa_family > fsa_scope
set of fsa families
Definition: fsa_family.hpp:70
libdar
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:46
libdar::archive_options_read::set_ref_entrepot
void set_ref_entrepot(const std::shared_ptr< entrepot > &entr)
defines the protocol to use to retrieve slices of the reference archive (where the external catalogue...
Definition: archive_options.hpp:198