Fawkes API Fawkes Development Version
|
Remote configuration via Fawkes net. More...
#include <>>
Classes | |
class | NetConfValueIterator |
Network configuration value iterator. More... | |
Public Member Functions | |
NetworkConfiguration (FawkesNetworkClient *c, unsigned int mirror_timeout_sec=15) | |
Constructor. | |
virtual | ~NetworkConfiguration () |
Destructor. | |
virtual void | copy (Configuration *copyconf) |
Copy all values from the given configuration. | |
virtual void | add_change_handler (ConfigurationChangeHandler *h) |
Add a configuration change handler. | |
virtual void | rem_change_handler (ConfigurationChangeHandler *h) |
Remove a configuration change handler. | |
virtual void | load (const char *filename, const char *defaults_filename, const char *tag=NULL) |
Load configuration. | |
virtual void | tag (const char *tag) |
Tag this configuration version. | |
virtual std::list< std::string > | tags () |
List of tags. | |
virtual bool | exists (const char *path) |
Check if a given value exists. | |
virtual bool | is_float (const char *path) |
Check if a value is of type float. | |
virtual bool | is_uint (const char *path) |
Check if a value is of type unsigned int. | |
virtual bool | is_int (const char *path) |
Check if a value is of type int. | |
virtual bool | is_bool (const char *path) |
Check if a value is of type bool. | |
virtual bool | is_string (const char *path) |
Check if a value is of type string. | |
virtual bool | is_default (const char *path) |
Check if a value was read from the default config. | |
virtual float | get_float (const char *path) |
Get value from configuration which is of type float. | |
virtual unsigned int | get_uint (const char *path) |
Get value from configuration which is of type unsigned int. | |
virtual int | get_int (const char *path) |
Get value from configuration which is of type int. | |
virtual bool | get_bool (const char *path) |
Get value from configuration which is of type bool. | |
virtual std::string | get_string (const char *path) |
Get value from configuration which is of type string. | |
virtual ValueIterator * | get_value (const char *path) |
Get value from configuration. | |
virtual std::string | get_comment (const char *path) |
Get comment of value at given path. | |
virtual std::string | get_default_comment (const char *path) |
Get comment of value at given path. | |
virtual std::string | get_type (const char *path) |
Get type of field. | |
virtual void | set_float (const char *path, float f) |
Set new value in configuration of type float. | |
virtual void | set_uint (const char *path, unsigned int uint) |
Set new value in configuration of type unsigned int. | |
virtual void | set_int (const char *path, int i) |
Set new value in configuration of type int. | |
virtual void | set_bool (const char *path, bool b) |
Set new value in configuration of type bool. | |
virtual void | set_string (const char *path, std::string &s) |
Set new value in configuration of type string. | |
virtual void | set_string (const char *path, const char *s) |
Set new value in configuration of type string. | |
virtual void | set_comment (const char *path, std::string &comment) |
Set new comment for existing value. | |
virtual void | set_comment (const char *path, const char *comment) |
Set new comment for existing value. | |
virtual void | erase (const char *path) |
Erase the given value from the configuration. | |
virtual void | set_default_float (const char *path, float f) |
Set new default value in configuration of type float. | |
virtual void | set_default_uint (const char *path, unsigned int uint) |
Set new default value in configuration of type unsigned int. | |
virtual void | set_default_int (const char *path, int i) |
Set new default value in configuration of type int. | |
virtual void | set_default_bool (const char *path, bool b) |
Set new default value in configuration of type bool. | |
virtual void | set_default_string (const char *path, std::string &s) |
Set new default value in configuration of type string. | |
virtual void | set_default_string (const char *path, const char *s) |
Set new default value in configuration of type string. | |
virtual void | set_default_comment (const char *path, std::string &comment) |
Set new default comment for existing default configuration value. | |
virtual void | set_default_comment (const char *path, const char *comment) |
Set new default comment for existing default configuration value. | |
virtual void | erase_default (const char *path) |
Erase the given default value from the configuration. | |
virtual void | deregistered (unsigned int id) throw () |
We are no longer registered in Fawkes network client. | |
virtual void | inbound_received (FawkesNetworkMessage *msg, unsigned int id) throw () |
Called for incoming messages. | |
virtual void | connection_died (unsigned int id) throw () |
Client connection died. | |
virtual void | connection_established (unsigned int id) throw () |
Client has established a connection. | |
virtual void | set_mirror_mode (bool mirror) |
Enable or disable mirror mode. | |
ValueIterator * | iterator () |
Iterator for all values. | |
ValueIterator * | iterator_default () |
Iterator for all default values. | |
ValueIterator * | iterator_hostspecific () |
Iterator for all host-specific values. | |
ValueIterator * | search (const char *path) |
Iterator with search results. | |
void | lock () |
Lock the config. | |
bool | try_lock () |
Try to lock the config. | |
void | unlock () |
Unlock the config. |
Remote configuration via Fawkes net.
This implementation of the Configuration interface allows for remote access to a Fawkes process implemented using the ConfigurationManager.
The network configuration can operator in two modes. In mirror and in non-mirror mode. The non-mirror mode is recommended if only a few operations have to be carried out like getting only a very few values or setting a single value. The mirror mode is for longer usage periods and on-the-fly updates. In mirror mode the complete configuration is copied once from the Fawkes process and then all updates are incorporated into the local database. You can register change handlers to be notified as soon as someone modifies a value.
fawkes::NetworkConfiguration::NetworkConfiguration | ( | FawkesNetworkClient * | c, |
unsigned int | mirror_timeout_sec = 15 |
||
) |
Constructor.
c | Fawkes network client (thread). |
mirror_timeout_sec | timeout in seconds for initiating mirroring |
Definition at line 77 of file netconf.cpp.
References fawkes::Exception::append(), fawkes::FawkesNetworkClient::connected(), and fawkes::FawkesNetworkClient::register_handler().
fawkes::NetworkConfiguration::~NetworkConfiguration | ( | ) | [virtual] |
Destructor.
Definition at line 98 of file netconf.cpp.
References fawkes::FawkesNetworkClient::deregister_handler(), set_mirror_mode(), and fawkes::RefCount::unref().
void fawkes::NetworkConfiguration::add_change_handler | ( | ConfigurationChangeHandler * | h | ) | [virtual] |
Add a configuration change handler.
The added handler is called whenever a value changes and the handler desires to get notified for the given component.
h | configuration change handler |
Reimplemented from fawkes::Configuration.
Definition at line 1245 of file netconf.cpp.
References fawkes::Configuration::add_change_handler().
void fawkes::NetworkConfiguration::connection_died | ( | unsigned int | id | ) | throw () [virtual] |
Client connection died.
This method is used to inform handlers that the connection has died for any reason. No more data can be send and no more messages should be enqueued because it is unclear when they would be sent.
id | the id of the calling client |
Implements fawkes::FawkesNetworkClientHandler.
Definition at line 1227 of file netconf.cpp.
void fawkes::NetworkConfiguration::connection_established | ( | unsigned int | id | ) | throw () [virtual] |
Client has established a connection.
Whenever the client establishes a connection this is signaled to handlers with this method. You can register to a client at any time, you may even enqueue messages to a client while the connection is dead. If the client at some point gets connected again, the messages will then be send out in one go. You should use this in your application though to only send data if the connection is alive and you should let the user know about the connection status.
id | the id of the calling client |
Implements fawkes::FawkesNetworkClientHandler.
Definition at line 1237 of file netconf.cpp.
void fawkes::NetworkConfiguration::copy | ( | Configuration * | copyconf | ) | [virtual] |
Copy all values from the given configuration.
All values from the given configuration are copied. Old values are not erased so that the copied values will overwrite existing values, new values are created, but values existent in current config but not in the copie config will remain unchanged.
copyconf | configuration to copy |
Implements fawkes::Configuration.
Definition at line 133 of file netconf.cpp.
References fawkes::Configuration::ValueIterator::get_bool(), fawkes::Configuration::ValueIterator::get_float(), fawkes::Configuration::ValueIterator::get_int(), fawkes::Configuration::ValueIterator::get_string(), fawkes::Configuration::ValueIterator::get_uint(), fawkes::Configuration::ValueIterator::is_bool(), fawkes::Configuration::ValueIterator::is_float(), fawkes::Configuration::ValueIterator::is_int(), fawkes::Configuration::ValueIterator::is_string(), fawkes::Configuration::ValueIterator::is_uint(), fawkes::Configuration::iterator(), fawkes::Configuration::lock(), fawkes::Configuration::ValueIterator::next(), fawkes::Configuration::ValueIterator::path(), set_bool(), set_float(), set_int(), set_string(), set_uint(), and fawkes::Configuration::unlock().
void fawkes::NetworkConfiguration::deregistered | ( | unsigned int | id | ) | throw () [virtual] |
We are no longer registered in Fawkes network client.
Ignored.
id | the id of the calling client |
Implements fawkes::FawkesNetworkClientHandler.
Definition at line 1014 of file netconf.cpp.
void fawkes::NetworkConfiguration::erase | ( | const char * | path | ) | [virtual] |
Erase the given value from the configuration.
It is not an error if the value does not exists before deletion.
path | path to value |
Implements fawkes::Configuration.
Definition at line 996 of file netconf.cpp.
void fawkes::NetworkConfiguration::erase_default | ( | const char * | path | ) | [virtual] |
Erase the given default value from the configuration.
It is not an error if the value does not exists before deletion.
path | path to value |
Implements fawkes::Configuration.
Definition at line 1003 of file netconf.cpp.
bool fawkes::NetworkConfiguration::exists | ( | const char * | path | ) | [virtual] |
Check if a given value exists.
path | path to value |
Implements fawkes::Configuration.
Definition at line 176 of file netconf.cpp.
References get_value(), and fawkes::Configuration::ValueIterator::valid().
bool fawkes::NetworkConfiguration::get_bool | ( | const char * | path | ) | [virtual] |
Get value from configuration which is of type bool.
path | path to value |
Implements fawkes::Configuration.
Definition at line 431 of file netconf.cpp.
References fawkes::Exception::append(), fawkes::config_bool_value_msg_t::b, fawkes::SQLiteConfiguration::get_bool(), fawkes::Mutex::lock(), fawkes::FawkesNetworkMessage::msg(), fawkes::Mutex::unlock(), and fawkes::RefCount::unref().
std::string fawkes::NetworkConfiguration::get_comment | ( | const char * | path | ) | [virtual] |
Get comment of value at given path.
The value at the given path must exist in the host-specific configuration.
path | path to value |
ConfigEntryNotFoundException | shall be thrown if value does not exist |
ConfigurationException | shall be thrown on any other error |
Implements fawkes::Configuration.
Definition at line 531 of file netconf.cpp.
References fawkes::Exception::append(), fawkes::SQLiteConfiguration::get_comment(), fawkes::Mutex::lock(), fawkes::FawkesNetworkMessage::msgge(), fawkes::config_comment_msg_t::s, fawkes::Mutex::unlock(), and fawkes::RefCount::unref().
std::string fawkes::NetworkConfiguration::get_default_comment | ( | const char * | path | ) | [virtual] |
Get comment of value at given path.
The value at the given path must exist in the default configuration.
path | path to value |
ConfigEntryNotFoundException | shall be thrown if value does not exist |
ConfigurationException | shall be thrown on any other error |
Implements fawkes::Configuration.
Definition at line 581 of file netconf.cpp.
References fawkes::Exception::append(), fawkes::SQLiteConfiguration::get_default_comment(), fawkes::Mutex::lock(), fawkes::FawkesNetworkMessage::msgge(), fawkes::config_comment_msg_t::s, fawkes::Mutex::unlock(), and fawkes::RefCount::unref().
float fawkes::NetworkConfiguration::get_float | ( | const char * | path | ) | [virtual] |
Get value from configuration which is of type float.
path | path to value |
Implements fawkes::Configuration.
Definition at line 281 of file netconf.cpp.
References fawkes::Exception::append(), fawkes::config_float_value_msg_t::f, fawkes::SQLiteConfiguration::get_float(), fawkes::Mutex::lock(), fawkes::FawkesNetworkMessage::msg(), fawkes::Mutex::unlock(), and fawkes::RefCount::unref().
int fawkes::NetworkConfiguration::get_int | ( | const char * | path | ) | [virtual] |
Get value from configuration which is of type int.
path | path to value |
Implements fawkes::Configuration.
Definition at line 381 of file netconf.cpp.
References fawkes::Exception::append(), fawkes::SQLiteConfiguration::get_int(), fawkes::config_int_value_msg_t::i, fawkes::Mutex::lock(), fawkes::FawkesNetworkMessage::msg(), fawkes::Mutex::unlock(), and fawkes::RefCount::unref().
std::string fawkes::NetworkConfiguration::get_string | ( | const char * | path | ) | [virtual] |
Get value from configuration which is of type string.
path | path to value |
Implements fawkes::Configuration.
Definition at line 481 of file netconf.cpp.
References fawkes::Exception::append(), fawkes::SQLiteConfiguration::get_string(), fawkes::Mutex::lock(), fawkes::FawkesNetworkMessage::msgge(), fawkes::config_string_value_msg_t::s, fawkes::Mutex::unlock(), and fawkes::RefCount::unref().
std::string fawkes::NetworkConfiguration::get_type | ( | const char * | path | ) | [virtual] |
Get type of field.
path | path |
Implements fawkes::Configuration.
Definition at line 200 of file netconf.cpp.
References fawkes::SQLiteConfiguration::get_type(), get_value(), fawkes::Mutex::lock(), fawkes::Configuration::ValueIterator::type(), and fawkes::Mutex::unlock().
Referenced by is_bool(), is_float(), is_int(), is_string(), and is_uint().
unsigned int fawkes::NetworkConfiguration::get_uint | ( | const char * | path | ) | [virtual] |
Get value from configuration which is of type unsigned int.
path | path to value |
Implements fawkes::Configuration.
Definition at line 331 of file netconf.cpp.
References fawkes::Exception::append(), fawkes::SQLiteConfiguration::get_uint(), fawkes::Mutex::lock(), fawkes::FawkesNetworkMessage::msg(), fawkes::config_uint_value_msg_t::u, fawkes::Mutex::unlock(), and fawkes::RefCount::unref().
Configuration::ValueIterator * fawkes::NetworkConfiguration::get_value | ( | const char * | path | ) | [virtual] |
Get value from configuration.
path | path to value |
Implements fawkes::Configuration.
Definition at line 632 of file netconf.cpp.
References fawkes::Exception::append(), fawkes::config_getval_msg_t::cp, fawkes::FawkesNetworkClient::enqueue_and_wait(), fawkes::SQLiteConfiguration::get_value(), fawkes::Mutex::lock(), fawkes::config_descriptor_t::path, fawkes::Mutex::unlock(), and fawkes::RefCount::unref().
Referenced by exists(), get_type(), and is_default().
void fawkes::NetworkConfiguration::inbound_received | ( | FawkesNetworkMessage * | m, |
unsigned int | id | ||
) | throw () [virtual] |
Called for incoming messages.
This is called when an incoming message has been received. If this method was called one or more times then the a previously carried out wait(cid) call will continue.
m | Message to handle |
id | the id of the calling client |
Implements fawkes::FawkesNetworkClientHandler.
Definition at line 1020 of file netconf.cpp.
References fawkes::config_bool_value_msg_t::b, fawkes::config_list_bool_entity_t::b, fawkes::config_comment_msg_t::cp, fawkes::config_string_value_msg_t::cp, fawkes::config_bool_value_msg_t::cp, fawkes::config_int_value_msg_t::cp, fawkes::config_uint_value_msg_t::cp, fawkes::config_float_value_msg_t::cp, fawkes::config_value_erased_msg_t::cp, fawkes::config_list_entity_header_t::cp, fawkes::config_float_value_msg_t::f, fawkes::config_list_float_entity_t::f, fawkes::ConfigListContent::has_next(), fawkes::config_int_value_msg_t::i, fawkes::config_list_int_entity_t::i, fawkes::config_descriptor_t::is_default, fawkes::LibLogger::log_warn(), fawkes::ConfigListContent::next(), fawkes::config_descriptor_t::path, fawkes::config_comment_msg_t::s, fawkes::config_string_value_msg_t::s, fawkes::config_list_comment_entity_t::s, fawkes::config_list_string_entity_t::s, fawkes::config_list_entity_header_t::type, fawkes::config_uint_value_msg_t::u, and fawkes::config_list_uint_entity_t::u.
bool fawkes::NetworkConfiguration::is_bool | ( | const char * | path | ) | [virtual] |
Check if a value is of type bool.
path | path to value |
Implements fawkes::Configuration.
Definition at line 239 of file netconf.cpp.
References get_type().
bool fawkes::NetworkConfiguration::is_default | ( | const char * | path | ) | [virtual] |
Check if a value was read from the default config.
path | path to value |
Implements fawkes::Configuration.
Definition at line 186 of file netconf.cpp.
References get_value(), and fawkes::Configuration::ValueIterator::is_default().
bool fawkes::NetworkConfiguration::is_float | ( | const char * | path | ) | [virtual] |
Check if a value is of type float.
path | path to value |
Implements fawkes::Configuration.
Definition at line 218 of file netconf.cpp.
References get_type().
bool fawkes::NetworkConfiguration::is_int | ( | const char * | path | ) | [virtual] |
Check if a value is of type int.
path | path to value |
Implements fawkes::Configuration.
Definition at line 232 of file netconf.cpp.
References get_type().
bool fawkes::NetworkConfiguration::is_string | ( | const char * | path | ) | [virtual] |
Check if a value is of type string.
path | path to value |
Implements fawkes::Configuration.
Definition at line 246 of file netconf.cpp.
References get_type().
bool fawkes::NetworkConfiguration::is_uint | ( | const char * | path | ) | [virtual] |
Check if a value is of type unsigned int.
path | path to value |
Implements fawkes::Configuration.
Definition at line 225 of file netconf.cpp.
References get_type().
Configuration::ValueIterator * fawkes::NetworkConfiguration::iterator | ( | ) | [virtual] |
Iterator for all values.
Returns an iterator that can be used to iterate over all values in the current configuration, it will value the overlay. If a default and a host-specific value exists you will only see the host-specific value.
Implements fawkes::Configuration.
Definition at line 1343 of file netconf.cpp.
References fawkes::SQLiteConfiguration::iterator().
Configuration::ValueIterator * fawkes::NetworkConfiguration::iterator_default | ( | ) | [virtual] |
Iterator for all default values.
Returns an iterator that can be used to iterate over all default values in the current default configuration. Note that this might return less paths than available, because the values for which no default entry exists are not returned.
Implements fawkes::Configuration.
Definition at line 1354 of file netconf.cpp.
References fawkes::SQLiteConfiguration::iterator_default().
Configuration::ValueIterator * fawkes::NetworkConfiguration::iterator_hostspecific | ( | ) | [virtual] |
Iterator for all host-specific values.
Returns an iterator that can be used to iterate over all host-specific values in the current configuration. Note that this might return less paths than available, because the default values for which no host-specific entry exists are not returned.
Implements fawkes::Configuration.
Definition at line 1365 of file netconf.cpp.
References fawkes::SQLiteConfiguration::iterator_hostspecific().
void fawkes::NetworkConfiguration::load | ( | const char * | name, |
const char * | defaults_name, | ||
const char * | tag = NULL |
||
) | [virtual] |
Load configuration.
This is a noop for the NetworkConfiguration.
name | name of the host-based database. This should be a name of the form hostname.db, where hostname is the unqualified part of the hostname. |
defaults_name | name of the default database. Should be defaults.db |
tag | optional tag to restore |
Implements fawkes::Configuration.
Definition at line 118 of file netconf.cpp.
void fawkes::NetworkConfiguration::lock | ( | ) | [virtual] |
Lock the config.
No further changes or queries can be executed on the configuration and will block until the config is unlocked.
Implements fawkes::Configuration.
Definition at line 1322 of file netconf.cpp.
References fawkes::Mutex::lock().
void fawkes::NetworkConfiguration::rem_change_handler | ( | ConfigurationChangeHandler * | h | ) | [virtual] |
Remove a configuration change handler.
The handler is removed from the change handler list and no longer called on config changes.
h | configuration change handler |
Reimplemented from fawkes::Configuration.
Definition at line 1256 of file netconf.cpp.
References fawkes::Configuration::rem_change_handler().
Configuration::ValueIterator * fawkes::NetworkConfiguration::search | ( | const char * | path | ) | [virtual] |
Iterator with search results.
Returns an iterator that can be used to iterate over the search results. All values whose path start with the given strings are returned. A call like
config->search("");
is effectively the same as a call to iterator().
path | start of path |
Implements fawkes::Configuration.
Definition at line 1376 of file netconf.cpp.
References fawkes::SQLiteConfiguration::search().
void fawkes::NetworkConfiguration::set_bool | ( | const char * | path, |
bool | b | ||
) | [virtual] |
Set new value in configuration of type bool.
path | path to value |
b | new bool value |
Implements fawkes::Configuration.
Definition at line 834 of file netconf.cpp.
Referenced by copy().
void fawkes::NetworkConfiguration::set_comment | ( | const char * | path, |
std::string & | comment | ||
) | [virtual] |
Set new comment for existing value.
path | path to value |
comment | new comment string |
Implements fawkes::Configuration.
Definition at line 954 of file netconf.cpp.
void fawkes::NetworkConfiguration::set_comment | ( | const char * | path, |
const char * | comment | ||
) | [virtual] |
Set new comment for existing value.
Works like the aforementioned method. Just takes an good ol' char array instead of a std::string.
path | path to value |
comment | new comment string |
Implements fawkes::Configuration.
Definition at line 940 of file netconf.cpp.
void fawkes::NetworkConfiguration::set_default_bool | ( | const char * | path, |
bool | b | ||
) | [virtual] |
Set new default value in configuration of type bool.
path | path to value |
b | new bool value |
Implements fawkes::Configuration.
Definition at line 841 of file netconf.cpp.
void fawkes::NetworkConfiguration::set_default_comment | ( | const char * | path, |
const char * | comment | ||
) | [virtual] |
Set new default comment for existing default configuration value.
Works like the aforementioned method. Just takes an good ol' char array instead of a std::string.
path | path to value |
comment | new comment string |
Implements fawkes::Configuration.
Definition at line 947 of file netconf.cpp.
void fawkes::NetworkConfiguration::set_default_comment | ( | const char * | path, |
std::string & | comment | ||
) | [virtual] |
Set new default comment for existing default configuration value.
path | path to value |
comment | new comment string |
Implements fawkes::Configuration.
Definition at line 961 of file netconf.cpp.
void fawkes::NetworkConfiguration::set_default_float | ( | const char * | path, |
float | f | ||
) | [virtual] |
Set new default value in configuration of type float.
path | path to value |
f | new float value |
Implements fawkes::Configuration.
Definition at line 716 of file netconf.cpp.
void fawkes::NetworkConfiguration::set_default_int | ( | const char * | path, |
int | i | ||
) | [virtual] |
Set new default value in configuration of type int.
path | path to value |
i | new int value |
Implements fawkes::Configuration.
Definition at line 798 of file netconf.cpp.
void fawkes::NetworkConfiguration::set_default_string | ( | const char * | path, |
std::string & | s | ||
) | [virtual] |
Set new default value in configuration of type string.
path | path to value |
s | new string value |
Implements fawkes::Configuration.
Definition at line 900 of file netconf.cpp.
void fawkes::NetworkConfiguration::set_default_string | ( | const char * | path, |
const char * | s | ||
) | [virtual] |
Set new default value in configuration of type string.
Works like the aforementioned method. Just takes an good ol' char array instead of a std::string.
path | path to value |
s | new string value |
Implements fawkes::Configuration.
Definition at line 886 of file netconf.cpp.
void fawkes::NetworkConfiguration::set_default_uint | ( | const char * | path, |
unsigned int | uint | ||
) | [virtual] |
Set new default value in configuration of type unsigned int.
path | path to value |
uint | new unsigned int value |
Implements fawkes::Configuration.
Definition at line 759 of file netconf.cpp.
void fawkes::NetworkConfiguration::set_float | ( | const char * | path, |
float | f | ||
) | [virtual] |
Set new value in configuration of type float.
path | path to value |
f | new float value |
Implements fawkes::Configuration.
Definition at line 709 of file netconf.cpp.
Referenced by copy().
void fawkes::NetworkConfiguration::set_int | ( | const char * | path, |
int | i | ||
) | [virtual] |
Set new value in configuration of type int.
path | path to value |
i | new int value |
Implements fawkes::Configuration.
Definition at line 791 of file netconf.cpp.
Referenced by copy().
void fawkes::NetworkConfiguration::set_mirror_mode | ( | bool | mirror | ) | [virtual] |
Enable or disable mirror mode.
mirror | true to enable mirror mode, false to disable |
Definition at line 1269 of file netconf.cpp.
References fawkes::FawkesNetworkClient::enqueue(), fawkes::SQLiteConfiguration::load(), fawkes::Mutex::lock(), fawkes::Mutex::unlock(), and fawkes::InterruptibleBarrier::wait().
Referenced by ConfigTreeView::set_network_client(), and ~NetworkConfiguration().
void fawkes::NetworkConfiguration::set_string | ( | const char * | path, |
const char * | s | ||
) | [virtual] |
Set new value in configuration of type string.
Works like the aforementioned method. Just takes an good ol' char array instead of a std::string.
path | path to value |
s | new string value |
Implements fawkes::Configuration.
Definition at line 879 of file netconf.cpp.
void fawkes::NetworkConfiguration::set_string | ( | const char * | path, |
std::string & | s | ||
) | [virtual] |
Set new value in configuration of type string.
path | path to value |
s | new string value |
Implements fawkes::Configuration.
Definition at line 893 of file netconf.cpp.
Referenced by copy().
void fawkes::NetworkConfiguration::set_uint | ( | const char * | path, |
unsigned int | uint | ||
) | [virtual] |
Set new value in configuration of type unsigned int.
path | path to value |
uint | new unsigned int value |
Implements fawkes::Configuration.
Definition at line 752 of file netconf.cpp.
Referenced by copy().
void fawkes::NetworkConfiguration::tag | ( | const char * | tag | ) | [virtual] |
Tag this configuration version.
This creates a new tagged version of the current config. The tagged config can be accessed via load().
tag | tag for this version |
Implements fawkes::Configuration.
Definition at line 157 of file netconf.cpp.
References fawkes::Mutex::lock(), and fawkes::Mutex::unlock().
std::list< std::string > fawkes::NetworkConfiguration::tags | ( | ) | [virtual] |
List of tags.
Implements fawkes::Configuration.
Definition at line 166 of file netconf.cpp.
References fawkes::Mutex::lock(), and fawkes::Mutex::unlock().
bool fawkes::NetworkConfiguration::try_lock | ( | ) | [virtual] |
Try to lock the config.
Implements fawkes::Configuration.
Definition at line 1329 of file netconf.cpp.
References fawkes::Mutex::try_lock().
void fawkes::NetworkConfiguration::unlock | ( | ) | [virtual] |
Unlock the config.
Modifications and queries are possible again.
Implements fawkes::Configuration.
Definition at line 1336 of file netconf.cpp.
References fawkes::Mutex::unlock().