Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

sbuild::chroot_facet_personality Class Reference

Chroot support for kernel personalities (execution domains). More...

#include <sbuild-chroot-facet-personality.h>

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

List of all members.

Public Types

typedef std::tr1::shared_ptr
< chroot_facet_personality
ptr
 A shared_ptr to a chroot facet object.
typedef std::tr1::shared_ptr
< const
chroot_facet_personality
const_ptr
 A shared_ptr to a const chroot facet object.

Public Member Functions

virtual ~chroot_facet_personality ()
 The destructor.
virtual chroot_facet::ptr clone () const
 Copy the chroot facet.
virtual std::string const & get_name () const
 Get the name of the chroot facet.
personality const & get_persona () const
 Get the process execution domain for the chroot.
void set_persona (personality const &persona)
 Set the process execution domain for the chroot.
virtual void setup_env (chroot const &chroot, environment &env) const
 Set environment.
virtual chroot::session_flags get_session_flags (chroot const &chroot) const
 Get the session flags of the chroot.
virtual void get_details (chroot const &chroot, format_detail &detail) const
 Get detailed information about the chroot for output.
virtual void get_keyfile (chroot const &chroot, keyfile &keyfile) const
 Copy the chroot properties into a keyfile.
virtual void set_keyfile (chroot &chroot, keyfile const &keyfile, string_list &used_keys)
 Set the chroot properties from a keyfile.

Static Public Member Functions

static ptr create ()
 Create a chroot facet.

Private Member Functions

 chroot_facet_personality ()
 The constructor.

Private Attributes

personality persona
 Process execution domain (Linux only).

Detailed Description

Chroot support for kernel personalities (execution domains).


Member Typedef Documentation

A shared_ptr to a const chroot facet object.

Reimplemented from sbuild::chroot_facet.

A shared_ptr to a chroot facet object.

Reimplemented from sbuild::chroot_facet.


Constructor & Destructor Documentation

chroot_facet_personality::chroot_facet_personality (  )  [private]

The constructor.

Referenced by clone(), and create().

chroot_facet_personality::~chroot_facet_personality (  )  [virtual]

The destructor.


Member Function Documentation

chroot_facet::ptr chroot_facet_personality::clone (  )  const [virtual]

Copy the chroot facet.

This is a virtual copy constructor.

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

Implements sbuild::chroot_facet.

References chroot_facet_personality().

chroot_facet_personality::ptr chroot_facet_personality::create (  )  [static]

Create a chroot facet.

Returns:
a shared_ptr to the new chroot facet.

References chroot_facet_personality().

Referenced by sbuild::chroot::chroot().

void chroot_facet_personality::get_details ( chroot const &  chroot,
format_detail detail 
) const [virtual]

Get detailed information about the chroot for output.

Parameters:
chroot the chroot to use.
detail the details to output to.

Implements sbuild::chroot_facet.

References sbuild::_(), sbuild::format_detail::add(), get_name(), and get_persona().

void chroot_facet_personality::get_keyfile ( chroot const &  chroot,
keyfile keyfile 
) const [virtual]

Copy the chroot properties into a keyfile.

The keyfile group with the name of the chroot will be set; if it already exists, it will be removed before setting it.

Parameters:
chroot the chroot to use.
keyfile the keyfile to use.

Implements sbuild::chroot_facet.

References sbuild::chroot::get_keyfile_name(), get_name(), get_persona(), and sbuild::basic_keyfile< K, P >::set_object_value().

std::string const & chroot_facet_personality::get_name (  )  const [virtual]

Get the name of the chroot facet.

Returns:
the chroot facet name.

Implements sbuild::chroot_facet.

Referenced by get_details(), and get_keyfile().

personality const & chroot_facet_personality::get_persona (  )  const

Get the process execution domain for the chroot.

Returns:
the personality.

References persona.

Referenced by get_details(), and get_keyfile().

chroot::session_flags chroot_facet_personality::get_session_flags ( chroot const &  chroot  )  const [virtual]

Get the session flags of the chroot.

These determine how the Session controlling the chroot will operate.

Parameters:
chroot the chroot to use.
Returns:
the session flags.

Implements sbuild::chroot_facet.

void chroot_facet_personality::set_keyfile ( chroot chroot,
keyfile const &  keyfile,
string_list used_keys 
) [virtual]

Set the chroot properties from a keyfile.

The chroot name must have previously been set, so that the correct keyfile group may be determined.

Parameters:
chroot the chroot to use.
keyfile the keyfile to get the properties from.
used_keys a list of the keys used will be set.

Implements sbuild::chroot_facet.

References sbuild::chroot::get_keyfile_name(), sbuild::basic_keyfile< K, P >::get_object_value(), and set_persona().

void chroot_facet_personality::set_persona ( personality const &  persona  ) 

Set the process execution domain for the chroot.

Parameters:
persona the personality.

Referenced by set_keyfile().

void chroot_facet_personality::setup_env ( chroot const &  chroot,
environment env 
) const [virtual]

Set environment.

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

Parameters:
chroot the chroot to use.
env the environment to set.

Implements sbuild::chroot_facet.


Member Data Documentation

Process execution domain (Linux only).

Referenced by get_persona().


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