Buteo Synchronization Framework
Public Member Functions | List of all members
Buteo::PluginCbInterface Class Referenceabstract

Interface which client and server plugins can use to communicate with synchronization daemon. More...

#include <PluginCbInterface.h>

Inheritance diagram for Buteo::PluginCbInterface:
Buteo::Synchronizer

Public Member Functions

virtual bool requestStorage (const QString &aStorageName, const SyncPluginBase *aCaller)=0
 Tries to reserve the given storage to the caller. More...
 
virtual void releaseStorage (const QString &aStorageName, const SyncPluginBase *aCaller)=0
 Releases the given storage. More...
 
virtual StoragePlugincreateStorage (const QString &aPluginName)=0
 Creates a storage plug-in instance. More...
 
virtual void destroyStorage (StoragePlugin *aStorage)=0
 Destroys the given storage plug-in instance. More...
 
virtual bool isConnectivityAvailable (Sync::ConnectivityType aType)=0
 Returns whether connectivity domain is available. More...
 
virtual ProfilegetSyncProfileByRemoteAddress (const QString &aAddress)=0
 tries to fetch a profile object based on the remote party's address (BT address for eg) More...
 
virtual QString getValue (const QString &aAddress, const QString &aKey)=0
 Get a value for a property describing the remote device. More...
 

Detailed Description

Interface which client and server plugins can use to communicate with synchronization daemon.

Member Function Documentation

◆ 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
aPluginNameName 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
aStorageStorage 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
aAddressremote 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
aAddressremote device's address
aKeyprofile 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
aTypeType 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
aStorageNameName of the storage backend to release.
aCallerObject 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
aStorageNameName of the storage backend to reserve.
aCallerObject calling this function
Returns
Success indicator

Implemented in Buteo::Synchronizer.


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