summaryrefslogtreecommitdiffstats
path: root/message.h
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-05-01 23:15:58 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-05-13 17:43:33 -0700
commitbb1aee701bc3516c2072a79d3129ee83918df7fd (patch)
tree150edc50142429ee566edf629a8d3f5dfb3a8557 /message.h
parent6465961f28f40ff5a2da31876f1c23ea3c7f7cec (diff)
message: add response message support
Add support for callid sequencing, and request data being included with the response message. Bug-AGL: SPEC-1404 Change-Id: I259ae3da68e55de17eafe9db534258db5fbc3ef8 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'message.h')
-rw-r--r--message.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/message.h b/message.h
index 37dc740..062ca58 100644
--- a/message.h
+++ b/message.h
@@ -18,7 +18,8 @@
#define MESSAGE_H
#include <QObject>
-#include <QJsonArray>
+#include <QMap>
+#include <QVariant>
#include <QJsonDocument>
#include <QJsonObject>
@@ -31,6 +32,7 @@ enum MessageId {
enum MessageType {
GenericMessage,
+ ResponseRequestMessage,
TelephonyEventMessage,
WeatherEventMessage,
MediaplayerEventMessage,
@@ -90,10 +92,14 @@ class Message : public QObject
return m_init;
}
+ inline void setCallId(qint32 callId) {
+ m_request["callid"] = callId;
+ }
+
protected:
bool m_event, m_init, m_reply;
QString m_event_api, m_event_name, m_reply_info, m_reply_status, m_reply_uuid;
- QJsonArray m_request;
+ QMap<QString, QVariant> m_request;
QJsonDocument m_jdoc;
QJsonObject m_event_data, m_reply_data;
};