fawkes::NetworkConfiguration Class Reference
Remote configuration via Fawkes net. More...
#include <config/netconf.h>

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. | |
Detailed Description
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.
Definition at line 48 of file netconf.h.
Constructor & Destructor Documentation
| fawkes::NetworkConfiguration::NetworkConfiguration | ( | FawkesNetworkClient * | c, | |
| unsigned int | mirror_timeout_sec = 15 | |||
| ) |
Constructor.
- Parameters:
-
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().
Member Function Documentation
| 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.
- Parameters:
-
h configuration change handler
Reimplemented from fawkes::Configuration.
Definition at line 1238 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.
- Parameters:
-
id the id of the calling client
Implements fawkes::FawkesNetworkClientHandler.
Definition at line 1220 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.
- Parameters:
-
id the id of the calling client
Implements fawkes::FawkesNetworkClientHandler.
Definition at line 1230 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.
- Parameters:
-
copyconf configuration to copy
Implements fawkes::Configuration.
Definition at line 126 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.
- Parameters:
-
id the id of the calling client
Implements fawkes::FawkesNetworkClientHandler.
Definition at line 1007 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.
- Parameters:
-
path path to value
Implements fawkes::Configuration.
Definition at line 989 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.
- Parameters:
-
path path to value
Implements fawkes::Configuration.
Definition at line 996 of file netconf.cpp.
| bool fawkes::NetworkConfiguration::exists | ( | const char * | path | ) | [virtual] |
Check if a given value exists.
- Parameters:
-
path path to value
- Returns:
- true if the value exists, false otherwise
Implements fawkes::Configuration.
Definition at line 169 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.
- Parameters:
-
path path to value
- Returns:
- value
Implements fawkes::Configuration.
Definition at line 424 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.
- Parameters:
-
path path to value
- Returns:
- comment
- Exceptions:
-
ConfigEntryNotFoundException shall be thrown if value does not exist ConfigurationException shall be thrown on any other error
Implements fawkes::Configuration.
Definition at line 524 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.
- Parameters:
-
path path to value
- Returns:
- comment
- Exceptions:
-
ConfigEntryNotFoundException shall be thrown if value does not exist ConfigurationException shall be thrown on any other error
Implements fawkes::Configuration.
Definition at line 574 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.
- Parameters:
-
path path to value
- Returns:
- value
Implements fawkes::Configuration.
Definition at line 274 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.
- Parameters:
-
path path to value
- Returns:
- value
Implements fawkes::Configuration.
Definition at line 374 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.
- Parameters:
-
path path to value
Implements fawkes::Configuration.
Definition at line 474 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.
- Parameters:
-
path path
- Returns:
- string of type
Implements fawkes::Configuration.
Definition at line 193 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.
- Parameters:
-
path path to value
- Returns:
- value
Implements fawkes::Configuration.
Definition at line 324 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.
- Parameters:
-
path path to value
- Returns:
- value iterator for just this one value, maybe invalid if value does not exists.
Implements fawkes::Configuration.
Definition at line 625 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.
- Parameters:
-
m Message to handle id the id of the calling client
Implements fawkes::FawkesNetworkClientHandler.
Definition at line 1013 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.
- Parameters:
-
path path to value
- Returns:
- true if the value exists and is of type bool
Implements fawkes::Configuration.
Definition at line 232 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.
- Parameters:
-
path path to value
- Returns:
- true if the value exists and is only stored in the default config
Implements fawkes::Configuration.
Definition at line 179 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.
- Parameters:
-
path path to value
- Returns:
- true if the value exists and is of type float
Implements fawkes::Configuration.
Definition at line 211 of file netconf.cpp.
References get_type().
| bool fawkes::NetworkConfiguration::is_int | ( | const char * | path | ) | [virtual] |
Check if a value is of type int.
- Parameters:
-
path path to value
- Returns:
- true if the value exists and is of type int
Implements fawkes::Configuration.
Definition at line 225 of file netconf.cpp.
References get_type().
| bool fawkes::NetworkConfiguration::is_string | ( | const char * | path | ) | [virtual] |
Check if a value is of type string.
- Parameters:
-
path path to value
- Returns:
- true if the value exists and is of type string
Implements fawkes::Configuration.
Definition at line 239 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.
- Parameters:
-
path path to value
- Returns:
- true if the value exists and is of type unsigned int
Implements fawkes::Configuration.
Definition at line 218 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.
- Returns:
- iterator over all values
Implements fawkes::Configuration.
Definition at line 1338 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.
- Returns:
- iterator over all default values
Implements fawkes::Configuration.
Definition at line 1349 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.
- Returns:
- iterator over all host-specific values
Implements fawkes::Configuration.
Definition at line 1360 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.
- Parameters:
-
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 1317 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.
- Parameters:
-
h configuration change handler
Reimplemented from fawkes::Configuration.
Definition at line 1249 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("");
- Parameters:
-
path start of path
- Returns:
- iterator to search results
Implements fawkes::Configuration.
Definition at line 1371 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.
- Parameters:
-
path path to value b new bool value
Implements fawkes::Configuration.
Definition at line 827 of file netconf.cpp.
Referenced by copy().
| 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.
- Parameters:
-
path path to value comment new comment string
Implements fawkes::Configuration.
Definition at line 933 of file netconf.cpp.
| void fawkes::NetworkConfiguration::set_comment | ( | const char * | path, | |
| std::string & | comment | |||
| ) | [virtual] |
Set new comment for existing value.
- Parameters:
-
path path to value comment new comment string
Implements fawkes::Configuration.
Definition at line 947 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.
- Parameters:
-
path path to value b new bool value
Implements fawkes::Configuration.
Definition at line 834 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.
- Parameters:
-
path path to value comment new comment string
Implements fawkes::Configuration.
Definition at line 940 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.
- Parameters:
-
path path to value comment new comment string
Implements fawkes::Configuration.
Definition at line 954 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.
- Parameters:
-
path path to value f new float value
Implements fawkes::Configuration.
Definition at line 709 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.
- Parameters:
-
path path to value i new int value
Implements fawkes::Configuration.
Definition at line 791 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.
- Parameters:
-
path path to value s new string value
Implements fawkes::Configuration.
Definition at line 879 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.
- Parameters:
-
path path to value s new string value
Implements fawkes::Configuration.
Definition at line 893 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.
- Parameters:
-
path path to value uint new unsigned int value
Implements fawkes::Configuration.
Definition at line 752 of file netconf.cpp.
| void fawkes::NetworkConfiguration::set_float | ( | const char * | path, | |
| float | f | |||
| ) | [virtual] |
Set new value in configuration of type float.
- Parameters:
-
path path to value f new float value
Implements fawkes::Configuration.
Definition at line 702 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.
- Parameters:
-
path path to value i new int value
Implements fawkes::Configuration.
Definition at line 784 of file netconf.cpp.
Referenced by copy().
| void fawkes::NetworkConfiguration::set_mirror_mode | ( | bool | mirror | ) | [virtual] |
Enable or disable mirror mode.
- Parameters:
-
mirror true to enable mirror mode, false to disable
Definition at line 1262 of file netconf.cpp.
References fawkes::FawkesNetworkClient::enqueue(), fawkes::SQLiteConfiguration::load(), fawkes::Mutex::lock(), fawkes::Mutex::unlock(), fawkes::RefCount::unref(), 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.
- Parameters:
-
path path to value s new string value
Implements fawkes::Configuration.
Definition at line 872 of file netconf.cpp.
| void fawkes::NetworkConfiguration::set_string | ( | const char * | path, | |
| std::string & | s | |||
| ) | [virtual] |
Set new value in configuration of type string.
- Parameters:
-
path path to value s new string value
Implements fawkes::Configuration.
Definition at line 886 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.
- Parameters:
-
path path to value uint new unsigned int value
Implements fawkes::Configuration.
Definition at line 745 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().
- Parameters:
-
tag tag for this version
Implements fawkes::Configuration.
Definition at line 150 of file netconf.cpp.
References fawkes::Mutex::lock(), and fawkes::Mutex::unlock().
| std::list< std::string > fawkes::NetworkConfiguration::tags | ( | ) | [virtual] |
List of tags.
- Returns:
- list of tags
Implements fawkes::Configuration.
Definition at line 159 of file netconf.cpp.
References fawkes::Mutex::lock(), and fawkes::Mutex::unlock().
| bool fawkes::NetworkConfiguration::try_lock | ( | ) | [virtual] |
Try to lock the config.
- See also:
- Configuration::lock()
- Returns:
- true, if the lock has been aquired, false otherwise
Implements fawkes::Configuration.
Definition at line 1324 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 1331 of file netconf.cpp.
References fawkes::Mutex::unlock().
The documentation for this class was generated from the following files:
- src/libs/config/netconf.h
- src/libs/config/netconf.cpp

