ButeoSynchronizationFramework
PluginServiceObj.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 PLUGINSERVICEOBJ_H
23 #define PLUGINSERVICEOBJ_H
24 
25 #include <QObject>
26 #include <QString>
27 #include <Profile.h>
28 #include <SyncProfile.h>
29 #include <PluginCbImpl.h>
30 #include <SyncCommonDefs.h>
31 
32 #include CLASSNAME_H
33 
34 using namespace Buteo;
35 
36 class PluginServiceObj : public QObject
37 {
38  Q_OBJECT
39 public:
40  PluginServiceObj( QString aProfile, QString aPluginName, QObject *parent = 0 );
41  virtual ~PluginServiceObj();
42 
43 public: // PROPERTIES
44 public Q_SLOTS: // METHODS
45  void abortSync(uchar aStatus);
46  bool cleanUp();
47  void connectivityStateChanged(int aType, bool aState);
48  QString getSyncResults();
49  bool init();
50  bool uninit();
51 #ifdef CLIENT_PLUGIN
52  bool startSync();
53 #else
54  void resume();
55  bool startListen();
56  void stopListen();
57  void suspend();
58 #endif
59 Q_SIGNALS: // SIGNALS
60  void accquiredStorage(const QString &aMimeType);
61  void error(const QString &aProfileName, const QString &aMessage, int aErrorCode);
62  void newSession(const QString &aDestination);
63  void success(const QString &aProfileName, const QString &aMessage);
64  void syncProgressDetail(const QString &aProfileName, int aProgressDetail);
65  void transferProgress(const QString &aProfileName, Sync::TransferDatabase aDatabase, Sync::TransferType aType, const QString &aMimeType, int aCommittedItems);
66 
67 private:
68  CLASSNAME *iPlugin;
69  QString iProfileName;
70  QString iPluginName;
71  PluginCbImpl iPluginCb;
72 };
73 
74 #endif // PLUGINSERVICEOBJ_H
Definition: PluginServiceObj.h:36
Definition: AccountsHelper.h:31
Definition: PluginCbImpl.h:32