Disk ARchive  2.6.1
Full featured and portable backup and archiving tool
archive_summary.hpp
Go to the documentation of this file.
1 /*********************************************************************/
2 // dar - disk archive - a backup/restoration program
3 // Copyright (C) 2002-2019 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 //
19 // to contact the author : http://dar.linux.free.fr/email.html
20 /*********************************************************************/
21 
25 
26 
27 #ifndef ARCHIVE_SUMMARY_HPP
28 #define ARCHIVE_SUMMARY_HPP
29 
30 #include "../my_config.h"
31 #include <string>
32 #include "infinint.hpp"
33 #include "entree_stats.hpp"
34 
35 namespace libdar
36 {
37 
40 
41 
43 
45  {
46  public:
47  archive_summary() { clear(); };
48  archive_summary(const archive_summary & ref) = default;
49  archive_summary(archive_summary && ref) noexcept = default;
50  archive_summary & operator = (const archive_summary & ref) = default;
51  archive_summary & operator = (archive_summary && ref) noexcept = default;
52  ~archive_summary() = default;
53 
54  // GETTINGS
55 
56  const infinint & get_slice_size() const { return slice_size; };
57  const infinint & get_first_slice_size() const { return first_slice_size; };
58  const infinint & get_last_slice_size() const { return last_slice_size; };
59  const infinint & get_slice_number() const { return slice_number; };
60  const infinint & get_archive_size() const { return archive_size; };
61  const infinint & get_catalog_size() const { return catalog_size; };
62  const infinint & get_storage_size() const { return storage_size; };
63  const infinint & get_data_size() const { return data_size; };
64  const entree_stats & get_contents() const { return contents; };
65  std::string get_edition() const { return edition; };
66  std::string get_compression_algo() const { return algo_zip; };
67  std::string get_user_comment() const { return user_comment; };
68  std::string get_cipher() const { return cipher; };
69  std::string get_asym() const { return asym; };
70  bool get_signed() const { return is_signed; };
71  bool get_tape_marks() const { return tape_marks; };
72 
73 
74  // SETTINGS
75 
76  void set_slice_size(const infinint & arg) { slice_size = arg; };
77  void set_first_slice_size(const infinint & arg) { first_slice_size = arg; };
78  void set_last_slice_size(const infinint & arg) { last_slice_size = arg; };
79  void set_slice_number(const infinint & arg) { slice_number = arg; };
80  void set_archive_size(const infinint & arg) { archive_size = arg; };
81  void set_catalog_size(const infinint & arg) { catalog_size = arg; };
82  void set_storage_size(const infinint & arg) { storage_size = arg; };
83  void set_data_size(const infinint & arg) { data_size = arg; };
84  void set_contents(const entree_stats & arg) { contents = arg; };
85  void set_edition(const std::string & arg) { edition = arg; };
86  void set_compression_algo(const std::string & arg) { algo_zip = arg; };
87  void set_user_comment(const std::string & arg) { user_comment = arg; };
88  void set_cipher(const std::string & arg) { cipher = arg; };
89  void set_asym(const std::string & arg) { asym = arg; };
90  void set_signed(bool arg) { is_signed = arg; };
91  void set_tape_marks(bool arg) { tape_marks = arg; };
92 
93  void clear();
94 
95  private:
105  std::string edition;
106  std::string algo_zip;
107  std::string user_comment;
108  std::string cipher;
109  std::string asym;
110  bool is_signed;
111  bool tape_marks;
112 
113  };
114 
115 } // end of namespace
116 
117 #endif
bool is_signed
whether the archive is signed
infinint slice_size
slice of the first slice or zero if not applicable
datastructure holding the nature of file present in a given archive
std::string cipher
encryption algorithm
holds the statistics contents of a catalogue
infinint storage_size
amount of byte used to store (compressed/encrypted) data
std::string algo_zip
compression algorithm
infinint archive_size
total size of the archive
infinint data_size
amount of data saved (once uncompressed/unciphered)
infinint slice_number
number of slices composing the archive of zero if unknown
entree_stats contents
nature of saved files
switch module to limitint (32 ou 64 bits integers) or infinint
bool tape_marks
whether the archive has tape marks (for sequential reading)
infinint first_slice_size
slice of the middle slices or zero if not applicable
std::string user_comment
user comment
the arbitrary large positive integer class
std::string asym
asymetrical encryption
infinint catalog_size
catalogue size if known, zero if not
infinint last_slice_size
slice of the last slice or zero if not applicable
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:46
std::string edition
archive format
the archive_summary class provides information about a given archive