aboutsummaryrefslogtreecommitdiff
path: root/lib/events/callanswerevent.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events/callanswerevent.h')
-rw-r--r--lib/events/callanswerevent.h39
1 files changed, 20 insertions, 19 deletions
diff --git a/lib/events/callanswerevent.h b/lib/events/callanswerevent.h
index 2d9e5bb0..052f732d 100644
--- a/lib/events/callanswerevent.h
+++ b/lib/events/callanswerevent.h
@@ -13,33 +13,34 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#pragma once
#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