00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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
00123
00124
00125
00126
00127
00128
00129