psa: Moved harmattand code to Qt project with sync option
[feedingit] / FeedingIt-Sync / feedingitsync.h
1 #ifndef FEEDINGITSYNC_H
2 #define FEEDINGITSYNC_H
3
4 #include "FeedingIt-Sync_global.h"
5
6 #include <libsyncpluginmgr/ClientPlugin.h>
7 #include <libsyncprofile/SyncResults.h>
8 #include <gconfitem.h>
9
10 class EventsExample : public Buteo::ClientPlugin
11 {
12     Q_OBJECT;
13 public:
14     EventsExample( const QString& aPluginName,
15                    const Buteo::SyncProfile& aProfile,
16                    Buteo::PluginCbInterface *aCbInterface );
17
18     virtual ~EventsExample();
19     virtual bool init();
20     virtual bool uninit();
21     virtual bool startSync();
22     virtual void abortSync(Sync::SyncStatus aStatus = Sync::SYNC_ABORTED);
23     virtual Buteo::SyncResults getSyncResults() const;
24     virtual bool cleanUp();
25
26 public slots:
27     virtual void connectivityStateChanged( Sync::ConnectivityType aType,
28                                           bool aState );
29
30 protected slots:
31     void syncSuccess();
32     void syncFailed();
33     void updateFeed();
34 private:
35     void updateResults(const Buteo::SyncResults &aResults);
36 private:
37     QMap<QString, QString>      iProperties;
38     Buteo::SyncResults          iResults;
39 };
40
41 extern "C" EventsExample* createPlugin( const QString& aPluginName,
42                                        const Buteo::SyncProfile& aProfile,
43                                        Buteo::PluginCbInterface *aCbInterface );
44
45 extern "C" void destroyPlugin( EventsExample *aClient );
46
47 #endif // FEEDINGITSYNC_H