From 50cc85d3dea93735fe352831421eea2fcf9c24c5 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Thu, 4 Oct 2018 14:41:48 +0900 Subject: Modernise and fix code dealing with call events Call events no more store deserialised values; instead they deserialise values on the fly, same as all other events. They are no more treated as state events (The Spec doesn't define them as state events in the first place). A common base class, CallEventBase, is introduced that defines data pieces common to all call events (call id and version). --- lib/events/callcandidatesevent.cpp | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'lib/events/callcandidatesevent.cpp') diff --git a/lib/events/callcandidatesevent.cpp b/lib/events/callcandidatesevent.cpp index 40d9ce05..52cd1856 100644 --- a/lib/events/callcandidatesevent.cpp +++ b/lib/events/callcandidatesevent.cpp @@ -18,12 +18,6 @@ #include "callcandidatesevent.h" -#include "event.h" - -#include "logging.h" - -#include - /* m.call.candidates { @@ -46,24 +40,3 @@ m.call.candidates "type": "m.call.candidates" } */ - -using namespace QMatrixClient; - - -CallCandidatesEvent::CallCandidatesEvent(const QJsonObject& obj) - : RoomEvent(typeId(), obj) - , _candidates(contentJson()["candidates"].toArray()) - , _callId(contentJson()["call_id"].toString()) - , _version(contentJson()["version"].toInt()) -{ - qCDebug(EVENTS) << "Call Candidates event"; -} - -CallCandidatesEvent::CallCandidatesEvent(const QString& callId, - const QJsonArray& candidates) - : RoomEvent(typeId(), NULL) -{ - _version = 0; - _callId = callId; - _candidates = candidates; -} -- cgit v1.2.3