Buteo Synchronization Framework
StorageChangeNotifier.h
1#ifndef STORAGECHANGENOTIFIER_H
2#define STORAGECHANGENOTIFIER_H
3
4#include <QObject>
5#include <QHash>
6
7namespace Buteo {
8
9class StorageChangeNotifierPlugin;
10class PluginManager;
11
15class StorageChangeNotifier : public QObject
16{
17 Q_OBJECT
18
19public:
23
27
33 void loadNotifiers(PluginManager *aPluginManager,
34 const QStringList &aStorageNames);
35
42 bool startListen(QStringList &aFailedStorages);
43
56 void stopListen(bool disableAfterNextChange = false);
57
60 void checkForChanges();
61
62private Q_SLOTS:
65 void storageChanged();
66
67Q_SIGNALS:
72 void storageChange(QString aStorageName);
73
74private:
75 QHash<QString, StorageChangeNotifierPlugin *> iNotifierMap;
76 PluginManager *iPluginManager;
77};
78
79}
80
81#endif
Manages plugins.
Definition PluginManager.h:56
Notifies about changes in storages that it's asked to monitor.
Definition StorageChangeNotifier.h:16
void loadNotifiers(PluginManager *aPluginManager, const QStringList &aStorageNames)
load all implemented storage change notifier plug-in's
Definition StorageChangeNotifier.cpp:29
void storageChange(QString aStorageName)
Definition moc_StorageChangeNotifier.cpp:138
StorageChangeNotifier()
constructor
Definition StorageChangeNotifier.cpp:10
bool startListen(QStringList &aFailedStorages)
Definition StorageChangeNotifier.cpp:46
~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:70
void checkForChanges()
Definition StorageChangeNotifier.cpp:96