diff options
-rw-r--r-- | callmessage.h | 5 | ||||
-rw-r--r-- | eventmessage.h | 7 | ||||
-rw-r--r-- | responsemessage.h | 10 |
3 files changed, 10 insertions, 12 deletions
diff --git a/callmessage.h b/callmessage.h index 41098bc..d08024e 100644 --- a/callmessage.h +++ b/callmessage.h @@ -23,8 +23,6 @@ class CallMessage : public Message { public: - CallMessage() = default; - bool createRequest(QString api, QString verb, QJsonValue parameter = "None"); bool isEvent() override @@ -46,6 +44,9 @@ class CallMessage : public Message private: QMap<QString, QVariant> m_request; + + CallMessage() = default; + friend class MessageFactory; }; #endif // CALLMESSAGE_H diff --git a/eventmessage.h b/eventmessage.h index 41bf7b6..133574c 100644 --- a/eventmessage.h +++ b/eventmessage.h @@ -23,9 +23,7 @@ class EventMessage : public Message { public: - explicit EventMessage(QJsonDocument data); - - inline QString eventApi() const + inline QString eventApi() const { return m_event_api; } @@ -55,6 +53,9 @@ class EventMessage : public Message private: QString m_event_api, m_event_name; QJsonObject m_event_data; + + explicit EventMessage(QJsonDocument data); + friend class MessageFactory; }; #endif // EVENTMESSAGE_H diff --git a/responsemessage.h b/responsemessage.h index bac4296..304a6e3 100644 --- a/responsemessage.h +++ b/responsemessage.h @@ -22,14 +22,7 @@ class ResponseMessage : public Message { - - public: - //deprecated: - explicit ResponseMessage(QByteArray request = nullptr); - - explicit ResponseMessage(QJsonDocument data); - inline QString requestApi() const { return m_request["api"].toString(); @@ -85,6 +78,9 @@ class ResponseMessage : public Message unsigned int m_reply_callid; QJsonObject m_reply_data; QMap<QString, QVariant> m_request; + + explicit ResponseMessage(QJsonDocument data); + friend class MessageFactory; }; #endif // RESPONSEMESSAGE_H |