From 82679ab9971f62469565fa600fe30490c7605a3b Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Thu, 9 Oct 2025 15:03:40 +0200 Subject: [PATCH] use display name instead of address for security example so the magic search does not search this fake address outboundproxy configuration #LINQT-2012 fix chat events order fix image picto only when file does not exist #LINQT-2049/2059 --- Linphone/core/account/AccountCore.cpp | 105 ++++---- Linphone/core/account/AccountCore.hpp | 26 +- Linphone/core/account/AccountDeviceList.hpp | 2 +- Linphone/core/chat/message/EventLogList.cpp | 6 +- Linphone/core/login/LoginPage.cpp | 5 +- Linphone/core/login/LoginPage.hpp | 3 +- Linphone/data/image/reunion.svg | 4 - Linphone/data/image/users-three-filled.svg | 10 + Linphone/data/languages/de.ts | 236 ++++++++++------- Linphone/data/languages/en.ts | 240 +++++++++++------- Linphone/data/languages/fr_FR.ts | 236 ++++++++++------- Linphone/model/account/AccountManager.cpp | 13 +- Linphone/model/account/AccountManager.hpp | 3 +- Linphone/model/account/AccountModel.cpp | 32 ++- Linphone/model/account/AccountModel.hpp | 9 +- Linphone/tool/Constants.hpp | 6 + Linphone/tool/Utils.cpp | 10 + Linphone/tool/Utils.hpp | 3 + Linphone/view/Control/Button/PopupButton.qml | 4 +- .../Control/Container/CreationFormLayout.qml | 18 +- .../view/Control/Container/FormItemLayout.qml | 45 ++-- .../view/Control/Display/Chat/FileView.qml | 21 +- .../view/Control/Input/DecoratedTextField.qml | 2 + .../view/Page/Form/Login/SIPLoginPage.qml | 26 +- .../AccountSettingsParametersLayout.qml | 44 +++- .../view/Page/Main/Contact/ContactPage.qml | 4 +- Linphone/view/Style/AppIcons.qml | 1 + 27 files changed, 680 insertions(+), 434 deletions(-) delete mode 100644 Linphone/data/image/reunion.svg create mode 100644 Linphone/data/image/users-three-filled.svg diff --git a/Linphone/core/account/AccountCore.cpp b/Linphone/core/account/AccountCore.cpp index 042cec3d2..efe6f74be 100644 --- a/Linphone/core/account/AccountCore.cpp +++ b/Linphone/core/account/AccountCore.cpp @@ -65,9 +65,11 @@ AccountCore::AccountCore(const std::shared_ptr &account) : QO << "TLS" << "DTLS"; mTransport = LinphoneEnums::toString(LinphoneEnums::fromLinphone(params->getTransport())); - mServerAddress = + mRegistrarUri = params->getServerAddress() ? Utils::coreStringToAppString(params->getServerAddress()->asString()) : ""; - mOutboundProxyEnabled = params->outboundProxyEnabled(); + auto routesAddresses = params->getRoutesAddresses(); + mOutboundProxyUri = + routesAddresses.empty() ? "" : Utils::coreStringToAppString(routesAddresses.front()->asString()); auto policy = params->getNatPolicy() ? params->getNatPolicy() : account->getCore()->createNatPolicy(); mStunServer = Utils::coreStringToAppString(policy->getStunServer()); mIceEnabled = policy->iceEnabled(); @@ -136,8 +138,8 @@ AccountCore::AccountCore(const AccountCore &accountCore) { mVoicemailAddress = accountCore.mVoicemailAddress; mTransport = accountCore.mTransport; mTransports = accountCore.mTransports; - mServerAddress = accountCore.mServerAddress; - mOutboundProxyEnabled = accountCore.mOutboundProxyEnabled; + mRegistrarUri = accountCore.mRegistrarUri; + mOutboundProxyUri = accountCore.mOutboundProxyUri; mStunServer = accountCore.mStunServer; mIceEnabled = accountCore.mIceEnabled; mAvpfEnabled = accountCore.mAvpfEnabled; @@ -201,11 +203,11 @@ void AccountCore::setSelf(QSharedPointer me) { mAccountModelConnection->invokeToCore( [this, value]() { onTransportChanged(LinphoneEnums::toString(LinphoneEnums::fromLinphone(value))); }); }); - mAccountModelConnection->makeConnectToModel(&AccountModel::serverAddressChanged, [this](QString value) { - mAccountModelConnection->invokeToCore([this, value]() { onServerAddressChanged(value); }); + mAccountModelConnection->makeConnectToModel(&AccountModel::registrarUriChanged, [this](QString value) { + mAccountModelConnection->invokeToCore([this, value]() { onRegistrarUriChanged(value); }); }); - mAccountModelConnection->makeConnectToModel(&AccountModel::outboundProxyEnabledChanged, [this](bool value) { - mAccountModelConnection->invokeToCore([this, value]() { onOutboundProxyEnabledChanged(value); }); + mAccountModelConnection->makeConnectToModel(&AccountModel::outboundProxyUriChanged, [this](QString value) { + mAccountModelConnection->invokeToCore([this, value]() { onOutboundProxyUriChanged(value); }); }); mAccountModelConnection->makeConnectToModel(&AccountModel::stunServerChanged, [this](QString value) { mAccountModelConnection->invokeToCore([this, value]() { onStunServerChanged(value); }); @@ -307,8 +309,8 @@ void AccountCore::reset(const AccountCore &accountCore) { setMwiServerAddress(accountCore.mMwiServerAddress); setVoicemailAddress(accountCore.mVoicemailAddress); setTransport(accountCore.mTransport); - setServerAddress(accountCore.mServerAddress); - setOutboundProxyEnabled(accountCore.mOutboundProxyEnabled); + setRegistrarUri(accountCore.mRegistrarUri); + setOutboundProxyUri(accountCore.mOutboundProxyUri); setStunServer(accountCore.mStunServer); setIceEnabled(accountCore.mIceEnabled); setAvpfEnabled(accountCore.mAvpfEnabled); @@ -524,12 +526,12 @@ QString AccountCore::getTransport() { return mTransport; } -QString AccountCore::getServerAddress() { - return mServerAddress; +QString AccountCore::getRegistrarUri() { + return mRegistrarUri; } -bool AccountCore::getOutboundProxyEnabled() { - return mOutboundProxyEnabled; +QString AccountCore::getOutboundProxyUri() { + return mOutboundProxyUri; } QString AccountCore::getStunServer() { @@ -582,32 +584,24 @@ void AccountCore::setVoicemailAddress(QString value) { void AccountCore::setTransport(QString value) { if (mTransport != value) { - mAccountModelConnection->invokeToModel([this, value] { - mustBeInLinphoneThread(getClassName() + Q_FUNC_INFO); - LinphoneEnums::TransportType transport; - LinphoneEnums::fromString(value, &transport); - mAccountModel->setTransport(LinphoneEnums::toLinphone(transport), false); - }); + mTransport = value; + emit transportChanged(); setIsSaved(false); } } -void AccountCore::setServerAddress(QString value) { - if (mServerAddress != value) { - mAccountModelConnection->invokeToModel([this, value, transportString = mTransport] { - LinphoneEnums::TransportType transport; - LinphoneEnums::fromString(transportString, &transport); - mustBeInLinphoneThread(getClassName() + Q_FUNC_INFO); - mAccountModel->setServerAddress(value, LinphoneEnums::toLinphone(transport), false); - }); +void AccountCore::setRegistrarUri(QString value) { + if (mRegistrarUri != value) { + mRegistrarUri = value; + emit registrarUriChanged(); setIsSaved(false); } } -void AccountCore::setOutboundProxyEnabled(bool value) { - if (mOutboundProxyEnabled != value) { - mOutboundProxyEnabled = value; - emit outboundProxyEnabledChanged(); +void AccountCore::setOutboundProxyUri(QString value) { + if (mOutboundProxyUri != value) { + mOutboundProxyUri = value; + emit outboundProxyUriChanged(); setIsSaved(false); } } @@ -715,19 +709,20 @@ void AccountCore::onTransportChanged(QString value) { } } -void AccountCore::onServerAddressChanged(QString value) { - if (value != mServerAddress) { - mServerAddress = value; - emit serverAddressChanged(); +void AccountCore::onRegistrarUriChanged(QString value) { + if (value != mRegistrarUri) { + mRegistrarUri = value; + emit registrarUriChanged(); } } -void AccountCore::onOutboundProxyEnabledChanged(bool value) { - if (value != mOutboundProxyEnabled) { - mOutboundProxyEnabled = value; - emit outboundProxyEnabledChanged(); +void AccountCore::onOutboundProxyUriChanged(QString value) { + if (value != mOutboundProxyUri) { + mOutboundProxyUri = value; + emit outboundProxyUriChanged(); } } + void AccountCore::onStunServerChanged(QString value) { if (value != mStunServer) { mStunServer = value; @@ -793,8 +788,8 @@ void AccountCore::writeIntoModel(std::shared_ptr model) const { LinphoneEnums::TransportType transport; LinphoneEnums::fromString(mTransport, &transport); model->setTransport(LinphoneEnums::toLinphone(transport), true); - model->setServerAddress(mServerAddress, LinphoneEnums::toLinphone(transport), true); - model->setOutboundProxyEnabled(mOutboundProxyEnabled); + model->setRegistrarUri(mRegistrarUri); + model->setOutboundProxyUri(mOutboundProxyUri); model->setStunServer(mStunServer); model->setIceEnabled(mIceEnabled); model->setAvpfEnabled(mAvpfEnabled); @@ -810,19 +805,19 @@ void AccountCore::writeFromModel(const std::shared_ptr &model) { mustBeInLinphoneThread(getClassName() + Q_FUNC_INFO); setUnreadCallNotifications(model->getMissedCallsCount()); setUnreadMessageNotifications(model->getUnreadMessagesCount()); - setMwiServerAddress(model->getMwiServerAddress()); - setTransport(LinphoneEnums::toString(LinphoneEnums::fromLinphone(model->getTransport()))); - setServerAddress(model->getServerAddress()); - setOutboundProxyEnabled(model->getOutboundProxyEnabled()); - setStunServer(model->getStunServer()); - setIceEnabled(model->getIceEnabled()); - setAvpfEnabled(model->getAvpfEnabled()); - setBundleModeEnabled(model->getBundleModeEnabled()); - setExpire(model->getExpire()); - setConferenceFactoryAddress(model->getConferenceFactoryAddress()); - setAudioVideoConferenceFactoryAddress(model->getAudioVideoConferenceFactoryAddress()); - setLimeServerUrl(model->getLimeServerUrl()); - setVoicemailAddress(model->getVoicemailAddress()); + onMwiServerAddressChanged(model->getMwiServerAddress()); + onTransportChanged(LinphoneEnums::toString(LinphoneEnums::fromLinphone(model->getTransport()))); + onRegistrarUriChanged(model->getRegistrarUri()); + onOutboundProxyUriChanged(model->getOutboundProxyUri()); + onStunServerChanged(model->getStunServer()); + onIceEnabledChanged(model->getIceEnabled()); + onAvpfEnabledChanged(model->getAvpfEnabled()); + onBundleModeEnabledChanged(model->getBundleModeEnabled()); + onExpireChanged(model->getExpire()); + onConferenceFactoryAddressChanged(model->getConferenceFactoryAddress()); + onAudioVideoConferenceFactoryAddressChanged(model->getAudioVideoConferenceFactoryAddress()); + onLimeServerUrlChanged(model->getLimeServerUrl()); + onVoicemailAddressChanged(model->getVoicemailAddress()); } void AccountCore::save() { diff --git a/Linphone/core/account/AccountCore.hpp b/Linphone/core/account/AccountCore.hpp index 6822aa450..fbfd62f2b 100644 --- a/Linphone/core/account/AccountCore.hpp +++ b/Linphone/core/account/AccountCore.hpp @@ -58,9 +58,9 @@ public: QString mwiServerAddress READ getMwiServerAddress WRITE setMwiServerAddress NOTIFY mwiServerAddressChanged) Q_PROPERTY(QStringList transports READ getTransports CONSTANT) Q_PROPERTY(QString transport READ getTransport WRITE setTransport NOTIFY transportChanged) - Q_PROPERTY(QString serverAddress READ getServerAddress WRITE setServerAddress NOTIFY serverAddressChanged) - Q_PROPERTY(bool outboundProxyEnabled READ getOutboundProxyEnabled WRITE setOutboundProxyEnabled NOTIFY - outboundProxyEnabledChanged) + Q_PROPERTY(QString registrarUri READ getRegistrarUri WRITE setRegistrarUri NOTIFY registrarUriChanged) + Q_PROPERTY( + QString outboundProxyUri READ getOutboundProxyUri WRITE setOutboundProxyUri NOTIFY outboundProxyUriChanged) Q_PROPERTY(QString stunServer READ getStunServer WRITE setStunServer NOTIFY stunServerChanged) Q_PROPERTY(bool iceEnabled READ getIceEnabled WRITE setIceEnabled NOTIFY iceEnabledChanged) Q_PROPERTY(bool avpfEnabled READ getAvpfEnabled WRITE setAvpfEnabled NOTIFY avpfEnabledChanged) @@ -132,8 +132,8 @@ public: QString getMwiServerAddress(); QString getTransport(); QStringList getTransports(); - QString getServerAddress(); - bool getOutboundProxyEnabled(); + QString getRegistrarUri(); + QString getOutboundProxyUri(); QString getStunServer(); bool getIceEnabled(); bool getAvpfEnabled(); @@ -146,8 +146,8 @@ public: void setMwiServerAddress(QString value); void setTransport(QString value); - void setServerAddress(QString value); - void setOutboundProxyEnabled(bool value); + void setRegistrarUri(QString value); + void setOutboundProxyUri(QString value); void setStunServer(QString value); void setIceEnabled(bool value); void setAvpfEnabled(bool value); @@ -165,8 +165,8 @@ public: void onMwiServerAddressChanged(QString value); void onVoicemailAddressChanged(QString value); void onTransportChanged(QString value); - void onServerAddressChanged(QString value); - void onOutboundProxyEnabledChanged(bool value); + void onRegistrarUriChanged(QString value); + void onOutboundProxyUriChanged(QString value); void onStunServerChanged(QString value); void onIceEnabledChanged(bool value); void onAvpfEnabledChanged(bool value); @@ -206,8 +206,8 @@ signals: void notificationsAllowedChanged(); void mwiServerAddressChanged(); void transportChanged(); - void serverAddressChanged(); - void outboundProxyEnabledChanged(); + void registrarUriChanged(); + void outboundProxyUriChanged(); void stunServerChanged(); void iceEnabledChanged(); void avpfEnabledChanged(); @@ -257,8 +257,8 @@ private: QString mMwiServerAddress; QString mTransport; QStringList mTransports; - QString mServerAddress; - bool mOutboundProxyEnabled; + QString mRegistrarUri; + QString mOutboundProxyUri; QString mStunServer; bool mIceEnabled; bool mAvpfEnabled; diff --git a/Linphone/core/account/AccountDeviceList.hpp b/Linphone/core/account/AccountDeviceList.hpp index 1f5fdf450..fc5ab3ae6 100644 --- a/Linphone/core/account/AccountDeviceList.hpp +++ b/Linphone/core/account/AccountDeviceList.hpp @@ -21,9 +21,9 @@ #ifndef ACCOUNT_DEVICE_LIST_H_ #define ACCOUNT_DEVICE_LIST_H_ -#include "../proxy/ListProxy.hpp" #include "AccountDeviceCore.hpp" #include "core/account/AccountGui.hpp" +#include "core/proxy/ListProxy.hpp" #include "model/account/AccountManagerServicesModel.hpp" #include "tool/AbstractObject.hpp" #include "tool/thread/SafeConnection.hpp" diff --git a/Linphone/core/chat/message/EventLogList.cpp b/Linphone/core/chat/message/EventLogList.cpp index efddab6ae..835505e41 100644 --- a/Linphone/core/chat/message/EventLogList.cpp +++ b/Linphone/core/chat/message/EventLogList.cpp @@ -163,9 +163,9 @@ void EventLogList::displayMore() { } mCoreModelConnection->invokeToCore([this, events, newCount] { int currentCount = mList.count(); - for (auto &event : *events) { - connectItem(event); - add(event); + for (auto it = events->end() - 1; it >= events->begin(); --it) { + connectItem(*it); + prepend(*it); } }); }); diff --git a/Linphone/core/login/LoginPage.cpp b/Linphone/core/login/LoginPage.cpp index 3c3860414..f0c4c349f 100644 --- a/Linphone/core/login/LoginPage.cpp +++ b/Linphone/core/login/LoginPage.cpp @@ -65,7 +65,8 @@ void LoginPage::login(const QString &username, QString displayName, QString domain, LinphoneEnums::TransportType transportType, - QString serverAddress, + QString registrarUri, + QString outboundProxyAddress, QString connectionId) { setErrorMessage(""); App::postModelAsync([=]() { @@ -114,7 +115,7 @@ void LoginPage::login(const QString &username, QString error; if (!accountManager->login(username, password, displayName, domain, LinphoneEnums::toLinphone(transportType), - &error, serverAddress, connectionId)) { + &error, registrarUri, outboundProxyAddress, connectionId)) { setErrorMessage(error); emit accountManager->registrationStateChanged(linphone::RegistrationState::None, linphone::Reason::None); } diff --git a/Linphone/core/login/LoginPage.hpp b/Linphone/core/login/LoginPage.hpp index 4dc9f9468..89441a544 100644 --- a/Linphone/core/login/LoginPage.hpp +++ b/Linphone/core/login/LoginPage.hpp @@ -42,7 +42,8 @@ public: QString displayName = QString(), QString domain = QString(), LinphoneEnums::TransportType transportType = LinphoneEnums::TransportType::Tls, - QString serverAddress = QString(), + QString registrarUri = QString(), + QString outboundProxyAddress = QString(), QString connectionId = QString()); linphone::RegistrationState getRegistrationState() const; diff --git a/Linphone/data/image/reunion.svg b/Linphone/data/image/reunion.svg deleted file mode 100644 index a6a2ce698..000000000 --- a/Linphone/data/image/reunion.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/Linphone/data/image/users-three-filled.svg b/Linphone/data/image/users-three-filled.svg new file mode 100644 index 000000000..91d26b6cd --- /dev/null +++ b/Linphone/data/image/users-three-filled.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index b6360c521..8a56a8e15 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -27,45 +27,45 @@ AccountCore - + drawer_menu_account_connection_status_connected "Connecté" Verbunden - + drawer_menu_account_connection_status_refreshing Aktualisiere… - + drawer_menu_account_connection_status_progress Verbinde… - + drawer_menu_account_connection_status_failed Fehler - + drawer_menu_account_connection_status_cleared Deaktiviert - + manage_account_status_connected_summary "Vous êtes en ligne et joignable." Sie sind online und erreichbar. - + manage_account_status_failed_summary "Erreur de connexion, vérifiez vos paramètres." Verbindungsfehler, überprüfen Sie Ihre Einstellungen. - + manage_account_status_cleared_summary "Compte désactivé, vous ne recevrez ni appel ni message." Konto deaktiviert, Sie erhalten keine Anrufe oder Nachrichten. @@ -83,43 +83,43 @@ AccountManager - + assistant_account_login_already_connected_error "The account is already connected" Das Konto ist bereits verbunden - + assistant_account_login_proxy_address_error "Unable to create proxy address. Please check the domain name." Proxy-Adresse konnte nicht erstellt werden. Bitte überprüfen Sie den Domänenname. - + assistant_account_login_address_configuration_error "Unable to configure address: `%1`." Folgende Adresse konnte nicht konfiguriert werden: `%1`. - + assistant_account_login_params_configuration_error "Unable to configure account settings." Kontoeinstellungen konnten nicht konfiguriert werden. - + assistant_account_login_forbidden_error "Username and password do not match" Benutzername und Passwort stimmen nicht überein - + assistant_account_login_error "Error during connection, please verify your parameters" Fehler bei der Verbindung - + assistant_account_add_error "Unable to add account." Konto konnte nicht hinzugefügt werden. @@ -134,25 +134,31 @@ - + set_server_address_failed_error_message "Unable to set server address, failed creating address from %1" - + + set_outbound_proxy_uri_failed_error_message + Unable to set outbound proxy uri, failed creating address from %1 + + + + set_conference_factory_address_failed_error_message "Unable to set the conversation server address, failed creating address from %1" - + set_audio_conference_factory_address_failed_error_message "Unable to set the meeting server address, failed creating address from %1" - + set_voicemail_address_failed_error_message Unable to set voicemail address, failed creating address from %1 @@ -325,104 +331,131 @@ AccountSettingsParametersLayout - + settings_title Einstellungen - + settings_account_title Kontoeinstellungen + + + info_popup_invalid_registrar_uri_message + Registrar uri is invalid. Please make sure it matches the following format : sip:<host>:<port>;transport=<transport> (:<port> is optional) + + + info_popup_invalid_outbound_proxy_message + Outbound proxy uri is invalid. Please make sure it matches the following format : sip:<host>:<port>;transport=<transport> (:<port> is optional) + + + + + info_popup_error_title + + + + information_popup_success_title Erfolg - + contact_editor_saved_changes_toast "Modifications sauvegardés" Änderungen gespeichert - + information_popup_error_title - + account_settings_mwi_uri_title "URI du serveur de messagerie vocale" Voicemail-Server-URI - + account_settings_voicemail_uri_title "URI de messagerie vocale" Voicemail-URI - + account_settings_transport_title "Transport" Transport - + + account_settings_registrar_uri_title + + + + account_settings_sip_proxy_url_title Proxy-Server-URL - - account_settings_outbound_proxy_title - "Serveur mandataire sortant" - Ausgehender Proxy-Server + + login_proxy_server_url_tooltip + "If this field is filled, the outbound proxy will be enabled automatically. Leave it empty to disable it." + - + account_settings_outbound_proxy_title + "Outbound proxy enabled" + Ausgehender Proxy-Server + + + account_settings_stun_server_url_title "Adresse du serveur STUN" STUN-Server-Adresse - + account_settings_enable_ice_title "Activer ICE" ICE aktivieren - + account_settings_avpf_title "AVPF" AVPF - + account_settings_bundle_mode_title "Mode bundle" Bundle-Modus - + account_settings_expire_title "Expiration (en seconde)" Ablaufzeit (in Sekunden) - + account_settings_conference_factory_uri_title "URI du serveur de conversations" Konferenz-Factory-URI - + account_settings_audio_video_conference_factory_uri_title "URI du serveur de réunions" Video-Konferenz-Factory-URI - + account_settings_lime_server_url_title "URL du serveur d’échange de clés de chiffrement" Lime-Server-URL @@ -546,19 +579,19 @@ AllContactListView - + car_favorites_contacts_title "Favoris" Favoriten - + generic_address_picker_contacts_list_title 'Contacts' Kontakte - + generic_address_picker_suggestions_list_title "Suggestions" Vorschläge @@ -900,42 +933,42 @@ CallLayout - + meeting_event_conference_destroyed "Vous avez quitté la conférence" Sie haben die Besprechung verlassen - + call_ended_by_user "Vous avez terminé l'appel" Sie haben den Anruf beendet - + call_ended_by_remote "Votre correspondant a terminé l'appel" Der Anrufer hat das Gespräch beendet - + conference_call_empty "En attente d'autres participants…" Warten auf weitere Teilnehmer… - + conference_share_link_title "Partager le lien" Link teilen - + copied Kopiert - + information_popup_meeting_address_copied_to_clipboard Le lien de la réunion a été copié dans le presse-papier Der Besprechungs-Link wurde in die Zwischenablage kopiert @@ -1937,25 +1970,25 @@ ChatMessage - + chat_message_copy_selection "Copy selection" - + chat_message_copy "Copy" - + chat_message_copied_to_clipboard_title Copied - + chat_message_copied_to_clipboard_toast "to clipboard" @@ -1991,25 +2024,25 @@ - + chat_message_reception_info "Reception info" - + chat_message_reply Reply - + chat_message_forward Forward - + chat_message_delete "Delete" @@ -2171,45 +2204,45 @@ Error ChatMessagesListView - - + + popup_info_find_message_title Find message - + info_popup_no_result_message No result found - + info_popup_first_result_message First result reached - + info_popup_last_result_message Last result reached - + chat_message_list_encrypted_header_title End to end encrypted chat - + chat_message_list_encrypted_header_message Les messages de cette conversation sont chiffrés de bout en bout. Seul votre correspondant peut les déchiffrer. - + chat_message_is_writing_info %1 is writing… @@ -3197,13 +3230,13 @@ Error DecoratedTextField - + textfield_error_message_cannot_be_empty "ne peut être vide" darf nicht leer sein - + textfield_error_message_unknown_format "Format non reconnu" Unbekanntes Format @@ -3490,50 +3523,50 @@ Error HelpPage - + help_title "Aide" Hilfe - - + + help_about_title "À propos de %1" Über %1 - + help_about_privacy_policy_title "Règles de confidentialité" Datenschutzrichtlinie - + help_about_privacy_policy_subtitle Quelles informations %1 collecte et utilise Welche Informationen sammelt und verwendet %1 - + help_about_version_title "Version" Version - + help_about_gpl_licence_title "Licences GPLv3" GPLv3-Lizenzen - + help_about_contribute_translations_title "Contribuer à la traduction de %1" Zur Übersetzung von %1 beitragen - + help_troubleshooting_title "Dépannage" Fehlerbehebung @@ -3819,7 +3852,7 @@ Error Link zur Remote-Konfiguration - + default_account_connection_state_error_toast Fehler bei der Verbindung @@ -3906,31 +3939,31 @@ Error Einstellungen - + recordings_title "Enregistrements" Aufnahmen - + help_title "Aide" Hilfe - + help_quit_title "Quitter l'application" App beenden - + quit_app_question "Quitter %1 ?" %1 beenden? - + drawer_menu_add_account "Ajouter un compte" Konto hinzufügen @@ -4279,13 +4312,13 @@ Error Zeitzone - + meeting_info_organizer_label "Organisateur" Organisator - + meeting_info_join_title "Rejoindre la réunion" Besprechung beitreten @@ -5028,13 +5061,25 @@ Pour les activer dans un projet commercial, merci de nous contacter. login_proxy_server_url - "Proxy server URL" + "Outbound SIP Proxy URI" - + + login_proxy_server_url_tooltip + "If this field is filled, the outbound proxy will be enabled automatically. Leave it empty to disable it." + + + + + login_registrar_uri + "Registrar URI" + + + + login_id - "Connexion ID (if different)" + "Authentication ID (if different)" @@ -5214,15 +5259,14 @@ Pour les activer dans un projet commercial, merci de nous contacter. Besprechungen - settings_security_title "Affichage" "Security" - Sicherheit / Verschlüsselung + Sicherheit / Verschlüsselung settings_network_title - "Réseau" + "Affichage" "Security" "Réseau" Netzwerk @@ -5324,7 +5368,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. Utils - + nMinute @@ -5332,7 +5376,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + nHour @@ -5340,8 +5384,8 @@ Pour les activer dans un projet commercial, merci de nous contacter. - - + + nDay @@ -5349,7 +5393,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + nWeek @@ -5357,7 +5401,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + nSeconds diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index d30572fc6..cb51ba5da 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -27,45 +27,45 @@ AccountCore - + drawer_menu_account_connection_status_connected "Connecté" Connected - + drawer_menu_account_connection_status_refreshing Refreshing… - + drawer_menu_account_connection_status_progress Connecting… - + drawer_menu_account_connection_status_failed Error - + drawer_menu_account_connection_status_cleared Disabled - + manage_account_status_connected_summary "Vous êtes en ligne et joignable." You are online and reachable. - + manage_account_status_failed_summary "Erreur de connexion, vérifiez vos paramètres." Connection error, check your settings. - + manage_account_status_cleared_summary "Compte désactivé, vous ne recevrez ni appel ni message." Account disabled, you will not receive calls or messages. @@ -83,43 +83,43 @@ AccountManager - + assistant_account_login_already_connected_error "The account is already connected" The account is already connected - + assistant_account_login_proxy_address_error "Unable to create proxy address. Please check the domain name." Unable to create proxy address. Please check the domain name. - + assistant_account_login_address_configuration_error "Unable to configure address: `%1`." Unable to configure address: `%1`. - + assistant_account_login_params_configuration_error "Unable to configure account settings." Unable to configure account settings. - + assistant_account_login_forbidden_error "Username and password do not match" Username and password do not match - + assistant_account_login_error "Error during connection, please verify your parameters" Error during connection - + assistant_account_add_error "Unable to add account." Unable to add account. @@ -134,25 +134,31 @@ Unable to set voicemail server address, failed creating address from %1 - + set_server_address_failed_error_message "Unable to set server address, failed creating address from %1" Unable to set server address, failed creating address from %1 - + + set_outbound_proxy_uri_failed_error_message + Unable to set outbound proxy uri, failed creating address from %1 + Unable to set outbound proxy uri, failed creating address from %1 + + + set_conference_factory_address_failed_error_message "Unable to set the conversation server address, failed creating address from %1" Unable to set the conversation server address, failed creating address from %1 - + set_audio_conference_factory_address_failed_error_message "Unable to set the meeting server address, failed creating address from %1" Unable to set the meeting server address, failed creating address from %1 - + set_voicemail_address_failed_error_message Unable to set voicemail address, failed creating address from %1 Unable to set voicemail address, failed creating address from %1 @@ -325,104 +331,131 @@ AccountSettingsParametersLayout - + settings_title Settings - + settings_account_title Account settings + + + info_popup_invalid_registrar_uri_message + Registrar uri is invalid. Please make sure it matches the following format : sip:<host>:<port>;transport=<transport> (:<port> is optional) + Registrar uri is invalid. Please make sure it matches the following format : sip:<host>:<port>;transport=<transport> (:<port> is optional) + + info_popup_invalid_outbound_proxy_message + Outbound proxy uri is invalid. Please make sure it matches the following format : sip:<host>:<port>;transport=<transport> (:<port> is optional) + Outbound proxy uri is invalid. Please make sure it matches the following format : sip:<host>:<port>;transport=<transport> (:<port> is optional) + + + + info_popup_error_title + Error + + + information_popup_success_title Success - + contact_editor_saved_changes_toast "Modifications sauvegardés" Changes saved - + information_popup_error_title Error - + account_settings_mwi_uri_title "URI du serveur de messagerie vocale" Voicemail server URI - + account_settings_voicemail_uri_title "URI de messagerie vocale" Voicemail URI - + account_settings_transport_title "Transport" Transport - + + account_settings_registrar_uri_title + Registrar URI + + + account_settings_sip_proxy_url_title - Proxy server URL + Outbound SIP Proxy URI + + + + login_proxy_server_url_tooltip + "If this field is filled, the outbound proxy will be enabled automatically. Leave it empty to disable it." + If this field is filled, the outbound proxy will be enabled automatically. Leave it empty to disable it. - account_settings_outbound_proxy_title - "Serveur mandataire sortant" - Outgoing proxy server + "Outbound proxy enabled" + Outbound proxy server enabled - + account_settings_stun_server_url_title "Adresse du serveur STUN" STUN server address - + account_settings_enable_ice_title "Activer ICE" Enable ICE - + account_settings_avpf_title "AVPF" AVPF - + account_settings_bundle_mode_title "Mode bundle" Bundle mode - + account_settings_expire_title "Expiration (en seconde)" Expiration (in seconds) - + account_settings_conference_factory_uri_title "URI du serveur de conversations" Conference factory URI - + account_settings_audio_video_conference_factory_uri_title "URI du serveur de réunions" Video conference factory uri - + account_settings_lime_server_url_title "URL du serveur d’échange de clés de chiffrement" Lime server URL @@ -546,19 +579,19 @@ AllContactListView - + car_favorites_contacts_title "Favoris" Favorites - + generic_address_picker_contacts_list_title 'Contacts' Contacts - + generic_address_picker_suggestions_list_title "Suggestions" Suggestions @@ -880,42 +913,42 @@ CallLayout - + meeting_event_conference_destroyed "Vous avez quitté la conférence" You have left the meeting - + call_ended_by_user "Vous avez terminé l'appel" You have ended the call - + call_ended_by_remote "Votre correspondant a terminé l'appel" Your caller has ended the call - + conference_call_empty "En attente d'autres participants…" Waiting for other participants… - + conference_share_link_title "Partager le lien" Share link - + copied Copied - + information_popup_meeting_address_copied_to_clipboard Le lien de la réunion a été copié dans le presse-papier The meeting link has been copied to the clipboard @@ -1899,25 +1932,25 @@ ChatMessage - + chat_message_copy_selection "Copy selection" Copy selection - + chat_message_copy "Copy" Copy - + chat_message_copied_to_clipboard_title Copied Copied - + chat_message_copied_to_clipboard_toast "to clipboard" in clipboard @@ -1953,25 +1986,25 @@ You replied - + chat_message_reception_info "Reception info" Reception info - + chat_message_reply Reply Reply - + chat_message_forward Forward Forward - + chat_message_delete "Delete" Delete @@ -2133,38 +2166,38 @@ Error ChatMessagesListView - - + + popup_info_find_message_title Find message Find message - + info_popup_no_result_message No result found No result found - + info_popup_first_result_message First result reached First result reached - + info_popup_last_result_message Last result reached Last result reached - + chat_message_list_encrypted_header_title End to end encrypted chat End to end encrypted chat - + chat_message_list_encrypted_header_message Les messages de cette conversation sont chiffrés de bout en bout. Seul votre correspondant peut les déchiffrer. @@ -2172,7 +2205,7 @@ Error Only your correspondent can decrypt them. - + chat_message_is_writing_info %1 is writing… %1 is writing… @@ -3110,13 +3143,13 @@ Only your correspondent can decrypt them. DecoratedTextField - + textfield_error_message_cannot_be_empty "ne peut être vide" can not be empty - + textfield_error_message_unknown_format "Format non reconnu" Unknown format @@ -3400,50 +3433,50 @@ Expiration : %1 HelpPage - + help_title "Aide" Help - - + + help_about_title "À propos de %1" About %1 - + help_about_privacy_policy_title "Règles de confidentialité" Privacy Policy - + help_about_privacy_policy_subtitle Quelles informations %1 collecte et utilise What information does %1 collect and use - + help_about_version_title "Version" Version - + help_about_gpl_licence_title "Licences GPLv3" GPLv3 licences - + help_about_contribute_translations_title "Contribuer à la traduction de %1" Contribute to the translation of %1 - + help_troubleshooting_title "Dépannage" Troubleshooting @@ -3729,7 +3762,7 @@ Expiration : %1 Remote provisioning link - + default_account_connection_state_error_toast Error during connection @@ -3816,31 +3849,31 @@ Expiration : %1 Settings - + recordings_title "Enregistrements" Records - + help_title "Aide" Help - + help_quit_title "Quitter l'application" Quit the app - + quit_app_question "Quitter %1 ?" Quit %1 ? - + drawer_menu_add_account "Ajouter un compte" Add an account @@ -4185,13 +4218,13 @@ Expiration : %1 Timezone - + meeting_info_organizer_label "Organisateur" Organizer - + meeting_info_join_title "Rejoindre la réunion" Join meeting @@ -4917,14 +4950,26 @@ To enable them in a commercial project, please contact us. login_proxy_server_url - "Proxy server URL" - Proxy server URL + "Outbound SIP Proxy URI" + Outbound SIP Proxy URI - + + login_proxy_server_url_tooltip + "If this field is filled, the outbound proxy will be enabled automatically. Leave it empty to disable it." + If this field is filled, the outbound proxy will be enabled automatically. Leave it empty to disable it. + + + + login_registrar_uri + "Registrar URI" + Registrar URI + + + login_id - "Connexion ID (if different)" - Connexion ID (if different) + "Authentication ID (if different)" + Authentication ID (if different) @@ -5103,15 +5148,14 @@ To enable them in a commercial project, please contact us. Meetings - settings_security_title "Affichage" "Security" - Security / Encryption + Security / Encryption settings_network_title - "Réseau" + "Affichage" "Security" "Réseau" Network @@ -5213,7 +5257,7 @@ To enable them in a commercial project, please contact us. Utils - + nSeconds %1 second @@ -5221,7 +5265,7 @@ To enable them in a commercial project, please contact us. - + nMinute %1 minute @@ -5265,7 +5309,7 @@ To enable them in a commercial project, please contact us. Failed to create reply message - + nHour %1 hour @@ -5273,8 +5317,8 @@ To enable them in a commercial project, please contact us. - - + + nDay %1 day @@ -5282,7 +5326,7 @@ To enable them in a commercial project, please contact us. - + nWeek %1 week diff --git a/Linphone/data/languages/fr_FR.ts b/Linphone/data/languages/fr_FR.ts index 096f782da..95d5324b0 100644 --- a/Linphone/data/languages/fr_FR.ts +++ b/Linphone/data/languages/fr_FR.ts @@ -27,45 +27,45 @@ AccountCore - + drawer_menu_account_connection_status_connected "Connecté" Connecté - + drawer_menu_account_connection_status_refreshing En cours de rafraîchissement… - + drawer_menu_account_connection_status_progress Connexion… - + drawer_menu_account_connection_status_failed Erreur - + drawer_menu_account_connection_status_cleared Désactivé - + manage_account_status_connected_summary "Vous êtes en ligne et joignable." Vous êtes en ligne et joignable. - + manage_account_status_failed_summary "Erreur de connexion, vérifiez vos paramètres." Erreur de connexion, vérifiez vos paramètres. - + manage_account_status_cleared_summary "Compte désactivé, vous ne recevrez ni appel ni message." Compte désactivé, vous ne recevrez ni appel ni message. @@ -83,43 +83,43 @@ AccountManager - + assistant_account_login_already_connected_error "The account is already connected" Le compte est déjà connecté - + assistant_account_login_proxy_address_error "Unable to create proxy address. Please check the domain name." Impossible de créer l'adresse proxy. Merci de vérifier le nom de domaine. - + assistant_account_login_address_configuration_error "Unable to configure address: `%1`." Impossible de configurer l'adresse : `%1`. - + assistant_account_login_params_configuration_error "Unable to configure account settings." Impossible de configurer les paramètres du compte. - + assistant_account_login_forbidden_error "Username and password do not match" Le couple identifiant mot de passe ne correspond pas - + assistant_account_login_error "Error during connection, please verify your parameters" Erreur durant la connexion, veuillez vérifier vos paramètres - + assistant_account_add_error "Unable to add account." Impossible d'ajouter le compte. @@ -134,25 +134,31 @@ Impossible de définir l'adresse du serveur de messagerie vocale depuis l'adresse %1 - + set_server_address_failed_error_message "Unable to set server address, failed creating address from %1" Impossible de définir l'adresse du serveur depuis l'adresse %1 - + + set_outbound_proxy_uri_failed_error_message + Unable to set outbound proxy uri, failed creating address from %1 + Impossible de définir l'adresse du proxy sip sortant depuis l'adresse %1 + + + set_conference_factory_address_failed_error_message "Unable to set the conversation server address, failed creating address from %1" Impossible de définir l'uri du serveur de conversations depuis l'adresse %1 - + set_audio_conference_factory_address_failed_error_message "Unable to set the meeting server address, failed creating address from %1" Impossible de définir l'uri du serveur de réunions depuis l'adresse %1 - + set_voicemail_address_failed_error_message Unable to set voicemail address, failed creating address from %1 Impossible de définir l'adresse de messagerie vocale depuis l'adresse %1 @@ -325,104 +331,131 @@ AccountSettingsParametersLayout - + settings_title Paramètres - + settings_account_title Paramètres de compte + + + info_popup_invalid_registrar_uri_message + Registrar uri is invalid. Please make sure it matches the following format : sip:<host>:<port>;transport=<transport> (:<port> is optional) + La registrar URI est invalide. Veuillez vous assurer qu'elle respecte le format suivant : sip:<host>:<port>;transport=<transport> (:<port> est facultatif) + + info_popup_invalid_outbound_proxy_message + Outbound proxy uri is invalid. Please make sure it matches the following format : sip:<host>:<port>;transport=<transport> (:<port> is optional) + L'uri du proxy sip sortant est invalide. Veuillez vous assurer qu'elle respecte le format suivant : sip:<host>:<port>;transport=<transport> (:<port> est facultatif) + + + + info_popup_error_title + Erreur + + + information_popup_success_title Succès - + contact_editor_saved_changes_toast "Modifications sauvegardés" Modifications sauvegardés - + information_popup_error_title Erreur - + account_settings_mwi_uri_title "URI du serveur de messagerie vocale" URI du serveur de messagerie vocale - + account_settings_voicemail_uri_title "URI de messagerie vocale" URI de messagerie vocale - + account_settings_transport_title "Transport" Transport - + + account_settings_registrar_uri_title + Registrar URI + + + account_settings_sip_proxy_url_title - URL du serveur mandataire + URL du proxy SIP sortant + + + + login_proxy_server_url_tooltip + "If this field is filled, the outbound proxy will be enabled automatically. Leave it empty to disable it." + Si ce champ est rempli, l’outbound proxy sera activé automatiquement. Laissez-le vide pour le désactiver. - account_settings_outbound_proxy_title - "Serveur mandataire sortant" - Serveur mandataire sortant + "Outbound proxy enabled" + Serveur mandataire sortant - + account_settings_stun_server_url_title "Adresse du serveur STUN" Adresse du serveur STUN - + account_settings_enable_ice_title "Activer ICE" Activer ICE - + account_settings_avpf_title "AVPF" AVPF - + account_settings_bundle_mode_title "Mode bundle" Mode bundle - + account_settings_expire_title "Expiration (en seconde)" Expiration (en seconde) - + account_settings_conference_factory_uri_title "URI du serveur de conversations" URI du serveur de conversations - + account_settings_audio_video_conference_factory_uri_title "URI du serveur de réunions" URI du serveur de réunions - + account_settings_lime_server_url_title "URL du serveur d’échange de clés de chiffrement" URL du serveur d’échange de clés de chiffrement @@ -546,19 +579,19 @@ AllContactListView - + car_favorites_contacts_title "Favoris" Favoris - + generic_address_picker_contacts_list_title 'Contacts' Contacts - + generic_address_picker_suggestions_list_title "Suggestions" Suggestions @@ -880,42 +913,42 @@ CallLayout - + meeting_event_conference_destroyed "Vous avez quitté la conférence" Vous avez quitté la conférence - + call_ended_by_user "Vous avez terminé l'appel" Vous avez terminé l'appel - + call_ended_by_remote "Votre correspondant a terminé l'appel" Votre correspondant a terminé l'appel - + conference_call_empty "En attente d'autres participants…" En attente d'autres participants… - + conference_share_link_title "Partager le lien" Partager le lien - + copied Copié - + information_popup_meeting_address_copied_to_clipboard Le lien de la réunion a été copié dans le presse-papier Le lien de la réunion a été copié dans le presse-papier @@ -1899,25 +1932,25 @@ ChatMessage - + chat_message_copy_selection "Copy selection" Copier la sélection - + chat_message_copy "Copy" Copier - + chat_message_copied_to_clipboard_title Copied Copié - + chat_message_copied_to_clipboard_toast "to clipboard" dans le presse-papiers @@ -1953,25 +1986,25 @@ Vous avez répondu - + chat_message_reception_info "Reception info" Info de réception - + chat_message_reply Reply Répondre - + chat_message_forward Forward Transférer - + chat_message_delete "Delete" Supprimer @@ -2133,38 +2166,38 @@ Error ChatMessagesListView - - + + popup_info_find_message_title Find message Trouver un message - + info_popup_no_result_message No result found Aucun résultat trouvé - + info_popup_first_result_message First result reached Premier résultat atteint - + info_popup_last_result_message Last result reached Dernier résultat atteint - + chat_message_list_encrypted_header_title End to end encrypted chat Conversation chiffrée de bout en bout - + chat_message_list_encrypted_header_message Les messages de cette conversation sont chiffrés de bout en bout. Seul votre correspondant peut les déchiffrer. @@ -2172,7 +2205,7 @@ Error en bout. Seul votre correspondant peut les déchiffrer. - + chat_message_is_writing_info %1 is writing… %1 est en train d'écrire… @@ -3105,13 +3138,13 @@ en bout. Seul votre correspondant peut les déchiffrer. DecoratedTextField - + textfield_error_message_cannot_be_empty "ne peut être vide" ne peut être vide - + textfield_error_message_unknown_format "Format non reconnu" Format non reconnu @@ -3395,50 +3428,50 @@ Expiration : %1 HelpPage - + help_title "Aide" Aide - - + + help_about_title "À propos de %1" À propos de %1 - + help_about_privacy_policy_title "Règles de confidentialité" Règles de confidentialité - + help_about_privacy_policy_subtitle Quelles informations %1 collecte et utilise Quelles informations %1 collecte et utilise - + help_about_version_title "Version" Version - + help_about_gpl_licence_title "Licences GPLv3" Licences GPLv3 - + help_about_contribute_translations_title "Contribuer à la traduction de %1" Contribuer à la traduction de %1 - + help_troubleshooting_title "Dépannage" Dépannage @@ -3724,7 +3757,7 @@ Expiration : %1 Lien de configuration distante - + default_account_connection_state_error_toast Erreur durant la connexion @@ -3811,31 +3844,31 @@ Expiration : %1 Paramètres - + recordings_title "Enregistrements" Enregistrements - + help_title "Aide" Aide - + help_quit_title "Quitter l'application" Quitter l'application - + quit_app_question "Quitter %1 ?" Quitter %1 ? - + drawer_menu_add_account "Ajouter un compte" Ajouter un compte @@ -4180,13 +4213,13 @@ Expiration : %1 Fuseau horaire - + meeting_info_organizer_label "Organisateur" Organisateur - + meeting_info_join_title "Rejoindre la réunion" Rejoindre la réunion @@ -4912,13 +4945,25 @@ Pour les activer dans un projet commercial, merci de nous contacter. login_proxy_server_url - "Proxy server URL" + "Outbound SIP Proxy URI" URI du proxy SIP sortant - + + login_proxy_server_url_tooltip + "If this field is filled, the outbound proxy will be enabled automatically. Leave it empty to disable it." + Si ce champ est rempli, l’outbound proxy sera activé automatiquement. Laissez-le vide pour le désactiver. + + + + login_registrar_uri + "Registrar URI" + Registrar URI + + + login_id - "Connexion ID (if different)" + "Authentication ID (if different)" Identifiant de connexion (si différent) @@ -5098,15 +5143,14 @@ Pour les activer dans un projet commercial, merci de nous contacter.Réunions - settings_security_title "Affichage" "Security" - Sécurité / Chiffrement + Sécurité / Chiffrement settings_network_title - "Réseau" + "Affichage" "Security" "Réseau" Réseau @@ -5208,7 +5252,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. Utils - + nMinute %1 minute @@ -5216,7 +5260,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + nHour %1 heure @@ -5224,8 +5268,8 @@ Pour les activer dans un projet commercial, merci de nous contacter. - - + + nDay %1 jour @@ -5233,7 +5277,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + nWeek %1 semaine @@ -5241,7 +5285,7 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + nSeconds %1 seconde diff --git a/Linphone/model/account/AccountManager.cpp b/Linphone/model/account/AccountManager.cpp index 6e5e761d4..044aa8b15 100644 --- a/Linphone/model/account/AccountManager.cpp +++ b/Linphone/model/account/AccountManager.cpp @@ -60,7 +60,8 @@ bool AccountManager::login(QString username, QString domain, linphone::TransportType transportType, QString *errorMessage, - QString serverAddress, + QString registrarUri, + QString outboundProxyAddress, QString connectionId) { mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); auto core = CoreModel::getInstance()->getCore(); @@ -89,9 +90,13 @@ bool AccountManager::login(QString username, } if (!displayName.isEmpty()) identity->setDisplayName(Utils::appStringToCoreString(displayName)); - if (!serverAddress.isEmpty()) { - auto linServerAddress = ToolModel::interpretUrl(serverAddress); - params->setServerAddress(linServerAddress); + if (!registrarUri.isEmpty()) { + auto linRegistrarUri = ToolModel::interpretUrl(registrarUri); + params->setServerAddress(linRegistrarUri); + } + if (!outboundProxyAddress.isEmpty()) { + auto linOutboundProxyAddress = ToolModel::interpretUrl(outboundProxyAddress); + params->setRoutesAddresses({linOutboundProxyAddress}); } if (!domain.isEmpty()) { identity->setDomain(Utils::appStringToCoreString(domain)); diff --git a/Linphone/model/account/AccountManager.hpp b/Linphone/model/account/AccountManager.hpp index 090ee68dc..f3f5f3c95 100644 --- a/Linphone/model/account/AccountManager.hpp +++ b/Linphone/model/account/AccountManager.hpp @@ -42,7 +42,8 @@ public: QString domain = QString(), linphone::TransportType transportType = linphone::TransportType::Tls, QString *errorMessage = nullptr, - QString serverAddress = QString(), + QString registrarUri = QString(), + QString outboundProxyAddress = QString(), QString connectionId = QString()); std::shared_ptr createAccount(const QString &assistantFile); diff --git a/Linphone/model/account/AccountModel.cpp b/Linphone/model/account/AccountModel.cpp index 6f59efd57..3853fa1a7 100644 --- a/Linphone/model/account/AccountModel.cpp +++ b/Linphone/model/account/AccountModel.cpp @@ -268,31 +268,51 @@ void AccountModel::setTransport(linphone::TransportType value, bool save) { params->setServerAddress(addressClone); if (save) mMonitor->setParams(params); emit transportChanged(value); - emit serverAddressChanged(Utils::coreStringToAppString(addressClone->asString())); + emit registrarUriChanged(Utils::coreStringToAppString(addressClone->asString())); } } -QString AccountModel::getServerAddress() const { +QString AccountModel::getRegistrarUri() const { if (mMonitor->getParams()->getServerAddress()) return Utils::coreStringToAppString(mMonitor->getParams()->getServerAddress()->asString()); else return ""; } -void AccountModel::setServerAddress(QString value, linphone::TransportType transport, bool save) { +void AccountModel::setRegistrarUri(QString value) { mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); auto params = mMonitor->getParams()->clone(); auto address = CoreModel::getInstance()->getCore()->interpretUrl(Utils::appStringToCoreString(value), false); if (address) { - if (save) address->setTransport(transport); params->setServerAddress(address); - if (save) mMonitor->setParams(params); - emit serverAddressChanged(value); + mMonitor->setParams(params); + emit registrarUriChanged(value); emit transportChanged(address->getTransport()); } else { //: "Unable to set server address, failed creating address from %1" emit setValueFailed(tr("set_server_address_failed_error_message").arg(value)); qWarning() << "Unable to set ServerAddress, failed creating address from" << value; } + emit registrarUriChanged(Utils::coreStringToAppString(address->asString())); +} + +QString AccountModel::getOutboundProxyUri() const { + auto routeAddresses = mMonitor->getParams()->getRoutesAddresses(); + auto outbound = + routeAddresses.empty() ? QString() : Utils::coreStringToAppString(routeAddresses.front()->asString()); + return outbound; +} + +void AccountModel::setOutboundProxyUri(QString value) { + auto linOutboundProxyAddress = ToolModel::interpretUrl(value); + if (!linOutboundProxyAddress) { + //: Unable to set outbound proxy uri, failed creating address from %1 + emit setValueFailed(tr("set_outbound_proxy_uri_failed_error_message").arg(value)); + return; + } + auto params = mMonitor->getParams()->clone(); + params->setRoutesAddresses({linOutboundProxyAddress}); + + emit outboundProxyUriChanged(value); } bool AccountModel::getOutboundProxyEnabled() const { diff --git a/Linphone/model/account/AccountModel.hpp b/Linphone/model/account/AccountModel.hpp index 083b474bd..1ac92ec00 100644 --- a/Linphone/model/account/AccountModel.hpp +++ b/Linphone/model/account/AccountModel.hpp @@ -59,8 +59,10 @@ public: void setMwiServerAddress(QString value); linphone::TransportType getTransport() const; void setTransport(linphone::TransportType value, bool save); - QString getServerAddress() const; - void setServerAddress(QString value, linphone::TransportType transport, bool save); + QString getRegistrarUri() const; + void setRegistrarUri(QString value); + QString getOutboundProxyUri() const; + void setOutboundProxyUri(QString value); bool getOutboundProxyEnabled() const; void setOutboundProxyEnabled(bool value); QString getStunServer() const; @@ -107,7 +109,8 @@ signals: void notificationsAllowedChanged(bool value); void mwiServerAddressChanged(QString value); void transportChanged(linphone::TransportType value); - void serverAddressChanged(QString value); + void registrarUriChanged(QString value); + void outboundProxyUriChanged(QString value); void outboundProxyEnabledChanged(bool value); void stunServerChanged(QString value); void iceEnabledChanged(bool value); diff --git a/Linphone/tool/Constants.hpp b/Linphone/tool/Constants.hpp index 3d1f7a2ca..527f6b45d 100644 --- a/Linphone/tool/Constants.hpp +++ b/Linphone/tool/Constants.hpp @@ -23,6 +23,7 @@ #include #include +#include #include #include "config.h" @@ -102,6 +103,11 @@ public: Q_PROPERTY(QString DefaultLocale MEMBER DefaultLocale CONSTANT) Q_PROPERTY(int maxMosaicParticipants MEMBER MaxMosaicParticipants CONSTANT) Q_PROPERTY(QStringList reactionsList READ getReactionsList CONSTANT) + Q_PROPERTY(QRegularExpression uriRegExp MEMBER mUriRegExp CONSTANT) + + // Uri regexp + QRegularExpression mUriRegExp = QRegularExpression( + "(sip|sips):[[:alnum:]]+[.]*[[[:alnum:]]+[.]*[[:alnum:]]+]*:?[0-9]*?;transport=(tls|tcp|udp|dtls)"); // For Webviews static constexpr char DefaultAssistantRegistrationUrl[] = "https://subscribe.linphone.org/register"; diff --git a/Linphone/tool/Utils.cpp b/Linphone/tool/Utils.cpp index 0ecde1a6d..eb4f16efa 100644 --- a/Linphone/tool/Utils.cpp +++ b/Linphone/tool/Utils.cpp @@ -2242,6 +2242,10 @@ bool Utils::isAnimatedImage(const QString &path) { return reader.canRead() && reader.supportsAnimation() && reader.imageCount() > 1; } +bool Utils::fileExists(const QString &path) { + return QFileInfo::exists(path); +} + bool Utils::canHaveThumbnail(const QString &path) { if (path.isEmpty()) return false; return isImage(path) || isAnimatedImage(path) /*|| isPdf(path)*/ || isVideo(path); @@ -2275,3 +2279,9 @@ QString Utils::getEphemeralFormatedTime(int selectedTime) { else if (selectedTime == 604800) return tr("nWeek", "", 1).arg(1); else return tr("nSeconds", "", selectedTime).arg(selectedTime); } + +bool Utils::stringMatchFormat(QString toMatch, QRegularExpression regExp) { + if (!regExp.isValid()) return false; + auto match = regExp.match(toMatch); + return match.hasMatch(); +} diff --git a/Linphone/tool/Utils.hpp b/Linphone/tool/Utils.hpp index 4ce76d7c8..7b8f1ea68 100644 --- a/Linphone/tool/Utils.hpp +++ b/Linphone/tool/Utils.hpp @@ -166,6 +166,7 @@ public: Q_INVOKABLE static bool isVideo(const QString &path); static QString getSafeFilePath(const QString &filePath, bool *soFarSoGood); Q_INVOKABLE static bool isAnimatedImage(const QString &path); + Q_INVOKABLE static bool fileExists(const QString &path); Q_INVOKABLE static bool canHaveThumbnail(const QString &path); Q_INVOKABLE static bool isImage(const QString &path); Q_INVOKABLE static bool isPdf(const QString &path); @@ -186,6 +187,8 @@ public: Q_INVOKABLE static void sendVoiceRecordingMessage(RecorderGui *recorderGui, ChatGui *chatGui); Q_INVOKABLE static QString getEphemeralFormatedTime(int selectedTime); + Q_INVOKABLE static bool stringMatchFormat(QString toMatch, QRegularExpression regExp); + // QDir findDirectoryByName(QString startPath, QString name); static QString getApplicationProduct(); diff --git a/Linphone/view/Control/Button/PopupButton.qml b/Linphone/view/Control/Button/PopupButton.qml index 6a18c1eb7..ce0d53cbf 100644 --- a/Linphone/view/Control/Button/PopupButton.qml +++ b/Linphone/view/Control/Button/PopupButton.qml @@ -21,8 +21,8 @@ Button { topPadding: 0 bottomPadding: 0 icon.source: AppIcons.verticalDots - icon.width: Math.round(24 * DefaultStyle.dp) - icon.height: Math.round(24 * DefaultStyle.dp) + icon.width: width + icon.height: width function close() { popup.close() } diff --git a/Linphone/view/Control/Container/CreationFormLayout.qml b/Linphone/view/Control/Container/CreationFormLayout.qml index 9d61bf362..c2998bf23 100644 --- a/Linphone/view/Control/Container/CreationFormLayout.qml +++ b/Linphone/view/Control/Container/CreationFormLayout.qml @@ -69,11 +69,19 @@ FocusScope { contentItem: RowLayout { spacing: Math.round(16 * DefaultStyle.dp) anchors.verticalCenter: parent.verticalCenter - Image { - source: AppIcons.groupCall - Layout.preferredWidth: Math.round(44 * DefaultStyle.dp) - sourceSize.width: Math.round(44 * DefaultStyle.dp) - fillMode: Image.PreserveAspectFit + Rectangle { + width: Math.round(44 * DefaultStyle.dp) + height: width + radius: width / 2 + color: DefaultStyle.main1_500_main + EffectImage { + imageSource: AppIcons.usersThreeFilled + anchors.centerIn: parent + width: Math.round(24 * DefaultStyle.dp) + height: width + fillMode: Image.PreserveAspectFit + colorizationColor: DefaultStyle.grey_0 + } } Text { text: mainItem.startGroupButtonText diff --git a/Linphone/view/Control/Container/FormItemLayout.qml b/Linphone/view/Control/Container/FormItemLayout.qml index 324dcf40d..ff20e3623 100644 --- a/Linphone/view/Control/Container/FormItemLayout.qml +++ b/Linphone/view/Control/Container/FormItemLayout.qml @@ -2,11 +2,13 @@ import QtQuick import QtQuick.Layouts import QtQuick.Effects import Linphone - +import "qrc:/qt/qml/Linphone/view/Style/buttonStyle.js" as ButtonStyle + FocusScope{ id: mainItem property alias contentItem: contentItem.data property string label: "" + property string tooltip: "" property bool mandatory: false property alias errorTextItem: errorText @@ -41,20 +43,33 @@ FocusScope{ spacing: Math.round(5 * DefaultStyle.dp) anchors.left: parent.left anchors.right: parent.right - - Text { - visible: label.length > 0 - verticalAlignment: Text.AlignVCenter - text: mainItem.label + (mainItem.mandatory ? "*" : "") - color: contentItem.activeFocus ? DefaultStyle.main1_500_main : DefaultStyle.main2_600 - elide: Text.ElideRight - wrapMode: Text.Wrap - maximumLineCount: 1 - textFormat: Text.RichText - - font { - pixelSize: Typography.p2.pixelSize - weight: Typography.p2.weight + RowLayout { + spacing: Math.round(8 * DefaultStyle.dp) + Text { + visible: label.length > 0 + verticalAlignment: Text.AlignVCenter + text: mainItem.label + (mainItem.mandatory ? "*" : "") + color: contentItem.activeFocus ? DefaultStyle.main1_500_main : DefaultStyle.main2_600 + elide: Text.ElideRight + wrapMode: Text.Wrap + maximumLineCount: 1 + textFormat: Text.RichText + + font { + pixelSize: Typography.p2.pixelSize + weight: Typography.p2.weight + } + } + Item{Layout.fillWidth: true} + PopupButton { + visible: mainItem.tooltip !== "" + Layout.preferredWidth: Math.round(24 * DefaultStyle.dp) + Layout.preferredHeight: Math.round(24 * DefaultStyle.dp) + style: ButtonStyle.noBackground + icon.source: AppIcons.info + popup.contentItem: Text { + text: mainItem.tooltip + } } } diff --git a/Linphone/view/Control/Display/Chat/FileView.qml b/Linphone/view/Control/Display/Chat/FileView.qml index 615595b9a..6c4500532 100644 --- a/Linphone/view/Control/Display/Chat/FileView.qml +++ b/Linphone/view/Control/Display/Chat/FileView.qml @@ -67,14 +67,19 @@ Item { sourceSize.height: mainItem.height fillMode: Image.PreserveAspectFit } - Image { - anchors.fill: image - z: image.z + 1 - visible: image.status == Image.Error || image.status == Image.Null || image.frameCount === 0 - source: AppIcons.fileImage - sourceSize.width: mainItem.width - sourceSize.height: mainItem.height - fillMode: Image.PreserveAspectFit + Rectangle { + anchors.fill: parent + color: DefaultStyle.main1_200 + opacity: 0.5 + Image { + anchors.fill: image + z: parent.z + 1 + visible: image.status == Image.Error || image.status == Image.Null || !UtilsCpp.fileExists(mainItem.filePath) + source: AppIcons.fileImage + sourceSize.width: mainItem.width + sourceSize.height: mainItem.height + fillMode: Image.PreserveAspectFit + } } Image { id: image diff --git a/Linphone/view/Control/Input/DecoratedTextField.qml b/Linphone/view/Control/Input/DecoratedTextField.qml index cbdcefc5f..8b923348d 100644 --- a/Linphone/view/Control/Input/DecoratedTextField.qml +++ b/Linphone/view/Control/Input/DecoratedTextField.qml @@ -19,6 +19,8 @@ FormItemLayout { property bool canBeEmpty: true property bool toValidate: false property alias text: textField.text + + property var value: propertyOwnerGui ? propertyOwnerGui.core[propertyName] : propertyOwner[propertyName] function value() { return propertyOwnerGui ? propertyOwnerGui.core[propertyName] : propertyOwner[propertyName] diff --git a/Linphone/view/Page/Form/Login/SIPLoginPage.qml b/Linphone/view/Page/Form/Login/SIPLoginPage.qml index 9cf2db034..f93a1b9e7 100644 --- a/Linphone/view/Page/Form/Login/SIPLoginPage.qml +++ b/Linphone/view/Page/Form/Login/SIPLoginPage.qml @@ -347,7 +347,7 @@ LoginLayout { } console.debug("[SIPLoginPage] User: Log in") LoginPageCpp.login(usernameEdit.text, passwordEdit.text, displayName.text, domainEdit.text, - transportCbox.currentValue, serverAddressEdit.text, connectionIdEdit.text); + transportCbox.currentValue, registrarUriEdit.text, outboundProxyUriEdit.text, connectionIdEdit.text); connectionButton.enabled = false connectionButtonContent.currentIndex = 1 } @@ -370,25 +370,39 @@ LoginLayout { ColumnLayout { spacing: Math.round(10 * DefaultStyle.dp) FormItemLayout { - id: serverAddress - //: "Proxy server URL" + id: outboundProxyUri + //: "Outbound SIP Proxy URI" label: qsTr("login_proxy_server_url") + //: "If this field is filled, the outbound proxy will be enabled automatically. Leave it empty to disable it." + tooltip: qsTr("login_proxy_server_url_tooltip") Layout.fillWidth: true contentItem: TextField { - id: serverAddressEdit + id: outboundProxyUriEdit Layout.preferredWidth: Math.round(360 * DefaultStyle.dp) + KeyNavigation.down: registrarUriEdit + } + } + FormItemLayout { + id: registrarUri + //: "Registrar URI" + label: qsTr("login_registrar_uri") + Layout.fillWidth: true + contentItem: TextField { + id: registrarUriEdit + Layout.preferredWidth: Math.round(360 * DefaultStyle.dp) + KeyNavigation.up: outboundProxyUriEdit KeyNavigation.down: connectionIdEdit } } FormItemLayout { id: connectionId - //: "Connexion ID (if different)" + //: "Authentication ID (if different)" label: qsTr("login_id") Layout.fillWidth: true contentItem: TextField { id: connectionIdEdit Layout.preferredWidth: Math.round(360 * DefaultStyle.dp) - KeyNavigation.up: serverAddressEdit + KeyNavigation.up: registrarUriEdit } } } diff --git a/Linphone/view/Page/Layout/Settings/AccountSettingsParametersLayout.qml b/Linphone/view/Page/Layout/Settings/AccountSettingsParametersLayout.qml index 6f326067d..075f82412 100644 --- a/Linphone/view/Page/Layout/Settings/AccountSettingsParametersLayout.qml +++ b/Linphone/view/Page/Layout/Settings/AccountSettingsParametersLayout.qml @@ -6,10 +6,13 @@ import QtQuick.Dialogs import Linphone import SettingsCpp 1.0 import UtilsCpp +import ConstantsCpp AbstractSettingsLayout { id: mainItem width: parent?.width + property bool registrarUriIsValid + property bool outboundProxyIsValid contentModel: [{ "title": qsTr("settings_title"), "subTitle": "", @@ -23,7 +26,15 @@ AbstractSettingsLayout { property alias account: mainItem.model onSave: { - account.core.save() + if (!registrarUriIsValid || !outboundProxyIsValid) { + var message = !registrarUriIsValid + //: Registrar uri is invalid. Please make sure it matches the following format : sip::;transport= (: is optional) + ? qsTr("info_popup_invalid_registrar_uri_message") + //: Outbound proxy uri is invalid. Please make sure it matches the following format : sip::;transport= (: is optional) + : qsTr("info_popup_invalid_outbound_proxy_message") + mainWindow.showInformationPopup(qsTr("info_popup_error_title"), message, false) + } + else account.core.save() } onUndo: account.core.undo() Connections { @@ -110,26 +121,33 @@ AbstractSettingsLayout { color: DefaultStyle.main2_600 font: Typography.p2l } - ComboSetting { + DecoratedTextField { Layout.fillWidth: true - Layout.topMargin: Math.round(-15 * DefaultStyle.dp) - entries: account.core.transports - propertyName: "transport" + //:"Registrar URI" + title: qsTr("account_settings_registrar_uri_title") + propertyName: "registrarUri" propertyOwnerGui: account + toValidate: true + isValid: function(text) { + var valid = text === "" || UtilsCpp.stringMatchFormat(text, ConstantsCpp.uriRegExp) + mainItem.registrarUriIsValid = valid + return valid + } } DecoratedTextField { Layout.fillWidth: true - //:"URL du serveur mandataire" + //:"Outbound SIP Proxy URI" title: qsTr("account_settings_sip_proxy_url_title") - propertyName: "serverAddress" + propertyName: "outboundProxyUri" propertyOwnerGui: account toValidate: true - } - SwitchSetting { - //: "Serveur mandataire sortant" - titleText: qsTr("account_settings_outbound_proxy_title") - propertyName: "outboundProxyEnabled" - propertyOwnerGui: account + //: "If this field is filled, the outbound proxy will be enabled automatically. Leave it empty to disable it." + tooltip: qsTr("login_proxy_server_url_tooltip") + isValid: function(text) { + var isValid = text === "" || UtilsCpp.stringMatchFormat(text, ConstantsCpp.uriRegExp) + mainItem.outboundProxyIsValid = isValid + return isValid + } } DecoratedTextField { Layout.fillWidth: true diff --git a/Linphone/view/Page/Main/Contact/ContactPage.qml b/Linphone/view/Page/Main/Contact/ContactPage.qml index 8266b8a0a..e9635175f 100644 --- a/Linphone/view/Page/Main/Contact/ContactPage.qml +++ b/Linphone/view/Page/Main/Contact/ContactPage.qml @@ -178,7 +178,7 @@ FriendGui{ content: RowLayout { spacing: Math.round(50 * DefaultStyle.dp) Avatar { - _address: "sip:a.c@sip.linphone.org" + displayNameVal: "A C" Layout.preferredWidth: Math.round(45 * DefaultStyle.dp) Layout.preferredHeight: Math.round(45 * DefaultStyle.dp) } @@ -189,7 +189,7 @@ FriendGui{ Layout.preferredHeight: Math.round(45 * DefaultStyle.dp) } Avatar { - _address: "sip:a.c@sip.linphone.org" + displayNameVal: "A C" secured: true Layout.preferredWidth: Math.round(45 * DefaultStyle.dp) Layout.preferredHeight: Math.round(45 * DefaultStyle.dp) diff --git a/Linphone/view/Style/AppIcons.qml b/Linphone/view/Style/AppIcons.qml index 324f1873b..42d66e6fe 100644 --- a/Linphone/view/Style/AppIcons.qml +++ b/Linphone/view/Style/AppIcons.qml @@ -49,6 +49,7 @@ QtObject { property string chatTeardropTextSelected: "image://internal/chat-teardrop-text-fill.svg" property string usersThree: "image://internal/users-three.svg" property string usersThreeSelected: "image://internal/users-three-fill.svg" + property string usersThreeFilled: "image://internal/users-three-filled.svg" property string userPlus: "image://internal/user-plus.svg" property string noItemImage: "image://internal/noItemImage.svg" property string verticalDots: "image://internal/dots-three-vertical.svg"