schroot-options.h

Go to the documentation of this file.
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       };
00050 
00057     Options(int   argc,
00058             char *argv[]);
00059 
00061     virtual ~Options();
00062 
00064     action_type          action;
00066     sbuild::string_list  chroots;
00068     sbuild::string_list  command;
00070     std::string          user;
00072     bool                 preserve;
00074     bool                 quiet;
00076     bool                 verbose;
00078     bool                 all;
00080     bool                 all_chroots;
00082     bool                 all_sessions;
00084     bool                 load_chroots;
00086     bool                 load_sessions;
00088     bool                 session_force;
00089 
00090   private:
00097     void
00098     set_action (action_type action);
00099 
00106     bool
00107     all_used() const
00108     {
00109       return (this->all || this->all_chroots || this->all_sessions);
00110     }
00111 
00112   };
00113 
00114 }
00115 
00116 #endif /* SCHROOT_OPTIONS_H */
00117 
00118 /*
00119  * Local Variables:
00120  * mode:C++
00121  * End:
00122  */
00123 

Generated on Mon Jan 30 13:22:57 2006 for schroot by  doxygen 1.4.6