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

virtual ~ChrootPlain ()
 The destructor.
virtual Chroot::chroot_ptr clone () const
 Copy the chroot.
std::string const & get_location () const
 Get the directory location of the chroot.
void set_location (std::string const &location)
 Set the directory location of the chroot.
virtual std::string const & get_mount_location () const
 Get the mount location of the chroot.
virtual std::string const & get_chroot_type () const
 Get the type of the chroot.
virtual void setup_env (environment &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.

Protected Member Functions

 ChrootPlain ()
 The constructor.
 ChrootPlain (keyfile const &keyfile, std::string const &group)
 The constructor.

Private Attributes

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

Friends

class Chroot

Detailed Description

A chroot located on a mounted filesystem.


Constructor & Destructor Documentation

ChrootPlain::ChrootPlain  )  [protected]
 

The constructor.

ChrootPlain::ChrootPlain keyfile const &  keyfile,
std::string const &  group
[protected]
 

The constructor.

Initialise from an open keyfile.

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

ChrootPlain::~ChrootPlain  )  [virtual]
 

The destructor.


Member Function Documentation

Chroot::chroot_ptr ChrootPlain::clone  )  const [virtual]
 

Copy the chroot.

This is a virtual copy constructor.

Returns:
a shared_ptr to the new copy of the chroot.

Implements sbuild::Chroot.

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

Get the type of the chroot.

Returns:
the chroot type.

Implements sbuild::Chroot.

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

Get the directory location of the chroot.

Returns:
the location.

std::string const & 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::set_location std::string const &  location  ) 
 

Set the directory location of the chroot.

Parameters:
location the location.

void ChrootPlain::setup_env environment 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.

void ChrootPlain::setup_lock SetupType  type,
bool  lock
[virtual]
 


Friends And Related Function Documentation

friend class Chroot [friend]
 


Member Data Documentation

std::string sbuild::ChrootPlain::location [private]
 

The directory location of the chroot.


The documentation for this class was generated from the following files:
Generated on Mon Jan 30 13:23:56 2006 for schroot by  doxygen 1.4.6