From 3a755f46d9cf6e3650d40a960d0d0db8c1ad9fa1 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Sat, 17 Sep 2011 03:03:23 +0200 Subject: preparing for library package --- libsowatch/watchserver.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 libsowatch/watchserver.h (limited to 'libsowatch/watchserver.h') diff --git a/libsowatch/watchserver.h b/libsowatch/watchserver.h new file mode 100644 index 0000000..78454d4 --- /dev/null +++ b/libsowatch/watchserver.h @@ -0,0 +1,46 @@ +#ifndef WATCHSERVER_H +#define WATCHSERVER_H + +#include +#include + +namespace sowatch +{ + +class Watch; +class Watchlet; + +class WatchServer : public QObject +{ + Q_OBJECT + Q_PROPERTY(Watch* watch READ watch) +public: + explicit WatchServer(Watch* watch, QObject* parent = 0); + + Watch* watch(); + + void runWatchlet(const QString& id); + void closeWatchlet(); + +signals: + +public slots: + +protected: + Watch* _watch; + Watchlet* _currentWatchlet; + + QMap watchlets; + + void registerWatchlet(Watchlet *watchlet); + +protected slots: + void watchConnected(); + void watchDisconnected(); + +friend class Watchlet; +}; + +} + +#endif // WATCHSERVER_H -- cgit v1.2.3