Public Methods | |
AltStorage (const std::string &currdir, Ing::FileLock::access_mode _mode) | |
virtual | ~AltStorage () |
void | parse () |
bool | setup (Alternative *old_alt, Alternative *new_alt) |
void | ignore (const char *name) |
Public Attributes | |
alternative_list | alternatives |
alternative_list | candidates |
Protected Methods | |
virtual void | begin_group (const std::string &group) |
virtual void | end_group (const std::string &group) |
virtual void | setup_option (const std::string &group, const std::string &name, const std::string &value, const std::string &type) |
Private Methods | |
std::string | fill_from (const std::string &path) |
std::string | check (bool during_test=false) |
void | setup_slaves (const std::string &candidate_name, Alternative *curr_item) |
void | dump () |
void | check_exists (void *pointer, const std::string &errstr) |
void | check_exists (bool pointer, const std::string &errstr) |
std::string | prepare_path (const std::string &str) |
Static Private Methods | |
std::string | xmlsafe (std::string str) |
Private Attributes | |
Candidate * | curr_prop |
Ing::FileLock::access_mode | mode |
std::string | current_dir |
Ing::FileLock | locker |
|
A constructor setup general internal structures, made database locking
|
|
A destructor unlock database, delete all internal structures, dump static information into /etc/alternatives/auto/dump.xml
|
|
implementation of Ing::Config method. Creates new Candidates objects, setup general internal configurations
|
|
Made a consistency checking in all available alternatives
|
|
Helper function, checks are this pointer is false, raise exception otherwise
|
|
Helper function, checks are this pointer is null, raise exception otherwise
|
|
Dump all alternatives in manual mode into special dump.xml file
|
|
implementation of Ing::Config method. Creates or update existing Alternatives object, fill object with data, also setup slaves if exists
|
|
Fill internal biffer with xml from files under selected directory
|
|
delete candidate and all it's slave candidates from alternatives structures
|
|
subconstructor, parse all alternatives configuration files, create internal structures, made consistency checkings
|
|
Helper function, checks are path valid alternatives link name. Alternatives link name must begin with slash
|
|
change settings of one alternatives item we try to replace item, then made consistency checking and rollback if it's fail.
|
|
implementation of Ing::Config method. Check are paths and weights of the alternative items correct, setup some internal data structures
|
|
setup all slave items for the current alternative, founded during previos setup_option() functions. Check for consistency, setup as new slave alternative item with candidates
|
|
Helper function, replace some symbols with entities (e.g. '&' with amp;), for safe using with xml
|
|
list of all possible alternatives |
|
all possible candidates list and it's alternatives |
|
current candidate item |
|
working directory with alternatives config files |
|
File Locker |
|
locking mode |