OpenAB  1.0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
TwoWaySync Class Reference

Sync Class providing all the Sync controls. More...

#include <TwoWaySync.hpp>

Inheritance diagram for TwoWaySync:
Collaboration diagram for TwoWaySync:

Public Member Functions

 TwoWaySync (OpenAB_Sync_params &)
 
 ~TwoWaySync ()
 
enum OpenAB_Sync::Sync::eInit init ()
 Initializes Sync. More...
 
void synchronize ()
 Synchronizes data. More...
 
enum OpenAB_Sync::Sync::eCancel cancel ()
 Cancels synchronization. More...
 
enum OpenAB_Sync::Sync::eSuspend suspend ()
 Suspends synchronization (if used OpenAB_Source::Source plugin supports it) More...
 
enum OpenAB_Sync::Sync::eResume resume ()
 Resumes synchronization (if used OpenAB_Source::Source plugin supports it) More...
 
void getStats (unsigned int &locallyAdded, unsigned int &locallyModified, unsigned int &locallyRemoved, unsigned int &remotelyAdded, unsigned int &remotelyModified, unsigned int &remotelyRemoved)
 Returns statistics of synchronization. More...
 
- Public Member Functions inherited from OpenAB_Sync::Sync
 Sync ()
 Constructor. More...
 
virtual ~Sync ()
 Destructor, virtual by default. 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...
 

Additional Inherited Members

- Public Types inherited from OpenAB_Sync::Sync
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 }
 
- Protected Attributes inherited from OpenAB_Sync::Sync
std::vector< Phasephases
 

Detailed Description

Sync Class providing all the Sync controls.

Constructor & Destructor Documentation

TwoWaySync::TwoWaySync ( OpenAB_Sync_params p)
TwoWaySync::~TwoWaySync ( )

Member Function Documentation

enum OpenAB_Sync::Sync::eCancel TwoWaySync::cancel ( )
virtual

Cancels synchronization.

Returns
the status code

Implements OpenAB_Sync::Sync.

void TwoWaySync::getStats ( unsigned int &  locallyAdded,
unsigned int &  locallyModified,
unsigned int &  locallyRemoved,
unsigned int &  remotelyAdded,
unsigned int &  remotelyModified,
unsigned int &  remotelyRemoved 
)
virtual

Returns statistics of synchronization.

Parameters
[out]locallyAddednumber of items added during synchronization in local storage
[out]locallyModifiednumber of items modified during synchronization in local storage
[out]locallyRemovednumber of items removed during synchronization from local storage
[out]remotelyAddednumber of items added during synchronization in remote storage
[out]remotelyModifiednumber of items modified during synchronization in remote storage
[out]remotyleRemovednumber of items removed during synchronization from remote storage

Implements OpenAB_Sync::Sync.

enum OpenAB_Sync::Sync::eInit TwoWaySync::init ( )
virtual

Initializes Sync.

Returns
the status code

Implements OpenAB_Sync::Sync.

enum OpenAB_Sync::Sync::eResume TwoWaySync::resume ( )
virtual

Resumes synchronization (if used OpenAB_Source::Source plugin supports it)

Returns
the status code

Implements OpenAB_Sync::Sync.

enum OpenAB_Sync::Sync::eSuspend TwoWaySync::suspend ( )
virtual

Suspends synchronization (if used OpenAB_Source::Source plugin supports it)

Returns
the status code

Implements OpenAB_Sync::Sync.

void TwoWaySync::synchronize ( )
virtual

Synchronizes data.

Implements OpenAB_Sync::Sync.


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