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/appmsgmanager.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/appmsgmanager.h')
| -rw-r--r-- | daemon/appmsgmanager.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/daemon/appmsgmanager.h b/daemon/appmsgmanager.h new file mode 100644 index 0000000..651d84e --- /dev/null +++ b/daemon/appmsgmanager.h @@ -0,0 +1,30 @@ +#ifndef APPMSGMANAGER_H +#define APPMSGMANAGER_H + +#include "watchconnector.h" + +class AppMsgManager : public QObject +{ + Q_OBJECT + LOG4QT_DECLARE_QCLASS_LOGGER + +public: + explicit AppMsgManager(WatchConnector *watch, QObject *parent); + +public slots: + void send(const QUuid &uuid, const QVariantMap &data); + +signals: + void appStarted(const QUuid &uuid); + void appStopped(const QUuid &uuid); + void dataReceived(const QUuid &uuid, const QVariantMap &data); + +private: + static QByteArray buildAckMessage(uint transaction); + static QByteArray buildNackMessage(uint transaction); + +private: + WatchConnector *watch; +}; + +#endif // APPMSGMANAGER_H |
