schroot_releaselock::main Class Reference

Frontend for schroot. More...

#include <schroot-releaselock-main.h>

Inheritance diagram for schroot_releaselock::main:

Inheritance graph
[legend]
Collaboration diagram for schroot_releaselock::main:

Collaboration graph
[legend]
List of all members.

Public Types

enum  error_code { DEVICE_NOTBLOCK, DEVICE_OWNED, DEVICE_RELEASE, DEVICE_STAT }
 Error codes. More...
typedef sbuild::custom_error<
error_code
error
 Exception type.

Public Member Functions

 main (options::ptr &options)
 The constructor.
virtual ~main ()
 The destructor.
virtual void action_releaselock ()
 Release lock.
virtual int run_impl ()
 Run the program.

Public Attributes

options::ptr opts
 The program options.

Detailed Description

Frontend for schroot.

This class is used to "run" schroot.

Definition at line 35 of file schroot-releaselock-main.h.


Member Typedef Documentation

typedef sbuild::custom_error<error_code> schroot_releaselock::main::error

Exception type.

Definition at line 48 of file schroot-releaselock-main.h.


Member Enumeration Documentation

enum schroot_releaselock::main::error_code

Error codes.

Enumerator:
DEVICE_NOTBLOCK  File is not a block device.
DEVICE_OWNED  Failed to release device lock (lock held by PID).
DEVICE_RELEASE  Failed to release device lock.
DEVICE_STAT  Failed to stat device.

Definition at line 39 of file schroot-releaselock-main.h.


Constructor & Destructor Documentation

main::main ( options::ptr options  ) 

The constructor.

Parameters:
options the command-line options to use.

Definition at line 70 of file schroot-releaselock-main.cc.

main::~main (  )  [virtual]

The destructor.

Reimplemented from schroot_base::main.

Definition at line 81 of file schroot-releaselock-main.cc.


Member Function Documentation

void main::action_releaselock (  )  [virtual]

Release lock.

Definition at line 86 of file schroot-releaselock-main.cc.

References DEVICE_NOTBLOCK, DEVICE_OWNED, DEVICE_RELEASE, DEVICE_STAT, sbuild::log_warning(), and opts.

Referenced by run_impl().

Here is the caller graph for this function:

int main::run_impl (  )  [virtual]

Run the program.

Returns:
0 on success, 1 on failure or the exit status of the chroot command.

Implements schroot_base::main.

Definition at line 110 of file schroot-releaselock-main.cc.

References schroot_base::main::action_help(), schroot_base::options::ACTION_HELP, action_releaselock(), schroot_releaselock::options::ACTION_RELEASELOCK, schroot_base::main::action_version(), and schroot_base::options::ACTION_VERSION.


Member Data Documentation

options::ptr schroot_releaselock::main::opts

The program options.

Definition at line 76 of file schroot-releaselock-main.h.

Referenced by action_releaselock().


The documentation for this class was generated from the following files:
Generated on Sun Jul 8 21:24:31 2007 for schroot by  doxygen 1.5.2