EvolutionSyncSourceConfig Class Reference
[Configuration Handling]

#include <SyncEvolutionConfig.h>

Inheritance diagram for EvolutionSyncSourceConfig:

Inheritance graph
[legend]
Collaboration diagram for EvolutionSyncSourceConfig:

Collaboration graph
[legend]

List of all members.

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 ConfigPropertyRegistrygetRegistry ()

Static Public Attributes

static StringConfigProperty m_sourcePropSync


Detailed Description

This class maps per-source properties to ConfigNode properties. Some properties are not configurable and have to be provided by derived classes.

Definition at line 808 of file SyncEvolutionConfig.h.


Constructor & Destructor Documentation

EvolutionSyncSourceConfig::EvolutionSyncSourceConfig ( const string &  name,
const SyncSourceNodes nodes 
)

Definition at line 566 of file SyncEvolutionConfig.cpp.


Member Function Documentation

void EvolutionSyncSourceConfig::checkPassword ( ConfigUserInterface ui  )  [virtual]

bool EvolutionSyncSourceConfig::exists (  )  const [inline]

Definition at line 817 of file SyncEvolutionConfig.h.

References SyncSourceNodes::m_configNode.

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.

Returns:
an ArrayList of CTCap

Implements AbstractSyncSourceConfig.

Definition at line 964 of file SyncEvolutionConfig.h.

const char * EvolutionSyncSourceConfig::getDatabaseID (  )  const [virtual]

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.

Parameters:
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]

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

ConfigPropertyRegistry & EvolutionSyncSourceConfig::getRegistry (  )  [static]

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.

Returns:
the pair of <backend> and the (possibly empty) <format> specified in the "type" property; see sourcePropSourceType in SyncEvolutionConfig.cpp for details

Definition at line 764 of file SyncEvolutionConfig.cpp.

References getSourceTypeString(), and runtests::type.

string EvolutionSyncSourceConfig::getSourceTypeString ( const SyncSourceNodes nodes  )  [static]

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

  • slow
  • two-way
  • one-way-from-server
  • one-way-from-client
  • refresh-from-server
  • refresh-from-client
  • one-way-from-server
  • one-way-from-client
  • addrchange (Funambol extension)

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]

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]

void EvolutionSyncSourceConfig::setEncoding ( const string &  value,
bool  temporarily = false 
) [virtual]

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.

Parameters:
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]

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]

void EvolutionSyncSourceConfig::setURI ( const string &  value,
bool  temporarily = false 
) [virtual]

void EvolutionSyncSourceConfig::setUser ( const string &  value,
bool  temporarily = false 
) [virtual]


Member Data Documentation


The documentation for this class was generated from the following files:

Generated on Sat Oct 18 17:17:04 2008 for SyncEvolution and Funambol by  doxygen 1.5.7.1