Interface which client and server plugins can use to communicate with synchronization daemon.
More...
#include <PluginCbInterface.h>
|
virtual bool | requestStorage (const QString &aStorageName, const SyncPluginBase *aCaller)=0 |
| Tries to reserve the given storage to the caller.
|
|
virtual void | releaseStorage (const QString &aStorageName, const SyncPluginBase *aCaller)=0 |
| Releases the given storage.
|
|
virtual StoragePlugin * | createStorage (const QString &aPluginName)=0 |
| Creates a storage plug-in instance.
|
|
virtual void | destroyStorage (StoragePlugin *aStorage)=0 |
| Destroys the given storage plug-in instance.
|
|
virtual bool | isConnectivityAvailable (Sync::ConnectivityType aType)=0 |
| Returns whether connectivity domain is available.
|
|
virtual Profile * | getSyncProfileByRemoteAddress (const QString &aAddress)=0 |
| tries to fetch a profile object based on the remote party's address (BT address for eg)
|
|
virtual QString | getValue (const QString &aAddress, const QString &aKey)=0 |
| Get a value for a property describing the remote device.
|
|
Interface which client and server plugins can use to communicate with synchronization daemon.
◆ createStorage()
virtual StoragePlugin * Buteo::PluginCbInterface::createStorage |
( |
const QString & |
aPluginName | ) |
|
|
pure virtual |
Creates a storage plug-in instance.
Server plug-ins must reserve the storage backend before creating a plug-in that uses it. Otherwise simultaenous access of the same backend may lead to inconsistent state.
- Parameters
-
aPluginName | Name of the storage plug-in to create. |
- Returns
- Created plug-in instance. NULL if failed.
Implemented in Buteo::Synchronizer.
◆ destroyStorage()
virtual void Buteo::PluginCbInterface::destroyStorage |
( |
StoragePlugin * |
aStorage | ) |
|
|
pure virtual |
Destroys the given storage plug-in instance.
- Parameters
-
aStorage | Storage plug-in to destroy. |
Implemented in Buteo::Synchronizer.
◆ getSyncProfileByRemoteAddress()
virtual Profile * Buteo::PluginCbInterface::getSyncProfileByRemoteAddress |
( |
const QString & |
aAddress | ) |
|
|
pure virtual |
tries to fetch a profile object based on the remote party's address (BT address for eg)
- Parameters
-
aAddress | remote party's address |
- Returns
- profile object - to be deleted by caller
Implemented in Buteo::Synchronizer.
◆ getValue()
virtual QString Buteo::PluginCbInterface::getValue |
( |
const QString & |
aAddress, |
|
|
const QString & |
aKey |
|
) |
| |
|
pure virtual |
Get a value for a property describing the remote device.
- Parameters
-
aAddress | remote device's address |
aKey | profile key identifying the property |
- Returns
- value for the property
Implemented in Buteo::Synchronizer.
◆ isConnectivityAvailable()
virtual bool Buteo::PluginCbInterface::isConnectivityAvailable |
( |
Sync::ConnectivityType |
aType | ) |
|
|
pure virtual |
Returns whether connectivity domain is available.
- Parameters
-
aType | Type of connectivity domain |
- Returns
- True if connectivity domain is available, otherwise false
Implemented in Buteo::Synchronizer.
◆ releaseStorage()
virtual void Buteo::PluginCbInterface::releaseStorage |
( |
const QString & |
aStorageName, |
|
|
const SyncPluginBase * |
aCaller |
|
) |
| |
|
pure virtual |
Releases the given storage.
Call this function after a storage requested with requestStorage is not needed anymore by the caller.
- Parameters
-
aStorageName | Name of the storage backend to release. |
aCaller | Object calling this function. |
Implemented in Buteo::Synchronizer.
◆ requestStorage()
virtual bool Buteo::PluginCbInterface::requestStorage |
( |
const QString & |
aStorageName, |
|
|
const SyncPluginBase * |
aCaller |
|
) |
| |
|
pure virtual |
Tries to reserve the given storage to the caller.
Server plug-ins must reserve storages before using them. For client plug-ins this is done automatically by the sync daemon when sync starts, based on profiles. Release must be called when the successfully requested storage is not needed anymore.
- Parameters
-
aStorageName | Name of the storage backend to reserve. |
aCaller | Object calling this function |
- Returns
- Success indicator
Implemented in Buteo::Synchronizer.
The documentation for this class was generated from the following file: