diff options
Diffstat (limited to 'lib/events/callanswerevent.h')
-rw-r--r-- | lib/events/callanswerevent.h | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/lib/events/callanswerevent.h b/lib/events/callanswerevent.h index f222803b..69662eb9 100644 --- a/lib/events/callanswerevent.h +++ b/lib/events/callanswerevent.h @@ -20,31 +20,29 @@ #include "roomevent.h" -namespace QMatrixClient { - class CallAnswerEvent : public CallEventBase - { - public: - DEFINE_EVENT_TYPEID("m.call.answer", CallAnswerEvent) +namespace QMatrixClient +{ +class CallAnswerEvent : public CallEventBase +{ +public: + DEFINE_EVENT_TYPEID("m.call.answer", CallAnswerEvent) - explicit CallAnswerEvent(const QJsonObject& obj); + explicit CallAnswerEvent(const QJsonObject& obj); - explicit CallAnswerEvent(const QString& callId, const int lifetime, - const QString& sdp); - explicit CallAnswerEvent(const QString& callId, const QString& sdp); + explicit CallAnswerEvent(const QString& callId, const int lifetime, + const QString& sdp); + explicit CallAnswerEvent(const QString& callId, const QString& sdp); - int lifetime() const - { - return content<int>("lifetime"_ls); - } // FIXME: Omittable<>? - QString sdp() const - { - return contentJson()["answer"_ls] - .toObject() - .value("sdp"_ls) - .toString(); - } - }; + int lifetime() const + { + return content<int>("lifetime"_ls); + } // FIXME: Omittable<>? + QString sdp() const + { + return contentJson()["answer"_ls].toObject().value("sdp"_ls).toString(); + } +}; - REGISTER_EVENT_TYPE(CallAnswerEvent) - DEFINE_EVENTTYPE_ALIAS(CallAnswer, CallAnswerEvent) +REGISTER_EVENT_TYPE(CallAnswerEvent) +DEFINE_EVENTTYPE_ALIAS(CallAnswer, CallAnswerEvent) } // namespace QMatrixClient |