#include <SyncEvolutionConfig.h>
Settings specific to SyncEvolution SyncSources | |
virtual const char * | getUser () const |
virtual void | setUser (const string &value, bool temporarily=false) |
const char * | getPassword () const |
virtual void | setPassword (const string &value, bool temporarily=false) |
virtual void | checkPassword (ConfigUserInterface &ui) |
virtual const char * | getDatabaseID () const |
virtual void | setDatabaseID (const string &value, bool temporarily=false) |
virtual pair< string, string > | getSourceType () const |
virtual void | setSourceType (const string &value, bool temporarily=false) |
static pair< string, string > | getSourceType (const SyncSourceNodes &nodes) |
static string | getSourceTypeString (const SyncSourceNodes &nodes) |
Public Member Functions | |
EvolutionSyncSourceConfig (const string &name, const SyncSourceNodes &nodes) | |
bool | exists () const |
Calls which have to be implemented by each EvolutionSyncSource. | |
virtual const char * | getMimeType () const =0 |
virtual const char * | getMimeVersion () const =0 |
virtual const char * | getSupportedTypes () const =0 |
Calls which usually do not have to be implemented by each EvolutionSyncSource. | |
virtual const char * | getURI () const |
virtual void | setURI (const string &value, bool temporarily=false) |
virtual const char * | getSyncModes () const |
virtual const char * | getSync () const |
virtual void | setSync (const string &value, bool temporarily=false) |
virtual const char * | getEncoding () const |
virtual void | setEncoding (const string &value, bool temporarily=false) |
virtual unsigned long | getLast () const |
virtual void | setLast (unsigned long timestamp) |
virtual const char * | getEncryption () const |
virtual const ArrayList & | getCtCaps () const |
Calls implemented by SyncEvolution. | |
virtual const char * | getType () const |
virtual const char * | getVersion () const |
virtual const char * | getName () const |
Static Public Member Functions | |
static ConfigPropertyRegistry & | getRegistry () |
Static Public Attributes | |
static StringConfigProperty | m_sourcePropSync |
Definition at line 808 of file SyncEvolutionConfig.h.
EvolutionSyncSourceConfig::EvolutionSyncSourceConfig | ( | const string & | name, | |
const SyncSourceNodes & | nodes | |||
) |
Definition at line 566 of file SyncEvolutionConfig.cpp.
void EvolutionSyncSourceConfig::checkPassword | ( | ConfigUserInterface & | ui | ) | [virtual] |
same as EvolutionSyncConfig::checkPassword()
Definition at line 751 of file SyncEvolutionConfig.cpp.
References PasswordConfigProperty::checkPassword(), and SyncSourceNodes::m_configNode.
Referenced by EvolutionSyncClient::status(), and EvolutionSyncClient::sync().
bool EvolutionSyncSourceConfig::exists | ( | ) | const [inline] |
virtual const ArrayList& EvolutionSyncSourceConfig::getCtCaps | ( | ) | const [inline, virtual] |
Returns an array of CtCap with all the capabilities for this source. The capabilities specify which parts of e.g. a vCard the sync source supports. Not specifying this in detail by returning an empty array implies that it supports all aspects. This is the default implementation of this call.
Implements AbstractSyncSourceConfig.
Definition at line 964 of file SyncEvolutionConfig.h.
const char * EvolutionSyncSourceConfig::getDatabaseID | ( | ) | const [virtual] |
Definition at line 743 of file SyncEvolutionConfig.cpp.
References ConfigStringCache::getProperty(), and SyncSourceNodes::m_configNode.
Referenced by SQLiteContactSource::open(), FileSyncSource::open(), EvolutionContactSource::open(), and EvolutionCalendarSource::open().
const char * EvolutionSyncSourceConfig::getEncoding | ( | ) | const [virtual] |
Specifies how the content of an outgoing item should be encoded by the client library if the sync source does not set an encoding on the item that it created. Valid values are listed in SyncItem::encodings.
Implements AbstractSyncSourceConfig.
Definition at line 759 of file SyncEvolutionConfig.cpp.
References ConfigStringCache::getProperty(), and SyncSourceNodes::m_configNode.
virtual const char* EvolutionSyncSourceConfig::getEncryption | ( | ) | const [inline, virtual] |
"des" enables an encryption mode which only the Funambol server understands. Not configurable in SyncEvolution unless a derived SyncSource decides otherwise.
Implements AbstractSyncSourceConfig.
Definition at line 953 of file SyncEvolutionConfig.h.
unsigned long EvolutionSyncSourceConfig::getLast | ( | ) | const [virtual] |
Sets the last sync timestamp. Called by the sync engine at the end of a sync. The client must save that modified value; it is needed to decide during the next sync whether an incremental sync is possible.
SyncEvolution will reset this value when a SyncSource fails and thus force a slow sync during the next sync.
timestamp | the last sync timestamp |
Implements AbstractSyncSourceConfig.
Definition at line 761 of file SyncEvolutionConfig.cpp.
References TypedConfigProperty< T >::getProperty(), and SyncSourceNodes::m_hiddenNode.
virtual const char* EvolutionSyncSourceConfig::getMimeType | ( | ) | const [pure virtual] |
Returns the preferred mime type of the items handled by the sync source. Example: "text/x-vcard"
Implemented in AddressBookSource, EvolutionCalendarSource, EvolutionContactSource, EvolutionMemoSource, FileSyncSource, SQLiteContactSource, TestEvolutionSyncSource, EvolutionSyncSource, PersistentEvolutionSyncSourceConfig, and TrackingSyncSource.
Referenced by getType().
virtual const char* EvolutionSyncSourceConfig::getMimeVersion | ( | ) | const [pure virtual] |
Returns the version of the mime type used by client. Example: "2.1"
Implemented in AddressBookSource, EvolutionCalendarSource, EvolutionContactSource, EvolutionMemoSource, FileSyncSource, SQLiteContactSource, TestEvolutionSyncSource, EvolutionSyncSource, PersistentEvolutionSyncSourceConfig, and TrackingSyncSource.
Referenced by getVersion().
virtual const char* EvolutionSyncSourceConfig::getName | ( | ) | const [inline, virtual] |
Returns the SyncSource name.
Implements AbstractSyncSourceConfig.
Definition at line 974 of file SyncEvolutionConfig.h.
const char * EvolutionSyncSourceConfig::getPassword | ( | ) | const |
Definition at line 747 of file SyncEvolutionConfig.cpp.
References PasswordConfigProperty::getCachedProperty(), ConfigProperty::getName(), SyncSourceNodes::m_configNode, and ConfigStringCache::storeString().
Referenced by EvolutionCalendarSource::authenticate(), and EvolutionContactSource::open().
ConfigPropertyRegistry & EvolutionSyncSourceConfig::getRegistry | ( | ) | [static] |
Definition at line 720 of file SyncEvolutionConfig.cpp.
References m_sourcePropSync, ConfigProperty::setHidden(), and ConfigProperty::setObligatory().
Referenced by EvolutionSyncConfig::copy(), SyncEvolutionCmdline::run(), and EvolutionSyncConfig::setSourceDefaults().
pair< string, string > EvolutionSyncSourceConfig::getSourceType | ( | ) | const [virtual] |
Definition at line 776 of file SyncEvolutionConfig.cpp.
Referenced by EvolutionSyncSource::createSource().
pair< string, string > EvolutionSyncSourceConfig::getSourceType | ( | const SyncSourceNodes & | nodes | ) | [static] |
Returns the data source type configured as part of the given configuration; different EvolutionSyncSources then check whether they support that type. This call has to work before instantiating a source and thus gets passed a node to read from.
Definition at line 764 of file SyncEvolutionConfig.cpp.
References getSourceTypeString(), and runtests::type.
string EvolutionSyncSourceConfig::getSourceTypeString | ( | const SyncSourceNodes & | nodes | ) | [static] |
Definition at line 763 of file SyncEvolutionConfig.cpp.
References SyncSourceNodes::m_configNode.
Referenced by EvolutionSyncSource::createSource(), and getSourceType().
virtual const char* EvolutionSyncSourceConfig::getSupportedTypes | ( | ) | const [pure virtual] |
A string representing the source types (with versions) supported by the SyncSource. The string must be formatted as a sequence of "type:version" separated by commas ','. For example: "text/x-vcard:2.1,text/vcard:3.0". The version can be left empty, for example: "text/x-s4j-sifc:". Supported types will be sent as part of the DevInf.
Implements AbstractSyncSourceConfig.
Implemented in AddressBookSource, EvolutionCalendarSource, EvolutionContactSource, EvolutionMemoSource, FileSyncSource, SQLiteContactSource, TestEvolutionSyncSource, EvolutionSyncSource, PersistentEvolutionSyncSourceConfig, and TrackingSyncSource.
const char * EvolutionSyncSourceConfig::getSync | ( | ) | const [virtual] |
Gets the default syncMode as one of the strings listed in setSyncModes.
Implements AbstractSyncSourceConfig.
Definition at line 757 of file SyncEvolutionConfig.cpp.
References ConfigStringCache::getProperty(), SyncSourceNodes::m_configNode, and m_sourcePropSync.
virtual const char* EvolutionSyncSourceConfig::getSyncModes | ( | ) | const [inline, virtual] |
Returns a comma separated list of the possible syncModes for the SyncSource. Sync modes can be one of
This is hard-coded in SyncEvolution because changing it wouldn't have any effect (IMHO).
Implements AbstractSyncSourceConfig.
Definition at line 917 of file SyncEvolutionConfig.h.
virtual const char* EvolutionSyncSourceConfig::getType | ( | ) | const [inline, virtual] |
Returns the mime type of the items handled by the sync source.
Implements AbstractSyncSourceConfig.
Definition at line 972 of file SyncEvolutionConfig.h.
References getMimeType().
const char * EvolutionSyncSourceConfig::getURI | ( | ) | const [virtual] |
Returns the SyncSource URI: used in SyncML to address the data on the server.
Each URI has to be unique during a sync session, i.e. two different sync sources cannot access the same data at the same time.
Implements AbstractSyncSourceConfig.
Definition at line 755 of file SyncEvolutionConfig.cpp.
References ConfigStringCache::getProperty(), and SyncSourceNodes::m_configNode.
const char * EvolutionSyncSourceConfig::getUser | ( | ) | const [virtual] |
Definition at line 745 of file SyncEvolutionConfig.cpp.
References ConfigStringCache::getProperty(), and SyncSourceNodes::m_configNode.
Referenced by EvolutionContactSource::open().
virtual const char* EvolutionSyncSourceConfig::getVersion | ( | ) | const [inline, virtual] |
Returns the version of the source type used by client.
Implements AbstractSyncSourceConfig.
Definition at line 973 of file SyncEvolutionConfig.h.
References getMimeVersion().
void EvolutionSyncSourceConfig::setDatabaseID | ( | const string & | value, | |
bool | temporarily = false | |||
) | [virtual] |
Definition at line 744 of file SyncEvolutionConfig.cpp.
References SyncSourceNodes::m_configNode, and ConfigProperty::setProperty().
Referenced by EvolutionSyncSource::createTestingSource().
void EvolutionSyncSourceConfig::setEncoding | ( | const string & | value, | |
bool | temporarily = false | |||
) | [virtual] |
Definition at line 760 of file SyncEvolutionConfig.cpp.
References SyncSourceNodes::m_configNode, and ConfigProperty::setProperty().
void EvolutionSyncSourceConfig::setLast | ( | unsigned long | timestamp | ) | [virtual] |
Sets the last sync timestamp. Called by the sync engine at the end of a sync. The client must save that modified value; it is needed to decide during the next sync whether an incremental sync is possible.
A client which wants to force a slow sync after a failed sync can reset the time stamp. The sync engine itself won't do that.
timestamp | the last sync timestamp |
Implements AbstractSyncSourceConfig.
Definition at line 762 of file SyncEvolutionConfig.cpp.
References SyncSourceNodes::m_hiddenNode, and TypedConfigProperty< T >::setProperty().
void EvolutionSyncSourceConfig::setPassword | ( | const string & | value, | |
bool | temporarily = false | |||
) | [virtual] |
Definition at line 754 of file SyncEvolutionConfig.cpp.
References SyncSourceNodes::m_configNode, and ConfigProperty::setProperty().
void EvolutionSyncSourceConfig::setSourceType | ( | const string & | value, | |
bool | temporarily = false | |||
) | [virtual] |
set the source type in <backend>[:format] style
Definition at line 777 of file SyncEvolutionConfig.cpp.
References SyncSourceNodes::m_configNode.
Referenced by EvolutionSyncSource::createTestingSource(), and TestEvolutionSyncSource::TestEvolutionSyncSource().
void EvolutionSyncSourceConfig::setSync | ( | const string & | value, | |
bool | temporarily = false | |||
) | [virtual] |
Definition at line 758 of file SyncEvolutionConfig.cpp.
References SyncSourceNodes::m_configNode, m_sourcePropSync, and ConfigProperty::setProperty().
void EvolutionSyncSourceConfig::setURI | ( | const string & | value, | |
bool | temporarily = false | |||
) | [virtual] |
Definition at line 756 of file SyncEvolutionConfig.cpp.
References SyncSourceNodes::m_configNode, and ConfigProperty::setProperty().
void EvolutionSyncSourceConfig::setUser | ( | const string & | value, | |
bool | temporarily = false | |||
) | [virtual] |
Definition at line 746 of file SyncEvolutionConfig.cpp.
References SyncSourceNodes::m_configNode, and ConfigProperty::setProperty().
sync mode for sync sources
Definition at line 815 of file SyncEvolutionConfig.h.
Referenced by getRegistry(), getSync(), SyncEvolutionCmdline::parse(), SyncEvolutionCmdline::run(), EvolutionSyncClient::setConfigFilter(), and setSync().