Disk ARchive  2.4.21
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 
65  void set_partial_read_only(bool value) { x_partial_read_only = value; if(value) x_partial = value; };
66 
67 
69 
71  void set_warn_order(bool value) { x_warn_order = value; };
72 
73  // gettings
74  bool get_partial() const { return x_partial; };
75  bool get_partial_read_only() const { return x_partial_read_only; };
76  bool get_warn_order() const { return x_warn_order; };
77 
78  private:
79  bool x_partial;
80  bool x_partial_read_only;
81  bool x_warn_order;
82  };
83 
85 
87  {
88  public:
89  database_dump_options() { clear(); };
90 
91  void clear() { x_overwrite = false; };
92 
93  // settings
94 
96 
99  void set_overwrite(bool value) { x_overwrite = value; };
100 
101  // gettings
102  bool get_overwrite() const { return x_overwrite; };
103 
104  private:
105  bool x_overwrite;
106  };
107 
109 
111  {
112  public:
113  database_add_options() { clear(); };
114 
115  void clear() {};
116  };
117 
119 
121  {
122  public:
123  database_remove_options() { clear(); };
124 
125  void clear() { x_revert_archive_numbering = false; };
126 
128  void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
129 
130  bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
131 
132  private:
133  bool x_revert_archive_numbering;
134 
135  };
136 
138 
140  {
141  public:
142  database_change_basename_options() { clear(); };
143 
144  void clear() { x_revert_archive_numbering = false; };
145 
147  void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
148 
149  bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
150 
151  private:
152  bool x_revert_archive_numbering;
153 
154  };
155 
156 
158 
160  {
161  public:
162  database_change_path_options() { clear(); };
163 
164  void clear() { x_revert_archive_numbering = false; };
165 
167  void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
168 
169  bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
170 
171  private:
172  bool x_revert_archive_numbering;
173 
174  };
175 
177 
179  {
180  public:
181  database_restore_options() { clear(); };
182 
183  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(); };
184 
185  // settings
186 
187 
189 
193 
194  void set_early_release(bool value) { x_early_release = value; };
195 
197 
199  void set_info_details(bool value) { x_info_details = value; };
200 
202 
204  void set_extra_options_for_dar(const std::vector<std::string> & value) { x_extra_options_for_dar = value; };
205 
207 
208  void set_ignore_dar_options_in_database(bool mode) { x_ignore_dar_options_in_database = mode; };
209 
211 
214  void set_date(const infinint & value) { x_date = value; };
215 
217 
220  void set_even_when_removed(bool value) { x_even_when_removed = value; };
221 
222 
223  // gettings
224  bool get_early_release() const { return x_early_release; };
225  bool get_info_details() const { return x_info_details; };
226  const std::vector<std::string> & get_extra_options_for_dar() const { return x_extra_options_for_dar; };
227  const infinint & get_date() const { return x_date; };
228  bool get_ignore_dar_options_in_database() const { return x_ignore_dar_options_in_database; };
229  bool get_even_when_removed() const { return x_even_when_removed; };
230 
231  private:
232  bool x_early_release;
233  bool x_info_details;
234  std::vector<std::string> x_extra_options_for_dar;
235  infinint x_date;
236  bool x_ignore_dar_options_in_database;
237  bool x_even_when_removed;
238  };
239 
240 
242 
244  {
245  public:
246  database_used_options() { clear(); };
247 
248  void clear() { x_revert_archive_numbering = false; };
249 
251  void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
252 
253  bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
254 
255  private:
256  bool x_revert_archive_numbering;
257 
258  };
259 
260 
262 
263 
264 } // end of namespace
265 #endif
options for file "used" in archive
options for changing a given archive&#39;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&#39;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