#include <schroot-main-base.h>
Inheritance diagram for schroot::main_base:


Public Types | |
| typedef sbuild::custom_error< error_code > | error |
| Exception type. | |
| CHROOTS_NOTFOUND | |
| Chroots not found. | |
| CHROOT_FILE | |
| No chroots are defined in .... | |
| CHROOT_FILE2 | |
| No chroots are defined in ... or .... | |
| CHROOT_NOTDEFINED | |
| The specified chroots are not defined. | |
| CHROOT_NOTFOUND | |
| Chroot not found. | |
| enum | error_code { CHROOTS_NOTFOUND, CHROOT_FILE, CHROOT_FILE2, CHROOT_NOTDEFINED, CHROOT_NOTFOUND } |
| Error codes. More... | |
Public Member Functions | |
| main_base (std::string const &program_name, std::string const &program_usage, options_base::ptr &options) | |
| The constructor. | |
| virtual | ~main_base () |
| The destructor. | |
| virtual void | action_list ()=0 |
| List chroots. | |
| virtual void | action_info () |
| Print detailed information about chroots. | |
| virtual void | action_location () |
| Print location of chroots. | |
| virtual void | action_config ()=0 |
| Dump configuration file for chroots. | |
Protected Member Functions | |
| virtual int | run_impl () |
| Run the program. | |
| virtual sbuild::string_list | get_chroot_options () |
| Get a list of chroots based on the specified options (--all, --chroot). | |
| virtual void | compat_check () |
| Check compatibility. | |
| virtual void | load_config () |
| Load configuration. | |
| virtual void | create_session (sbuild::session::operation sess_op)=0 |
| Create a session. | |
Protected Attributes | |
| options_base::ptr | options |
| The program options. | |
| sbuild::chroot_config::ptr | config |
| The chroot configuration. | |
| sbuild::string_list | chroots |
| The chroots to use. | |
| sbuild::session::ptr | session |
| The session. | |
This class is used to "run" schroot programs. This class contains functionality common to all schroot programs (schroot, dchroot, dchroot-dsa).
Exception type.
| main_base::main_base | ( | std::string const & | program_name, | |
| std::string const & | program_usage, | |||
| options_base::ptr & | options | |||
| ) |
The constructor.
| program_name | the program name. | |
| program_usage | the program usage message. | |
| options | the command-line options to use. |
Reimplemented in dchroot::main_base.
| main_base::~main_base | ( | ) | [virtual] |
| virtual void schroot::main_base::action_config | ( | ) | [pure virtual] |
| void main_base::action_info | ( | ) | [virtual] |
Print detailed information about chroots.
| virtual void schroot::main_base::action_list | ( | ) | [pure virtual] |
| void main_base::action_location | ( | ) | [virtual] |
| void main_base::compat_check | ( | ) | [protected, virtual] |
Check compatibility.
Does nothing, but derived classes may use it as they see fit.
Reimplemented in dchroot::main_base.
| virtual void schroot::main_base::create_session | ( | sbuild::session::operation | sess_op | ) | [protected, pure virtual] |
Create a session.
This sets the session member.
| sess_op | the session operation to perform. |
Implemented in schroot::main, dchroot::main, and dchroot_dsa::main.
| sbuild::string_list main_base::get_chroot_options | ( | ) | [protected, virtual] |
Get a list of chroots based on the specified options (--all, --chroot).
| void main_base::load_config | ( | ) | [protected, virtual] |
| int main_base::run_impl | ( | ) | [protected, virtual] |
Run the program.
This is the program-specific run method which must be implemented in a derived class.
Implements schroot_base::main.
sbuild::string_list schroot::main_base::chroots [protected] |
The chroots to use.
sbuild::chroot_config::ptr schroot::main_base::config [protected] |
The chroot configuration.
options_base::ptr schroot::main_base::options [protected] |
The program options.
sbuild::session::ptr schroot::main_base::session [protected] |
The session.
1.4.7