| Disk ARchive 2.8.1 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
archive_summary.hpp
Go to the documentation of this file.
1/*********************************************************************/
2// dar - disk archive - a backup/restoration program
3// Copyright (C) 2002-2025 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, see the AUTHOR file
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
44 class archive_summary
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_ref_slice_size() const { return ref_slice_size; };
60 const infinint & get_ref_first_slice_size() const { return ref_first_slice_size; };
61 const infinint & get_slice_number() const { return slice_number; };
62 const infinint & get_archive_size() const { return archive_size; };
63 const infinint & get_catalog_size() const { return catalog_size; };
64 const infinint & get_storage_size() const { return storage_size; };
65 const infinint & get_data_size() const { return data_size; };
66 const entree_stats & get_contents() const { return contents; };
67 const std::string & get_edition() const { return edition; };
68 const std::string & get_compression_algo() const { return algo_zip; };
69 const std::string & get_user_comment() const { return user_comment; };
70 const std::string & get_cipher() const { return cipher; };
71 const std::string & get_asym() const { return asym; };
72 bool get_signed() const { return is_signed; };
73 bool get_tape_marks() const { return tape_marks; };
74 const std::string & get_in_place() const { return in_place; };
75 const infinint & get_compression_block_size() const { return compr_block_size; };
76 const std::string & get_salt() const { return salt; };
77 const infinint & get_iteration_count() const { return iteration_count; };
78 const std::string & get_kdf_hash() const { return kdf_hash; };
79
80
81 // SETTINGS
82
83 void set_slice_size(const infinint & arg) { slice_size = arg; };
84 void set_first_slice_size(const infinint & arg) { first_slice_size = arg; };
85 void set_last_slice_size(const infinint & arg) { last_slice_size = arg; };
86 void set_ref_slice_size(const infinint & arg) { ref_slice_size = arg; };
87 void set_ref_first_slice_size(const infinint & arg) { ref_first_slice_size = arg; };
88 void set_slice_number(const infinint & arg) { slice_number = arg; };
89 void set_archive_size(const infinint & arg) { archive_size = arg; };
90 void set_catalog_size(const infinint & arg) { catalog_size = arg; };
91 void set_storage_size(const infinint & arg) { storage_size = arg; };
92 void set_data_size(const infinint & arg) { data_size = arg; };
93 void set_contents(const entree_stats & arg) { contents = arg; };
94 void set_edition(const std::string & arg) { edition = arg; };
95 void set_compression_algo(const std::string & arg) { algo_zip = arg; };
96 void set_user_comment(const std::string & arg) { user_comment = arg; };
97 void set_cipher(const std::string & arg) { cipher = arg; };
98 void set_asym(const std::string & arg) { asym = arg; };
99 void set_signed(bool arg) { is_signed = arg; };
100 void set_tape_marks(bool arg) { tape_marks = arg; };
101 void set_in_place(const std::string & arg) { in_place = arg; };
102 void set_compression_block_size(const infinint & arg) { compr_block_size = arg; };
103 void set_salt(const std::string & arg) { salt = arg; };
104 void set_iteration_count(const infinint & arg) { iteration_count = arg; };
105 void set_kdf_hash(const std::string & arg) { kdf_hash = arg; };
106
107 void clear();
108
109 private:
110 infinint slice_size;
111 infinint first_slice_size;
112 infinint last_slice_size;
113 infinint ref_slice_size;
114 infinint ref_first_slice_size;
115 infinint slice_number;
116 infinint archive_size;
117 infinint catalog_size;
118 infinint storage_size;
119 infinint data_size;
120 entree_stats contents;
121 std::string edition;
122 std::string algo_zip;
123 std::string user_comment;
124 std::string cipher;
125 std::string asym;
126 bool is_signed;
127 bool tape_marks;
128 std::string in_place;
129 infinint compr_block_size;
130 std::string salt;
131 infinint iteration_count;
132 std::string kdf_hash;
133 };
134
135} // end of namespace
136
137#endif
libdar::infinint
the arbitrary large positive integer class
Definition real_infinint.hpp:62
entree_stats.hpp
datastructure holding the nature of file present in a given archive
libdar::archive_summary::iteration_count
infinint iteration_count
iteration count for KDF routine
Definition archive_summary.hpp:131
libdar::archive_summary::salt
std::string salt
the salt
Definition archive_summary.hpp:130
libdar::archive_summary::is_signed
bool is_signed
whether the archive is signed
Definition archive_summary.hpp:126
libdar::archive_summary::edition
std::string edition
archive format
Definition archive_summary.hpp:121
libdar::archive_summary::archive_size
infinint archive_size
total size of the archive
Definition archive_summary.hpp:116
libdar::archive_summary::slice_size
infinint slice_size
slice of the middle slice or zero if not applicable
Definition archive_summary.hpp:110
libdar::archive_summary::last_slice_size
infinint last_slice_size
slice of the last slice or zero if not applicable
Definition archive_summary.hpp:112
libdar::archive_summary::user_comment
std::string user_comment
user comment
Definition archive_summary.hpp:123
libdar::archive_summary::in_place
std::string in_place
in_place path empty string if absent
Definition archive_summary.hpp:128
libdar::archive_summary::ref_first_slice_size
infinint ref_first_slice_size
slice of the first slice of the archive of reference
Definition archive_summary.hpp:114
libdar::archive_summary::contents
entree_stats contents
nature of saved files
Definition archive_summary.hpp:120
libdar::archive_summary::tape_marks
bool tape_marks
whether the archive has tape marks (for sequential reading)
Definition archive_summary.hpp:127
libdar::archive_summary::storage_size
infinint storage_size
amount of byte used to store (compressed/encrypted) data
Definition archive_summary.hpp:118
libdar::archive_summary::slice_number
infinint slice_number
number of slices composing the archive of zero if unknown
Definition archive_summary.hpp:115
libdar::archive_summary::cipher
std::string cipher
encryption algorithm
Definition archive_summary.hpp:124
libdar::archive_summary::data_size
infinint data_size
amount of data saved (once uncompressed/unciphered)
Definition archive_summary.hpp:119
libdar::archive_summary::ref_slice_size
infinint ref_slice_size
slice of the slice of the archive of reference
Definition archive_summary.hpp:113
libdar::archive_summary::algo_zip
std::string algo_zip
compression algorithm
Definition archive_summary.hpp:122
libdar::archive_summary::catalog_size
infinint catalog_size
catalogue size if known, zero if not
Definition archive_summary.hpp:117
libdar::archive_summary::first_slice_size
infinint first_slice_size
slice of the first slices or zero if not applicable
Definition archive_summary.hpp:111
libdar::archive_summary::kdf_hash
std::string kdf_hash
kdf hash algo
Definition archive_summary.hpp:132
libdar::archive_summary::compr_block_size
infinint compr_block_size
compression block size, or zero if stream compression is used
Definition archive_summary.hpp:129
libdar::archive_summary::asym
std::string asym
asymetrical encryption
Definition archive_summary.hpp:125
infinint.hpp
switch module to limitint (32 ou 64 bits integers) or infinint
my_config.h
include macro defined by the configure script and some specific additional ones
libdar
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47
libdar::entree_stats
holds the statistics contents of a catalogue
Definition entree_stats.hpp:49