summaryrefslogtreecommitdiff
path: root/daemon/appmsgmanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/appmsgmanager.h')
-rw-r--r--daemon/appmsgmanager.h30
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