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         ACTION_LOCATION,        
00050         ACTION_CONFIG           
00051       };
00052 
00059     options (int   argc,
00060              char *argv[]);
00061 
00063     virtual ~options ();
00064 
00066     action_type          action;
00068     sbuild::string_list  chroots;
00070     std::string          chroot_path;
00072     sbuild::string_list  command;
00074     std::string          user;
00076     bool                 preserve;
00078     bool                 quiet;
00080     bool                 verbose;
00082     bool                 all;
00084     bool                 all_chroots;
00086     bool                 all_sessions;
00088     bool                 load_chroots;
00090     bool                 load_sessions;
00092     bool                 session_force;
00094     bool                 dchroot_compat;
00095 
00096   private:
00103     void
00104     set_action (action_type action);
00105 
00112     bool
00113     all_used () const
00114     {
00115       return (this->all || this->all_chroots || this->all_sessions);
00116     }
00117 
00118   };
00119 
00120 }
00121 
00122 #endif /* SCHROOT_OPTIONS_H */
00123 
00124 /*
00125  * Local Variables:
00126  * mode:C++
00127  * End:
00128  */
00129 

Generated on Sun Mar 19 12:07:48 2006 for schroot by  doxygen 1.4.6