Disk ARchive
2.4.2
|
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 // $Id: database_options.hpp,v 1.6.2.1 2011/06/20 14:02:03 edrusb Rel $ 00022 // 00023 /*********************************************************************/ 00024 00028 00029 #ifndef DATABASE_OPTIONS_HPP 00030 #define DATABASE_OPTIONS_HPP 00031 00032 #include "../my_config.h" 00033 00034 #include <string> 00035 #include <vector> 00036 00037 namespace libdar 00038 { 00039 00042 00043 00045 00046 class database_open_options 00047 { 00048 public: 00049 database_open_options() { x_partial = false; }; 00050 00051 // setings 00052 00054 00057 void set_partial(bool value) { x_partial = value; }; 00058 00059 00060 // gettings 00061 bool get_partial() const { return x_partial; }; 00062 00063 private: 00064 bool x_partial; 00065 00066 }; 00067 00069 00070 class database_dump_options 00071 { 00072 public: 00073 database_dump_options() { x_overwrite = false; }; 00074 00075 // settings 00076 00078 00081 void set_overwrite(bool value) { x_overwrite = value; }; 00082 00083 // gettings 00084 bool get_overwrite() const { return x_overwrite; }; 00085 00086 private: 00087 bool x_overwrite; 00088 }; 00089 00091 00092 class database_add_options 00093 { 00094 public: 00095 database_add_options() {}; 00096 }; 00097 00099 00100 class database_remove_options 00101 { 00102 public: 00103 database_remove_options() { x_revert_archive_numbering = false; }; 00104 00106 void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; }; 00107 00108 bool get_revert_archive_numbering() const { return x_revert_archive_numbering; }; 00109 00110 private: 00111 bool x_revert_archive_numbering; 00112 00113 }; 00114 00116 00117 class database_change_basename_options 00118 { 00119 public: 00120 database_change_basename_options() { x_revert_archive_numbering = false; }; 00121 00123 void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; }; 00124 00125 bool get_revert_archive_numbering() const { return x_revert_archive_numbering; }; 00126 00127 private: 00128 bool x_revert_archive_numbering; 00129 00130 }; 00131 00132 00134 00135 class database_change_path_options 00136 { 00137 public: 00138 database_change_path_options() { x_revert_archive_numbering = false; }; 00139 00141 void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; }; 00142 00143 bool get_revert_archive_numbering() const { return x_revert_archive_numbering; }; 00144 00145 private: 00146 bool x_revert_archive_numbering; 00147 00148 }; 00149 00151 00152 class database_restore_options 00153 { 00154 public: 00155 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(); }; 00156 00157 // settings 00158 00159 00161 00165 00166 void set_early_release(bool value) { x_early_release = value; }; 00167 00169 00171 void set_info_details(bool value) { x_info_details = value; }; 00172 00174 00176 void set_extra_options_for_dar(const std::vector<std::string> & value) { x_extra_options_for_dar = value; }; 00177 00179 00180 void set_ignore_dar_options_in_database(bool mode) { x_ignore_dar_options_in_database = mode; }; 00181 00183 00186 void set_date(const infinint & value) { x_date = value; }; 00187 00189 00192 void set_even_when_removed(bool value) { x_even_when_removed = value; }; 00193 00194 00195 // gettings 00196 bool get_early_release() const { return x_early_release; }; 00197 bool get_info_details() const { return x_info_details; }; 00198 const std::vector<std::string> & get_extra_options_for_dar() const { return x_extra_options_for_dar; }; 00199 const infinint & get_date() const { return x_date; }; 00200 bool get_ignore_dar_options_in_database() const { return x_ignore_dar_options_in_database; }; 00201 bool get_even_when_removed() const { return x_even_when_removed; }; 00202 00203 private: 00204 bool x_early_release; 00205 bool x_info_details; 00206 std::vector<std::string> x_extra_options_for_dar; 00207 infinint x_date; 00208 bool x_ignore_dar_options_in_database; 00209 bool x_even_when_removed; 00210 }; 00211 00212 00214 00215 class database_used_options 00216 { 00217 public: 00218 database_used_options() { x_revert_archive_numbering = false; }; 00219 00221 void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; }; 00222 00223 bool get_revert_archive_numbering() const { return x_revert_archive_numbering; }; 00224 00225 private: 00226 bool x_revert_archive_numbering; 00227 00228 }; 00229 00230 00232 00233 00234 } // end of namespace 00235 #endif