sbuild::ChrootPlain Class Reference

A chroot located on a mounted filesystem. More...

#include <sbuild-chroot-plain.h>

Inheritance diagram for sbuild::ChrootPlain:

Inheritance graph
[legend]
Collaboration diagram for sbuild::ChrootPlain:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ChrootPlain ()
 The constructor.
 ChrootPlain (const keyfile &keyfile, const std::string &group)
 The constructor.
virtual ~ChrootPlain ()
 The destructor.
virtual Chrootclone () const
 Copy the chroot.
const std::string & get_location () const
 Get the directory location of the chroot.
void set_location (const std::string &location)
 Set the directory location of the chroot.
virtual const std::string & get_mount_location () const
 Get the mount location of the chroot.
virtual const std::string & get_chroot_type () const
 Get the type of the chroot.
virtual void setup_env (env_list &env)
 Set environment.
virtual void setup_lock (SetupType type, bool lock)
virtual SessionFlags get_session_flags () const
 Get the session flags of the chroot.
virtual void print_details (std::ostream &stream) const
 Print detailed information about the chroot to a stream.
virtual void print_config (std::ostream &stream) const
 Print the configuration group for a chroot in the format required by schroot.conf.

Private Member Functions

void read_keyfile (const keyfile &keyfile, const std::string &group)
 Read chroot configuration from a keyfile.

Private Attributes

std::string location
 The directory location of the chroot.

Detailed Description

A chroot located on a mounted filesystem.


Constructor & Destructor Documentation

ChrootPlain::ChrootPlain const keyfile keyfile,
const std::string &  group
 

The constructor.

Initialise from an open keyfile.

Parameters:
keyfile the configuration file
group the keyfile group (chroot name)


Member Function Documentation

Chroot * ChrootPlain::clone  )  const [virtual]
 

Copy the chroot.

This is a virtual copy constructor.

Returns:
a copy of the chroot.

Implements sbuild::Chroot.

const std::string & ChrootPlain::get_chroot_type  )  const [virtual]
 

Get the type of the chroot.

Returns:
the chroot type.

Implements sbuild::Chroot.

const std::string & ChrootPlain::get_location  )  const
 

Get the directory location of the chroot.

Returns:
the location.

const std::string & ChrootPlain::get_mount_location  )  const [virtual]
 

Get the mount location of the chroot.

Returns:
the mount location.

Reimplemented from sbuild::Chroot.

Chroot::SessionFlags ChrootPlain::get_session_flags  )  const [virtual]
 

Get the session flags of the chroot.

These determine how the Session controlling the chroot will operate.

Returns:
the session flags.

Implements sbuild::Chroot.

void ChrootPlain::print_config std::ostream &  stream  )  const [virtual]
 

Print the configuration group for a chroot in the format required by schroot.conf.

Parameters:
stream the stream to output to.
Todo:
Replace with proper serialisation code to stream to a keyfile.

Reimplemented from sbuild::Chroot.

void ChrootPlain::print_details std::ostream &  stream  )  const [virtual]
 

Print detailed information about the chroot to a stream.

The information is printed in plain text with one line per property.

Parameters:
stream the stream to output to.

Reimplemented from sbuild::Chroot.

void ChrootPlain::read_keyfile const keyfile keyfile,
const std::string &  group
[private]
 

Read chroot configuration from a keyfile.

Parameters:
keyfile the configuration file
group the keyfile group (chroot name)

Reimplemented from sbuild::Chroot.

void ChrootPlain::set_location const std::string &  location  ) 
 

Set the directory location of the chroot.

Parameters:
location the location.

void ChrootPlain::setup_env env_list &  env  )  [virtual]
 

Set environment.

Set the environment that the setup scripts will see during execution.

Parameters:
env the environment to set.

Reimplemented from sbuild::Chroot.


The documentation for this class was generated from the following files:
Generated on Thu Dec 29 17:20:05 2005 for schroot by  doxygen 1.4.5