Disk ARchive  2.4.15
database_options.hpp
Go to the documentation of this file.
1 /*********************************************************************/
2 // dar - disk archive - a backup/restoration program
3 // Copyright (C) 2002-2052 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 #ifndef DATABASE_OPTIONS_HPP
27 #define DATABASE_OPTIONS_HPP
28 
29 #include "../my_config.h"
30 
31 #include <string>
32 #include <vector>
33 
34 namespace libdar
35 {
36 
39 
40 
42 
44  {
45  public:
46  database_open_options() { clear(); };
47 
48  void clear() { x_partial = false; x_partial_read_only = false; x_warn_order = true; };
49 
50  // setings
51 
53 
56  void set_partial(bool value) { x_partial = value; };
57 
58 
60 
63 
64  void set_partial_read_only(bool value) { x_partial_read_only = x_partial = value; };
65 
66 
68 
70  void set_warn_order(bool value) { x_warn_order = value; };
71 
72  // gettings
73  bool get_partial() const { return x_partial; };
74  bool get_partial_read_only() const { return x_partial_read_only; };
75  bool get_warn_order() const { return x_warn_order; };
76 
77  private:
78  bool x_partial;
79  bool x_partial_read_only;
80  bool x_warn_order;
81  };
82 
84 
86  {
87  public:
88  database_dump_options() { clear(); };
89 
90  void clear() { x_overwrite = false; };
91 
92  // settings
93 
95 
98  void set_overwrite(bool value) { x_overwrite = value; };
99 
100  // gettings
101  bool get_overwrite() const { return x_overwrite; };
102 
103  private:
104  bool x_overwrite;
105  };
106 
108 
110  {
111  public:
112  database_add_options() { clear(); };
113 
114  void clear() {};
115  };
116 
118 
120  {
121  public:
122  database_remove_options() { clear(); };
123 
124  void clear() { x_revert_archive_numbering = false; };
125 
127  void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
128 
129  bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
130 
131  private:
132  bool x_revert_archive_numbering;
133 
134  };
135 
137 
139  {
140  public:
141  database_change_basename_options() { clear(); };
142 
143  void clear() { x_revert_archive_numbering = false; };
144 
146  void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
147 
148  bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
149 
150  private:
151  bool x_revert_archive_numbering;
152 
153  };
154 
155 
157 
159  {
160  public:
161  database_change_path_options() { clear(); };
162 
163  void clear() { x_revert_archive_numbering = false; };
164 
166  void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
167 
168  bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
169 
170  private:
171  bool x_revert_archive_numbering;
172 
173  };
174 
176 
178  {
179  public:
180  database_restore_options() { clear(); };
181 
182  void clear() { x_early_release = x_info_details = x_ignore_dar_options_in_database = x_even_when_removed = false; x_date = 0; x_extra_options_for_dar.clear(); };
183 
184  // settings
185 
186 
188 
192 
193  void set_early_release(bool value) { x_early_release = value; };
194 
196 
198  void set_info_details(bool value) { x_info_details = value; };
199 
201 
203  void set_extra_options_for_dar(const std::vector<std::string> & value) { x_extra_options_for_dar = value; };
204 
206 
207  void set_ignore_dar_options_in_database(bool mode) { x_ignore_dar_options_in_database = mode; };
208 
210 
213  void set_date(const infinint & value) { x_date = value; };
214 
216 
219  void set_even_when_removed(bool value) { x_even_when_removed = value; };
220 
221 
222  // gettings
223  bool get_early_release() const { return x_early_release; };
224  bool get_info_details() const { return x_info_details; };
225  const std::vector<std::string> & get_extra_options_for_dar() const { return x_extra_options_for_dar; };
226  const infinint & get_date() const { return x_date; };
227  bool get_ignore_dar_options_in_database() const { return x_ignore_dar_options_in_database; };
228  bool get_even_when_removed() const { return x_even_when_removed; };
229 
230  private:
231  bool x_early_release;
232  bool x_info_details;
233  std::vector<std::string> x_extra_options_for_dar;
234  infinint x_date;
235  bool x_ignore_dar_options_in_database;
236  bool x_even_when_removed;
237  };
238 
239 
241 
243  {
244  public:
245  database_used_options() { clear(); };
246 
247  void clear() { x_revert_archive_numbering = false; };
248 
250  void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
251 
252  bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
253 
254  private:
255  bool x_revert_archive_numbering;
256 
257  };
258 
259 
261 
262 
263 } // end of namespace
264 #endif
options for file "used" in archive
options for changing a given archive's path
options to add an archive to base
void set_partial_read_only(bool value)
partial and read only option
void set_early_release(bool value)
early_release option
void set_even_when_removed(bool value)
find data or EA if they have been removed at the requested data
void set_partial(bool value)
partial option
options for changing a given archive's basename
options to remove an archive from the base
options to open a database
options to write a database to file
void set_revert_archive_numbering(bool revert)
defines whether the archive number is counted from the beginning or from the end of the database ...
void set_date(const infinint &value)
date option
void set_overwrite(bool value)
overwrite option
options for restoration from database
void set_ignore_dar_options_in_database(bool mode)
ignore options to dar embedded in the database
void set_info_details(bool value)
info_details option
the arbitrary large positive integer class
void set_revert_archive_numbering(bool revert)
defines whether the archive number is counted from the beginning or from the end of the database ...
void set_extra_options_for_dar(const std::vector< std::string > &value)
extra options to dar
void set_revert_archive_numbering(bool revert)
defines whether the archive number is counted from the beginning or from the end of the database ...
void set_revert_archive_numbering(bool revert)
defines whether the archive number is counted from the beginning or from the end of the database ...
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:43
void set_warn_order(bool value)
warning about file ordering in database