Disk ARchive  2.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
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 // $Id: database_options.hpp,v 1.6.2.1 2011/06/20 14:02:03 edrusb Rel $
22 //
23 /*********************************************************************/
24 
28 
29 #ifndef DATABASE_OPTIONS_HPP
30 #define DATABASE_OPTIONS_HPP
31 
32 #include "../my_config.h"
33 
34 #include <string>
35 #include <vector>
36 
37 namespace libdar
38 {
39 
42 
43 
45 
47  {
48  public:
49  database_open_options() { x_partial = false; };
50 
51  // setings
52 
54 
57  void set_partial(bool value) { x_partial = value; };
58 
59 
60  // gettings
61  bool get_partial() const { return x_partial; };
62 
63  private:
64  bool x_partial;
65 
66  };
67 
69 
71  {
72  public:
73  database_dump_options() { x_overwrite = false; };
74 
75  // settings
76 
78 
81  void set_overwrite(bool value) { x_overwrite = value; };
82 
83  // gettings
84  bool get_overwrite() const { return x_overwrite; };
85 
86  private:
87  bool x_overwrite;
88  };
89 
91 
93  {
94  public:
96  };
97 
99 
101  {
102  public:
103  database_remove_options() { x_revert_archive_numbering = false; };
104 
106  void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
107 
108  bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
109 
110  private:
111  bool x_revert_archive_numbering;
112 
113  };
114 
116 
118  {
119  public:
120  database_change_basename_options() { x_revert_archive_numbering = false; };
121 
123  void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
124 
125  bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
126 
127  private:
128  bool x_revert_archive_numbering;
129 
130  };
131 
132 
134 
136  {
137  public:
138  database_change_path_options() { x_revert_archive_numbering = false; };
139 
141  void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
142 
143  bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
144 
145  private:
146  bool x_revert_archive_numbering;
147 
148  };
149 
151 
153  {
154  public:
155  database_restore_options() { 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(); };
156 
157  // settings
158 
159 
161 
165 
166  void set_early_release(bool value) { x_early_release = value; };
167 
169 
171  void set_info_details(bool value) { x_info_details = value; };
172 
174 
176  void set_extra_options_for_dar(const std::vector<std::string> & value) { x_extra_options_for_dar = value; };
177 
179 
180  void set_ignore_dar_options_in_database(bool mode) { x_ignore_dar_options_in_database = mode; };
181 
183 
186  void set_date(const infinint & value) { x_date = value; };
187 
189 
192  void set_even_when_removed(bool value) { x_even_when_removed = value; };
193 
194 
195  // gettings
196  bool get_early_release() const { return x_early_release; };
197  bool get_info_details() const { return x_info_details; };
198  const std::vector<std::string> & get_extra_options_for_dar() const { return x_extra_options_for_dar; };
199  const infinint & get_date() const { return x_date; };
200  bool get_ignore_dar_options_in_database() const { return x_ignore_dar_options_in_database; };
201  bool get_even_when_removed() const { return x_even_when_removed; };
202 
203  private:
204  bool x_early_release;
205  bool x_info_details;
206  std::vector<std::string> x_extra_options_for_dar;
207  infinint x_date;
208  bool x_ignore_dar_options_in_database;
209  bool x_even_when_removed;
210  };
211 
212 
214 
216  {
217  public:
218  database_used_options() { x_revert_archive_numbering = false; };
219 
221  void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
222 
223  bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
224 
225  private:
226  bool x_revert_archive_numbering;
227 
228  };
229 
230 
232 
233 
234 } // end of namespace
235 #endif