#include <SyncClient.h>
Public Member Functions | |
SyncClient () | |
virtual | ~SyncClient () |
virtual int | sync (AbstractSyncConfig &config, SyncSource **sources) |
virtual int | sync (AbstractSyncConfig &config, char **sourceNames=NULL) |
SyncReport * | getSyncReport () |
Protected Member Functions | |
virtual int | prepareSync (AbstractSyncConfig &) |
virtual int | createSyncSource (const char *, const int, AbstractSyncSourceConfig *, SyncSource **source) |
virtual int | beginSync (SyncSource **) |
virtual int | endSync (SyncSource **) |
virtual int | continueAfterPrepareSync () |
virtual int | continueAfterSync () |
Protected Attributes | |
SyncReport | syncReport |
Warning: the library contains global data in several different places. Therefore it is not possible to execute multiple sessions in parallel.
Definition at line 64 of file SyncClient.h.
SyncClient::SyncClient | ( | ) |
virtual SyncClient::~SyncClient | ( | ) | [virtual] |
virtual int SyncClient::beginSync | ( | SyncSource ** | ) | [inline, protected, virtual] |
Callback invoked after creating all sources.
Definition at line 163 of file SyncClient.h.
virtual int SyncClient::continueAfterPrepareSync | ( | ) | [inline, protected, virtual] |
Callback invoked after the prepareSync function.
Definition at line 180 of file SyncClient.h.
virtual int SyncClient::continueAfterSync | ( | ) | [inline, protected, virtual] |
Callback invoked after the sync function.
Definition at line 188 of file SyncClient.h.
virtual int SyncClient::createSyncSource | ( | const char * | , | |
const | int, | |||
AbstractSyncSourceConfig * | , | |||
SyncSource ** | source | |||
) | [inline, protected, virtual] |
A factory method that is used by the sync() call to create the sync sources that are to be synchronized. Not used by the sync(SyncSource**) call.
name | name of the sync source | |
pos | position of the SyncSource in the SSConfig array (index: 0 - numSources-1) | |
config | a pointer to the source's configuration: this includes all properties that the client library knows and uses itself (only valid during this call) This pointer is owned by AbstractSyncConfig, sources uses it to initialize the internal config by reference. |
source | the sync source created by the client or NULL if there is no sync source currently associated with the config or it is inactive; instance is a new SyncSource* and it's freed by the caller (see finally) |
Definition at line 151 of file SyncClient.h.
virtual int SyncClient::endSync | ( | SyncSource ** | ) | [inline, protected, virtual] |
Callback invoked after the sync process.
Definition at line 171 of file SyncClient.h.
SyncReport* SyncClient::getSyncReport | ( | ) |
Referenced by SourceList::syncDone().
virtual int SyncClient::prepareSync | ( | AbstractSyncConfig & | ) | [inline, protected, virtual] |
A callback into a derived class which is called after reading the SyncML configuration and before creating sources. Not used by the sync(SyncSource**) call.
config | a reference to SyncManager configuration can be used to read client specific properties |
Definition at line 126 of file SyncClient.h.
virtual int SyncClient::sync | ( | AbstractSyncConfig & | config, | |
char ** | sourceNames = NULL | |||
) | [virtual] |
Execute a synchronization with sources that are chosen based on the sourceNames param or, if sourceNames is NULL, based on the configuration: in this case all available sources will be used.
This version of the call is easier to use for clients whose sync sources are determined by the configuration or by an array of desired sources to sync
config,: | the configuration to be used for this sync | |
sourceNames,: | optional, a NULL terminated array of source names that we want to sync. If NULL, sources to sync are chosen from the configuration. |
virtual int SyncClient::sync | ( | AbstractSyncConfig & | config, | |
SyncSource ** | sources | |||
) | [virtual] |
SyncReport SyncClient::syncReport [protected] |
Definition at line 194 of file SyncClient.h.