Disk ARchive  2.4.12
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
database_options.hpp
Go to the documentation of this file.
00001 /*********************************************************************/
00002 // dar - disk archive - a backup/restoration program
00003 // Copyright (C) 2002-2052 Denis Corbin
00004 //
00005 // This program is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU General Public License
00007 // as published by the Free Software Foundation; either version 2
00008 // of the License, or (at your option) any later version.
00009 //
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018 //
00019 // to contact the author : http://dar.linux.free.fr/email.html
00020 /*********************************************************************/
00021 
00025 
00026 #ifndef DATABASE_OPTIONS_HPP
00027 #define DATABASE_OPTIONS_HPP
00028 
00029 #include "../my_config.h"
00030 
00031 #include <string>
00032 #include <vector>
00033 
00034 namespace libdar
00035 {
00036 
00039 
00040 
00042 
00043     class database_open_options
00044     {
00045     public:
00046         database_open_options() { clear(); };
00047 
00048         void clear() { x_partial = false; x_partial_read_only = false; x_warn_order = true; };
00049 
00050             // setings
00051 
00053 
00056         void set_partial(bool value) { x_partial = value; };
00057 
00058 
00060 
00063 
00064         void set_partial_read_only(bool value) { x_partial_read_only = x_partial = value; };
00065 
00066 
00068 
00070         void set_warn_order(bool value) { x_warn_order = value; };
00071 
00072             // gettings
00073         bool get_partial() const { return x_partial; };
00074         bool get_partial_read_only() const { return x_partial_read_only; };
00075         bool get_warn_order() const { return x_warn_order; };
00076 
00077     private:
00078         bool x_partial;
00079         bool x_partial_read_only;
00080         bool x_warn_order;
00081     };
00082 
00084 
00085     class database_dump_options
00086     {
00087     public:
00088         database_dump_options() { clear(); };
00089 
00090         void clear() { x_overwrite = false; };
00091 
00092             // settings
00093 
00095 
00098         void set_overwrite(bool value) { x_overwrite = value; };
00099 
00100             // gettings
00101         bool get_overwrite() const { return x_overwrite; };
00102 
00103     private:
00104         bool x_overwrite;
00105     };
00106 
00108 
00109     class database_add_options
00110     {
00111     public:
00112         database_add_options() { clear(); };
00113 
00114         void clear() {};
00115     };
00116 
00118 
00119     class database_remove_options
00120     {
00121     public:
00122         database_remove_options() { clear(); };
00123 
00124         void clear() { x_revert_archive_numbering = false; };
00125 
00127         void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
00128 
00129         bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
00130 
00131     private:
00132         bool x_revert_archive_numbering;
00133 
00134     };
00135 
00137 
00138     class database_change_basename_options
00139     {
00140     public:
00141         database_change_basename_options() { clear(); };
00142 
00143         void clear() { x_revert_archive_numbering = false; };
00144 
00146         void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
00147 
00148         bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
00149 
00150     private:
00151         bool x_revert_archive_numbering;
00152 
00153     };
00154 
00155 
00157 
00158     class database_change_path_options
00159     {
00160     public:
00161         database_change_path_options() { clear(); };
00162 
00163         void clear() { x_revert_archive_numbering = false; };
00164 
00166         void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
00167 
00168         bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
00169 
00170     private:
00171         bool x_revert_archive_numbering;
00172 
00173     };
00174 
00176 
00177     class database_restore_options
00178     {
00179     public:
00180         database_restore_options() { clear(); };
00181 
00182         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(); };
00183 
00184             // settings
00185 
00186 
00188 
00192 
00193         void set_early_release(bool value) { x_early_release = value; };
00194 
00196 
00198         void set_info_details(bool value) { x_info_details = value; };
00199 
00201 
00203         void set_extra_options_for_dar(const std::vector<std::string> & value) { x_extra_options_for_dar = value; };
00204 
00206 
00207         void set_ignore_dar_options_in_database(bool mode) { x_ignore_dar_options_in_database = mode; };
00208 
00210 
00213         void set_date(const infinint & value) { x_date = value; };
00214 
00216 
00219         void set_even_when_removed(bool value) { x_even_when_removed = value; };
00220 
00221 
00222             // gettings
00223         bool get_early_release() const { return x_early_release; };
00224         bool get_info_details() const { return x_info_details; };
00225         const std::vector<std::string> & get_extra_options_for_dar() const { return x_extra_options_for_dar; };
00226         const infinint & get_date() const { return x_date; };
00227         bool get_ignore_dar_options_in_database() const { return x_ignore_dar_options_in_database; };
00228         bool get_even_when_removed() const { return x_even_when_removed; };
00229 
00230     private:
00231         bool x_early_release;
00232         bool x_info_details;
00233         std::vector<std::string> x_extra_options_for_dar;
00234         infinint x_date;
00235         bool x_ignore_dar_options_in_database;
00236         bool x_even_when_removed;
00237     };
00238 
00239 
00241 
00242     class database_used_options
00243     {
00244     public:
00245         database_used_options() { clear(); };
00246 
00247         void clear() { x_revert_archive_numbering = false; };
00248 
00250         void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
00251 
00252         bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
00253 
00254     private:
00255         bool x_revert_archive_numbering;
00256 
00257     };
00258 
00259 
00261 
00262 
00263 } // end of namespace
00264 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines