SyncManagerConfig Class Reference
[Client]

This implementation is just a transient configuration information repository; persisting configuration settings is delegated to subclasses. More...

#include <SyncManagerConfig.h>

Inheritance diagram for SyncManagerConfig:
[legend]
Collaboration diagram for SyncManagerConfig:
[legend]

List of all members.

Public Member Functions

virtual AbstractSyncSourceConfiggetAbstractSyncSourceConfig (const char *name) const
virtual AbstractSyncSourceConfiggetAbstractSyncSourceConfig (unsigned int i) const
virtual unsigned int getAbstractSyncSourceConfigsCount () const
virtual unsigned int getSyncSourceConfigsCount () const
virtual SyncSourceConfiggetSyncSourceConfigs () const
virtual SyncSourceConfiggetSyncSourceConfig (const char *name, bool refresh=false) const
virtual SyncSourceConfiggetSyncSourceConfig (unsigned int i, bool refresh=false) const
virtual bool setSyncSourceConfig (SyncSourceConfig &sc)
virtual const AccessConfig & getAccessConfig () const
virtual AccessConfig & getAccessConfig ()
virtual void setAccessConfig (AccessConfig &ac)
virtual const DeviceConfig & getDeviceConfig () const
virtual DeviceConfig & getDeviceConfig ()
virtual void setDeviceConfig (DeviceConfig &dc)
virtual const DeviceConfig & getClientConfig () const
 get the clientConfig that stores the client configurations
virtual DeviceConfig & getClientConfig ()
virtual void setClientConfig (DeviceConfig &dc)
virtual const DeviceConfig & getServerConfig () const
virtual DeviceConfig & getServerConfig ()
virtual void setServerConfig (DeviceConfig &dc)
unsigned int isDirty () const
void setClientDefaults ()
 Initializes the access and device config with default values from DefaultConfigFactory.
void setSourceDefaults (const char *name)
 Initializes the given source with default values from DefaultConfigFactory.
virtual const char * getUsername () const
 Returns the username value.
virtual const char * getPassword () const
 Returns the password value.
virtual bool getUseProxy () const
 Should the sync engine use a HTTP proxy?
virtual const char * getProxyHost () const
 Returns the proxyHost value.
virtual int getProxyPort () const
virtual const char * getProxyUsername () const
 Returns the proxyUsername value.
virtual const char * getProxyPassword () const
 Returns the proxyPassword value.
virtual const char * getSyncURL () const
 Returns the syncURL value.
virtual void setSyncURL (const char *v)
virtual void setBeginSync (unsigned long timestamp)
 Sets the new "beginSync" timestamp.
virtual void setEndSync (unsigned long timestamp)
 Sets the new "endSync" timestamp.
virtual bool getServerAuthRequired () const
 Does the server require authentication?
virtual const char * getClientAuthType () const
 the type of client authentication used by client:
  • syncml:basic-auth
  • syncml:md5-auth

virtual const char * getServerAuthType () const
 same as for client?
virtual const char * getServerPWD () const
 the server password
virtual const char * getServerID () const
 the server ID value
virtual const char * getServerNonce () const
 The server nonce value: from client to server.
virtual void setServerNonce (const char *v)
virtual const char * getClientNonce () const
 The client nonce value: from server to client.
virtual void setClientNonce (const char *v)
virtual unsigned long getMaxMsgSize () const
 The maximum message size (Byte) accepted for XML messages received from server (server to client).
virtual unsigned long getReadBufferSize () const
 Specifies the value for the size of the buffer used to store the incoming stream from server (byte).
virtual const char * getUserAgent () const
 The user agent string, will be attached to http messages to identify the client on server side.
virtual bool getCompression () const
virtual unsigned int getResponseTimeout () const
 The number of seconds of waiting response timeout.
virtual const char * getMan () const
 Specifies the name of the manufacturer of the device.
virtual const char * getMod () const
 Specifies the model name or model number of the device.
virtual const char * getOem () const
 Specifies the OEM (Original Equipment Manufacturer) of the device.
virtual const char * getFwv () const
 Specifies the firmware version of the device.
virtual const char * getSwv () const
 Specifies the software version of the device.
virtual const char * getHwv () const
 Specifies the hardware version of the device.
virtual const char * getDevID () const
 Specifies the identifier of the source synchronization device.
virtual const char * getDevType () const
 Specifies the type of the source synchronization device.
virtual const char * getDsV () const
 Specifies the implemented DS version.
virtual bool getUtc () const
 Specifies that the device supports UTC based time.
virtual bool getLoSupport () const
 Specifies that the device supports handling of large objects.
virtual bool getNocSupport () const
 Specifies that the device supports number of changes.
virtual unsigned int getMaxObjSize () const
 Specifies the maximum object size allowed by the device.
virtual const char * getDevInfHash () const
 This is a hash value generated from all properties that are used for the <DevInf> element, plus the syncURL property.
virtual void setDevInfHash (const char *hash)
virtual bool getSendDevInfo () const
 Specifies if devinfo should be sent.
virtual void setSendDevInfo (bool v)
virtual bool getForceServerDevInfo () const
 Specifies if Server devinfo should be asked even if not necessary.
virtual void setForceServerDevInfo (bool v)
virtual void setServerSwv (const char *v)
virtual void setServerFwv (const char *v)
 Specifies the firmware version of the Server.
virtual void setServerHwv (const char *v)
 Specifies the hardware version of the Server.
virtual void setServerMan (const char *v)
 Specifies the name of the manufacturer of the Server.
virtual void setServerMod (const char *v)
 Specifies the model name or model number of the Server.
virtual void setServerOem (const char *v)
 Specifies the OEM (Original Equipment Manufacturer) of the Server.
virtual void setServerDevID (const char *v)
 Specifies the Server identifier.
virtual void setServerDevType (const char *v)
 Specifies the Server type (expected "server").
virtual void setServerUtc (const bool v)
 Specifies if the Server supports UTC based time.
virtual void setServerLoSupport (const bool v)
 Specifies if the Server supports handling of large objects.
virtual void setServerNocSupport (const bool v)
 Specifies if the Server supports number of changes.
virtual void setServerVerDTD (const char *v)
 Specifies the DTD version of the Server (expected "1.2").
virtual void setServerSmartSlowSync (const int v)
 Specifies if the Server supports the Smart Slow sync.
virtual void setServerMultipleEmailAccount (const int v)
 Specifies if the Server supports MEA.
virtual void setServerLastSyncURL (const char *v)
virtual const char * getServerSwv () const
 Specifies the Server software version.
virtual const char * getServerFwv () const
virtual const char * getServerHwv () const
virtual const char * getServerMan () const
virtual const char * getServerMod () const
virtual const char * getServerOem () const
virtual const char * getServerDevID () const
virtual const char * getServerDevType () const
virtual bool getServerUtc () const
virtual bool getServerLoSupport () const
virtual bool getServerNocSupport () const
virtual const char * getServerVerDTD () const
virtual int getServerSmartSlowSync () const
virtual int getMultipleEmailAccount () const
virtual const char * getServerLastSyncURL () const
 Specifies the Server URL correspondant to the devInf obtained.
virtual void setServerDataStores (const ArrayList *dataStores)
 Specifies the array of DataStores supported by the Server.
virtual const ArrayList * getServerDataStores () const
 Returns the array of DataStores supported by the Server.
DataStore * getServerDataStore (const char *sourceRef)
 Returns a specific Server DataStore, given its name (sourceRef).
virtual bool isToAbort ()
virtual void setToAbort (bool val=true)
virtual int getLastGlobalError ()
 Returns the global error code of last sync.
virtual void setLastGlobalError (const int val)
 Sets the global last error code.

Protected Member Functions

virtual bool addSyncSourceConfig (SyncSourceConfig &sc)

Protected Attributes

AccessConfig accessConfig
DeviceConfig clientConfig
DeviceConfig serverConfig
SyncSourceConfigsourceConfigs
unsigned int sourceConfigsCount
bool abortSyncProcess
int lastGlobalError
 This is the global error code of the last synchronization done (global, not related to a specific source: for sources errors see SyncSourceConfig::lastSourceError).


Detailed Description

This implementation is just a transient configuration information repository; persisting configuration settings is delegated to subclasses.

Member Function Documentation

virtual const DeviceConfig& SyncManagerConfig::getClientConfig (  )  const [inline, virtual]

virtual const char* SyncManagerConfig::getDevID (  )  const [inline, virtual]

Specifies the identifier of the source synchronization device.

The content information MUST specify an identifier which is unique among all devices accessing the same data on a SyncML server.

Implements AbstractSyncConfig.

References getClientConfig().

virtual const char* SyncManagerConfig::getDevInfHash (  )  const [inline, virtual]

This is a hash value generated from all properties that are used for the <DevInf> element, plus the syncURL property.

If the hash changes between sync sessions the information has changed and must be resent.

Implements AbstractSyncConfig.

References getClientConfig().

virtual const char* SyncManagerConfig::getDevType (  )  const [inline, virtual]

Specifies the type of the source synchronization device.

Type values for this element type can be e.g. "pager", "handheld", "pda", "phone", "smartphone", "server", "workstation". Other values can also be specified. This property is mandatory.

Implements AbstractSyncConfig.

References getClientConfig().

virtual const char* SyncManagerConfig::getDsV (  )  const [inline, virtual]

Specifies the implemented DS version.

This property is optional.

Implements AbstractSyncConfig.

References getClientConfig().

virtual bool SyncManagerConfig::getForceServerDevInfo (  )  const [inline, virtual]

Specifies if Server devinfo should be asked even if not necessary.

Can be used by Clients to force asking Server caps.

Implements AbstractSyncConfig.

References getClientConfig().

virtual const char* SyncManagerConfig::getFwv (  )  const [inline, virtual]

Specifies the firmware version of the device.

This property is optional.

Implements AbstractSyncConfig.

References getClientConfig().

virtual const char* SyncManagerConfig::getHwv (  )  const [inline, virtual]

Specifies the hardware version of the device.

This property is optional.

Implements AbstractSyncConfig.

References getClientConfig().

virtual const char* SyncManagerConfig::getMan (  )  const [inline, virtual]

Specifies the name of the manufacturer of the device.

This property is optional.

Implements AbstractSyncConfig.

References getClientConfig().

virtual unsigned int SyncManagerConfig::getMaxObjSize (  )  const [inline, virtual]

Specifies the maximum object size allowed by the device.

Value 0 means "no maxObjSize set".

Implements AbstractSyncConfig.

References getClientConfig().

virtual const char* SyncManagerConfig::getMod (  )  const [inline, virtual]

Specifies the model name or model number of the device.

This property is optional.

Implements AbstractSyncConfig.

References getClientConfig().

virtual bool SyncManagerConfig::getNocSupport (  )  const [inline, virtual]

Specifies that the device supports number of changes.

Must be false.

Implements AbstractSyncConfig.

References getClientConfig().

virtual const char* SyncManagerConfig::getOem (  )  const [inline, virtual]

Specifies the OEM (Original Equipment Manufacturer) of the device.

This property is optional.

Implements AbstractSyncConfig.

References getClientConfig().

DataStore* SyncManagerConfig::getServerDataStore ( const char *  sourceRef  )  [inline]

Returns a specific Server DataStore, given its name (sourceRef).

If not found, returns NULL.

Referenced by startSync().

virtual const char* SyncManagerConfig::getServerLastSyncURL (  )  const [inline, virtual]

Specifies the Server URL correspondant to the devInf obtained.

It's used to check if the Server URL changed from last time, in this case the Server devInf are obsolete (will ask them again).

Implements AbstractSyncConfig.

virtual const char* SyncManagerConfig::getSwv (  )  const [inline, virtual]

Specifies the software version of the device.

This property is optional.

Implements AbstractSyncConfig.

References getClientConfig().

Referenced by initializeClient(), OutlookConfig::read(), OutlookConfig::readFunambolSwv(), and OutlookConfig::upgradeConfig().

virtual const char* SyncManagerConfig::getSyncURL (  )  const [inline, virtual]

Returns the syncURL value.

If the URL does not start with http:// (or HTTP://) or https:// (or HTTPS://), http:// is prepended to the given string.

Implements AbstractSyncConfig.

Referenced by OutlookConfig::save(), SyncManagerTest::testLargeObject2(), and SyncManagerTest::testServerError506().

virtual const char* SyncManagerConfig::getUserAgent (  )  const [inline, virtual]

The user agent string, will be attached to http messages to identify the client on server side.

It should be a short description with the client name plus its version

Implements AbstractSyncConfig.

virtual const char* SyncManagerConfig::getUsername (  )  const [inline, virtual]

Returns the username value.

Returns:
The username value. The caller MUST NOT release the memory itself.

Implements AbstractSyncConfig.

virtual bool SyncManagerConfig::getUtc (  )  const [inline, virtual]

Specifies that the device supports UTC based time.

If utc = true, the server SHOULD send time in UTC format, else MUST send in local time.

Implements AbstractSyncConfig.

References getClientConfig().

virtual void SyncManagerConfig::setBeginSync ( unsigned long   )  [inline, virtual]

Sets the new "beginSync" timestamp.

The client can use this value if it wants to, but it doesn't have to store it persistently.

Parameters:
timestamp the beginSync timestamp

Reimplemented from AbstractSyncConfig.

virtual void SyncManagerConfig::setEndSync ( unsigned long   )  [inline, virtual]

Sets the new "endSync" timestamp.

The client can use this value if it wants to, but it doesn't have to store it persistently.

Parameters:
timestamp the endSync timestamp

Reimplemented from AbstractSyncConfig.

virtual void SyncManagerConfig::setServerDataStores ( const ArrayList *  dataStores  )  [inline, virtual]

Specifies the array of DataStores supported by the Server.

Existing datastores will be replaced by these ones.

Implements AbstractSyncConfig.


Member Data Documentation

This is the global error code of the last synchronization done (global, not related to a specific source: for sources errors see SyncSourceConfig::lastSourceError).

It is read/stored in the configuration, so it is accessible at any time, even after the sync ended. If using the SyncClient object to trigger the sync, its value is the SyncReport's lastErrorCode, set at the end of each sync session. Code 0 means "no error occurred".

Referenced by getLastGlobalError(), and setLastGlobalError().


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

Generated on Tue Apr 6 13:00:43 2010 for Funambol Outlook Plug-in Library by  doxygen 1.5.7.1