Buteo Synchronization Framework
StorageChangeNotifier.h
1#ifndef STORAGECHANGENOTIFIER_H
2#define STORAGECHANGENOTIFIER_H
3
4#include <QObject>
5#include <QHash>
6
7namespace Buteo {
8
10class PluginManager;
11
14class StorageChangeNotifier : public QObject
15{
16 Q_OBJECT
17
18public:
22
26
32 void loadNotifiers(PluginManager *aPluginManager,
33 const QStringList &aStorageNames);
34
41 bool startListen(QStringList *failedStorages);
42
55 void stopListen(bool disableAfterNextChange = false);
56
59 void checkForChanges();
60
61private Q_SLOTS:
64 void storageChanged();
65
66Q_SIGNALS:
70 void storageChange(QString storageName);
71
72private:
73 QHash<QString, StorageChangeNotifierPlugin *> iNotifierMap;
74 PluginManager *iPluginManager;
75};
76
77}
78
79#endif
Manages plugins.
Definition PluginManager.h:56
Implement this class to notify about changes in a specific storage - contacts/calendar/sms,...
Definition StorageChangeNotifierPlugin.h:15
void loadNotifiers(PluginManager *aPluginManager, const QStringList &aStorageNames)
load all implemented storage change notifier plug-in's
Definition StorageChangeNotifier.cpp:29
StorageChangeNotifier()
constructor
Definition StorageChangeNotifier.cpp:10
bool startListen(QStringList *failedStorages)
Definition StorageChangeNotifier.cpp:46
void storageChange(QString storageName)
~StorageChangeNotifier()
destructor
Definition StorageChangeNotifier.cpp:16
void stopListen(bool disableAfterNextChange=false)
call this to ignore taking action on storage changes. Whether there was a change can be determined by...
Definition StorageChangeNotifier.cpp:72
void checkForChanges()
Definition StorageChangeNotifier.cpp:98