mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
Lime server Url migration from core to accounts.
This commit is contained in:
parent
592df568a9
commit
dad9cbecf2
26 changed files with 304 additions and 32 deletions
|
|
@ -2956,6 +2956,21 @@ Klik her: <a href="%1">%1</a>
|
|||
<extracomment>"invalid conference URI" : Error text about conference URI</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>videoConferenceURI</source>
|
||||
<extracomment>"Video Conference URI" : Label of a text edit for filling Video conference URI.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeServerUrl</source>
|
||||
<extracomment>'E2E encryption keys server URL' : Label of a text edit for filling the Lime server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>invalidLimeServerUrl</source>
|
||||
<extracomment>"invalid E2E encryption keys server URL" : Error text about E2E encryption keys server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsTunnel</name>
|
||||
|
|
|
|||
|
|
@ -2956,6 +2956,21 @@ Klicken Sie hier: <a href="%1">%1</a>
|
|||
<extracomment>"invalid conference URI" : Error text about conference URI</extracomment>
|
||||
<translation>Ungültige Konferenz-URI</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>videoConferenceURI</source>
|
||||
<extracomment>"Video Conference URI" : Label of a text edit for filling Video conference URI.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeServerUrl</source>
|
||||
<extracomment>'E2E encryption keys server URL' : Label of a text edit for filling the Lime server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>invalidLimeServerUrl</source>
|
||||
<extracomment>"invalid E2E encryption keys server URL" : Error text about E2E encryption keys server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsTunnel</name>
|
||||
|
|
|
|||
|
|
@ -2979,6 +2979,21 @@ Click here: <a href="%1">%1</a>
|
|||
<extracomment>"invalid conference URI" : Error text about conference URI</extracomment>
|
||||
<translation>Invalid conference URI</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>videoConferenceURI</source>
|
||||
<extracomment>"Video Conference URI" : Label of a text edit for filling Video conference URI.</extracomment>
|
||||
<translation>Video Conference URI</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeServerUrl</source>
|
||||
<extracomment>'E2E encryption keys server URL' : Label of a text edit for filling the Lime server URL.</extracomment>
|
||||
<translation>E2E encryption keys server URL</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>invalidLimeServerUrl</source>
|
||||
<extracomment>"invalid E2E encryption keys server URL" : Error text about E2E encryption keys server URL.</extracomment>
|
||||
<translation>invalid E2E encryption keys server URL</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsTunnel</name>
|
||||
|
|
|
|||
|
|
@ -2956,6 +2956,21 @@ Haga clic aquí: <a href="%1">%1 </a>
|
|||
<extracomment>"invalid conference URI" : Error text about conference URI</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>videoConferenceURI</source>
|
||||
<extracomment>"Video Conference URI" : Label of a text edit for filling Video conference URI.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeServerUrl</source>
|
||||
<extracomment>'E2E encryption keys server URL' : Label of a text edit for filling the Lime server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>invalidLimeServerUrl</source>
|
||||
<extracomment>"invalid E2E encryption keys server URL" : Error text about E2E encryption keys server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsTunnel</name>
|
||||
|
|
|
|||
|
|
@ -2956,6 +2956,21 @@ Cliquez ici : <a href="%1">%1</a>
|
|||
<extracomment>"invalid conference URI" : Error text about conference URI</extracomment>
|
||||
<translation>URI de conférence invalide</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>videoConferenceURI</source>
|
||||
<extracomment>"Video Conference URI" : Label of a text edit for filling Video conference URI.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeServerUrl</source>
|
||||
<extracomment>'E2E encryption keys server URL' : Label of a text edit for filling the Lime server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>invalidLimeServerUrl</source>
|
||||
<extracomment>"invalid E2E encryption keys server URL" : Error text about E2E encryption keys server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsTunnel</name>
|
||||
|
|
|
|||
|
|
@ -2943,6 +2943,21 @@ Kattintson ide: <a href="%1">%1</a>
|
|||
<extracomment>"invalid conference URI" : Error text about conference URI</extracomment>
|
||||
<translation>Érvénytelen konferencia URI-cím</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>videoConferenceURI</source>
|
||||
<extracomment>"Video Conference URI" : Label of a text edit for filling Video conference URI.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeServerUrl</source>
|
||||
<extracomment>'E2E encryption keys server URL' : Label of a text edit for filling the Lime server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>invalidLimeServerUrl</source>
|
||||
<extracomment>"invalid E2E encryption keys server URL" : Error text about E2E encryption keys server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsTunnel</name>
|
||||
|
|
|
|||
|
|
@ -2956,6 +2956,21 @@ Clicca: <a href="%1">%1</a>
|
|||
<extracomment>"invalid conference URI" : Error text about conference URI</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>videoConferenceURI</source>
|
||||
<extracomment>"Video Conference URI" : Label of a text edit for filling Video conference URI.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeServerUrl</source>
|
||||
<extracomment>'E2E encryption keys server URL' : Label of a text edit for filling the Lime server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>invalidLimeServerUrl</source>
|
||||
<extracomment>"invalid E2E encryption keys server URL" : Error text about E2E encryption keys server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsTunnel</name>
|
||||
|
|
|
|||
|
|
@ -2943,6 +2943,21 @@
|
|||
<extracomment>"invalid conference URI" : Error text about conference URI</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>videoConferenceURI</source>
|
||||
<extracomment>"Video Conference URI" : Label of a text edit for filling Video conference URI.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeServerUrl</source>
|
||||
<extracomment>'E2E encryption keys server URL' : Label of a text edit for filling the Lime server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>invalidLimeServerUrl</source>
|
||||
<extracomment>"invalid E2E encryption keys server URL" : Error text about E2E encryption keys server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsTunnel</name>
|
||||
|
|
|
|||
|
|
@ -2969,6 +2969,21 @@ Spustelėkite čia: <a href="%1">%1</a>
|
|||
<extracomment>"invalid conference URI" : Error text about conference URI</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>videoConferenceURI</source>
|
||||
<extracomment>"Video Conference URI" : Label of a text edit for filling Video conference URI.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeServerUrl</source>
|
||||
<extracomment>'E2E encryption keys server URL' : Label of a text edit for filling the Lime server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>invalidLimeServerUrl</source>
|
||||
<extracomment>"invalid E2E encryption keys server URL" : Error text about E2E encryption keys server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsTunnel</name>
|
||||
|
|
|
|||
|
|
@ -2956,6 +2956,21 @@ Clique aqui: <a href="%1">%1 </a>
|
|||
<extracomment>"invalid conference URI" : Error text about conference URI</extracomment>
|
||||
<translation>URI de conferência inválido</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>videoConferenceURI</source>
|
||||
<extracomment>"Video Conference URI" : Label of a text edit for filling Video conference URI.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeServerUrl</source>
|
||||
<extracomment>'E2E encryption keys server URL' : Label of a text edit for filling the Lime server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>invalidLimeServerUrl</source>
|
||||
<extracomment>"invalid E2E encryption keys server URL" : Error text about E2E encryption keys server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsTunnel</name>
|
||||
|
|
|
|||
|
|
@ -2969,6 +2969,21 @@
|
|||
<extracomment>"invalid conference URI" : Error text about conference URI</extracomment>
|
||||
<translation>Недопустимый URI конференции</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>videoConferenceURI</source>
|
||||
<extracomment>"Video Conference URI" : Label of a text edit for filling Video conference URI.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeServerUrl</source>
|
||||
<extracomment>'E2E encryption keys server URL' : Label of a text edit for filling the Lime server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>invalidLimeServerUrl</source>
|
||||
<extracomment>"invalid E2E encryption keys server URL" : Error text about E2E encryption keys server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsTunnel</name>
|
||||
|
|
|
|||
|
|
@ -2956,6 +2956,21 @@ Klicka här: <a href="%1">%1</a>
|
|||
<extracomment>"invalid conference URI" : Error text about conference URI</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>videoConferenceURI</source>
|
||||
<extracomment>"Video Conference URI" : Label of a text edit for filling Video conference URI.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeServerUrl</source>
|
||||
<extracomment>'E2E encryption keys server URL' : Label of a text edit for filling the Lime server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>invalidLimeServerUrl</source>
|
||||
<extracomment>"invalid E2E encryption keys server URL" : Error text about E2E encryption keys server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsTunnel</name>
|
||||
|
|
|
|||
|
|
@ -2943,6 +2943,21 @@ Buraya tıklayın: <a href="%1">%1</a>
|
|||
<extracomment>"invalid conference URI" : Error text about conference URI</extracomment>
|
||||
<translation>Geçersiz toplantı URI'si</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>videoConferenceURI</source>
|
||||
<extracomment>"Video Conference URI" : Label of a text edit for filling Video conference URI.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeServerUrl</source>
|
||||
<extracomment>'E2E encryption keys server URL' : Label of a text edit for filling the Lime server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>invalidLimeServerUrl</source>
|
||||
<extracomment>"invalid E2E encryption keys server URL" : Error text about E2E encryption keys server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsTunnel</name>
|
||||
|
|
|
|||
|
|
@ -2969,6 +2969,21 @@
|
|||
<extracomment>"invalid conference URI" : Error text about conference URI</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>videoConferenceURI</source>
|
||||
<extracomment>"Video Conference URI" : Label of a text edit for filling Video conference URI.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeServerUrl</source>
|
||||
<extracomment>'E2E encryption keys server URL' : Label of a text edit for filling the Lime server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>invalidLimeServerUrl</source>
|
||||
<extracomment>"invalid E2E encryption keys server URL" : Error text about E2E encryption keys server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsTunnel</name>
|
||||
|
|
|
|||
|
|
@ -2943,6 +2943,21 @@
|
|||
<extracomment>"invalid conference URI" : Error text about conference URI</extracomment>
|
||||
<translation>无效的会议URI</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>videoConferenceURI</source>
|
||||
<extracomment>"Video Conference URI" : Label of a text edit for filling Video conference URI.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>limeServerUrl</source>
|
||||
<extracomment>'E2E encryption keys server URL' : Label of a text edit for filling the Lime server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>invalidLimeServerUrl</source>
|
||||
<extracomment>"invalid E2E encryption keys server URL" : Error text about E2E encryption keys server URL.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsTunnel</name>
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ void CoreManager::createLinphoneCore (const QString &configPath) {
|
|||
nullptr
|
||||
);
|
||||
// Enable LIME on your core to use encryption.
|
||||
mCore->enableLimeX3Dh(mCore->getLimeX3DhServerUrl() != "");
|
||||
mCore->enableLimeX3Dh(mCore->limeX3DhAvailable());
|
||||
// Now see the CoreService.CreateGroupChatRoom to see how to create a secure chat room
|
||||
|
||||
mCore->addListener(mHandlers);
|
||||
|
|
@ -294,8 +294,9 @@ void CoreManager::handleChatRoomCreated(const QSharedPointer<ChatRoomModel> &cha
|
|||
|
||||
void CoreManager::migrate () {
|
||||
shared_ptr<linphone::Config> config = mCore->getConfig();
|
||||
auto oldLimeServerUrl = mCore->getLimeX3DhServerUrl();// core url is deprecated : If core url exists, it must be copied to all linphone accounts.
|
||||
int rcVersion = config->getInt(SettingsModel::UiSection, Constants::RcVersionName, 0);
|
||||
if (rcVersion == Constants::RcVersionCurrent)
|
||||
if (oldLimeServerUrl.empty() && rcVersion == Constants::RcVersionCurrent)
|
||||
return;
|
||||
if (rcVersion > Constants::RcVersionCurrent) {
|
||||
qWarning() << QStringLiteral("RC file version (%1) is more recent than app rc file version (%2)!!!")
|
||||
|
|
@ -306,7 +307,7 @@ void CoreManager::migrate () {
|
|||
qInfo() << QStringLiteral("Migrate from old rc file (%1 to %2).")
|
||||
.arg(rcVersion).arg(Constants::RcVersionCurrent);
|
||||
|
||||
bool setlimeServerUrl = false;
|
||||
bool setLimeServerUrl = false;
|
||||
for(const auto &account : getAccountList()){
|
||||
auto params = account->getParams();
|
||||
if( params->getDomain() == Constants::LinphoneDomain) {
|
||||
|
|
@ -319,7 +320,7 @@ void CoreManager::migrate () {
|
|||
}
|
||||
if( rcVersion < 2) {
|
||||
bool exists = newParams->getConferenceFactoryUri() != "";
|
||||
setlimeServerUrl = true;
|
||||
setLimeServerUrl = true;
|
||||
if(!exists )
|
||||
newParams->setConferenceFactoryUri(Constants::DefaultConferenceURI);
|
||||
qInfo() << "Migrating" << accountIdentity << "for version 2. Conference factory URI" << (exists ? std::string("unchanged") : std::string("= ") +Constants::DefaultConferenceURI).c_str();
|
||||
|
|
@ -335,17 +336,25 @@ void CoreManager::migrate () {
|
|||
}
|
||||
if( rcVersion < 5) {
|
||||
bool exists = !!newParams->getAudioVideoConferenceFactoryAddress();
|
||||
setlimeServerUrl = true;
|
||||
setLimeServerUrl = true;
|
||||
if( !exists)
|
||||
newParams->setAudioVideoConferenceFactoryAddress(Utils::interpretUrl(Constants::DefaultVideoConferenceURI));
|
||||
qInfo() << "Migrating" << accountIdentity << "for version 5. Video conference factory URI" << (exists ? std::string("unchanged") : std::string("= ") +Constants::DefaultVideoConferenceURI).c_str();
|
||||
// note: using std::string.c_str() to avoid having double quotes in qInfo()
|
||||
}
|
||||
|
||||
if(!oldLimeServerUrl.empty())
|
||||
newParams->setLimeServerUrl(oldLimeServerUrl);
|
||||
else if( setLimeServerUrl)
|
||||
newParams->setLimeServerUrl(Constants::DefaultLimeServerURL);
|
||||
|
||||
account->setParams(newParams);
|
||||
}
|
||||
}
|
||||
if(setlimeServerUrl) {
|
||||
mCore->setLimeX3DhServerUrl(Constants::DefaultLimeServerURL);
|
||||
if( !oldLimeServerUrl.empty()) {
|
||||
mCore->setLimeX3DhServerUrl("");
|
||||
mCore->enableLimeX3Dh(true);
|
||||
}else if(setLimeServerUrl) {
|
||||
mCore->enableLimeX3Dh(true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,8 +68,9 @@ AccountSettingsModel::AccountSettingsModel (QObject *parent) : QObject(parent) {
|
|||
QObject::connect(this, &AccountSettingsModel::accountSettingsUpdated, this, &AccountSettingsModel::sipAddressChanged);
|
||||
QObject::connect(this, &AccountSettingsModel::accountSettingsUpdated, this, &AccountSettingsModel::fullSipAddressChanged);
|
||||
QObject::connect(this, &AccountSettingsModel::accountSettingsUpdated, this, &AccountSettingsModel::registrationStateChanged);
|
||||
QObject::connect(this, &AccountSettingsModel::accountSettingsUpdated, this, &AccountSettingsModel::conferenceURIChanged);
|
||||
QObject::connect(this, &AccountSettingsModel::accountSettingsUpdated, this, &AccountSettingsModel::videoConferenceURIChanged);
|
||||
QObject::connect(this, &AccountSettingsModel::accountSettingsUpdated, this, &AccountSettingsModel::conferenceUriChanged);
|
||||
QObject::connect(this, &AccountSettingsModel::accountSettingsUpdated, this, &AccountSettingsModel::videoConferenceUriChanged);
|
||||
QObject::connect(this, &AccountSettingsModel::accountSettingsUpdated, this, &AccountSettingsModel::limeServerUrlChanged);
|
||||
QObject::connect(this, &AccountSettingsModel::accountSettingsUpdated, this, &AccountSettingsModel::primaryDisplayNameChanged);
|
||||
QObject::connect(this, &AccountSettingsModel::accountSettingsUpdated, this, &AccountSettingsModel::primaryUsernameChanged);
|
||||
QObject::connect(this, &AccountSettingsModel::accountSettingsUpdated, this, &AccountSettingsModel::primarySipAddressChanged);
|
||||
|
|
@ -160,6 +161,8 @@ QVariantMap AccountSettingsModel::getAccountDescription (const shared_ptr<linpho
|
|||
map["conferenceUri"] = Utils::coreStringToAppString(accountParams->getConferenceFactoryUri());
|
||||
auto address = accountParams->getAudioVideoConferenceFactoryAddress();
|
||||
map["videoConferenceUri"] = address ? Utils::coreStringToAppString(address->asString()) : "";
|
||||
map["limeServerUrl"] = Utils::coreStringToAppString(accountParams->getLimeServerUrl());
|
||||
map["videoConferenceUri"] = address ? Utils::coreStringToAppString(address->asString()) : "";
|
||||
map["contactParams"] = Utils::coreStringToAppString(accountParams->getContactParameters());
|
||||
map["avpfInterval"] = accountParams->getAvpfRrInterval();
|
||||
map["registerEnabled"] = accountParams->registerEnabled();
|
||||
|
|
@ -194,13 +197,13 @@ QVariantMap AccountSettingsModel::getAccountDescription (const shared_ptr<linpho
|
|||
return map;
|
||||
}
|
||||
|
||||
QString AccountSettingsModel::getConferenceURI() const{
|
||||
QString AccountSettingsModel::getConferenceUri() const{
|
||||
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
||||
shared_ptr<linphone::Account> account = core->getDefaultAccount();
|
||||
return account ? Utils::coreStringToAppString(account->getParams()->getConferenceFactoryUri()) : "";
|
||||
}
|
||||
|
||||
QString AccountSettingsModel::getVideoConferenceURI() const{
|
||||
QString AccountSettingsModel::getVideoConferenceUri() const{
|
||||
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
||||
shared_ptr<linphone::Account> account = core->getDefaultAccount();
|
||||
if(account) {
|
||||
|
|
@ -210,6 +213,11 @@ QString AccountSettingsModel::getVideoConferenceURI() const{
|
|||
return "";
|
||||
}
|
||||
|
||||
QString AccountSettingsModel::getLimeServerUrl() const{
|
||||
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
||||
shared_ptr<linphone::Account> account = core->getDefaultAccount();
|
||||
return account ? Utils::coreStringToAppString(account->getParams()->getLimeServerUrl()) : "";
|
||||
}
|
||||
|
||||
void AccountSettingsModel::setDefaultAccount (const shared_ptr<linphone::Account> &account) {
|
||||
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
||||
|
|
@ -320,6 +328,7 @@ bool AccountSettingsModel::addOrUpdateAccount(
|
|||
accountParams->setConferenceFactoryUri(Utils::appStringToCoreString(txt));
|
||||
txt = data["videoConferenceUri"].toString();
|
||||
accountParams->setAudioVideoConferenceFactoryAddress(Utils::interpretUrl(txt));
|
||||
accountParams->setLimeServerUrl(Utils::appStringToCoreString(data["limeServerUrl"].toString()));
|
||||
|
||||
if(data.contains("contactParams"))
|
||||
accountParams->setContactParameters(Utils::appStringToCoreString(data["contactParams"].toString()));
|
||||
|
|
|
|||
|
|
@ -39,8 +39,9 @@ class AccountSettingsModel : public QObject {
|
|||
Q_PROPERTY(QString fullSipAddress READ getUsedSipAddressAsString NOTIFY fullSipAddressChanged)
|
||||
Q_PROPERTY(RegistrationState registrationState READ getRegistrationState NOTIFY registrationStateChanged)
|
||||
|
||||
Q_PROPERTY(QString conferenceURI READ getConferenceURI NOTIFY conferenceURIChanged)
|
||||
Q_PROPERTY(QString videoConferenceURI READ getVideoConferenceURI NOTIFY videoConferenceURIChanged)
|
||||
Q_PROPERTY(QString conferenceUri READ getConferenceUri NOTIFY conferenceUriChanged)
|
||||
Q_PROPERTY(QString videoConferenceUri READ getVideoConferenceUri NOTIFY videoConferenceUriChanged)
|
||||
Q_PROPERTY(QString limeServerUrl READ getLimeServerUrl NOTIFY limeServerUrlChanged)
|
||||
|
||||
// Default info.
|
||||
Q_PROPERTY(QString primaryDisplayName READ getPrimaryDisplayName WRITE setPrimaryDisplayName NOTIFY primaryDisplayNameChanged)
|
||||
|
|
@ -70,8 +71,9 @@ public:
|
|||
bool addOrUpdateAccount (std::shared_ptr<linphone::Account> account, const std::shared_ptr<linphone::AccountParams>& accountParams);
|
||||
|
||||
Q_INVOKABLE QVariantMap getAccountDescription (const std::shared_ptr<linphone::Account> &account);
|
||||
QString getConferenceURI() const;
|
||||
QString getVideoConferenceURI() const;
|
||||
QString getConferenceUri() const;
|
||||
QString getVideoConferenceUri() const;
|
||||
QString getLimeServerUrl() const;
|
||||
|
||||
Q_INVOKABLE void setDefaultAccount (const std::shared_ptr<linphone::Account> &account = nullptr);
|
||||
Q_INVOKABLE void setDefaultAccountFromSipAddress (const QString &sipAddress);
|
||||
|
|
@ -96,8 +98,9 @@ signals:
|
|||
void sipAddressChanged();
|
||||
void fullSipAddressChanged();
|
||||
void registrationStateChanged();
|
||||
void conferenceURIChanged();
|
||||
void videoConferenceURIChanged();
|
||||
void conferenceUriChanged();
|
||||
void videoConferenceUriChanged();
|
||||
void limeServerUrlChanged();
|
||||
|
||||
void primaryDisplayNameChanged();
|
||||
void primaryUsernameChanged();
|
||||
|
|
|
|||
|
|
@ -823,7 +823,10 @@ void SettingsModel::setStandardChatEnabled (bool status) {
|
|||
|
||||
bool SettingsModel::getSecureChatEnabled () const {
|
||||
return !!mConfig->getInt(UiSection, getEntryFullName(UiSection, "secure_chat_enabled"), 1)
|
||||
&& !CoreManager::getInstance()->getCore()->getLimeX3DhServerUrl().empty() && getGroupChatEnabled();
|
||||
&& getLimeIsSupported()
|
||||
&& CoreManager::getInstance()->getCore()->getDefaultAccount() && !CoreManager::getInstance()->getCore()->getDefaultAccount()->getParams()->getLimeServerUrl().empty()
|
||||
//&& !CoreManager::getInstance()->getCore()->getLimeX3DhServerUrl().empty()
|
||||
&& getGroupChatEnabled();
|
||||
;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ SearchBox {
|
|||
}, {
|
||||
colorSet: SettingsModel.getShowStartChatButton() ? SipAddressesViewStyle.chat : SipAddressesViewStyle.history,
|
||||
secure: 1,
|
||||
visible: SettingsModel.secureChatEnabled && AccountSettingsModel.conferenceURI != '',
|
||||
visible: SettingsModel.secureChatEnabled && AccountSettingsModel.conferenceUri != '',
|
||||
handler: function (entry) {
|
||||
searchBox.closeMenu()
|
||||
searchBox.launchSecureChat(entry.sipAddress)
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ DialogPlus {
|
|||
onClicked: exit(0)
|
||||
},
|
||||
TextButtonB {
|
||||
enabled: conferenceManager.creationState != 1 && selectedParticipants.count >= conferenceManager.minParticipants && subject.text != '' && AccountSettingsModel.conferenceURI != ''
|
||||
enabled: conferenceManager.creationState != 1 && selectedParticipants.count >= conferenceManager.minParticipants && subject.text != '' && AccountSettingsModel.conferenceUri != ''
|
||||
//: 'Launch' : Launch button
|
||||
text: conferenceManager.isNew ? qsTr('launchButton')
|
||||
//: 'Update' : Update button
|
||||
|
|
@ -142,7 +142,7 @@ DialogPlus {
|
|||
conferenceInfoModel.createConference(false && secureSwitch.checked) // TODO remove false when Encryption is ready to use
|
||||
}
|
||||
TooltipArea{
|
||||
visible: AccountSettingsModel.conferenceURI == '' || subject.text == '' || selectedParticipants.count < conferenceManager.minParticipants
|
||||
visible: AccountSettingsModel.conferenceUri == '' || subject.text == '' || selectedParticipants.count < conferenceManager.minParticipants
|
||||
maxWidth: participantView.width
|
||||
delay:0
|
||||
text: {
|
||||
|
|
@ -153,7 +153,7 @@ DialogPlus {
|
|||
if( selectedParticipants.count < conferenceManager.minParticipants)
|
||||
//: 'You need at least %1 participant.' : Tooltip to warn a user that there are not enough participants for the conference creation.
|
||||
txt += '- ' + qsTr('missingParticipants', '', conferenceManager.minParticipants).arg(conferenceManager.minParticipants) + '\n'
|
||||
if( AccountSettingsModel.conferenceURI == '')
|
||||
if( AccountSettingsModel.conferenceUri == '')
|
||||
//: 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missing in its configuration.
|
||||
txt += '- ' + qsTr('missingConferenceURI') + '\n'
|
||||
return txt;
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ ColumnLayout {
|
|||
backgroundRadius: 90
|
||||
colorSet: SettingsModel.getShowStartChatButton() ? ContactEditStyle.chat : ContactEditStyle.history
|
||||
visible: SettingsModel.secureChatEnabled
|
||||
enabled: AccountSettingsModel.conferenceURI != ''
|
||||
enabled: AccountSettingsModel.conferenceUri != ''
|
||||
Icon{
|
||||
icon:'secure_level_1'
|
||||
iconSize:parent.height/2
|
||||
|
|
@ -199,7 +199,7 @@ ColumnLayout {
|
|||
onClicked: {sipAddressesMenu.open(sipAddressesMenu.createSecureChatRoom)}
|
||||
|
||||
tooltipMaxWidth: actionBar.width
|
||||
tooltipVisible: AccountSettingsModel.conferenceURI == ''
|
||||
tooltipVisible: AccountSettingsModel.conferenceUri == ''
|
||||
//: 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missing in its configuration.
|
||||
tooltipText: '- ' + qsTr('missingConferenceURI') + '\n'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ ColumnLayout {
|
|||
backgroundRadius: 90
|
||||
colorSet: SettingsModel.getShowStartChatButton() ? ContactsStyle.chat : ContactsStyle.history
|
||||
visible: SettingsModel.secureChatEnabled
|
||||
enabled: AccountSettingsModel.conferenceURI != ''
|
||||
enabled: AccountSettingsModel.conferenceUri != ''
|
||||
Icon{
|
||||
icon:'secure_level_1'
|
||||
iconSize:parent.height/2
|
||||
|
|
@ -175,7 +175,7 @@ ColumnLayout {
|
|||
}
|
||||
onClicked: {actions.itemAt(3).open()}
|
||||
tooltipMaxWidth: actionBar.width
|
||||
tooltipVisible: AccountSettingsModel.conferenceURI == ''
|
||||
tooltipVisible: AccountSettingsModel.conferenceUri == ''
|
||||
//: 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missing in its configuration.
|
||||
tooltipText: '- ' + qsTr('missingConferenceURI') + '\n'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ DialogPlus {
|
|||
onClicked: exit(0)
|
||||
},
|
||||
TextButtonB {
|
||||
enabled: selectedParticipants.count >= conferenceManager.minParticipants && subject.text != '' && AccountSettingsModel.conferenceURI != ''
|
||||
enabled: selectedParticipants.count >= conferenceManager.minParticipants && subject.text != '' && AccountSettingsModel.conferenceUri != ''
|
||||
//: 'Launch' : Start button
|
||||
text: qsTr('startButton')
|
||||
capitalization: Font.AllUppercase
|
||||
|
|
@ -38,7 +38,7 @@ DialogPlus {
|
|||
exit(1)
|
||||
}
|
||||
TooltipArea{
|
||||
visible: AccountSettingsModel.conferenceURI == '' || subject.text == '' || selectedParticipants.count < conferenceManager.minParticipants
|
||||
visible: AccountSettingsModel.conferenceUri == '' || subject.text == '' || selectedParticipants.count < conferenceManager.minParticipants
|
||||
maxWidth: participantView.width
|
||||
delay:0
|
||||
text: {
|
||||
|
|
@ -49,7 +49,7 @@ DialogPlus {
|
|||
if( selectedParticipants.count < conferenceManager.minParticipants)
|
||||
//: 'You need at least %1 participant.' : Tooltip to warn a user that there are not enough participants for the chat creation.
|
||||
txt += '- ' + qsTr('missingParticipants', '', conferenceManager.minParticipants).arg(conferenceManager.minParticipants) + '\n'
|
||||
if( AccountSettingsModel.conferenceURI == '')
|
||||
if( AccountSettingsModel.conferenceUri == '')
|
||||
//: 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missong in its configuration.
|
||||
txt += '- ' + qsTr('missingConferenceURI') + '\n'
|
||||
return txt;
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ function initForm (account) {
|
|||
route.text = config.route
|
||||
conferenceUri.text = config.conferenceUri
|
||||
videoConferenceUri.text = config.videoConferenceUri
|
||||
limeServerUrl.text = config.limeServerUrl
|
||||
contactParams.text = config.contactParams
|
||||
avpfInterval.text = config.avpfInterval
|
||||
registerEnabled.checked = config.registerEnabled
|
||||
|
|
@ -72,7 +73,7 @@ function initForm (account) {
|
|||
}
|
||||
|
||||
function formIsValid () {
|
||||
return dialog._sipAddressOk && dialog._serverAddressOk && dialog._routeOk && dialog._conferenceUriOk && dialog._videoConferenceUriOk
|
||||
return dialog._sipAddressOk && dialog._serverAddressOk && dialog._routeOk && dialog._conferenceUriOk && dialog._videoConferenceUriOk && dialog._limeServerUrlOk
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
@ -86,6 +87,7 @@ function validAccount (account) {
|
|||
route: route.text,
|
||||
conferenceUri: conferenceUri.text,
|
||||
videoConferenceUri: videoConferenceUri.text,
|
||||
limeServerUrl: limeServerUrl.text,
|
||||
contactParams: contactParams.text,
|
||||
avpfInterval: avpfInterval.text,
|
||||
registerEnabled: registerEnabled.checked,
|
||||
|
|
@ -119,6 +121,10 @@ function handleVideoConferenceUriChanged (uri) {
|
|||
dialog._videoConferenceUriOk = uri=='' || Linphone.SipAddressesModel.addressIsValid(uri)
|
||||
}
|
||||
|
||||
function handleLimeServerUrlChanged (uri) {
|
||||
dialog._limeServerUrlOk = uri=='' || Linphone.SipAddressesModel.addressIsValid(uri)
|
||||
}
|
||||
|
||||
function handleServerAddressChanged (address) {
|
||||
if (address.length === 0) {
|
||||
dialog._serverAddressOk = false
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ DialogPlus {
|
|||
property bool _routeOk: true
|
||||
property bool _conferenceUriOk: true
|
||||
property bool _videoConferenceUriOk: true
|
||||
property bool _limeServerUrlOk: true
|
||||
|
||||
flat: true
|
||||
showMargins: true
|
||||
|
|
@ -151,8 +152,8 @@ DialogPlus {
|
|||
}
|
||||
FormLine {
|
||||
FormGroup {
|
||||
|
||||
label: 'Video Conference URI'
|
||||
//: "Video Conference URI" : Label of a text edit for filling Video conference URI.
|
||||
label: qsTr('videoConferenceURI')
|
||||
|
||||
TextField {
|
||||
id: videoConferenceUri
|
||||
|
|
@ -165,6 +166,22 @@ DialogPlus {
|
|||
}
|
||||
}
|
||||
}
|
||||
FormLine {
|
||||
FormGroup {
|
||||
//: 'E2E encryption keys server URL' : Label of a text edit for filling the Lime server URL.
|
||||
label: qsTr('limeServerUrl')
|
||||
|
||||
TextField {
|
||||
id: limeServerUrl
|
||||
//: "invalid E2E encryption keys server URL" : Error text about E2E encryption keys server URL.
|
||||
error: dialog._limeServerUrlOk ? '' : qsTr("invalidLimeServerUrl")
|
||||
|
||||
onTextChanged: Logic.handleLimeServerUrlChanged(text)
|
||||
Keys.onEnterPressed: nextItemInFocusChain().forceActiveFocus()
|
||||
Keys.onReturnPressed: nextItemInFocusChain().forceActiveFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FormLine {
|
||||
FormGroup {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue