23 #ifndef SYNCPLUGINBASE_H
24 #define SYNCPLUGINBASE_H
26 #include "SyncCommonDefs.h"
27 #include "SyncResults.h"
28 #include "ButeoPluginIface.h"
35 #define DBUS_SERVICE_NAME_PREFIX "com.buteo.msyncd.plugin."
36 #define DBUS_SERVICE_OBJ_PATH "/"
40 class PluginCbInterface;
57 const QString &aProfileName,
80 virtual bool init() = 0;
95 virtual void abortSync(Sync::SyncStatus aStatus = Sync::SYNC_ABORTED) { Q_UNUSED(aStatus); }
126 void transferProgress(
const QString &aProfileName, Sync::TransferDatabase aDatabase,
127 Sync::TransferType aType,
const QString &aMimeType,
int aCommittedItems );
136 void error(
const QString &aProfileName,
const QString &aMessage,
int aErrorCode );
143 void success(
const QString &aProfileName,
const QString &aMessage );
189 QString iProfileName;
194 #endif // SYNCPLUGINBASE_H
Definition: ButeoPluginIface.h:28
Contains information about a completed synchronization session.
Definition: SyncResults.h:58
Definition: AccountsHelper.h:31
void accquiredStorage(const QString &aMimeType)
Emitted when a storage is requested and accquired.
Definition: moc_SyncPluginBase.cpp:229
virtual void abortSync(Sync::SyncStatus aStatus=Sync::SYNC_ABORTED)
Aborts synchronization.
Definition: SyncPluginBase.h:95
virtual SyncResults getSyncResults() const
Gets the results of the last completed sync session.
Definition: SyncPluginBase.cpp:54
virtual bool uninit()=0
Uninitializes the plugin.
QString getProfileName() const
Returns profile name.
Definition: SyncPluginBase.cpp:49
SyncPluginBase(const QString &aPluginName, const QString &aProfileName, PluginCbInterface *aCbInterface)
Constructor.
Definition: SyncPluginBase.cpp:28
Interface which client and server plugins can use to communicate with synchronization daemon...
Definition: PluginCbInterface.h:38
void error(const QString &aProfileName, const QString &aMessage, int aErrorCode)
Emitted when error has occurred in synchronization and it cannot be continued.
Definition: moc_SyncPluginBase.cpp:215
QString getPluginName() const
Returns the name of this plugin.
Definition: SyncPluginBase.cpp:44
PluginCbInterface * iCbInterface
Pointer to synchronizer.
Definition: SyncPluginBase.h:171
Base class for client and server plugins.
Definition: SyncPluginBase.h:45
void transferProgress(const QString &aProfileName, Sync::TransferDatabase aDatabase, Sync::TransferType aType, const QString &aMimeType, int aCommittedItems)
Emitted when progress has been made in synchronization in transferring items between local and remote...
Definition: moc_SyncPluginBase.cpp:208
Definition: SyncPluginBase.h:173
virtual bool cleanUp()=0
Cleans up any sync related stuff (e.g sync anchors etc) when the profile is deleted.
virtual bool init()=0
Initializes the plugin.
Definition: SyncBackupAdaptor.h:41
virtual void connectivityStateChanged(Sync::ConnectivityType aType, bool aState)=0
Slot that is invoked by sync framework when changes occur in connectivity domains.
void success(const QString &aProfileName, const QString &aMessage)
Emitted when synchronization has been finished successfully.
Definition: moc_SyncPluginBase.cpp:222
void syncProgressDetail(const QString &aProfileName, int aProgressDetail)
Emitted during Sync Progress to indicate the detail of the current ongoing sync.
Definition: moc_SyncPluginBase.cpp:236