diff options
| author | Javier <dev.git@javispedro.com> | 2014-11-30 20:58:57 +0100 |
|---|---|---|
| committer | Javier <dev.git@javispedro.com> | 2014-11-30 20:58:57 +0100 |
| commit | f7c8244641a4242f6a8c706bd918494b23e48075 (patch) | |
| tree | f84b5ead8f4d621cf47e10489889fb9fef8b1f61 /daemon/jskitmanager.h | |
| parent | 4527ab9a4147a8f15bf8ca5613341df9d0029d0c (diff) | |
introduce the AppMsgManager and the JsKitManager
will be used to handle application messages (push, etc)
while the JSKitManager will run PebbleKit JS scripts.
also add the ability to unpack PebbleDicts
Diffstat (limited to 'daemon/jskitmanager.h')
| -rw-r--r-- | daemon/jskitmanager.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/daemon/jskitmanager.h b/daemon/jskitmanager.h new file mode 100644 index 0000000..5e2880f --- /dev/null +++ b/daemon/jskitmanager.h @@ -0,0 +1,41 @@ +#ifndef JSKITMANAGER_H +#define JSKITMANAGER_H + +#include <QJSEngine> +#include "appmanager.h" +#include "appmsgmanager.h" + +class JSKitPebble; + +class JSKitManager : public QObject +{ + Q_OBJECT + LOG4QT_DECLARE_QCLASS_LOGGER + +public: + explicit JSKitManager(AppManager *apps, AppMsgManager *appmsg, QObject *parent = 0); + ~JSKitManager(); + +signals: + +public slots: + +private slots: + void handleAppStarted(const QUuid &uuid); + void handleAppStopped(const QUuid &uuid); + +private: + void startJsApp(); + void stopJsApp(); + +private: + friend class JSKitPebble; + + AppManager *_apps; + AppMsgManager *_appmsg; + AppManager::AppInfo _curApp; + QJSEngine *_engine; + QPointer<JSKitPebble> _jspebble; +}; + +#endif // JSKITMANAGER_H |
