Base class for client and server plugins.
More...
#include <SyncPluginBase.h>
|
virtual void | connectivityStateChanged (Sync::ConnectivityType aType, bool aState)=0 |
| Slot that is invoked by sync framework when changes occur in connectivity domains.
|
|
|
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 database.
|
|
void | error (const QString &aProfileName, const QString &aMessage, SyncResults::MinorCode aErrorCode) |
| Emitted when error has occurred in synchronization and it cannot be continued.
|
|
void | success (const QString &aProfileName, const QString &aMessage) |
| Emitted when synchronization has been finished successfully.
|
|
void | accquiredStorage (const QString &aMimeType) |
| Emitted when a storage is requested and accquired.
|
|
void | syncProgressDetail (const QString &aProfileName, int aProgressDetail) |
| Emitted during Sync Progress to indicate the detail of the current ongoing sync.
|
|
|
| SyncPluginBase (const QString &aPluginName, const QString &aProfileName, PluginCbInterface *aCbInterface) |
| Constructor.
|
|
QString | getPluginName () const |
| Returns the name of this plugin.
|
|
QString | getProfileName () const |
| Returns profile name.
|
|
virtual bool | init ()=0 |
| Initializes the plugin.
|
|
virtual bool | uninit ()=0 |
| Uninitializes the plugin.
|
|
virtual void | abortSync (Sync::SyncStatus aStatus=Sync::SYNC_ABORTED) |
| Aborts synchronization.
|
|
virtual bool | cleanUp ()=0 |
| Cleans up any sync related stuff (e.g sync anchors etc) when the profile is deleted.
|
|
virtual SyncResults | getSyncResults () const |
| Gets the results of the last completed sync session.
|
|
Base class for client and server plugins.
◆ SyncPluginBase()
SyncPluginBase::SyncPluginBase |
( |
const QString & | aPluginName, |
|
|
const QString & | aProfileName, |
|
|
PluginCbInterface * | aCbInterface ) |
Constructor.
- Parameters
-
aPluginName | Name of this plugin |
aProfileName | Profile name |
aCbInterface | Pointer to the callback interface |
◆ abortSync()
virtual void Buteo::SyncPluginBase::abortSync |
( |
Sync::SyncStatus | aStatus = Sync::SYNC_ABORTED | ) |
|
|
inlinevirtual |
Aborts synchronization.
Derived plug-in should implement this function and abort the sync session that is in progress when this function is called. A final signal (success or error) is still expected from the aborted session before it terminates.
Reimplemented in Buteo::OOPClientPlugin.
◆ accquiredStorage
void Buteo::SyncPluginBase::accquiredStorage |
( |
const QString & | aMimeType | ) |
|
|
signal |
Emitted when a storage is requested and accquired.
- Parameters
-
aMimeType | Mime type of the processed item |
◆ cleanUp()
virtual bool Buteo::SyncPluginBase::cleanUp |
( |
| ) |
|
|
pure virtual |
Cleans up any sync related stuff (e.g sync anchors etc) when the profile is deleted.
Derived plug-in should implement this function and perform any cleanup operations if required when the profile is deleted
Implemented in Buteo::OOPClientPlugin, and Buteo::OOPServerPlugin.
◆ connectivityStateChanged
virtual void Buteo::SyncPluginBase::connectivityStateChanged |
( |
Sync::ConnectivityType | aType, |
|
|
bool | aState ) |
|
pure virtualslot |
Slot that is invoked by sync framework when changes occur in connectivity domains.
- Parameters
-
aType | Connectivity domain |
aState | True if connectivity domain is now available, otherwise false |
◆ error
void Buteo::SyncPluginBase::error |
( |
const QString & | aProfileName, |
|
|
const QString & | aMessage, |
|
|
SyncResults::MinorCode | aErrorCode ) |
|
signal |
Emitted when error has occurred in synchronization and it cannot be continued.
- Parameters
-
aProfileName | Name of the profile being synchronized |
aMessage | Message data related to error event |
aErrorCode | Error code |
◆ getPluginName()
QString SyncPluginBase::getPluginName |
( |
| ) |
const |
Returns the name of this plugin.
- Returns
- Name of the plugin
◆ getProfileName()
QString SyncPluginBase::getProfileName |
( |
| ) |
const |
Returns profile name.
- Returns
- Profile
◆ getSyncResults()
Gets the results of the last completed sync session.
This function should be called only after the sync session has finished, after an error or success signal has been emitted. The default implementation returns empty results, so derived plug-in should implement this function.
- Returns
- Sync results.
Reimplemented in Buteo::OOPClientPlugin.
◆ init()
virtual bool Buteo::SyncPluginBase::init |
( |
| ) |
|
|
pure virtual |
Initializes the plugin.
It is recommended that the plugin should do not do any thread insecure initializations inside constructor, instead it should be done inside this method.
- Returns
- True on success, otherwise false
Implemented in Buteo::OOPClientPlugin, and Buteo::OOPServerPlugin.
◆ success
void Buteo::SyncPluginBase::success |
( |
const QString & | aProfileName, |
|
|
const QString & | aMessage ) |
|
signal |
Emitted when synchronization has been finished successfully.
- Parameters
-
aProfileName | Name of the profile being synchronized |
aMessage | Message data related to finish event |
◆ syncProgressDetail
void Buteo::SyncPluginBase::syncProgressDetail |
( |
const QString & | aProfileName, |
|
|
int | aProgressDetail ) |
|
signal |
Emitted during Sync Progress to indicate the detail of the current ongoing sync.
- Parameters
-
aProfileName | Profile Name |
aProgressDetail | Progress in Detail |
- See also
- Sync::SyncProgressDetail
◆ transferProgress
void Buteo::SyncPluginBase::transferProgress |
( |
const QString & | aProfileName, |
|
|
Sync::TransferDatabase | aDatabase, |
|
|
Sync::TransferType | aType, |
|
|
const QString & | aMimeType, |
|
|
int | aCommittedItems ) |
|
signal |
Emitted when progress has been made in synchronization in transferring items between local and remote database.
- Parameters
-
aProfileName | Name of the profile being synchronized |
aDatabase | Indicates if progress has been made to local or remote database |
aType | Type of progress made (item added, modified or deleted) |
aMimeType | Mime type of the processed item |
aCommittedItems | No. of items committed for this operation |
◆ uninit()
virtual bool Buteo::SyncPluginBase::uninit |
( |
| ) |
|
|
pure virtual |
The documentation for this class was generated from the following files: