sbuild Namespace Reference


Classes

class  auth_conv_tty
 Authentication conversation handler for terminal devices. More...
class  auth_conv
 Authentication conversation handler interface. More...
class  auth_message
 Authentication messages. More...
class  auth
 Authentication handler. More...
class  chroot_block_device
 A chroot stored on an unmounted block device. More...
class  chroot_config
 Chroot configuration. More...
class  chroot_file
 A chroot stored in a file archive (tar or zip). More...
class  chroot_lvm_snapshot
 A chroot stored on an LVM logical volume (LV). More...
class  chroot_plain
 A chroot located on a mounted filesystem. More...
class  chroot_source
 A chroot may offer a "source" chroot in addition to its normal "session" copy, to allow for maintenence of the source data. More...
class  chroot
 Common chroot data. More...
class  environment
 Container of environment variables. More...
class  runtime_error
 Generic runtime error. More...
class  runtime_error_custom
 Runtime error specific to a class. More...
class  keyfile
 Configuration file parser. More...
class  lock
 Advisory locking. More...
class  file_lock
 File lock. More...
class  device_lock
 Device lock. More...
class  basic_nbuf
 Null stream buffer. More...
class  basic_nostream
 Null output stream. More...
class  session
 Session handler. More...
class  sourcedeps
 Source dependencies. More...

Typedefs

typedef basic_nostream< char > nostream
 A null ostream.
typedef basic_nostream< wchar_t > wnostream
 A wide null ostream.
typedef std::vector< std::string > string_list
 A string vector.

Enumerations

enum  DebugLevel {
  DEBUG_NONE = -1, DEBUG_NOTICE = 1, DEBUG_INFO = 2, DEBUG_WARNING = 3,
  DEBUG_CRITICAL = 4
}
 Debugging level. More...

Functions

std::ostream & log_info ()
 Log an informational message.
std::ostream & log_warning ()
 Log a warning message.
std::ostream & log_error ()
 Log an error message.
std::ostream & log_debug (sbuild::DebugLevel level)
 Log a debug message.
std::ostream & log_debug (DebugLevel level)
 Log a debug message.
bool parse_value (std::string const &stringval, bool &value)
 Parse a boolean value.
bool parse_value (std::string const &stringval, std::string &value)
 Parse a string value.
template<typename T>
bool parse_value (std::string const &stringval, T &value)
 Parse a value.
std::string basename (std::string name, char separator= '/')
 Strip the directory path from a filename.
std::string dirname (std::string name, char separator= '/')
 Strip the fileame from a pathname.
std::string string_list_to_string (string_list const &list, std::string const &separator)
 Convert a string_list into a string.
string_list split_string (std::string const &value, char separator)
 Split a string into a string_list.
std::string find_program_in_path (std::string const &program, std::string const &path, std::string const &prefix)
 Find a program in the PATH search path.
char ** string_list_to_strv (string_list const &str)
 Create a string vector from a string_list.
void strv_delete (char **strv)
 Delete a string vector.

Variables

DebugLevel debug_level = sbuild::DEBUG_NONE
 The debugging level in use.
nostream cnull
 A null ostream.


Typedef Documentation

typedef basic_nostream<char> sbuild::nostream
 

A null ostream.

typedef std::vector<std::string> sbuild::string_list
 

A string vector.

typedef basic_nostream<wchar_t> sbuild::wnostream
 

A wide null ostream.


Enumeration Type Documentation

enum sbuild::DebugLevel
 

Debugging level.

Enumerator:
DEBUG_NONE  No debugging.
DEBUG_NOTICE  Notification messages.
DEBUG_INFO  Informational messages.
DEBUG_WARNING  Warning messages.
DEBUG_CRITICAL  Critical messages.


Function Documentation

std::string sbuild::basename std::string  name,
char  separator = '/'
 

Strip the directory path from a filename.

This is similar to basename(3).

Parameters:
name the filename to strip of its path.
separator the separation delimiting directories.
Returns:
the base name.

std::string sbuild::dirname std::string  name,
char  separator = '/'
 

Strip the fileame from a pathname.

This is similar to dirname(3).

Parameters:
name the path to strip of its filename.
separator the separation delimiting directories.
Returns:
the directory name.

std::string sbuild::find_program_in_path std::string const &  program,
std::string const &  path,
std::string const &  prefix
 

Find a program in the PATH search path.

Parameters:
program the program to search for.
path the search path; typically the value of $PATH.
prefix a directory prefix the add to the search path. This may be left empty to search the root filesystem.
Returns:
the absolute path of the program, or an empty string if the program could not be found.

std::ostream& sbuild::log_debug DebugLevel  level  ) 
 

Log a debug message.

Parameters:
level the debug level of the message being logged.
Returns:
an ostream. This will be a valid stream if level is greater or equal to debug_level, or else a null stream will be returned, resulting in no output.

std::ostream& sbuild::log_debug DebugLevel  level  ) 
 

Log a debug message.

Parameters:
level the debug level of the message being logged.
Returns:
an ostream. This will be a valid stream if level is greater or equal to debug_level, or else a null stream will be returned, resulting in no output.

std::ostream & sbuild::log_error  ) 
 

Log an error message.

Returns:
an ostream.

std::ostream & sbuild::log_info  ) 
 

Log an informational message.

Returns:
an ostream.

std::ostream & sbuild::log_warning  ) 
 

Log a warning message.

Returns:
an ostream.

template<typename T>
bool sbuild::parse_value std::string const &  stringval,
T &  value
 

Parse a value.

Parameters:
stringval the string to parse.
value the variable to store the parsed value.
Returns:
true on success, false on failure.

Here is the call graph for this function:

bool sbuild::parse_value std::string const &  stringval,
std::string &  value
 

Parse a string value.

Parameters:
stringval the string to parse.
value the variable to store the parsed value.
Returns:
true on success, false on failure.

bool sbuild::parse_value std::string const &  stringval,
bool &  value
 

Parse a boolean value.

Parameters:
stringval the string to parse.
value the variable to store the parsed value.
Returns:
true on success, false on failure.
Todo:
Throw exception on parse failure.

string_list sbuild::split_string std::string const &  value,
char  separator
 

Split a string into a string_list.

The string is split using separator as a delimiter.

Parameters:
value the string to split.
separator the delimiting character.
Returns:
a string_list.

std::string sbuild::string_list_to_string string_list const &  list,
std::string const &  separator
 

Convert a string_list into a string.

The strings are concatenated using separator as a delimiter.

Parameters:
list the list to concatenate.
separator the delimiting character.
Returns:
a string.

char ** sbuild::string_list_to_strv string_list const &  str  ) 
 

Create a string vector from a string_list.

The strings in the vector, as well as the vector itself, are allocated with new, and should be freed as a whole with strv_delete.

Parameters:
str the string_list to use.

void sbuild::strv_delete char **  strv  ) 
 

Delete a string vector.

The strings in the vector, as well as the vector itself, must have been previously allocated with new, for example sbuild::environment::get_strv.

Parameters:
strv the string vector to delete.


Variable Documentation

sbuild::nostream sbuild::cnull
 

A null ostream.

sbuild::DebugLevel sbuild::debug_level = sbuild::DEBUG_NONE
 

The debugging level in use.


Generated on Sun Mar 19 12:08:49 2006 for schroot by  doxygen 1.4.6