Buteo Synchronization Framework: StorageChangeNotifierPlugin.h Source File

Buteo Synchronization Framework

StorageChangeNotifierPlugin.h
1#ifndef STORAGECHANGENOTIFIERPLUGIN_H
2#define STORAGECHANGENOTIFIERPLUGIN_H
3
4#include <QObject>
5#include <QString>
6
7namespace Buteo {
8
14 class StorageChangeNotifierPlugin : public QObject
15{
16 Q_OBJECT
17
18public:
22 StorageChangeNotifierPlugin(const QString &aStorageName):
23 iStorageName(aStorageName) {}
24
27 virtual ~StorageChangeNotifierPlugin() {}
28
35 virtual QString name() const = 0;
36
42 virtual bool hasChanges() const = 0;
43
48 virtual void changesReceived() = 0;
49
52 virtual void enable() = 0;
53
61 virtual void disable(bool disableAfterNextChange = false) = 0;
62
63Q_SIGNALS:
68 void storageChange();
69
70protected:
71 QString iStorageName;
72};
73
74}
75
76#endif
Buteo::StorageChangeNotifierPlugin
Implement this class to notify about changes in a specific storage - contacts/calendar/sms,...
Definition: StorageChangeNotifierPlugin.h:15
Buteo::StorageChangeNotifierPlugin::~StorageChangeNotifierPlugin
virtual ~StorageChangeNotifierPlugin()
destructor
Definition: StorageChangeNotifierPlugin.h:27
Buteo::StorageChangeNotifierPlugin::changesReceived
virtual void changesReceived()=0
Buteo::StorageChangeNotifierPlugin::hasChanges
virtual bool hasChanges() const =0
Check if this storage has changes since the last time it was asked for the same.
Buteo::StorageChangeNotifierPlugin::disable
virtual void disable(bool disableAfterNextChange=false)=0
Disable listening to storage changes.
Buteo::StorageChangeNotifierPlugin::name
virtual QString name() const =0
the name should be a well-known name which buteo sync-fw knows about as a storage that could be synce...
Buteo::StorageChangeNotifierPlugin::StorageChangeNotifierPlugin
StorageChangeNotifierPlugin(const QString &aStorageName)
constructor
Definition: StorageChangeNotifierPlugin.h:22
Buteo::StorageChangeNotifierPlugin::storageChange
void storageChange()
emit this signal when there's a change in this storage. It's upto the plug-in when and how frequently...
Definition: moc_StorageChangeNotifierPlugin.cpp:130
Buteo::StorageChangeNotifierPlugin::enable
virtual void enable()=0
Enable listening to storage changes.