20
20
#ifndef SCHROOT_OPTIONS_H
21
21
#define SCHROOT_OPTIONS_H
26
#include "sbuild-session.h"
27
#include "sbuild-types.h"
23
#include <schroot/schroot-options-base.h>
33
29
* schroot command-line options.
31
class options : public options_base
38
/// The action to perform.
41
ACTION_SESSION_AUTO, ///< Begin, run and end a session.
42
ACTION_SESSION_BEGIN, ///< Begin a session.
43
ACTION_SESSION_RECOVER, ///< Recover an existing session.
44
ACTION_SESSION_RUN, ///< Run an existing session.
45
ACTION_SESSION_END, ///< End an existing session.
46
ACTION_VERSION, ///< Display program version.
47
ACTION_LIST, ///< Display a list of chroots.
48
ACTION_INFO, ///< Display chroot information.
49
ACTION_LOCATION, ///< Display chroot location information.
50
ACTION_CONFIG ///< Display chroot configuration.
56
37
* @param argc the number of arguments.
57
38
* @param argv the list of arguments.
62
42
/// The destructor.
63
43
virtual ~options ();
65
/// The action to perform.
68
sbuild::string_list chroots;
69
/// Chroot to print path.
70
std::string chroot_path;
72
sbuild::string_list command;
75
/// Preserve environment.
81
/// Use all chroots and sessions.
91
/// Force session operations.
93
/// dchroot(1) compatibility mode.
98
* Set action. This detects if an action has already been set
99
* (only one action may be specified at once).
101
* @param action the action to set.
104
set_action (action_type action);
107
* Check if any of the --all options have been used.
109
* @returns true if any of the options have been used, otherwise
115
return (this->all || this->all_chroots || this->all_sessions);