diff --git a/linphone-app/assets/languages/da.ts b/linphone-app/assets/languages/da.ts index 24f862d75..19805b50b 100644 --- a/linphone-app/assets/languages/da.ts +++ b/linphone-app/assets/languages/da.ts @@ -755,9 +755,7 @@ Server url ikke konfigureret. conferencesEndedFilter - 'Finished' : Filter conferences on end status. ----------- -'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + 'Finished' : Filter conferences on end status. @@ -770,6 +768,11 @@ Server url ikke konfigureret. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. + + conferencesInvitedFilter + 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + + ConfirmDialog diff --git a/linphone-app/assets/languages/de.ts b/linphone-app/assets/languages/de.ts index d2a4d5bca..9064c5c58 100644 --- a/linphone-app/assets/languages/de.ts +++ b/linphone-app/assets/languages/de.ts @@ -755,9 +755,7 @@ Server URL ist nicht konfiguriert. conferencesEndedFilter - 'Finished' : Filter conferences on end status. ----------- -'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + 'Finished' : Filter conferences on end status. @@ -770,6 +768,11 @@ Server URL ist nicht konfiguriert. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. + + conferencesInvitedFilter + 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + + ConfirmDialog diff --git a/linphone-app/assets/languages/en.ts b/linphone-app/assets/languages/en.ts index 3afa2c519..1281ce601 100644 --- a/linphone-app/assets/languages/en.ts +++ b/linphone-app/assets/languages/en.ts @@ -755,9 +755,7 @@ Server URL not configured. conferencesEndedFilter - 'Finished' : Filter conferences on end status. ----------- -'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + 'Finished' : Filter conferences on end status. Finished @@ -770,6 +768,11 @@ Server URL not configured. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. Conference URL has been copied + + conferencesInvitedFilter + 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + Invitations + ConfirmDialog diff --git a/linphone-app/assets/languages/es.ts b/linphone-app/assets/languages/es.ts index 36eacb4bc..b2c4614fa 100644 --- a/linphone-app/assets/languages/es.ts +++ b/linphone-app/assets/languages/es.ts @@ -755,9 +755,7 @@ URL del servidor no configurada. conferencesEndedFilter - 'Finished' : Filter conferences on end status. ----------- -'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + 'Finished' : Filter conferences on end status. @@ -770,6 +768,11 @@ URL del servidor no configurada. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. + + conferencesInvitedFilter + 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + + ConfirmDialog diff --git a/linphone-app/assets/languages/fr_FR.ts b/linphone-app/assets/languages/fr_FR.ts index d45566785..0af034d24 100644 --- a/linphone-app/assets/languages/fr_FR.ts +++ b/linphone-app/assets/languages/fr_FR.ts @@ -755,9 +755,7 @@ URL du serveur non configurée. conferencesEndedFilter - 'Finished' : Filter conferences on end status. ----------- -'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + 'Finished' : Filter conferences on end status. @@ -770,6 +768,11 @@ URL du serveur non configurée. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. + + conferencesInvitedFilter + 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + + ConfirmDialog diff --git a/linphone-app/assets/languages/hu.ts b/linphone-app/assets/languages/hu.ts index b1aa482b9..9ce762ce8 100644 --- a/linphone-app/assets/languages/hu.ts +++ b/linphone-app/assets/languages/hu.ts @@ -750,9 +750,7 @@ A kiszolgáló URL-je nincs konfigurálva. conferencesEndedFilter - 'Finished' : Filter conferences on end status. ----------- -'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + 'Finished' : Filter conferences on end status. @@ -765,6 +763,11 @@ A kiszolgáló URL-je nincs konfigurálva. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. + + conferencesInvitedFilter + 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + + ConfirmDialog diff --git a/linphone-app/assets/languages/it.ts b/linphone-app/assets/languages/it.ts index 30edd166c..7de3b163f 100644 --- a/linphone-app/assets/languages/it.ts +++ b/linphone-app/assets/languages/it.ts @@ -755,9 +755,7 @@ URL del server non configurato. conferencesEndedFilter - 'Finished' : Filter conferences on end status. ----------- -'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + 'Finished' : Filter conferences on end status. @@ -770,6 +768,11 @@ URL del server non configurato. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. + + conferencesInvitedFilter + 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + + ConfirmDialog diff --git a/linphone-app/assets/languages/ja.ts b/linphone-app/assets/languages/ja.ts index 1952237f5..4171ddc1a 100644 --- a/linphone-app/assets/languages/ja.ts +++ b/linphone-app/assets/languages/ja.ts @@ -750,9 +750,7 @@ conferencesEndedFilter - 'Finished' : Filter conferences on end status. ----------- -'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + 'Finished' : Filter conferences on end status. @@ -765,6 +763,11 @@ 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. + + conferencesInvitedFilter + 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + + ConfirmDialog diff --git a/linphone-app/assets/languages/lt.ts b/linphone-app/assets/languages/lt.ts index ad48a0662..ab1df5071 100644 --- a/linphone-app/assets/languages/lt.ts +++ b/linphone-app/assets/languages/lt.ts @@ -760,9 +760,7 @@ Nesukonfigūruotas serverio url. conferencesEndedFilter - 'Finished' : Filter conferences on end status. ----------- -'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + 'Finished' : Filter conferences on end status. @@ -775,6 +773,11 @@ Nesukonfigūruotas serverio url. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. + + conferencesInvitedFilter + 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + + ConfirmDialog diff --git a/linphone-app/assets/languages/pt_BR.ts b/linphone-app/assets/languages/pt_BR.ts index e85601850..0617d6277 100644 --- a/linphone-app/assets/languages/pt_BR.ts +++ b/linphone-app/assets/languages/pt_BR.ts @@ -755,9 +755,7 @@ URL do servidor não configurado. conferencesEndedFilter - 'Finished' : Filter conferences on end status. ----------- -'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + 'Finished' : Filter conferences on end status. @@ -770,6 +768,11 @@ URL do servidor não configurado. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. + + conferencesInvitedFilter + 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + + ConfirmDialog diff --git a/linphone-app/assets/languages/ru.ts b/linphone-app/assets/languages/ru.ts index d8484a60a..0c44b0c37 100644 --- a/linphone-app/assets/languages/ru.ts +++ b/linphone-app/assets/languages/ru.ts @@ -760,9 +760,7 @@ conferencesEndedFilter - 'Finished' : Filter conferences on end status. ----------- -'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + 'Finished' : Filter conferences on end status. @@ -775,6 +773,11 @@ 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. + + conferencesInvitedFilter + 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + + ConfirmDialog diff --git a/linphone-app/assets/languages/sv.ts b/linphone-app/assets/languages/sv.ts index c1fb0b68b..c281aed7f 100644 --- a/linphone-app/assets/languages/sv.ts +++ b/linphone-app/assets/languages/sv.ts @@ -755,9 +755,7 @@ Serverwebbadressen är inte konfigurerad. conferencesEndedFilter - 'Finished' : Filter conferences on end status. ----------- -'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + 'Finished' : Filter conferences on end status. @@ -770,6 +768,11 @@ Serverwebbadressen är inte konfigurerad. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. + + conferencesInvitedFilter + 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + + ConfirmDialog diff --git a/linphone-app/assets/languages/tr.ts b/linphone-app/assets/languages/tr.ts index c9d51efed..7fe259420 100644 --- a/linphone-app/assets/languages/tr.ts +++ b/linphone-app/assets/languages/tr.ts @@ -750,9 +750,7 @@ Sunucu url'si yapılandırılmadı. conferencesEndedFilter - 'Finished' : Filter conferences on end status. ----------- -'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + 'Finished' : Filter conferences on end status. @@ -765,6 +763,11 @@ Sunucu url'si yapılandırılmadı. 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. + + conferencesInvitedFilter + 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + + ConfirmDialog diff --git a/linphone-app/assets/languages/uk.ts b/linphone-app/assets/languages/uk.ts index 63e92d83d..e9058bde5 100644 --- a/linphone-app/assets/languages/uk.ts +++ b/linphone-app/assets/languages/uk.ts @@ -760,9 +760,7 @@ conferencesEndedFilter - 'Finished' : Filter conferences on end status. ----------- -'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + 'Finished' : Filter conferences on end status. @@ -775,6 +773,11 @@ 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. + + conferencesInvitedFilter + 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + + ConfirmDialog diff --git a/linphone-app/assets/languages/zh_CN.ts b/linphone-app/assets/languages/zh_CN.ts index e95d42b1f..243d59503 100644 --- a/linphone-app/assets/languages/zh_CN.ts +++ b/linphone-app/assets/languages/zh_CN.ts @@ -750,9 +750,7 @@ conferencesEndedFilter - 'Finished' : Filter conferences on end status. ----------- -'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + 'Finished' : Filter conferences on end status. @@ -765,6 +763,11 @@ 'Conference URL has been copied' : Message text in a banner to warn the user that the µURL have been copied to the clipboard. + + conferencesInvitedFilter + 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). + + ConfirmDialog diff --git a/linphone-app/resources.qrc b/linphone-app/resources.qrc index bf9010a19..81654483b 100644 --- a/linphone-app/resources.qrc +++ b/linphone-app/resources.qrc @@ -417,12 +417,10 @@ ui/views/App/Calls/Dialogs/CallSipAddress.qml ui/views/App/Calls/Dialogs/CallTransfer.qml ui/views/App/Calls/Dialogs/ConferenceManager.qml - ui/views/App/Calls/EndedCall.qml ui/views/App/Calls/IncallFullscreenWindow.qml ui/views/App/Calls/Incall.js ui/views/App/Calls/Incall.qml ui/views/App/Calls/IncomingCall.qml - ui/views/App/Calls/OutgoingCall.qml ui/views/App/Calls/WaitingRoom.qml ui/views/App/Calls/ZrtpTokenAuthentication.qml ui/views/App/Dialog/NewConference.qml diff --git a/linphone-app/src/components/call/CallModel.cpp b/linphone-app/src/components/call/CallModel.cpp index 06117db28..f8df585a8 100644 --- a/linphone-app/src/components/call/CallModel.cpp +++ b/linphone-app/src/components/call/CallModel.cpp @@ -28,6 +28,7 @@ #include "components/calls/CallsListModel.hpp" #include "components/chat-room/ChatRoomModel.hpp" #include "components/conference/ConferenceModel.hpp" +#include "components/conferenceInfo/ConferenceInfoModel.hpp" #include "components/contact/ContactModel.hpp" #include "components/contacts/ContactsListModel.hpp" #include "components/core/CoreHandlers.hpp" @@ -87,7 +88,11 @@ CallModel::CallModel (shared_ptr call){ if(mCall) { mRemoteAddress = mCall->getRemoteAddress()->clone(); if(mCall->getConference()) - mConferenceModel = ConferenceModel::create(mCall->getConference()); + mConferenceModel = ConferenceModel::create(mCall->getConference()); + auto conferenceInfo = CoreManager::getInstance()->getCore()->findConferenceInformationFromUri(getConferenceAddress()); + if( conferenceInfo ){ + mConferenceInfoModel = ConferenceInfoModel::create(conferenceInfo); + } } mMagicSearch->getContactListFromFilterAsync(mRemoteAddress->getUsername(),mRemoteAddress->getDomain()); } @@ -115,6 +120,20 @@ QString CallModel::getFullPeerAddress () const { QString CallModel::getFullLocalAddress () const { return mCall ? Utils::coreStringToAppString(mCall->getCallLog()->getLocalAddress()->asString()) : ""; } + +std::shared_ptr CallModel::getConferenceAddress () const{ + std::shared_ptr conferenceAddress; + if(mCall){ + auto remoteContact = mCall->getRemoteContact(); + + if (mCall->getDir() == linphone::Call::Dir::Incoming){ + if( remoteContact != "" ) + conferenceAddress = CoreManager::getInstance()->getCore()->interpretUrl(remoteContact); + }else + conferenceAddress = mCall->getRemoteAddress()->clone(); + } + return conferenceAddress; +} // ----------------------------------------------------------------------------- ContactModel *CallModel::getContactModel() const{ @@ -165,6 +184,10 @@ ConferenceModel * CallModel::getConferenceModel(){ return mConferenceModel.get(); } +ConferenceInfoModel * CallModel::getConferenceInfoModel(){ + return mConferenceInfoModel.get(); +} + QSharedPointer CallModel::getConferenceSharedModel(){ if(mCall->getConference() && !mConferenceModel){ mConferenceModel = ConferenceModel::create(mCall->getConference()); @@ -682,6 +705,7 @@ void CallModel::setCameraEnabled (bool status){ shared_ptr params = core->createCallParams(mCall); params->setVideoDirection(status ? linphone::MediaDirection::SendRecv : linphone::MediaDirection::RecvOnly); + params->enableVideo(true); mCall->update(params); } } diff --git a/linphone-app/src/components/call/CallModel.hpp b/linphone-app/src/components/call/CallModel.hpp index c2b810ddf..129597c57 100644 --- a/linphone-app/src/components/call/CallModel.hpp +++ b/linphone-app/src/components/call/CallModel.hpp @@ -29,6 +29,7 @@ #include "utils/LinphoneEnums.hpp" // ============================================================================= +class ConferenceInfoModel; class ConferenceModel; class ContactModel; class ChatRoomModel; @@ -44,6 +45,7 @@ class CallModel : public QObject { Q_PROPERTY(ContactModel *contactModel READ getContactModel CONSTANT ) Q_PROPERTY(ChatRoomModel * chatRoomModel READ getChatRoomModel NOTIFY chatRoomModelChanged) Q_PROPERTY(ConferenceModel * conferenceModel READ getConferenceModel NOTIFY conferenceModelChanged) + Q_PROPERTY(ConferenceInfoModel * conferenceInfoModel READ getConferenceInfoModel NOTIFY conferenceModelInfoChanged) Q_PROPERTY(CallStatus status READ getStatus NOTIFY statusChanged) Q_PROPERTY(QString callError READ getCallError NOTIFY callErrorChanged) @@ -119,10 +121,12 @@ public: QString getLocalAddress () const; QString getFullPeerAddress () const; QString getFullLocalAddress () const; + std::shared_ptr getConferenceAddress () const; ContactModel *getContactModel() const; ChatRoomModel * getChatRoomModel() const; ConferenceModel* getConferenceModel(); + ConferenceInfoModel* getConferenceInfoModel(); QSharedPointer getConferenceSharedModel(); bool isInConference () const { @@ -191,6 +195,7 @@ signals: void callIdChanged(); void isInConferenceChanged (bool status); void conferenceModelChanged(); + void conferenceModelInfoChanged(); void chatRoomModelChanged(); void speakerMutedChanged (bool status); void microMutedChanged (bool status); @@ -304,6 +309,7 @@ private: std::shared_ptr mSearch; QString mTransferAddress; QSharedPointer mConferenceModel; + QSharedPointer mConferenceInfoModel; }; #endif // CALL_MODEL_H_ diff --git a/linphone-app/src/components/calls/CallsListModel.cpp b/linphone-app/src/components/calls/CallsListModel.cpp index ef6a64e25..8d02478e0 100644 --- a/linphone-app/src/components/calls/CallsListModel.cpp +++ b/linphone-app/src/components/calls/CallsListModel.cpp @@ -202,36 +202,6 @@ void CallsListModel::launchVideoCall (const QString &sipAddress, const QString& CallModel::prepareTransfert(call, prepareTransfertAddress); } -ChatRoomModel* CallsListModel::launchSecureChat (const QString &sipAddress) const { - CoreManager::getInstance()->getTimelineListModel()->mAutoSelectAfterCreation = true; - shared_ptr core = CoreManager::getInstance()->getCore(); - shared_ptr address = core->interpretUrl(Utils::appStringToCoreString(sipAddress)); - if (!address) - return nullptr; - - std::shared_ptr params = core->createDefaultChatRoomParams(); - std::list > participants; - std::shared_ptr localAddress; - participants.push_back(address); - params->enableEncryption(true); - - params->setSubject("Dummy Subject"); - params->enableEncryption(true); - - std::shared_ptr chatRoom = core->createChatRoom(params, localAddress, participants); - if( chatRoom != nullptr){ - auto timelineList = CoreManager::getInstance()->getTimelineListModel(); - timelineList->update(); - auto timeline = timelineList->getTimeline(chatRoom, false); - if(!timeline){ - timeline = timelineList->getTimeline(chatRoom, true); - timelineList->add(timeline); - } - return timeline->getChatRoomModel(); - } - return nullptr; -} - QVariantMap CallsListModel::launchChat(const QString &sipAddress, const int& securityLevel) const{ QVariantList participants; participants << sipAddress; @@ -252,6 +222,7 @@ ChatRoomModel* CallsListModel::createChat (const QString &participantAddress) co params->setBackend(linphone::ChatRoomBackend::Basic); + qInfo() << "Create ChatRoom with " < chatRoom = core->createChatRoom(params, localAddress, participants); if( chatRoom != nullptr){ @@ -287,7 +258,19 @@ bool CallsListModel::createSecureChat (const QString& subject, const QString &pa params->enableEncryption(true); params->enableGroup(true); + qInfo() << "Create secure ChatRoom: " << subject << ", from " << QString::fromStdString(localAddress->asString()) << " and with " < chatRoom = core->createChatRoom(params, localAddress, participants); +// Still needed? +// if( chatRoom != nullptr){ +// auto timelineList = CoreManager::getInstance()->getTimelineListModel(); +// timelineList->update(); +// auto timeline = timelineList->getTimeline(chatRoom, false); +// if(!timeline){ +// timeline = timelineList->getTimeline(chatRoom, true); +// timelineList->add(timeline); +// } +// return timeline->getChatRoomModel(); +// } return chatRoom != nullptr; } @@ -305,7 +288,7 @@ QVariantMap CallsListModel::createChatRoom(const QString& subject, const int& se QSharedPointer timeline; auto timelineList = CoreManager::getInstance()->getTimelineListModel(); QString localAddressStr = (localAddress ? Utils::coreStringToAppString(localAddress->asStringUriOnly()) : "local"); - qInfo() << "ChatRoom creation of " << subject << " at " << securityLevel << " security, from " << localAddressStr << " and with " << participants; + qInfo() << "Create ChatRoom: " << subject << " at " << securityLevel << " security, from " << localAddressStr << " and with " << participants; std::shared_ptr params = core->createDefaultChatRoomParams(); std::list > chatRoomParticipants; diff --git a/linphone-app/src/components/calls/CallsListModel.hpp b/linphone-app/src/components/calls/CallsListModel.hpp index 6635c8674..29bc6911e 100644 --- a/linphone-app/src/components/calls/CallsListModel.hpp +++ b/linphone-app/src/components/calls/CallsListModel.hpp @@ -47,7 +47,6 @@ public: Q_INVOKABLE void launchAudioCall (const QString &sipAddress, const QString& prepareTransfertAddress = "", const QHash &headers = {}) const; Q_INVOKABLE void launchSecureAudioCall (const QString &sipAddress, LinphoneEnums::MediaEncryption encryption, const QHash &headers = {}, const QString& prepareTransfertAddress = "") const; Q_INVOKABLE void launchVideoCall (const QString &sipAddress, const QString& prepareTransfertAddress = "", const bool& autoSelectAfterCreation = true, QVariantMap options = QVariantMap()) const; - Q_INVOKABLE ChatRoomModel* launchSecureChat (const QString &sipAddress) const; Q_INVOKABLE QVariantMap launchChat(const QString &sipAddress, const int& securityLevel) const; Q_INVOKABLE ChatRoomModel* createChat (const QString &participantAddress) const; Q_INVOKABLE ChatRoomModel* createChat (const CallModel * ) const; @@ -63,7 +62,7 @@ public: Q_INVOKABLE void terminateAllCalls () const; Q_INVOKABLE void terminateCall (const QString& sipAddress) const; - static std::list> getCallHistory(const QString& peerAddress, const QString& localAddress); + static std::list> getCallHistory(const QString& peerAddress, const QString& localAddress); signals: void callRunning (int index, CallModel *callModel); diff --git a/linphone-app/src/components/chat-room/ChatRoomModel.cpp b/linphone-app/src/components/chat-room/ChatRoomModel.cpp index 3e52db2ef..9b9df4473 100644 --- a/linphone-app/src/components/chat-room/ChatRoomModel.cpp +++ b/linphone-app/src/components/chat-room/ChatRoomModel.cpp @@ -187,8 +187,10 @@ ChatRoomModel::~ChatRoomModel () { for(auto p : participants) participantsAddress.push_back(p->getAddress()->clone()); auto internalChatRoom = CoreManager::getInstance()->getCore()->searchChatRoom(mChatRoom->getCurrentParams(), mChatRoom->getLocalAddress(), mChatRoom->getPeerAddress(), participantsAddress); - if( internalChatRoom) + if( internalChatRoom) { + qInfo() << "Deleting ChatRoom : " << getSubject() << ", address=" << getFullPeerAddress(); CoreManager::getInstance()->getCore()->deleteChatRoom(internalChatRoom); + } } } } @@ -258,6 +260,7 @@ void ChatRoomModel::removeAllEntries () { if(haveLogs) emit CoreManager::getInstance()->callLogsCountChanged(); } + deleteChatRoom(); endResetModel(); emit allEntriesRemoved(mSelf.lock()); emit focused();// Removing all entries is like having focus. Don't wait asynchronous events. @@ -593,6 +596,7 @@ void ChatRoomModel::markAsToDelete(){ } void ChatRoomModel::deleteChatRoom(){ + qInfo() << "Deleting ChatRoom : " << getSubject() << ", address=" << getFullPeerAddress(); CoreManager::getInstance()->getCore()->deleteChatRoom(mChatRoom); } diff --git a/linphone-app/src/components/history/HistoryModel.cpp b/linphone-app/src/components/history/HistoryModel.cpp index ed5c32248..6b750b0a1 100644 --- a/linphone-app/src/components/history/HistoryModel.cpp +++ b/linphone-app/src/components/history/HistoryModel.cpp @@ -53,7 +53,10 @@ static inline void fillCallStartEntry (QVariantMap &dest, const shared_ptrgetDir() == linphone::Call::Dir::Outgoing; dest["status"] = static_cast(callLog->getStatus()); dest["isStart"] = true; - dest["sipAddress"] = Utils::coreStringToAppString(callLog->getRemoteAddress()->asString()); + if(callLog->wasConference()) { + dest["title"] = QString::fromStdString(callLog->getConferenceInfo()->getSubject()); + }else + dest["sipAddress"] = Utils::coreStringToAppString(callLog->getRemoteAddress()->asString()); } static inline void fillCallEndEntry (QVariantMap &dest, const shared_ptr &callLog) { @@ -62,7 +65,11 @@ static inline void fillCallEndEntry (QVariantMap &dest, const shared_ptrgetDir() == linphone::Call::Dir::Outgoing; dest["status"] = static_cast(callLog->getStatus()); dest["isStart"] = false; - dest["sipAddress"] = Utils::coreStringToAppString(callLog->getRemoteAddress()->asString()); + if(callLog->wasConference()) { + dest["title"] = QString::fromStdString(callLog->getConferenceInfo()->getSubject()); + }else + dest["sipAddress"] = Utils::coreStringToAppString(callLog->getRemoteAddress()->asString()); + } // ----------------------------------------------------------------------------- diff --git a/linphone-app/ui/modules/Linphone/History/Event.qml b/linphone-app/ui/modules/Linphone/History/Event.qml index ff61042fb..1f3d1734d 100644 --- a/linphone-app/ui/modules/Linphone/History/Event.qml +++ b/linphone-app/ui/modules/Linphone/History/Event.qml @@ -13,7 +13,7 @@ Row { id: mainItem signal entryClicked(var entry) - property var _sipAddressObserver: SipAddressesModel.getSipAddressObserver($historyEntry.sipAddress, '') + property var _sipAddressObserver: $historyEntry.sipAddress ? SipAddressesModel.getSipAddressObserver($historyEntry.sipAddress, '') : $historyEntry.title property QtObject iconData property string translation Component.onDestruction: _sipAddressObserver=null// Need to set it to null because of not calling destructor if not. @@ -135,7 +135,7 @@ Row { pointSize: HistoryStyle.entry.event.text.pointSize } height: parent.height - text: _sipAddressObserver ? UtilsCpp.getDisplayName(_sipAddressObserver.peerAddress) : '' + text: _sipAddressObserver ? ( $historyEntry.sipAddress ? UtilsCpp.getDisplayName(_sipAddressObserver.peerAddress) : _sipAddressObserver) : '' verticalAlignment: Text.AlignVCenter MouseArea{ anchors.fill:parent diff --git a/linphone-app/ui/modules/Linphone/Notifications/NotificationReceivedMessage.qml b/linphone-app/ui/modules/Linphone/Notifications/NotificationReceivedMessage.qml index 2f14f40cf..5dfd1ba63 100644 --- a/linphone-app/ui/modules/Linphone/Notifications/NotificationReceivedMessage.qml +++ b/linphone-app/ui/modules/Linphone/Notifications/NotificationReceivedMessage.qml @@ -41,14 +41,14 @@ Notification { //entry: notification.fullPeerAddress? SipAddressesModel.getSipAddressObserver(notification.fullPeerAddress, notification.fullLocalAddress): notification.timelineModel.getChatRoomModel() property var sipObserver: SipAddressesModel.getSipAddressObserver(notification.fullPeerAddress, notification.fullLocalAddress) showAuxData: !chatRoomModel.isOneToOne - entry: ({ - sipAddress: sipObserver ? sipObserver.peerAddress : '', + entry: sipObserver ? ({ + sipAddress: sipObserver.peerAddress, contactModel: sipObserver.contact, isOneToOne: chatRoomModel.isOneToOne, haveEncryption: chatRoomModel.haveEncryption, securityLevel: chatRoomModel.securityLevel, auxDataToShow: '- ' + chatRoomModel.subject+' -' - }) + }): undefined Component.onDestruction: sipObserver=null// Need to set it to null because of not calling destructor if not. } diff --git a/linphone-app/ui/modules/Linphone/Timeline/Timeline.qml b/linphone-app/ui/modules/Linphone/Timeline/Timeline.qml index 541a1c56f..fc3b76659 100644 --- a/linphone-app/ui/modules/Linphone/Timeline/Timeline.qml +++ b/linphone-app/ui/modules/Linphone/Timeline/Timeline.qml @@ -410,11 +410,9 @@ Rectangle { onClicked: { if(mouse.button == Qt.LeftButton){ timeline.entryClicked($modelData) - if(view){ - if(view.updateSelectionModels) - $modelData.selected = true - view.currentIndex = index; - } + if(view.updateSelectionModels) + $modelData.selected = true + view.currentIndex = index; }else{ contactTooltip.show() } diff --git a/linphone-app/ui/views/App/Calls/CallsWindow.js b/linphone-app/ui/views/App/Calls/CallsWindow.js index 969b4576d..ab9572662 100644 --- a/linphone-app/ui/views/App/Calls/CallsWindow.js +++ b/linphone-app/ui/views/App/Calls/CallsWindow.js @@ -61,7 +61,6 @@ function openWaitingRoom(model){ if(window.conferenceInfoModel) window.conferenceInfoModel = null; window.conferenceInfoModel = model - console.log('set : '+window.conferenceInfoModel) } // ----------------------------------------------------------------------------- @@ -78,18 +77,13 @@ function getContent (call, conferenceInfoModel) { if (status == null) { return calls.conferenceModel.count > 0 ? conference : null } - var CallModel = Linphone.CallModel if (status === CallModel.CallStatusIncoming) { return incomingCall } - - if (status === CallModel.CallStatusOutgoing) { - return outgoingCall - } - - if (status === CallModel.CallStatusEnded) { - return endedCall + window.conferenceInfoModel = call.conferenceInfoModel; + if (status === CallModel.CallStatusOutgoing || status === CallModel.CallStatusEnded) { + return waitingRoom } if(call.isConference) diff --git a/linphone-app/ui/views/App/Calls/CallsWindow.qml b/linphone-app/ui/views/App/Calls/CallsWindow.qml index 20b3ff05f..71226b985 100644 --- a/linphone-app/ui/views/App/Calls/CallsWindow.qml +++ b/linphone-app/ui/views/App/Calls/CallsWindow.qml @@ -191,14 +191,6 @@ Window { } } - Component { - id: outgoingCall - - OutgoingCall { - call: window.call - } - } - Component { id: incall @@ -207,14 +199,6 @@ Window { } } - Component { - id: endedCall - - EndedCall { - call: window.call - } - } - Component { id: chat @@ -256,6 +240,7 @@ Window { conferenceInfoModel: window.conferenceInfoModel onCancel: endOfProcess(0) enabled: window.visible + callModel: window.call } } Component { diff --git a/linphone-app/ui/views/App/Calls/EndedCall.qml b/linphone-app/ui/views/App/Calls/EndedCall.qml deleted file mode 100644 index 7a557ae04..000000000 --- a/linphone-app/ui/views/App/Calls/EndedCall.qml +++ /dev/null @@ -1,95 +0,0 @@ -import QtQuick 2.7 -import QtQuick.Layouts 1.3 - -import Linphone 1.0 -import Utils 1.0 -import UtilsCpp 1.0 - -import App.Styles 1.0 - -import 'Incall.js' as Logic -import 'qrc:/ui/scripts/Utils/utils.js' as Utils - -// ============================================================================= - -Rectangle { - id: endedCall - - property var call - - property var _sipAddressObserver: SipAddressesModel.getSipAddressObserver(call ? call.fullPeerAddress : '', call ? call.fullLocalAddress : '') - - - Component.onDestruction: _sipAddressObserver=null// Need to set it to null because of not calling destructor if not. - // --------------------------------------------------------------------------- - - color: CallStyle.backgroundColor - - ColumnLayout { - anchors { - fill: parent - topMargin: CallStyle.header.topMargin - } - - spacing: 0 - - ContactDescription { - id: contactDescription - - Layout.fillWidth: true - Layout.preferredHeight: CallStyle.header.contactDescription.height - - horizontalTextAlignment: Text.AlignHCenter - sipAddress: _sipAddressObserver && _sipAddressObserver.peerAddress - username: _sipAddressObserver ? UtilsCpp.getDisplayName(_sipAddressObserver.peerAddress) : '' - } - - Text { - Layout.fillWidth: true - - color: CallStyle.header.elapsedTime.color - font.pointSize: CallStyle.header.elapsedTime.pointSize - horizontalAlignment: Text.AlignHCenter - - text: { - var call = endedCall.call - return call ? Utils.formatElapsedTime(call.duration) : 0 - } - } - - Item { - id: container - - Layout.fillWidth: true - Layout.fillHeight: true - Layout.margins: CallStyle.container.margins - - Avatar { - anchors.centerIn: parent - backgroundColor: CallStyle.container.avatar.backgroundColor - image: _sipAddressObserver && _sipAddressObserver.contact && _sipAddressObserver.contact.vcard.avatar - username: contactDescription.username - - height: Utils.computeAvatarSize(container, CallStyle.container.avatar.maxSize) - width: height - } - } - - Item { - Layout.fillWidth: true - Layout.preferredHeight: CallStyle.actionArea.height - - Text { - color: CallStyle.actionArea.callError.color - font.pointSize: CallStyle.actionArea.callError.pointSize - horizontalAlignment: Text.AlignHCenter - width: parent.width - - text: { - var call = endedCall.call - return call ? call.callError : '' - } - } - } - } -} diff --git a/linphone-app/ui/views/App/Calls/OutgoingCall.qml b/linphone-app/ui/views/App/Calls/OutgoingCall.qml deleted file mode 100644 index d250efb9a..000000000 --- a/linphone-app/ui/views/App/Calls/OutgoingCall.qml +++ /dev/null @@ -1,57 +0,0 @@ -import QtQuick 2.7 -import QtQuick.Layouts 1.3 - -import Common 1.0 -import Common.Styles 1.0 - -import App.Styles 1.0 - -// ============================================================================= - -AbstractStartingCall { - showKeypad:true - GridLayout { - columns: parent.width < CallStyle.actionArea.lowWidth && call.videoEnabled ? 1 : 2 - rowSpacing: ActionBarStyle.spacing - - anchors { - left: parent.left - leftMargin: CallStyle.actionArea.leftButtonsGroupMargin - verticalCenter: parent.verticalCenter - } - - ActionSwitch { - isCustom: true - backgroundRadius: 90 - colorSet: enabled ? CallStyle.buttons.microOn : CallStyle.buttons.microOff - enabled: !call.microMuted - - onClicked: call.microMuted = enabled - } - } - - Item { - anchors.centerIn: parent - height: CallStyle.actionArea.userVideo.height - width: CallStyle.actionArea.userVideo.width - - visible: call.videoEnabled - } - - ActionBar { - anchors { - right: parent.right - rightMargin: CallStyle.actionArea.rightButtonsGroupMargin - verticalCenter: parent.verticalCenter - } - iconSize: CallStyle.actionArea.iconSize - - ActionButton { - isCustom: true - backgroundRadius: 90 - colorSet: CallStyle.buttons.hangup - - onClicked: call.terminate() - } - } -} diff --git a/linphone-app/ui/views/App/Calls/WaitingRoom.qml b/linphone-app/ui/views/App/Calls/WaitingRoom.qml index a84311344..2c8b83036 100644 --- a/linphone-app/ui/views/App/Calls/WaitingRoom.qml +++ b/linphone-app/ui/views/App/Calls/WaitingRoom.qml @@ -5,35 +5,73 @@ import QtGraphicalEffects 1.12 import Common 1.0 import Linphone 1.0 import LinphoneEnums 1.0 +import UtilsCpp 1.0 import Common.Styles 1.0 import App.Styles 1.0 + + + // ============================================================================= Rectangle { id: mainItem color: WaitingRoomStyle.backgroundColor property ConferenceInfoModel conferenceInfoModel - + property CallModel callModel // Store the call for processing calling. + property bool previewLoaderEnabled: true + property var _sipAddressObserver: callModel ? SipAddressesModel.getSipAddressObserver(callModel.fullPeerAddress, callModel.fullLocalAddress) : undefined + signal cancel() function close(){ - previewLoader.enabled = false + mainItem.previewLoaderEnabled = false// Need it to close camera. } function open(){ + mainItem.previewLoaderEnabled = true } + //onCallModelChanged: callModel ? contentsStack.replace(callingComponent) : contentsStack.replace(cameraComponent) + onCallModelChanged: contentsStack.flipped = !!callModel + + Component.onDestruction: {mainItem.previewLoaderEnabled = false;_sipAddressObserver=null}// Need to set it to null because of not calling destructor if not. + ColumnLayout { anchors.fill: parent - Text{ - Layout.alignment: Qt.AlignCenter + RowLayout{ Layout.preferredHeight: 60 + Layout.alignment: Qt.AlignCenter Layout.topMargin: 15 - text: conferenceInfoModel.subject - color: WaitingRoomStyle.title.color - font.pointSize: WaitingRoomStyle.title.pointSize - horizontalAlignment: Qt.AlignCenter + spacing: 20 + Text{ + Layout.preferredHeight: 60 + Layout.alignment: Qt.AlignCenter + text: mainItem.conferenceInfoModel ? mainItem.conferenceInfoModel.subject + : (mainItem._sipAddressObserver ? UtilsCpp.getDisplayName(mainItem._sipAddressObserver.peerAddress) : '') + color: WaitingRoomStyle.title.color + font.pointSize: WaitingRoomStyle.title.pointSize + horizontalAlignment: Qt.AlignHCenter + verticalAlignment: Qt.AlignVCenter + } + BusyIndicator { + Layout.alignment: Qt.AlignCenter + Layout.preferredHeight: WaitingRoomStyle.header.busyIndicator.height + Layout.preferredWidth: WaitingRoomStyle.header.busyIndicator.width + color: WaitingRoomStyle.header.busyIndicator.color + visible: mainItem.callModel && mainItem.callModel.isOutgoing + } + } + Text { + Layout.fillWidth: true + horizontalAlignment: Qt.AlignHCenter + verticalAlignment: Qt.AlignVCenter + + color: WaitingRoomStyle.callError.color + font.pointSize: WaitingRoomStyle.callError.pointSize + width: parent.width + visible: mainItem.callModel && mainItem.callModel.callError + text: mainItem.callModel && mainItem.callModel.callError ? mainItem.callModel.callError : '' } RowLayout{ id: loader @@ -42,22 +80,58 @@ Rectangle { Item{ Layout.fillHeight: true Layout.fillWidth: true - CameraView{ - id: previewLoader - showCloseButton: false + + Flipable{ + id: contentsStack anchors.centerIn: parent - height: Math.min( parent.height, parent.width) + height: Math.min( loader.height, loader.width) width : height - ActionButton{ - anchors.top: parent.top - anchors.right: parent.right - anchors.topMargin: 10 - anchors.rightMargin: 10 - isCustom: true - backgroundRadius: width/2 - colorSet: WaitingRoomStyle.buttons.options - toggled: mediaMenu.visible - onClicked: mediaMenu.visible = !mediaMenu.visible + property bool flipped: false + + transform: Rotation { + id: rotation + origin.x: contentsStack.width/2 + origin.y: contentsStack.height/2 + axis.x: 0; axis.y: 1; axis.z: 0 // set axis.y to 1 to rotate around y-axis + angle: 0 // the default angle + } + + states: State { + name: "back" + PropertyChanges { target: rotation; angle: 180 } + when: contentsStack.flipped + } + + transitions: Transition { + NumberAnimation { target: rotation; property: "angle"; duration: 500 } + } + + front: CameraView{ + id: previewLoader + showCloseButton: false + enabled: mainItem.previewLoaderEnabled + height: Math.min( loader.height, loader.width) + width : height + ActionButton{ + anchors.top: parent.top + anchors.right: parent.right + anchors.topMargin: 10 + anchors.rightMargin: 10 + isCustom: true + backgroundRadius: width/2 + colorSet: WaitingRoomStyle.buttons.options + toggled: mediaMenu.visible + onClicked: mediaMenu.visible = !mediaMenu.visible + } + } + back: Avatar { + id: avatar + height: Math.min( loader.height, loader.width) + width : height + backgroundColor: WaitingRoomStyle.avatar.backgroundColor + image: mainItem._sipAddressObserver && _sipAddressObserver.contact && mainItem._sipAddressObserver.contact.vcard.avatar + username: mainItem.conferenceInfoModel ? mainItem.conferenceInfoModel.subject + : (mainItem._sipAddressObserver ? UtilsCpp.getDisplayName(mainItem._sipAddressObserver.peerAddress) : '') } } } @@ -85,6 +159,7 @@ Rectangle { Layout.bottomMargin: 25 Layout.leftMargin: 25 Layout.rightMargin: 25 + enabled: !mainItem.callModel Item{ Layout.fillWidth: true } @@ -128,7 +203,7 @@ Rectangle { isCustom: true backgroundRadius: width/2 colorSet: selectedMode == 0 ? WaitingRoomStyle.buttons.gridLayout : - selectedMode == 1 ? WaitingRoomStyle.buttons.activeSpeakerLayout : WaitingRoomStyle.buttons.audioOnly + selectedMode == 1 ? WaitingRoomStyle.buttons.activeSpeakerLayout : WaitingRoomStyle.buttons.audioOnly onClicked: selectedMode = (selectedMode + 1) % 3 } } @@ -146,21 +221,24 @@ Rectangle { capitalization: Font.AllUppercase onClicked: { - mainItem.close() - mainItem.cancel() - } + mainItem.close() + if(mainItem.callModel) + callModel.terminate() + mainItem.cancel() + } } TextButtonB { //: 'Start' : Button label for starting the conference. text: qsTr('startButton') capitalization: Font.AllUppercase - - onClicked: {mainItem.close(); CallsListModel.launchVideoCall(conferenceInfoModel.uri, '', 0, - { video: modeChoice.selectedMode != 2 - , camera: camera.cameraEnabled - , micro: !micro.microMuted - , audio: !speaker.speakerMuted - , layout: (modeChoice.selectedMode % 2)}) } + enabled: !mainItem.callModel + + onClicked: {CallsListModel.launchVideoCall(conferenceInfoModel.uri, '', 0, + { video: modeChoice.selectedMode != 2 + , camera: camera.cameraEnabled + , micro: !micro.microMuted + , audio: !speaker.speakerMuted + , layout: (modeChoice.selectedMode % 2)}) } } } diff --git a/linphone-app/ui/views/App/Main/Conferences.qml b/linphone-app/ui/views/App/Main/Conferences.qml index e2149fe04..5112cb2f5 100644 --- a/linphone-app/ui/views/App/Main/Conferences.qml +++ b/linphone-app/ui/views/App/Main/Conferences.qml @@ -65,7 +65,7 @@ Item{ qsTr('conferencesScheduledFilter'), //: 'Invitations' : Filter conferences on invited conferences (where we are not the organizer). - qsTr('conferencesEndedFilter'), + qsTr('conferencesInvitedFilter'), ] capitalization: Font.AllUppercase selectedButton: mainItem.filterType diff --git a/linphone-app/ui/views/App/Styles/Calls/WaitingRoomStyle.qml b/linphone-app/ui/views/App/Styles/Calls/WaitingRoomStyle.qml index e1b88ca9a..e9a2efdea 100644 --- a/linphone-app/ui/views/App/Styles/Calls/WaitingRoomStyle.qml +++ b/linphone-app/ui/views/App/Styles/Calls/WaitingRoomStyle.qml @@ -125,6 +125,21 @@ QtObject { } } */ + property QtObject callError: QtObject { + property color color: ColorsList.add(sectionName+'_action_error', 'i').color + property int pointSize: Units.dp * 12 + } + property QtObject header: QtObject { + property QtObject busyIndicator: QtObject { + property color color: ColorsList.add(sectionName+'_header_busy', 'i').color + property int height: 30 + property int width: 30 + } + } + property QtObject avatar: QtObject { + property color backgroundColor: ColorsList.add(sectionName+'_container_avatar_bg', 'n').color + property int maxSize: 300 + } // Button colors property QtObject buttons: QtObject { property QtObject microOn: QtObject { diff --git a/linphone-sdk b/linphone-sdk index be381f199..9542d335e 160000 --- a/linphone-sdk +++ b/linphone-sdk @@ -1 +1 @@ -Subproject commit be381f199d2c55dcfca959f65cbe589329b4bee7 +Subproject commit 9542d335ea525de66d7b5519bac4e1ba808caa3a