10 #ifndef ONE_WAY_SYNC_HPP
11 #define ONE_WAY_SYNC_HPP
139 void getStats(
unsigned int& locallyAdded,
140 unsigned int& locallyModified,
141 unsigned int& locallyRemoved,
142 unsigned int& remotelyAdded,
143 unsigned int& remotelyModified,
144 unsigned int& remotelyRemoved);
157 void updateIndexDB();
158 void processItems(
unsigned int phaseNum);
163 bool flushInsertions();
164 bool flushModifications();
166 enum eSync doSynchronize();
167 static void* threadSync(
void*);
176 unsigned int modified;
177 unsigned int removed;
178 pthread_mutex_t mutex;
182 SyncStats phaseStats;
183 SyncStats globalStats;
190 typedef std::vector< OpenAB::SmartPtr<OpenAB_Storage::StorageItem> > vectorElem;
191 typedef std::map< OpenAB::SmartPtr<OpenAB::PIMItemIndex> , vectorElem > dbIndexElem;
204 std::vector<ItemDesc> itemsToBeAdded;
205 std::vector<ItemDesc> itemsToBeModified;
210 pthread_t syncThread;
211 pthread_mutex_t syncMutex;
214 eSync lastSyncResult;
eInit
Definition: Sync.hpp:142
Definition: OneWaySync.hpp:114
Definition: OneWaySync.hpp:112
~OneWaySync()
Definition: OneWaySync.cpp:68
float sync_progress_time
Definition: OneWaySync.hpp:116
enum OpenAB_Sync_params::SyncType sync_type
SyncType
Definition: OneWaySync.hpp:110
Sync Class providing all the Sync controls.
Definition: OneWaySync.hpp:123
OneWaySync(OpenAB_Sync_params &)
Definition: OneWaySync.cpp:40
Documentation for Storage plugin interface. Generic interface is modeled over Sync Plugin specific re...
Definition: Storage.hpp:106
enum OpenAB_Sync::Sync::eResume resume()
Resumes synchronization (if used OpenAB_Source::Source plugin supports it)
Definition: OneWaySync.cpp:208
enum OpenAB_Sync::Sync::eInit init()
Initializes Sync.
Definition: OneWaySync.cpp:93
eCancel
Definition: Sync.hpp:172
unsigned int batch_size
Definition: OneWaySync.hpp:117
void synchronize()
Synchronizes data.
Definition: OneWaySync.cpp:132
OpenAB_Source::Parameters input_params
The parameters required by the Input plugin used.
Definition: OneWaySync.hpp:106
Set of parameters required to perform the synchronization.
Definition: OneWaySync.hpp:103
eResume
Definition: Sync.hpp:202
Documentation for Source plugin interface.
Definition: Source.hpp:76
Virtual class that provide all the callback routines to control the synchronization.
Definition: Sync.hpp:249
OpenAB_Sync::Sync::SyncCallback * cb
The Callback object.
Definition: OneWaySync.hpp:109
OpenAB_Storage::Parameters ab_params
The parameters required by the AB plugin used.
Definition: OneWaySync.hpp:108
void getStats(unsigned int &locallyAdded, unsigned int &locallyModified, unsigned int &locallyRemoved, unsigned int &remotelyAdded, unsigned int &remotelyModified, unsigned int &remotelyRemoved)
Returns statistics of synchronization.
Definition: OneWaySync.cpp:231
std::string ab_plugin
The name of the AB (Address Book) plugin.
Definition: OneWaySync.hpp:107
std::string input_plugin
The name of the Input plugin.
Definition: OneWaySync.hpp:105
enum OpenAB_Sync::Sync::eCancel cancel()
Cancels synchronization.
Definition: OneWaySync.cpp:165
Definition: OneWaySync.hpp:113
Documentation for class Sync plugin interface.
Definition: Sync.hpp:126
eSuspend
Definition: Sync.hpp:187
enum OpenAB_Sync::Sync::eSuspend suspend()
Suspends synchronization (if used OpenAB_Source::Source plugin supports it)
Definition: OneWaySync.cpp:185
Generic storage for plugin parameters. Allows to store map of parameters with different types (OpenAB...
Definition: GenericParameters.hpp:25
eSync
Definition: Sync.hpp:156