diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2011-09-17 03:03:23 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2011-09-17 03:03:23 +0200 |
commit | 3a755f46d9cf6e3650d40a960d0d0db8c1ad9fa1 (patch) | |
tree | f330f63caec08b6626c808b5ae70c64cab0246a6 /libsowatch/watchserver.h | |
parent | 0dca79a8c15b76ca53617c0ed3396ab6435f0152 (diff) | |
download | sowatch-3a755f46d9cf6e3650d40a960d0d0db8c1ad9fa1.tar.gz sowatch-3a755f46d9cf6e3650d40a960d0d0db8c1ad9fa1.zip |
preparing for library package
Diffstat (limited to 'libsowatch/watchserver.h')
-rw-r--r-- | libsowatch/watchserver.h | 46 |
1 files changed, 46 insertions, 0 deletions
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 <QtCore/QObject> +#include <QtCore/QMap> + +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<QString, Watchlet*> watchlets; + + void registerWatchlet(Watchlet *watchlet); + +protected slots: + void watchConnected(); + void watchDisconnected(); + +friend class Watchlet; +}; + +} + +#endif // WATCHSERVER_H |