Commit c5132486 authored by Sébastien Blin's avatar Sébastien Blin Committed by Adrien Béraud

rendezvous: the host can change the layout

until we can set another account as the master

Change-Id: Ia4f6d72a4341d036dd20c60d06cb171b236bdcf7
parent 1b7de38d
...@@ -613,6 +613,12 @@ ConversationModel::selectConversation(const QString& uid) const ...@@ -613,6 +613,12 @@ ConversationModel::selectConversation(const QString& uid) const
callEnded = call.status == call::Status::ENDED; callEnded = call.status == call::Status::ENDED;
} catch (...) {} } catch (...) {}
} }
if (!conversation.confId.isEmpty()
&& owner.confProperties.isRendezVous) {
// If we are on a rendez vous account and we select the conversation,
// attach to the call.
CallManager::instance().unholdConference(conversation.confId);
}
if (not callEnded and not conversation.confId.isEmpty()) { if (not callEnded and not conversation.confId.isEmpty()) {
emit pimpl_->behaviorController.showCallView(owner.id, conversation); emit pimpl_->behaviorController.showCallView(owner.id, conversation);
...@@ -1946,7 +1952,11 @@ ConversationModelPimpl::slotCallAddedToConference(const QString& callId, const Q ...@@ -1946,7 +1952,11 @@ ConversationModelPimpl::slotCallAddedToConference(const QString& callId, const Q
if (conversation.callId == callId || conversation.confId == confId) { if (conversation.callId == callId || conversation.confId == confId) {
conversation.confId = confId; conversation.confId = confId;
dirtyConversations = {true, true}; dirtyConversations = {true, true};
emit linked.selectConversation(conversation.uid);
// Refresh the conference status only if attached
MapStringString confDetails = CallManager::instance().getConferenceDetails(confId);
if (confDetails["STATE"] == "ACTIVE_ATTACHED")
emit linked.selectConversation(conversation.uid);
} }
} }
} }
......
...@@ -705,11 +705,12 @@ NewCallModelPimpl::slotIncomingCall(const QString& accountId, const QString& cal ...@@ -705,11 +705,12 @@ NewCallModelPimpl::slotIncomingCall(const QString& accountId, const QString& cal
if (linked.owner.id != accountId) { if (linked.owner.id != accountId) {
return; return;
} }
if (linked.owner.confProperties.isRendezVous) { // TODO: uncomment this. For now, the rendez-vous account is showing calls
// Do not notify for calls if rendez vous because it's in a detached //if (linked.owner.confProperties.isRendezVous) {
// mode and auto answer is managed by the daemon // // Do not notify for calls if rendez vous because it's in a detached
return; // // mode and auto answer is managed by the daemon
} // return;
//}
// do not use auto here (QDBusPendingReply<MapStringString>) // do not use auto here (QDBusPendingReply<MapStringString>)
MapStringString callDetails = CallManager::instance().getCallDetails(callId); MapStringString callDetails = CallManager::instance().getCallDetails(callId);
...@@ -775,8 +776,10 @@ NewCallModelPimpl::slotCallStateChanged(const QString& callId, const QString& st ...@@ -775,8 +776,10 @@ NewCallModelPimpl::slotCallStateChanged(const QString& callId, const QString& st
|| previousStatus == call::Status::OUTGOING_RINGING) { || previousStatus == call::Status::OUTGOING_RINGING) {
if (previousStatus == call::Status::INCOMING_RINGING if (previousStatus == call::Status::INCOMING_RINGING
&& linked.owner.profileInfo.type != profile::Type::SIP) && linked.owner.profileInfo.type != profile::Type::SIP
&& !linked.owner.confProperties.isRendezVous) { // TODO remove this when we want to not show calls in rendez-vous
linked.setCurrentCall(callId); linked.setCurrentCall(callId);
}
call->startTime = std::chrono::steady_clock::now(); call->startTime = std::chrono::steady_clock::now();
emit linked.callStarted(callId); emit linked.callStarted(callId);
sendProfile(callId); sendProfile(callId);
...@@ -861,6 +864,14 @@ NewCallModelPimpl::slotOnConferenceInfosUpdated(const QString& confId, const Vec ...@@ -861,6 +864,14 @@ NewCallModelPimpl::slotOnConferenceInfosUpdated(const QString& confId, const Vec
} }
emit linked.onParticipantsChanged(confId); emit linked.onParticipantsChanged(confId);
// TODO: remove when the rendez-vous UI will be done
// For now, the rendez-vous account can see ongoing calls
// And must be notified when a new
QStringList callList = CallManager::instance().getParticipantList(confId);
foreach(const auto& call, callList) {
emit linked.callAddedToConference(call, confId);
}
} }
bool bool
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment