ButeoSynchronizationFramework
StorageChangeNotifier.h
1 #ifndef STORAGECHANGENOTIFIER_H
2 #define STORAGECHANGENOTIFIER_H
3 
4 #include <QObject>
5 #include <QHash>
6 
7 namespace Buteo
8 {
9 
10 class StorageChangeNotifierPlugin;
11 class PluginManager;
12 
16 class StorageChangeNotifier : public QObject
17 {
18  Q_OBJECT
19 
20 public:
24 
28 
34  void loadNotifiers(PluginManager* aPluginManager,
35  const QStringList& aStorageNames);
36 
43  bool startListen(QStringList& aFailedStorages);
44 
57  void stopListen(bool disableAfterNextChange = false);
58 
61  void checkForChanges();
62 
63 private Q_SLOTS:
66  void storageChanged();
67 
68 Q_SIGNALS:
73  void storageChange(QString aStorageName);
74 
75 private:
76  QHash<QString,StorageChangeNotifierPlugin*> iNotifierMap;
77  PluginManager* iPluginManager;
78 };
79 
80 }
81 
82 #endif
Manages plugins.
Definition: PluginManager.h:91
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:80
Notifies about changes in storages that it&#39;s asked to monitor.
Definition: StorageChangeNotifier.h:16
StorageChangeNotifier()
constructor
Definition: StorageChangeNotifier.cpp:10
Definition: AccountsHelper.h:31
bool startListen(QStringList &aFailedStorages)
Definition: StorageChangeNotifier.cpp:51
void checkForChanges()
Definition: StorageChangeNotifier.cpp:109
void storageChange(QString aStorageName)
Definition: moc_StorageChangeNotifier.cpp:132
void loadNotifiers(PluginManager *aPluginManager, const QStringList &aStorageNames)
load all implemented storage change notifier plug-in&#39;s
Definition: StorageChangeNotifier.cpp:31
~StorageChangeNotifier()
destructor
Definition: StorageChangeNotifier.cpp:16