#include <SyncEvolutionConfig.h>

Public Member Functions | |
| ConfigProperty (const string &name, const string &comment, const string &def=string("")) | |
| virtual | ~ConfigProperty () |
| virtual string | getName () const |
| virtual string | getComment () const |
| virtual string | getDefValue () const |
| virtual bool | checkValue (const string &value, string &error) const |
| bool | isHidden () const |
| void | setHidden (bool hidden) |
| bool | isObligatory () const |
| void | setObligatory (bool obligatory) |
| void | setProperty (ConfigNode &node, const string &value) const |
| void | setProperty (FilterConfigNode &node, const string &value, bool temporarily=false) const |
| void | setDefaultProperty (ConfigNode &node, bool force) const |
| virtual string | getProperty (const ConfigNode &node, bool *isDefault=NULL) const |
Static Public Member Functions | |
| static void | splitComment (const string &comment, list< string > &commentLines) |
Protected Member Functions | |
| void | throwValueError (const ConfigNode &node, const string &name, const string &value, const string &error) const |
A default value is returned if the ConfigNode doesn't have a value set (= empty string). Invalid values in the configuration trigger an exception. Setting invalid values does not because it is not known where the value comes from - the caller should check it himself.
Definition at line 60 of file SyncEvolutionConfig.h.
| ConfigProperty::ConfigProperty | ( | const string & | name, | |
| const string & | comment, | |||
| const string & | def = string("") | |||
| ) | [inline] |
Definition at line 62 of file SyncEvolutionConfig.h.
| virtual ConfigProperty::~ConfigProperty | ( | ) | [inline, virtual] |
Definition at line 69 of file SyncEvolutionConfig.h.
| virtual bool ConfigProperty::checkValue | ( | const string & | value, | |
| string & | error | |||
| ) | const [inline, virtual] |
Check whether the given value is okay. If not, then set an error string (one line, no punctuation).
Reimplemented in StringConfigProperty, and TypedConfigProperty< T >.
Definition at line 81 of file SyncEvolutionConfig.h.
Referenced by getProperty().
| virtual string ConfigProperty::getComment | ( | ) | const [inline, virtual] |
Definition at line 72 of file SyncEvolutionConfig.h.
Referenced by setDefaultProperty(), TypedConfigProperty< T >::setProperty(), and setProperty().
| virtual string ConfigProperty::getDefValue | ( | ) | const [inline, virtual] |
Definition at line 73 of file SyncEvolutionConfig.h.
Referenced by TypedConfigProperty< T >::getProperty(), getProperty(), and setDefaultProperty().
| virtual string ConfigProperty::getName | ( | ) | const [inline, virtual] |
Definition at line 71 of file SyncEvolutionConfig.h.
Referenced by ConfigPropertyRegistry::find(), EvolutionSyncSourceConfig::getPassword(), EvolutionSyncConfig::getPassword(), ConfigStringCache::getProperty(), TypedConfigProperty< T >::getProperty(), getProperty(), EvolutionSyncConfig::getProxyPassword(), TypedConfigProperty< T >::setProperty(), and setProperty().
| virtual string ConfigProperty::getProperty | ( | const ConfigNode & | node, | |
| bool * | isDefault = NULL | |||
| ) | const [inline, virtual] |
| isDefault | return true if the node had no value set and the default was returned instead |
Reimplemented in StringConfigProperty.
Definition at line 112 of file SyncEvolutionConfig.h.
References checkValue(), getDefValue(), getName(), ConfigNode::readProperty(), and throwValueError().
Referenced by PasswordConfigProperty::checkPassword(), PasswordConfigProperty::getCachedProperty(), and ConfigStringCache::getProperty().
| bool ConfigProperty::isHidden | ( | ) | const [inline] |
Definition at line 86 of file SyncEvolutionConfig.h.
| bool ConfigProperty::isObligatory | ( | ) | const [inline] |
Definition at line 89 of file SyncEvolutionConfig.h.
| void ConfigProperty::setDefaultProperty | ( | ConfigNode & | node, | |
| bool | force | |||
| ) | const [inline] |
set default value of a property, marked as default unless forced setting
Definition at line 103 of file SyncEvolutionConfig.h.
References getComment(), getDefValue(), and ConfigNode::setProperty().
| void ConfigProperty::setHidden | ( | bool | hidden | ) | [inline] |
Definition at line 87 of file SyncEvolutionConfig.h.
Referenced by EvolutionSyncSourceConfig::getRegistry(), and EvolutionSyncConfig::getRegistry().
| void ConfigProperty::setObligatory | ( | bool | obligatory | ) | [inline] |
Definition at line 90 of file SyncEvolutionConfig.h.
Referenced by EvolutionSyncSourceConfig::getRegistry(), and EvolutionSyncConfig::getRegistry().
| void ConfigProperty::setProperty | ( | FilterConfigNode & | node, | |
| const string & | value, | |||
| bool | temporarily = false | |||
| ) | const [inline] |
Definition at line 94 of file SyncEvolutionConfig.h.
References FilterConfigNode::addFilter(), getComment(), and FilterConfigNode::setProperty().
| void ConfigProperty::setProperty | ( | ConfigNode & | node, | |
| const string & | value | |||
| ) | const [inline] |
set value unconditionally, even if it is not valid
Definition at line 93 of file SyncEvolutionConfig.h.
References getComment(), getName(), and ConfigNode::setProperty().
Referenced by EvolutionSyncConfig::setClientAuthType(), EvolutionSyncConfig::setClientNonce(), EvolutionSyncSourceConfig::setDatabaseID(), EvolutionSyncConfig::setDevID(), EvolutionSyncConfig::setDevInfHash(), EvolutionSyncSourceConfig::setEncoding(), EvolutionSyncConfig::setLogDir(), EvolutionSyncSourceConfig::setPassword(), EvolutionSyncConfig::setPassword(), EvolutionSyncConfig::setProxyHost(), EvolutionSyncConfig::setProxyPassword(), EvolutionSyncConfig::setProxyUsername(), EvolutionSyncConfig::setServerNonce(), EvolutionSyncConfig::setSSLServerCertificates(), EvolutionSyncSourceConfig::setSync(), EvolutionSyncConfig::setSyncURL(), EvolutionSyncSourceConfig::setURI(), EvolutionSyncSourceConfig::setUser(), and EvolutionSyncConfig::setUsername().
| void ConfigProperty::splitComment | ( | const string & | comment, | |
| list< string > & | commentLines | |||
| ) | [static] |
split
separated comment into lines without
, appending them to commentLines
Definition at line 35 of file SyncEvolutionConfig.cpp.
Referenced by FileConfigNode::setProperty().
| void ConfigProperty::throwValueError | ( | const ConfigNode & | node, | |
| const string & | name, | |||
| const string & | value, | |||
| const string & | error | |||
| ) | const [protected] |
Definition at line 51 of file SyncEvolutionConfig.cpp.
References ConfigNode::getName(), and EvolutionSyncClient::throwError().
Referenced by TypedConfigProperty< T >::getProperty(), and getProperty().
1.5.7.1