OpenAB
1.0.1
|
Documentation for class Sync plugin interface. More...
#include <Sync.hpp>
Classes | |
struct | Phase |
class | SyncCallback |
Virtual class that provide all the callback routines to control the synchronization. More... | |
Public Types | |
enum | eInit { eInitOk, eInitFail } |
enum | eSync { eSyncOkWithDataChange, eSyncOkWithoutDataChange, eSyncCancelled, eSyncAlreadyInProgress, eSyncFail } |
enum | eCancel { eCancelOk, eCancelNotInProgress, eCancelFail } |
enum | eSuspend { eSuspendOk, eSuspendNotInProgress, eSuspendFail } |
enum | eResume { eResumeOk, eResumeNotSuspended, eResumeFail } |
Public Member Functions | |
Sync () | |
Constructor. More... | |
virtual | ~Sync () |
Destructor, virtual by default. More... | |
virtual enum eInit | init ()=0 |
Initializes Sync. More... | |
virtual void | synchronize ()=0 |
Synchronizes data. More... | |
virtual enum eCancel | cancel ()=0 |
Cancels synchronization. More... | |
virtual enum eSuspend | suspend ()=0 |
Suspends synchronization (if used OpenAB_Source::Source plugin supports it) More... | |
virtual enum eResume | resume ()=0 |
Resumes synchronization (if used OpenAB_Source::Source plugin supports it) More... | |
virtual void | getStats (unsigned int &locallyAdded, unsigned int &locallyModified, unsigned int &locallyRemoved, unsigned int &remotelyAdded, unsigned int &remotelyModified, unsigned int &remotelyRemoved)=0 |
Returns statistics of synchronization. More... | |
bool | addPhase (const std::string &name, const std::vector< std::string > &ignoreFields) |
Adds new phase to synchronization process. More... | |
void | clearPhases () |
Removes all previously defined synchronization phases. More... | |
Protected Attributes | |
std::vector< Phase > | phases |
Documentation for class Sync plugin interface.
Enumerator | |
---|---|
eSyncOkWithDataChange |
Synchronization finished successfully with data change in OpenAB_Storage::Storage |
eSyncOkWithoutDataChange |
Synchronization finished successfully without any data change in OpenAB_Storage::Storage |
eSyncCancelled |
Synchronization was cancelled |
eSyncAlreadyInProgress |
Synchronization is already in progress |
eSyncFail |
Synchronization failed |
|
inline |
Constructor.
|
inlinevirtual |
Destructor, virtual by default.
bool OpenAB_Sync::Sync::addPhase | ( | const std::string & | name, |
const std::vector< std::string > & | ignoreFields | ||
) |
Adds new phase to synchronization process.
[in] | name | name of phase |
[in] | ignoreFields | vector of OpenAB::PIMItem fields that should be ignored by OpenAB_Source::Source plugin. |
|
pure virtual |
void OpenAB_Sync::Sync::clearPhases | ( | ) |
Removes all previously defined synchronization phases.
|
pure virtual |
Returns statistics of synchronization.
[out] | locallyAdded | number of items added during synchronization in local storage |
[out] | locallyModified | number of items modified during synchronization in local storage |
[out] | locallyRemoved | number of items removed during synchronization from local storage |
[out] | remotelyAdded | number of items added during synchronization in remote storage |
[out] | remotelyModified | number of items modified during synchronization in remote storage |
[out] | remotyleRemoved | number of items removed during synchronization from remote storage |
Implemented in OneWaySync, and TwoWaySync.
|
pure virtual |
|
pure virtual |
Resumes synchronization (if used OpenAB_Source::Source plugin supports it)
Implemented in OneWaySync, and TwoWaySync.
|
pure virtual |
Suspends synchronization (if used OpenAB_Source::Source plugin supports it)
Implemented in OneWaySync, and TwoWaySync.
|
pure virtual |
Synchronizes data.
Implemented in OneWaySync, and TwoWaySync.
|
protected |