ButeoSynchronizationFramework
PluginCbImpl.h
1 /*
2 * This file is part of buteo-sync-plugins package
3 *
4 * Copyright (C) 2013 Jolla Ltd. and/or its subsidiary(-ies).
5 *
6 * Author: Sateesh Kavuri <sateesh.kavuri@gmail.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 #ifndef PLUGINCBIMPL_H
23 #define PLUGINCBIMPL_H
24 
25 #include "PluginCbInterface.h"
26 #include "PluginManager.h"
27 #include "SyncDaemonProxy.h"
28 #include "TransportTracker.h"
29 
30 namespace Buteo {
31 
33 {
34 public:
35  PluginCbImpl();
36 
37  ~PluginCbImpl();
38 
40  virtual bool requestStorage(const QString &aStorageName,
41  const SyncPluginBase *aCaller);
42 
44  virtual void releaseStorage(const QString &aStorageName,
45  const SyncPluginBase *aCaller);
46 
48  virtual StoragePlugin* createStorage(const QString &aPluginName);
49 
51  virtual void destroyStorage(StoragePlugin *aStorage);
52 
54  virtual bool isConnectivityAvailable( Sync::ConnectivityType aType );
55 
57  virtual Profile* getSyncProfileByRemoteAddress(const QString& aAddress);
58 
60  virtual QString getValue(const QString& aAddress, const QString& aKey);
61 
62 signals:
63 
65  void storageReleased();
66 
67 private:
68 
69  SyncDaemonProxy *imsyncIface;
70 
71  PluginManager iPluginManager;
72 
73  TransportTracker iTransportTracker;
74 };
75 
76 }
77 
78 #endif // PLUGINCBIMPL_H
This class represents a single profile, a collection of settings or data releated to some entity...
Definition: Profile.h:52
Manages plugins.
Definition: PluginManager.h:91
virtual Profile * getSyncProfileByRemoteAddress(const QString &aAddress)
Definition: PluginCbImpl.cpp:113
Definition: AccountsHelper.h:31
virtual bool isConnectivityAvailable(Sync::ConnectivityType aType)
Definition: PluginCbImpl.cpp:106
Definition: PluginCbImpl.h:32
virtual void releaseStorage(const QString &aStorageName, const SyncPluginBase *aCaller)
Definition: PluginCbImpl.cpp:73
Interface which client and server plugins can use to communicate with synchronization daemon...
Definition: PluginCbInterface.h:38
void storageReleased()
emitted by releaseStorages call
Base class for client and server plugins.
Definition: SyncPluginBase.h:45
virtual StoragePlugin * createStorage(const QString &aPluginName)
Definition: PluginCbImpl.cpp:87
virtual bool requestStorage(const QString &aStorageName, const SyncPluginBase *aCaller)
Definition: PluginCbImpl.cpp:50
Class for tracking transport states.
Definition: TransportTracker.h:47
virtual QString getValue(const QString &aAddress, const QString &aKey)
Definition: PluginCbImpl.cpp:119
Base class for storage plugins.
Definition: StoragePlugin.h:38
Proxy class for interface com.meego.msyncd.
Definition: SyncDaemonProxy.h:48
virtual void destroyStorage(StoragePlugin *aStorage)
Definition: PluginCbImpl.cpp:99