Logo Search packages:      
Sourcecode: schroot version File versions  Download package

sbuild::chroot_source Class Reference

#include <sbuild-chroot-source.h>

Inheritance diagram for sbuild::chroot_source:

sbuild::chroot sbuild::chroot_file sbuild::chroot_lvm_snapshot

List of all members.


Detailed Description

A chroot may offer a "source" chroot in addition to its normal "session" copy, to allow for maintenence of the source data. This interface may be implemented by any chroot wishing to provide such functionality.

While this is effectively an interface, in practice this derives from sbuild::chroot, to allow setting and getting of data from a keyfile, including storing the keyfile options.

Chroot types implementing chroot_source should, at a minimum, implement clone_source(). This should create and return a source chroot, and must call clone_source_setup() to set up the source chroot.

Definition at line 43 of file sbuild-chroot-source.h.


Public Types

typedef runtime_error_custom
< chroot
error
 Exception type.
typedef std::tr1::shared_ptr
< chroot
ptr
 A shared_ptr to a chroot object.
enum  session_flags { SESSION_CREATE = 1 << 0 }
 Chroot session properties. More...
enum  setup_type {
  SETUP_START, SETUP_RECOVER, SETUP_STOP, EXEC_START,
  EXEC_STOP
}
 Type of setup to perform. More...

Public Member Functions

virtual ptr clone () const =0
virtual chroot::ptr clone_source () const =0
bool get_active () const
string_list const & get_aliases () const
virtual std::string const & get_chroot_type () const =0
string_list const & get_command_prefix () const
std::string const & get_description () const
string_list const & get_groups () const
virtual std::string const & get_location () const
virtual std::string const & get_mount_device () const
virtual std::string const & get_mount_location () const
std::string const & get_name () const
virtual std::string get_path () const
unsigned int get_priority () const
string_list const & get_root_groups () const
bool get_run_exec_scripts () const
bool get_run_setup_scripts () const
virtual session_flags get_session_flags () const =0
virtual string_list const & get_source_groups () const
virtual string_list const & get_source_root_groups () const
void set_active (bool active)
void set_aliases (string_list const &aliases)
void set_command_prefix (string_list const &command_prefix)
void set_description (std::string const &description)
void set_groups (string_list const &groups)
void set_mount_device (std::string const &device)
void set_mount_location (std::string const &location)
void set_name (std::string const &name)
void set_priority (unsigned int priority)
void set_root_groups (string_list const &groups)
void set_run_exec_scripts (bool run_exec_scripts)
void set_run_setup_scripts (bool run_setup_scripts)
virtual void set_source_groups (string_list const &groups)
virtual void set_source_root_groups (string_list const &groups)
void setup_env (environment &env)
virtual void setup_lock (setup_type type, bool lock)=0
virtual ~chroot_source ()
 The destructor.

Static Public Member Functions

static ptr create (std::string const &type)

Protected Member Functions

 chroot_source ()
 The constructor.
void clone_source_setup (chroot::ptr &clone) const
template<typename T>
format_detail< T > format_details (std::string const &name, T const &value) const
void get_keyfile (keyfile &keyfile) const
void print_details (std::ostream &stream) const
void set_keyfile (keyfile const &keyfile)
virtual void set_location (std::string const &location)
virtual void setup_session_info (bool start)

Private Attributes

string_list source_groups
 Groups allowed to access the source chroot.
string_list source_root_groups
 Groups allowed to access the source chroot as root.

Friends

class chroot
keyfileoperator<< (keyfile &keyfile, ptr const &rhs)
std::ostream & operator<< (std::ostream &stream, ptr const &rhs)
keyfile const & operator>> (keyfile const &keyfile, ptr &rhs)

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index