// SPDX-FileCopyrightText: 2017 Marius Gripsgard // SPDX-FileCopyrightText: 2018 Josip Delic // SPDX-FileCopyrightText: 2018 Kitsune Ral // SPDX-FileCopyrightText: 2020 Carl Schwan // SPDX-License-Identifier: LGPL-2.1-or-later #pragma once #include "roomevent.h" namespace Quotient { class CallCandidatesEvent : public CallEventBase { public: DEFINE_EVENT_TYPEID("m.call.candidates", CallCandidatesEvent) explicit CallCandidatesEvent(const QJsonObject& obj) : CallEventBase(typeId(), obj) {} explicit CallCandidatesEvent(const QString& callId, const QJsonArray& candidates) : CallEventBase(typeId(), matrixTypeId(), callId, 0, { { QStringLiteral("candidates"), candidates } }) {} QJsonArray candidates() const { return contentPart("candidates"_ls); } QString callId() const { return contentPart("call_id"); } int version() const { return contentPart("version"); } }; REGISTER_EVENT_TYPE(CallCandidatesEvent) } // namespace Quotient