StorageChangeNotifier.h
#ifndef STORAGECHANGENOTIFIER_H
#define STORAGECHANGENOTIFIER_H
#include <QObject>
#include <QHash>
namespace Buteo {
class StorageChangeNotifierPlugin;
class PluginManager;
class StorageChangeNotifier : public QObject
{
Q_OBJECT
public:
StorageChangeNotifier();
~StorageChangeNotifier();
void loadNotifiers(PluginManager *aPluginManager,
const QStringList &aStorageNames);
bool startListen(QStringList *failedStorages);
void stopListen(bool disableAfterNextChange = false);
void checkForChanges();
private Q_SLOTS:
void storageChanged();
Q_SIGNALS:
void storageChange(QString storageName);
private:
QHash<QString, StorageChangeNotifierPlugin *> iNotifierMap;
PluginManager *iPluginManager;
};
}
#endif
Buteo::PluginManager
Manages plugins.
Definition PluginManager.h:56
Buteo::StorageChangeNotifierPlugin
Implement this class to notify about changes in a specific storage - contacts/calendar/sms,...
Definition StorageChangeNotifierPlugin.h:15
Buteo::StorageChangeNotifier::loadNotifiers
void loadNotifiers(PluginManager *aPluginManager, const QStringList &aStorageNames)
load all implemented storage change notifier plug-in's
Definition StorageChangeNotifier.cpp:29
Buteo::StorageChangeNotifier::StorageChangeNotifier
StorageChangeNotifier()
constructor
Definition StorageChangeNotifier.cpp:10
Buteo::StorageChangeNotifier::startListen
bool startListen(QStringList *failedStorages)
Definition StorageChangeNotifier.cpp:46
Buteo::StorageChangeNotifier::storageChange
void storageChange(QString storageName)
Buteo::StorageChangeNotifier::~StorageChangeNotifier
~StorageChangeNotifier()
destructor
Definition StorageChangeNotifier.cpp:16
Buteo::StorageChangeNotifier::stopListen
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
Buteo::StorageChangeNotifier::checkForChanges
void checkForChanges()
Definition StorageChangeNotifier.cpp:98