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 78 of file netconf.cpp.
References fawkes::FawkesNetworkClient::connected(), fawkes::FawkesNetworkClient::register_handler(), and fawkes::Exception::append().
fawkes::NetworkConfiguration::~NetworkConfiguration | ( | ) | [virtual] |
Destructor.
Definition at line 99 of file netconf.cpp.
References set_mirror_mode(), fawkes::FawkesNetworkClient::deregister_handler(), 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 1246 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 1228 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 1238 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 134 of file netconf.cpp.
References fawkes::Configuration::lock(), fawkes::Configuration::iterator(), fawkes::Configuration::ValueIterator::next(), fawkes::Configuration::ValueIterator::is_float(), set_float(), fawkes::Configuration::ValueIterator::path(), fawkes::Configuration::ValueIterator::get_float(), fawkes::Configuration::ValueIterator::is_int(), set_int(), fawkes::Configuration::ValueIterator::get_int(), fawkes::Configuration::ValueIterator::is_uint(), set_uint(), fawkes::Configuration::ValueIterator::get_uint(), fawkes::Configuration::ValueIterator::is_bool(), set_bool(), fawkes::Configuration::ValueIterator::get_bool(), fawkes::Configuration::ValueIterator::is_string(), fawkes::Configuration::ValueIterator::get_string(), set_string(), 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 1015 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 997 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 1004 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 177 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 432 of file netconf.cpp.
References fawkes::Mutex::lock(), fawkes::SQLiteConfiguration::get_bool(), fawkes::Exception::append(), fawkes::Mutex::unlock(), fawkes::FawkesNetworkMessage::msg(), fawkes::config_bool_value_msg_t::b, 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 532 of file netconf.cpp.
References fawkes::Mutex::lock(), fawkes::SQLiteConfiguration::get_comment(), fawkes::Exception::append(), fawkes::Mutex::unlock(), fawkes::FawkesNetworkMessage::msgge(), fawkes::config_comment_msg_t::s, 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 582 of file netconf.cpp.
References fawkes::Mutex::lock(), fawkes::SQLiteConfiguration::get_default_comment(), fawkes::Exception::append(), fawkes::Mutex::unlock(), fawkes::FawkesNetworkMessage::msgge(), fawkes::config_comment_msg_t::s, 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 282 of file netconf.cpp.
References fawkes::Mutex::lock(), fawkes::SQLiteConfiguration::get_float(), fawkes::Exception::append(), fawkes::Mutex::unlock(), fawkes::FawkesNetworkMessage::msg(), fawkes::config_float_value_msg_t::f, 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 382 of file netconf.cpp.
References fawkes::Mutex::lock(), fawkes::SQLiteConfiguration::get_int(), fawkes::Exception::append(), fawkes::Mutex::unlock(), fawkes::FawkesNetworkMessage::msg(), fawkes::config_int_value_msg_t::i, 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 482 of file netconf.cpp.
References fawkes::Mutex::lock(), fawkes::SQLiteConfiguration::get_string(), fawkes::Exception::append(), fawkes::Mutex::unlock(), fawkes::FawkesNetworkMessage::msgge(), fawkes::config_string_value_msg_t::s, 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 201 of file netconf.cpp.
References fawkes::Mutex::lock(), fawkes::SQLiteConfiguration::get_type(), fawkes::Mutex::unlock(), get_value(), and fawkes::Configuration::ValueIterator::type().
Referenced by is_float(), is_uint(), is_int(), is_bool(), and is_string().
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 332 of file netconf.cpp.
References fawkes::Mutex::lock(), fawkes::SQLiteConfiguration::get_uint(), fawkes::Exception::append(), fawkes::Mutex::unlock(), fawkes::FawkesNetworkMessage::msg(), fawkes::config_uint_value_msg_t::u, 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 633 of file netconf.cpp.
References fawkes::Mutex::lock(), fawkes::SQLiteConfiguration::get_value(), fawkes::Exception::append(), fawkes::Mutex::unlock(), fawkes::config_getval_msg_t::cp, fawkes::config_descriptor_t::path, fawkes::FawkesNetworkClient::enqueue_and_wait(), and fawkes::RefCount::unref().
Referenced by exists(), is_default(), and get_type().
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 1021 of file netconf.cpp.
References fawkes::ConfigListContent::has_next(), fawkes::ConfigListContent::next(), fawkes::config_list_entity_header_t::type, fawkes::config_list_entity_header_t::cp, fawkes::config_descriptor_t::is_default, fawkes::config_descriptor_t::path, fawkes::config_list_float_entity_t::f, fawkes::config_list_int_entity_t::i, fawkes::config_list_uint_entity_t::u, fawkes::config_list_bool_entity_t::b, fawkes::config_list_string_entity_t::s, fawkes::config_list_comment_entity_t::s, fawkes::LibLogger::log_warn(), fawkes::config_value_erased_msg_t::cp, fawkes::config_float_value_msg_t::cp, fawkes::config_float_value_msg_t::f, fawkes::config_uint_value_msg_t::cp, fawkes::config_uint_value_msg_t::u, fawkes::config_int_value_msg_t::cp, fawkes::config_int_value_msg_t::i, fawkes::config_bool_value_msg_t::cp, fawkes::config_bool_value_msg_t::b, fawkes::config_string_value_msg_t::cp, fawkes::config_string_value_msg_t::s, fawkes::config_comment_msg_t::cp, and fawkes::config_comment_msg_t::s.
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 240 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 187 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 219 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 233 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 247 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 226 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 1344 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 1355 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 1366 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 119 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 1323 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 1257 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 1377 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 835 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 955 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 941 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 842 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 962 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 948 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 717 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 799 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 901 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 887 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 760 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 710 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 792 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 1270 of file netconf.cpp.
References fawkes::SQLiteConfiguration::load(), fawkes::Mutex::lock(), fawkes::FawkesNetworkClient::enqueue(), fawkes::InterruptibleBarrier::wait(), and fawkes::Mutex::unlock().
Referenced by ~NetworkConfiguration(), and ConfigTreeView::set_network_client().
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 894 of file netconf.cpp.
Referenced by copy().
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 880 of file netconf.cpp.
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 753 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 158 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 167 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 1330 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 1337 of file netconf.cpp.
References fawkes::Mutex::unlock().