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_directory |
A chroot located in the filesystem. 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 in the filesystem (mounts disabled). 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 | custom_error |
Custom error. More... | |
class | direntry |
An entry in a dirstream. More... | |
class | dirstream |
Access directories. More... | |
class | environment |
Container of environment variables. More... | |
class | error_base |
Error exception base class. More... | |
class | error |
Error exception class. More... | |
class | format_detail |
Format names and values for output. 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 | null |
Null. More... | |
class | parse_error |
Parse error. More... | |
class | personality |
Chroot personality. More... | |
class | run_parts |
Run all scripts or programs within a directory. More... | |
class | session |
Session handler. More... | |
class | date_base |
A date representation. More... | |
class | gmdate |
A date representation in UTC. More... | |
class | date |
A date representation in local time. More... | |
Typedefs | |
typedef basic_nostream< char > | nostream |
A null ostream. | |
typedef basic_nostream< wchar_t > | wnostream |
A wide null ostream. | |
typedef parse_error< parse_value_error_code > | parse_value_error |
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... | |
enum | parse_value_error_code { BAD_VALUE } |
Functions | |
dirstream & | operator>> (dirstream &stream, direntry &entry) |
The overloaded extraction operator. | |
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. | |
void | log_exception_warning (std::exception const &e) |
Log an exception as a warning. | |
void | log_exception_error (std::exception const &e) |
Log an exception as an error. | |
std::ostream & | log_debug (DebugLevel level) |
Log a debug message. | |
void | parse_value (std::string const &value, bool &parsed_value) |
Parse a boolean value. | |
void | parse_value (std::string const &value, std::string &parsed_value) |
Parse a string value. | |
template<typename T> | |
void | parse_value (std::string const &value, T &parsed_value) |
Parse a value of type T. | |
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 | normalname (std::string name, char separator= '/') |
Normalise a pathname. | |
bool | is_absname (std::string const &name) |
Check if a pathname is absolute. | |
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, std::string const &separator) |
Split a string into a string_list. | |
std::wstring | widen_string (std::string const &str, std::locale locale) |
Widen a string. | |
std::string | narrow_string (std::wstring const &str, std::locale locale) |
Narrow a string. | |
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. | |
int | exec (std::string const &file, string_list const &command, environment const &env) |
execve wrapper. | |
Variables | |
DebugLevel | debug_level = sbuild::DEBUG_NONE |
The debugging level in use. | |
nostream | cnull |
A null ostream. |
typedef basic_nostream<char> sbuild::nostream |
A null ostream.
typedef basic_nostream<wchar_t> sbuild::wnostream |
A wide null ostream.
typedef std::vector<std::string> sbuild::string_list |
A string vector.
enum sbuild::DebugLevel |
The overloaded extraction operator.
This is used to pull direntries from a dirstream.
stream | the dirstream to get input from. | |
entry | the direntry to set. |
std::ostream & sbuild::log_info | ( | ) |
Log an informational message.
std::ostream & sbuild::log_warning | ( | ) |
Log a warning message.
Here is the caller graph for this function:
std::ostream & sbuild::log_error | ( | ) |
Log an error message.
Here is the caller graph for this function:
std::ostream& sbuild::log_debug | ( | DebugLevel | level | ) |
Log a debug message.
level | the debug level of the message being logged. |
Here is the caller graph for this function:
void sbuild::log_exception_warning | ( | std::exception const & | e | ) |
Log an exception as a warning.
e | the exception to log. |
Here is the caller graph for this function:
void sbuild::log_exception_error | ( | std::exception const & | e | ) |
Log an exception as an error.
e | the exception to log. |
Here is the caller graph for this function:
std::ostream& sbuild::log_debug | ( | DebugLevel | level | ) |
Log a debug message.
level | the debug level of the message being logged. |
Here is the caller graph for this function:
void sbuild::parse_value | ( | std::string const & | value, | |
bool & | parsed_value | |||
) |
Parse a boolean value.
value | the value to parse. | |
parsed_value | the variable to store the parsed value. |
Here is the caller graph for this function:
void sbuild::parse_value | ( | std::string const & | value, | |
std::string & | parsed_value | |||
) |
Parse a string value.
value | the value to parse. | |
parsed_value | the variable to store the parsed value. |
void sbuild::parse_value | ( | std::string const & | value, | |
T & | parsed_value | |||
) |
Parse a value of type T.
value | the value to parse. | |
parsed_value | the variable to store the parsed value. |
Here is the call graph for this function:
std::string sbuild::basename | ( | std::string | name, | |
char | separator = '/' | |||
) |
Strip the directory path from a filename.
This is similar to basename(3).
name | the filename to strip of its path. | |
separator | the separation delimiting directories. |
std::string sbuild::dirname | ( | std::string | name, | |
char | separator = '/' | |||
) |
Strip the fileame from a pathname.
This is similar to dirname(3).
name | the path to strip of its filename. | |
separator | the separation delimiting directories. |
std::string sbuild::normalname | ( | std::string | name, | |
char | separator = '/' | |||
) |
Normalise a pathname.
This strips all trailing separators, and duplicate separators within a path.
name | the path to normalise. | |
separator | the separation delimiting directories. |
bool sbuild::is_absname | ( | std::string const & | name | ) |
Check if a pathname is absolute.
name | the path to check. |
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.
list | the list to concatenate. | |
separator | the delimiting character. |
string_list sbuild::split_string | ( | std::string const & | value, | |
std::string const & | separator | |||
) |
Split a string into a string_list.
The string is split using separator as a delimiter.
value | the string to split. | |
separator | the delimiting character or characters. |
Here is the caller graph for this function:
std::wstring sbuild::widen_string | ( | std::string const & | str, | |
std::locale | locale | |||
) |
Widen a string.
The narrow string is converted into a wide string. Note that any conversion error will cause the string to be clipped at the point of error.
str | the string to widen. | |
locale | the locale to use for the conversion. |
std::string sbuild::narrow_string | ( | std::wstring const & | str, | |
std::locale | locale | |||
) |
Narrow a string.
The wide string is converted into a narrow string. Note that any conversion error will cause the string to be clipped at the point of error.
str | the string to narrow. | |
locale | the locale to use for the conversion. |
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.
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. |
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.
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.
strv | the string vector to delete. |
int sbuild::exec | ( | std::string const & | file, | |
string_list const & | command, | |||
environment const & | env | |||
) |
execve wrapper.
Run the command specified by file (an absolute pathname), using command and env as the argv and environment, respectively.
file | the program to execute. | |
command | the arguments to pass to the executable. | |
env | the environment. |
sbuild::DebugLevel sbuild::debug_level = sbuild::DEBUG_NONE |
The debugging level in use.
A null ostream.