summaryrefslogtreecommitdiff
path: root/sowatchd/watchhandler.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-08-10 00:45:24 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-08-10 00:45:24 +0200
commitd194a6112299cfe045c34e5cdb6adbbb81418d09 (patch)
tree4973f946b6701c8aea8bed73e5c4c6c978ce8e66 /sowatchd/watchhandler.h
parentb1ccb04d7dd2fb20def829be084474ed329d4988 (diff)
downloadsowatch-d194a6112299cfe045c34e5cdb6adbbb81418d09.tar.gz
sowatch-d194a6112299cfe045c34e5cdb6adbbb81418d09.zip
new watchhandler for watchlet/prov lifecycle mgmt
Diffstat (limited to 'sowatchd/watchhandler.h')
-rw-r--r--sowatchd/watchhandler.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/sowatchd/watchhandler.h b/sowatchd/watchhandler.h
new file mode 100644
index 0000000..3fa7c6b
--- /dev/null
+++ b/sowatchd/watchhandler.h
@@ -0,0 +1,41 @@
+#ifndef WATCHHANDLER_H
+#define WATCHHANDLER_H
+
+#include <QtCore/QObject>
+#include <QtCore/QList>
+
+#include <sowatch.h>
+
+namespace sowatch
+{
+
+class WatchHandler : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString status READ status NOTIFY statusChanged)
+
+public:
+ explicit WatchHandler(ConfigKey *config, QObject *parent = 0);
+
+ QString status() const;
+
+signals:
+ void statusChanged();
+
+private slots:
+ void updateWatchlets();
+ void updateProviders();
+ void handleConfigSubkeyChanged(const QString& key);
+
+private:
+ ConfigKey *_config;
+ Watch *_watch;
+ WatchServer *_server;
+ QList<QString> _watchlet_order;
+ QMap<QString, Watchlet*> _watchlets;
+ QMap<QString, NotificationProvider*> _providers;
+};
+
+}
+
+#endif // WATCHHANDLER_H