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

archive_aux.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
27 #ifndef ARCHIVE_AUX_HPP
28 #define ARCHIVE_AUX_HPP
29
30 #include "../my_config.h"
31
32 #include "integers.hpp"
33 #include <string>
34
35 namespace libdar
36 {
37
40
42
43 enum class modified_data_detection
44 {
45 any_inode_change,
46 mtime_size,
47 };
48
49
51
52 enum class comparison_fields
53 {
54 all,
55 ignore_owner,
56 mtime,
57 inode_type
58 };
59
61
62 enum class hash_algo
63 {
64 none,
65 md5,
66 sha1,
67 sha512
68 };
69
71 extern std::string hash_algo_to_string(hash_algo algo);
72
74
78 extern bool string_to_hash_algo(const std::string & arg, hash_algo & val);
79
81 extern U_I hash_algo_to_gcrypt_hash(hash_algo algo);
82
84 extern unsigned char hash_algo_to_char(hash_algo algo);
85
87
89 extern hash_algo char_to_hash_algo(unsigned char arg);
90
92
93 } // end of namespace
94
95 #endif
libdar::hash_algo
hash_algo
hashing algorithm available
Definition: archive_aux.hpp:63
libdar::comparison_fields::ignore_owner
@ ignore_owner
consider any available field except ownership fields
libdar::hash_algo::sha1
@ sha1
SHA1 algorithm.
integers.hpp
are defined here basic integer types that tend to be portable
libdar::hash_algo_to_gcrypt_hash
U_I hash_algo_to_gcrypt_hash(hash_algo algo)
convert hash value to libgcrypt hash value
libdar::hash_algo::md5
@ md5
MD5 algorithm.
libdar::hash_algo::sha512
@ sha512
SHA-512 algorithm.
libdar::string_to_hash_algo
bool string_to_hash_algo(const std::string &arg, hash_algo &val)
convert string to hash algorithm
libdar::char_to_hash_algo
hash_algo char_to_hash_algo(unsigned char arg)
convert char to hash_algo
libdar::modified_data_detection::any_inode_change
@ any_inode_change
historical behavior, resave an inode on any metadata change
libdar::hash_algo::none
@ none
no hashing algorithm
libdar::comparison_fields::mtime
@ mtime
consider any available field except ownership and permission fields
libdar::hash_algo_to_char
unsigned char hash_algo_to_char(hash_algo algo)
convert hash value to char value
libdar::comparison_fields
comparison_fields
how to consider file change during comparison and incremental backup
Definition: archive_aux.hpp:53
libdar::comparison_fields::inode_type
@ inode_type
only consider the file type
libdar::comparison_fields::all
@ all
consider any available field for comparing inodes
libdar::hash_algo_to_string
std::string hash_algo_to_string(hash_algo algo)
convert hash value to human readable string
libdar::modified_data_detection::mtime_size
@ mtime_size
default behavior since release 2.6.0 resave only if file size of mtime changed
libdar::modified_data_detection
modified_data_detection
how to detect data has changed when some fields
Definition: archive_aux.hpp:44
libdar
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:47