summaryrefslogtreecommitdiffstats
path: root/eventmessage.h
diff options
context:
space:
mode:
authorRaquel Medina <raquel.medina@konsulko.com>2020-05-26 01:41:35 +0200
committerRaquel Medina <raquel.medina@konsulko.com>2020-05-28 11:51:52 +0200
commitcb62d2ee423ce7e10f4b6dd0127491e60f4cec83 (patch)
treeabaf368c1ac9c6972e10c9499fc935fd9cb04a1c /eventmessage.h
parent3bd1bb068819f29b480812bc7db61a87006103e1 (diff)
block direct *Message objects creation
Make constructors private for the *Message objects to ensure they are only created via factory. Bug-AGL: SPEC-3112 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: I385775e7cc113aea792bfab4b7372e7b51c19f81
Diffstat (limited to 'eventmessage.h')
-rw-r--r--eventmessage.h7
1 files changed, 4 insertions, 3 deletions
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