diff options
author | Josip Delic <delijati@googlemail.com> | 2018-08-25 20:17:29 +0200 |
---|---|---|
committer | Josip Delic <delijati@googlemail.com> | 2018-08-25 20:17:29 +0200 |
commit | 508d1f5e14f0286bb3feaf74c4f143ce2a950234 (patch) | |
tree | 173848f86b0e89803b8c2ec7562b148500077337 /lib | |
parent | 41b408334619a6e755fffbef1c40e7165ab0e0f7 (diff) | |
download | libquotient-508d1f5e14f0286bb3feaf74c4f143ce2a950234.tar.gz libquotient-508d1f5e14f0286bb3feaf74c4f143ce2a950234.zip |
Update make it compile
Diffstat (limited to 'lib')
-rw-r--r-- | lib/events/callanswerevent.cpp | 6 | ||||
-rw-r--r-- | lib/events/callanswerevent.h | 2 | ||||
-rw-r--r-- | lib/events/callcandidatesevent.cpp | 4 | ||||
-rw-r--r-- | lib/events/callcandidatesevent.h | 1 | ||||
-rw-r--r-- | lib/events/callhangupevent.cpp | 4 | ||||
-rw-r--r-- | lib/events/callinviteevent.cpp | 4 | ||||
-rw-r--r-- | lib/jobs/turnserverjob.h | 1 | ||||
-rw-r--r-- | lib/room.cpp | 20 |
8 files changed, 22 insertions, 20 deletions
diff --git a/lib/events/callanswerevent.cpp b/lib/events/callanswerevent.cpp index 14221bc1..c28ad305 100644 --- a/lib/events/callanswerevent.cpp +++ b/lib/events/callanswerevent.cpp @@ -48,7 +48,7 @@ m.call.answer using namespace QMatrixClient; CallAnswerEvent::CallAnswerEvent(const QJsonObject& obj) - : RoomEvent(CallAnswer, obj) + : RoomEvent(typeId(), obj) , _lifetime(contentJson()["lifetime"].toInt()) , _sdp(contentJson()["answer"].toObject()["sdp"].toString()) , _callId(contentJson()["call_id"].toString()) @@ -59,7 +59,7 @@ CallAnswerEvent::CallAnswerEvent(const QJsonObject& obj) CallAnswerEvent::CallAnswerEvent(const QString& callId, const int lifetime, const QString& sdp) - : RoomEvent(CallAnswer) + : RoomEvent(typeId(), NULL) { _version = 0; _callId = callId; @@ -68,7 +68,7 @@ CallAnswerEvent::CallAnswerEvent(const QString& callId, const int lifetime, } CallAnswerEvent::CallAnswerEvent(const QString& callId, const QString& sdp) - : RoomEvent(CallAnswer) + : RoomEvent(typeId(), NULL) { _version = 0; _callId = callId; diff --git a/lib/events/callanswerevent.h b/lib/events/callanswerevent.h index b26a66c3..05a20aac 100644 --- a/lib/events/callanswerevent.h +++ b/lib/events/callanswerevent.h @@ -63,4 +63,4 @@ namespace QMatrixClient REGISTER_EVENT_TYPE(CallAnswerEvent) DEFINE_EVENTTYPE_ALIAS(CallAnswer, CallAnswerEvent) -} +} // namespace QMatrixClient diff --git a/lib/events/callcandidatesevent.cpp b/lib/events/callcandidatesevent.cpp index bf7f0f79..40d9ce05 100644 --- a/lib/events/callcandidatesevent.cpp +++ b/lib/events/callcandidatesevent.cpp @@ -51,7 +51,7 @@ using namespace QMatrixClient; CallCandidatesEvent::CallCandidatesEvent(const QJsonObject& obj) - : RoomEvent(CallCandidates, obj) + : RoomEvent(typeId(), obj) , _candidates(contentJson()["candidates"].toArray()) , _callId(contentJson()["call_id"].toString()) , _version(contentJson()["version"].toInt()) @@ -61,7 +61,7 @@ CallCandidatesEvent::CallCandidatesEvent(const QJsonObject& obj) CallCandidatesEvent::CallCandidatesEvent(const QString& callId, const QJsonArray& candidates) - : RoomEvent(CallCandidates) + : RoomEvent(typeId(), NULL) { _version = 0; _callId = callId; diff --git a/lib/events/callcandidatesevent.h b/lib/events/callcandidatesevent.h index fa2de993..faf3fb7d 100644 --- a/lib/events/callcandidatesevent.h +++ b/lib/events/callcandidatesevent.h @@ -19,6 +19,7 @@ #pragma once #include "roomevent.h" +#include <QtCore/QJsonArray> namespace QMatrixClient { diff --git a/lib/events/callhangupevent.cpp b/lib/events/callhangupevent.cpp index e83f506f..27f41a5f 100644 --- a/lib/events/callhangupevent.cpp +++ b/lib/events/callhangupevent.cpp @@ -44,7 +44,7 @@ using namespace QMatrixClient; CallHangupEvent::CallHangupEvent(const QJsonObject& obj) - : RoomEvent(CallHangup, obj) + : RoomEvent(typeId(), obj) , _callId(contentJson()["call_id"].toString()) , _version(contentJson()["version"].toInt()) { @@ -52,7 +52,7 @@ CallHangupEvent::CallHangupEvent(const QJsonObject& obj) } CallHangupEvent::CallHangupEvent(const QString& callId) - : RoomEvent(CallHangup) + : RoomEvent(typeId(), NULL) { _version = 0; _callId = callId; diff --git a/lib/events/callinviteevent.cpp b/lib/events/callinviteevent.cpp index 5eb07ce2..71c49d66 100644 --- a/lib/events/callinviteevent.cpp +++ b/lib/events/callinviteevent.cpp @@ -48,7 +48,7 @@ m.call.invite using namespace QMatrixClient; CallInviteEvent::CallInviteEvent(const QJsonObject& obj) - : RoomEvent(CallInvite, obj) + : RoomEvent(typeId(), obj) , _lifetime(contentJson()["lifetime"].toInt()) , _sdp(contentJson()["offer"].toObject()["sdp"].toString()) , _callId(contentJson()["call_id"].toString()) @@ -59,7 +59,7 @@ CallInviteEvent::CallInviteEvent(const QJsonObject& obj) CallInviteEvent::CallInviteEvent(const QString& callId, const int lifetime, const QString& sdp) - : RoomEvent(CallInvite) + : RoomEvent(typeId(), NULL) { _version = 0; _callId = callId; diff --git a/lib/jobs/turnserverjob.h b/lib/jobs/turnserverjob.h index 14e28422..adbef3ba 100644 --- a/lib/jobs/turnserverjob.h +++ b/lib/jobs/turnserverjob.h @@ -19,6 +19,7 @@ #pragma once #include "basejob.h" +#include <QtCore/QJsonObject> namespace QMatrixClient { diff --git a/lib/room.cpp b/lib/room.cpp index 81e56161..ea1386ad 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -1313,38 +1313,38 @@ void Room::inviteCall(const QString& callId, const int lifetime, const QString& sdp) { Q_ASSERT(isCallSupported()); - CallInviteEvent rme(callId, lifetime, sdp); - connection()->callApi<SendMessageJob>(id(), rme); + auto *evt = new CallInviteEvent(callId, lifetime, sdp); + postEvent(evt); } void Room::callCandidates(const QString& callId, const QJsonArray& candidates) { Q_ASSERT(isCallSupported()); - CallCandidatesEvent rme(callId, candidates); - connection()->callApi<SendMessageJob>(id(), rme); + auto *evt = new CallCandidatesEvent(callId, candidates); + postEvent(evt); } void Room::answerCall(const QString& callId, const int lifetime, const QString& sdp) { Q_ASSERT(isCallSupported()); - CallAnswerEvent rme(callId, lifetime, sdp); - connection()->callApi<SendMessageJob>(id(), rme); + auto *evt = new CallAnswerEvent(callId, lifetime, sdp); + postEvent(evt); } void Room::answerCall(const QString& callId, const QString& sdp) { Q_ASSERT(isCallSupported()); - CallAnswerEvent rme(callId, sdp); - connection()->callApi<SendMessageJob>(id(), rme); + auto *evt = new CallAnswerEvent(callId, sdp); + postEvent(evt); } void Room::hangupCall(const QString& callId) { Q_ASSERT(isCallSupported()); - CallHangupEvent rme(callId); - connection()->callApi<SendMessageJob>(id(), rme); + auto *evt = new CallHangupEvent(callId); + postEvent(evt); } void Room::getPreviousContent(int limit) |