sbuild  1.6.10
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
sbuild::chroot_facet Class Referenceabstract

Common chroot data. More...

#include <sbuild-chroot-facet.h>

+ Inheritance diagram for sbuild::chroot_facet:
+ Collaboration diagram for sbuild::chroot_facet:

Public Types

typedef std::shared_ptr< chroot_facetptr
 A shared_ptr to a chroot facet object.
 
typedef std::shared_ptr< const chroot_facetconst_ptr
 A shared_ptr to a const chroot facet object.
 

Public Member Functions

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

Protected Member Functions

 chroot_facet ()
 The constructor.
 
void set_chroot (chroot &chroot)
 Set containing chroot. More...
 

Protected Attributes

chrootowner
 Chroot owning this facet.
 

Friends

class chroot
 

Detailed Description

Common chroot data.

This class contains all of the metadata associated with a single chroot, for all chroot types. This is the in-core representation of a chroot definition in the configuration file, and may be initialised directly from an open keyfile.

Member Function Documentation

virtual ptr sbuild::chroot_facet::clone ( ) const
pure virtual

Copy the chroot facet.

This is a virtual copy constructor.

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

Implemented in sbuild::chroot_facet_session, sbuild::chroot_facet_union, sbuild::chroot_facet_userdata, sbuild::chroot_facet_mountable, sbuild::chroot_facet_source_clonable, sbuild::chroot_facet_source, sbuild::chroot_facet_session_clonable, and sbuild::chroot_facet_personality.

Referenced by ~chroot_facet().

+ Here is the caller graph for this function:

virtual void sbuild::chroot_facet::get_details ( chroot const &  chroot,
format_detail detail 
) const
pure virtual

Get detailed information about the chroot for output.

Parameters
chrootthe chroot to use.
detailthe details to output to.

Implemented in sbuild::chroot_facet_source_clonable, sbuild::chroot_facet_union, sbuild::chroot_facet_session, sbuild::chroot_facet_mountable, sbuild::chroot_facet_session_clonable, sbuild::chroot_facet_personality, sbuild::chroot_facet_userdata, and sbuild::chroot_facet_source.

Referenced by ~chroot_facet().

+ Here is the caller graph for this function:

virtual void sbuild::chroot_facet::get_keyfile ( chroot const &  chroot,
keyfile keyfile 
) const
pure 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
chrootthe chroot to use.
keyfilethe keyfile to use.

Implemented in sbuild::chroot_facet_source_clonable, sbuild::chroot_facet_union, sbuild::chroot_facet_session, sbuild::chroot_facet_mountable, sbuild::chroot_facet_session_clonable, sbuild::chroot_facet_personality, sbuild::chroot_facet_userdata, and sbuild::chroot_facet_source.

Referenced by ~chroot_facet().

+ Here is the caller graph for this function:

virtual std::string const& sbuild::chroot_facet::get_name ( ) const
pure virtual
virtual chroot::session_flags sbuild::chroot_facet::get_session_flags ( chroot const &  chroot) const
pure virtual

Get the session flags of the chroot.

These determine how the Session controlling the chroot will operate.

Parameters
chrootthe chroot to use.
Returns
the session flags.

Implemented in sbuild::chroot_facet_source_clonable, sbuild::chroot_facet_union, sbuild::chroot_facet_session, sbuild::chroot_facet_mountable, sbuild::chroot_facet_session_clonable, sbuild::chroot_facet_personality, sbuild::chroot_facet_userdata, and sbuild::chroot_facet_source.

Referenced by ~chroot_facet().

+ Here is the caller graph for this function:

void sbuild::chroot_facet::set_chroot ( chroot chroot)
inlineprotected

Set containing chroot.

Parameters
chrootthe chroot containing this facet.

References owner.

virtual void sbuild::chroot_facet::set_keyfile ( chroot chroot,
keyfile const &  keyfile,
string_list used_keys 
)
pure 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
chrootthe chroot to use.
keyfilethe keyfile to get the properties from.
used_keysa list of the keys used will be set.

Implemented in sbuild::chroot_facet_source_clonable, sbuild::chroot_facet_union, sbuild::chroot_facet_session, sbuild::chroot_facet_mountable, sbuild::chroot_facet_session_clonable, sbuild::chroot_facet_personality, sbuild::chroot_facet_userdata, and sbuild::chroot_facet_source.

Referenced by ~chroot_facet().

+ Here is the caller graph for this function:

virtual void sbuild::chroot_facet::setup_env ( chroot const &  chroot,
environment env 
) const
pure virtual

Set environment.

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

Parameters
chrootthe chroot to use.
envthe environment to set.

Implemented in sbuild::chroot_facet_source_clonable, sbuild::chroot_facet_union, sbuild::chroot_facet_session, sbuild::chroot_facet_mountable, sbuild::chroot_facet_session_clonable, sbuild::chroot_facet_personality, sbuild::chroot_facet_userdata, and sbuild::chroot_facet_source.

Referenced by ~chroot_facet().

+ Here is the caller graph for this function:


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