ButeoSynchronizationFramework
StorageChangeNotifierPlugin.h
1 #ifndef STORAGECHANGENOTIFIERPLUGIN_H
2 #define STORAGECHANGENOTIFIERPLUGIN_H
3 
4 #include <QObject>
5 #include <QString>
6 
7 namespace Buteo
8 {
9 
15 class StorageChangeNotifierPlugin : public QObject
16 {
17  Q_OBJECT
18 
19 public:
23  StorageChangeNotifierPlugin(const QString& aStorageName):
24  iStorageName(aStorageName){}
25 
29 
36  virtual QString name() const = 0;
37 
43  virtual bool hasChanges() const = 0;
44 
49  virtual void changesReceived() = 0;
50 
53  virtual void enable() = 0;
54 
62  virtual void disable(bool disableAfterNextChange = false) = 0;
63 
64 Q_SIGNALS:
69  void storageChange();
70 
71 protected:
72  QString iStorageName;
73 };
74 
75 }
76 
77 #endif
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...
virtual bool hasChanges() const =0
Check if this storage has changes since the last time it was asked for the same.
virtual void enable()=0
Enable listening to storage changes.
Definition: AccountsHelper.h:31
virtual ~StorageChangeNotifierPlugin()
destructor
Definition: StorageChangeNotifierPlugin.h:28
StorageChangeNotifierPlugin(const QString &aStorageName)
constructor
Definition: StorageChangeNotifierPlugin.h:23
virtual void disable(bool disableAfterNextChange=false)=0
Disable listening to storage changes.
void storageChange()
emit this signal when there&#39;s a change in this storage. It&#39;s upto the plug-in when and how frequently...
Definition: moc_StorageChangeNotifierPlugin.cpp:124
Implement this class to notify about changes in a specific storage - contacts/calendar/sms, or even custom ones like a facebook storage, if there&#39;s such a storage on the device.
Definition: StorageChangeNotifierPlugin.h:15