summaryrefslogtreecommitdiff
path: root/watchlet.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2011-09-16 17:47:24 +0200
committerJavier <javier@pcjavier.(none)>2011-09-16 17:47:24 +0200
commitaa1c0fd3146b4ed055d181c99d52463afa6bedbb (patch)
treef6fb8d9693ad8c545ddabf76312f8f33b5b9878f /watchlet.h
downloadsowatch-aa1c0fd3146b4ed055d181c99d52463afa6bedbb.tar.gz
sowatch-aa1c0fd3146b4ed055d181c99d52463afa6bedbb.zip
Initial import
Diffstat (limited to 'watchlet.h')
-rw-r--r--watchlet.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/watchlet.h b/watchlet.h
new file mode 100644
index 0000000..fd2c7f4
--- /dev/null
+++ b/watchlet.h
@@ -0,0 +1,38 @@
+#ifndef WATCHLET_H
+#define WATCHLET_H
+
+#include <QtCore/QObject>
+
+namespace sowatch
+{
+
+class Watch;
+class WatchServer;
+
+class Watchlet : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString id READ id)
+
+public:
+ explicit Watchlet(WatchServer *server, const QString& id);
+
+ WatchServer* server();
+ Watch* watch();
+
+ QString id();
+
+protected:
+ virtual void activate() = 0;
+ virtual void deactivate() = 0;
+
+private:
+ QString _id;
+ WatchServer* _server;
+
+friend class WatchServer;
+};
+
+}
+
+#endif // WATCHLET_H