00001 /* Copyright © 2005-2006 Roger Leigh <rleigh@debian.org> 00002 * 00003 * schroot is free software; you can redistribute it and/or modify it 00004 * under the terms of the GNU General Public License as published by 00005 * the Free Software Foundation; either version 2 of the License, or 00006 * (at your option) any later version. 00007 * 00008 * schroot is distributed in the hope that it will be useful, but 00009 * WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 * General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU General Public License 00014 * along with this program; if not, write to the Free Software 00015 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00016 * MA 02111-1307 USA 00017 * 00018 *********************************************************************/ 00019 00020 #ifndef SCHROOT_OPTIONS_H 00021 #define SCHROOT_OPTIONS_H 00022 00023 #include <string> 00024 #include <vector> 00025 00026 #include "sbuild-session.h" 00027 #include "sbuild-types.h" 00028 00029 namespace schroot 00030 { 00031 00035 class options 00036 { 00037 public: 00039 enum action_type 00040 { 00041 ACTION_SESSION_AUTO, 00042 ACTION_SESSION_BEGIN, 00043 ACTION_SESSION_RECOVER, 00044 ACTION_SESSION_RUN, 00045 ACTION_SESSION_END, 00046 ACTION_VERSION, 00047 ACTION_LIST, 00048 ACTION_INFO, 00049 ACTION_CONFIG 00050 }; 00051 00058 options (int argc, 00059 char *argv[]); 00060 00062 virtual ~options (); 00063 00065 action_type action; 00067 sbuild::string_list chroots; 00069 sbuild::string_list command; 00071 std::string user; 00073 bool preserve; 00075 bool quiet; 00077 bool verbose; 00079 bool all; 00081 bool all_chroots; 00083 bool all_sessions; 00085 bool load_chroots; 00087 bool load_sessions; 00089 bool session_force; 00090 00091 private: 00098 void 00099 set_action (action_type action); 00100 00107 bool 00108 all_used () const 00109 { 00110 return (this->all || this->all_chroots || this->all_sessions); 00111 } 00112 00113 }; 00114 00115 } 00116 00117 #endif /* SCHROOT_OPTIONS_H */ 00118 00119 /* 00120 * Local Variables: 00121 * mode:C++ 00122 * End: 00123 */ 00124