Buteo Synchronization Framework
PluginCbInterface.h
1 /*
2  * This file is part of buteo-syncfw package
3  *
4  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
5  *
6  * Contact: Sateesh Kavuri <sateesh.kavuri@nokia.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * version 2.1 as published by the Free Software Foundation.
11  *
12  * This library is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20  * 02110-1301 USA
21  *
22  */
23 #ifndef PLUGINCBINTERFACE_H
24 #define PLUGINCBINTERFACE_H
25 
26 #include <QString>
27 
28 #include "SyncPluginBase.h"
29 
30 namespace Buteo {
31 
32 class StoragePlugin;
33 class Profile;
34 
39 {
40 public:
41 
42  virtual ~PluginCbInterface() {}
43 
55  virtual bool requestStorage(const QString &aStorageName,
56  const SyncPluginBase *aCaller) = 0;
57 
65  virtual void releaseStorage(const QString &aStorageName,
66  const SyncPluginBase *aCaller) = 0;
67 
76  virtual StoragePlugin *createStorage(const QString &aPluginName) = 0;
77 
82  virtual void destroyStorage(StoragePlugin *aStorage) = 0;
83 
89  virtual bool isConnectivityAvailable(Sync::ConnectivityType aType) = 0;
90 
97  virtual Profile *getSyncProfileByRemoteAddress(const QString &aAddress) = 0;
98 
105  virtual QString getValue(const QString &aAddress, const QString &aKey) = 0;
106 };
107 
108 }
109 
110 #endif
Interface which client and server plugins can use to communicate with synchronization daemon.
Definition: PluginCbInterface.h:39
virtual QString getValue(const QString &aAddress, const QString &aKey)=0
Get a value for a property describing the remote device.
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 void destroyStorage(StoragePlugin *aStorage)=0
Destroys the given storage plug-in instance.
virtual StoragePlugin * createStorage(const QString &aPluginName)=0
Creates a storage plug-in instance.
virtual bool requestStorage(const QString &aStorageName, const SyncPluginBase *aCaller)=0
Tries to reserve the given storage to the caller.
virtual bool isConnectivityAvailable(Sync::ConnectivityType aType)=0
Returns whether connectivity domain is available.
virtual void releaseStorage(const QString &aStorageName, const SyncPluginBase *aCaller)=0
Releases the given storage.
This class represents a single profile, a collection of settings or data releated to some entity.
Definition: Profile.h:53
Base class for storage plugins.
Definition: StoragePlugin.h:39
Base class for client and server plugins.
Definition: SyncPluginBase.h:46