aboutsummaryrefslogtreecommitdiff
path: root/lib/events/callinviteevent.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events/callinviteevent.h')
-rw-r--r--lib/events/callinviteevent.h44
1 files changed, 21 insertions, 23 deletions
diff --git a/lib/events/callinviteevent.h b/lib/events/callinviteevent.h
index 911ccf96..4334ca5b 100644
--- a/lib/events/callinviteevent.h
+++ b/lib/events/callinviteevent.h
@@ -20,30 +20,28 @@
#include "roomevent.h"
-namespace QMatrixClient {
- class CallInviteEvent : public CallEventBase
- {
- public:
- DEFINE_EVENT_TYPEID("m.call.invite", CallInviteEvent)
+namespace QMatrixClient
+{
+class CallInviteEvent : public CallEventBase
+{
+public:
+ DEFINE_EVENT_TYPEID("m.call.invite", CallInviteEvent)
- explicit CallInviteEvent(const QJsonObject& obj);
+ explicit CallInviteEvent(const QJsonObject& obj);
- explicit CallInviteEvent(const QString& callId, const int lifetime,
- const QString& sdp);
+ explicit CallInviteEvent(const QString& callId, const int lifetime,
+ const QString& sdp);
- int lifetime() const
- {
- return content<int>("lifetime"_ls);
- } // FIXME: Omittable<>?
- QString sdp() const
- {
- return contentJson()["offer"_ls]
- .toObject()
- .value("sdp"_ls)
- .toString();
- }
- };
+ int lifetime() const
+ {
+ return content<int>("lifetime"_ls);
+ } // FIXME: Omittable<>?
+ QString sdp() const
+ {
+ return contentJson()["offer"_ls].toObject().value("sdp"_ls).toString();
+ }
+};
- REGISTER_EVENT_TYPE(CallInviteEvent)
- DEFINE_EVENTTYPE_ALIAS(CallInvite, CallInviteEvent)
-}
+REGISTER_EVENT_TYPE(CallInviteEvent)
+DEFINE_EVENTTYPE_ALIAS(CallInvite, CallInviteEvent)
+} // namespace QMatrixClient