Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package linphoneqt for openSUSE:Factory checked in at 2024-11-12 19:21:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/linphoneqt (Old) and /work/SRC/openSUSE:Factory/.linphoneqt.new.2017 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "linphoneqt" Tue Nov 12 19:21:22 2024 rev:16 rq:1223427 version:5.2.6 Changes: -------- --- /work/SRC/openSUSE:Factory/linphoneqt/linphoneqt.changes 2024-05-20 18:17:01.794134375 +0200 +++ /work/SRC/openSUSE:Factory/.linphoneqt.new.2017/linphoneqt.changes 2024-11-12 19:22:09.997341824 +0100 @@ -1,0 +2,12 @@ +Mon Nov 11 09:21:19 UTC 2024 - ecsos <ec...@opensuse.org> + +- Update to version 5.2.6. + ### Fixed + - Crash on Windows when using non-UTF8 characters in system username. + - Update SDK to 5.3.72 +- Update to version 5.2.5. + ### Fixed + - Case sensitive issue with sip attributes on LDAP search. + - Update SDK to 5.3.68 + +------------------------------------------------------------------- Old: ---- linphone-desktop-5.2.4.tar.bz2 New: ---- linphone-desktop-5.2.6.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ linphoneqt.spec ++++++ --- /var/tmp/diff_new_pack.TWeitH/_old 2024-11-12 19:22:10.553365091 +0100 +++ /var/tmp/diff_new_pack.TWeitH/_new 2024-11-12 19:22:10.553365091 +0100 @@ -20,7 +20,7 @@ %define _name linphone Name: linphoneqt -Version: 5.2.4 +Version: 5.2.6 Release: 0 Summary: Qt interface for Linphone License: GPL-3.0-or-later ++++++ linphone-desktop-5.2.4.tar.bz2 -> linphone-desktop-5.2.6.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linphone-desktop-5.2.4/.gitmodules new/linphone-desktop-5.2.6/.gitmodules --- old/linphone-desktop-5.2.4/.gitmodules 2024-04-11 14:10:51.000000000 +0200 +++ new/linphone-desktop-5.2.6/.gitmodules 2024-07-22 11:08:44.000000000 +0200 @@ -1,9 +1,6 @@ [submodule "linphone-sdk"] path = linphone-sdk url = https://gitlab.linphone.org/BC/public/linphone-sdk.git -[submodule "plugins/contacts/contacts-api"] - path = plugins/contacts/contacts-api - url = https://gitlab.linphone.org/BC/public/linphone-desktop-plugins/contacts/contacts-api.git [submodule "external/qtkeychain"] path = external/qtkeychain url = https://gitlab.linphone.org/BC/public/external/qtkeychain.git diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linphone-desktop-5.2.4/CHANGELOG.md new/linphone-desktop-5.2.6/CHANGELOG.md --- old/linphone-desktop-5.2.4/CHANGELOG.md 2024-04-11 14:10:51.000000000 +0200 +++ new/linphone-desktop-5.2.6/CHANGELOG.md 2024-07-22 11:08:44.000000000 +0200 @@ -8,6 +8,18 @@ ### Added - Screen Sharing +## 5.2.6 - 2024-07-22 + +### Fixed +- Crash on Windows when using non-UTF8 characters in system username. +- Update SDK to 5.3.72 + +## 5.2.5 - 2024-07-10 + +### Fixed +- Case sensitive issue with sip attributes on LDAP search. +- Update SDK to 5.3.68 + ## 5.2.4 - 2024-04-11 ### Fixed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linphone-desktop-5.2.4/linphone-app/src/app/App.cpp new/linphone-desktop-5.2.6/linphone-app/src/app/App.cpp --- old/linphone-desktop-5.2.4/linphone-app/src/app/App.cpp 2024-04-11 14:10:51.000000000 +0200 +++ new/linphone-desktop-5.2.6/linphone-app/src/app/App.cpp 2024-07-22 11:08:44.000000000 +0200 @@ -79,7 +79,7 @@ const QString OsascriptExecutable(QStringLiteral("osascript")); #else const QString - AutoStartSettingsFilePath(QStringLiteral("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run")); + AutoStartSettingsFilePath(QStringLiteral("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run")); #endif // ifdef Q_OS_LINUX } // namespace @@ -107,7 +107,7 @@ // check if the Exec part of the autostart ini file not corresponding to our executable (old desktop entry with // wrong version in filename) if (autoStartConf.indexOf(QString("Exec=" + exec + " ")) < - 0) { // On autostart, there is the option --iconified so there is one space. + 0) { // On autostart, there is the option --iconified so there is one space. // replace file setAutoStart(true); } @@ -140,11 +140,11 @@ QProcess process; process.start(OsascriptExecutable, - {"-e", "tell application \"System Events\" to get the name of every login item"}); + {"-e", "tell application \"System Events\" to get the name of every login item"}); if (!process.waitForFinished()) { qWarning() << QStringLiteral("Unable to execute properly: `%1` (%2).") - .arg(OsascriptExecutable) - .arg(process.errorString()); + .arg(OsascriptExecutable) + .arg(process.errorString()); return false; } @@ -187,7 +187,7 @@ string configPath; if (!QUrl(filePath).isRelative()) { configPath = Utils::appStringToCoreString(FileDownloader::synchronousDownload( - filePath, Utils::coreStringToAppString(Paths::getConfigDirPath(false)), true)); + filePath, Utils::coreStringToAppString(Paths::getConfigDirPath(false)), true)); } if (configPath == "") configPath = Paths::getConfigFilePath(filePath, false); if (configPath == "") configPath = Paths::getConfigFilePath("", false); @@ -218,7 +218,7 @@ createParser(); } else if (!filePath.isEmpty()) mParser->process( - cleanParserKeys(mParser, QStringList("fetch-config"))); // Remove this parameter from the parser + cleanParserKeys(mParser, QStringList("fetch-config"))); // Remove this parameter from the parser return filePath; } @@ -231,10 +231,10 @@ } else { QObject *context = new QObject(); connect(CoreManager::getInstance(), &CoreManager::coreManagerInitialized, context, - [context, filePath, this]() { - useFetchConfig(filePath); - context->deleteLater(); - }); + [context, filePath, this]() { + useFetchConfig(filePath); + context->deleteLater(); + }); } } return false; @@ -264,13 +264,13 @@ // ----------------------------------------------------------------------------- App::App(int &argc, char *argv[]) - : SingleApplication(argc, argv, true, Mode::User | Mode::ExcludeAppPath | Mode::ExcludeAppVersion) { + : SingleApplication(argc, argv, true, Mode::User | Mode::ExcludeAppPath | Mode::ExcludeAppVersion) { // Ignore vertical sync. This way, we avoid blinking on resizes(and other refresh steps like layouts etc.). auto ignoreVSync = QSurfaceFormat::defaultFormat(); ignoreVSync.setSwapInterval(0); QSurfaceFormat::setDefaultFormat(ignoreVSync); connect(this, SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, - SLOT(stateChanged(Qt::ApplicationState))); + SLOT(stateChanged(Qt::ApplicationState))); setWindowIcon(QIcon(Constants::WindowIconPath)); #ifdef Q_OS_WIN @@ -303,13 +303,14 @@ // Use UTF-8 for internals. Linphone uses UTF-8 so there will be no loss on // data with less precise encodings. Qt will do the rest. - bctbx_set_default_encoding(Constants::LinphoneLocaleEncoding); + // bctbx_set_default_encoding(Constants::LinphoneLocaleEncoding); + setlocale(LC_CTYPE, ".UTF8"); createParser(); mParser->parse(this->arguments()); // Get configuration for translators shared_ptr<linphone::Config> config = - Utils::getConfigIfExists(QString::fromStdString(getConfigPathIfExists(*mParser))); + Utils::getConfigIfExists(QString::fromStdString(getConfigPathIfExists(*mParser))); // Init locale. mTranslator = new DefaultTranslator(this); @@ -341,18 +342,18 @@ mAutoStart = autoStartEnabled(); qInfo() << QStringLiteral("Starting application " APPLICATION_NAME " (bin: " EXECUTABLE_NAME - "). Version:%1 Os:%2 Qt:%3") - .arg(applicationVersion()) - .arg(Utils::getOsProduct()) - .arg(qVersion()); + "). Version:%1 Os:%2 Qt:%3") + .arg(applicationVersion()) + .arg(Utils::getOsProduct()) + .arg(qVersion()); qInfo() << QStringLiteral("Use locale: %1 with language: %2") - .arg(mLocale.name()) - .arg(QLocale::languageToString(mLocale.language())); + .arg(mLocale.name()) + .arg(QLocale::languageToString(mLocale.language())); qInfo() << QStringLiteral("System timezone: code=%1 / country=%2 / Offset=%3 / ID=%4") - .arg(QTimeZone::systemTimeZone().country()) - .arg(Utils::getCountryName(QTimeZone::systemTimeZone().country())) - .arg(QTimeZone::systemTimeZone().standardTimeOffset(QDateTime::currentDateTime())) - .arg(QString(QTimeZone::systemTimeZoneId())); + .arg(QTimeZone::systemTimeZone().country()) + .arg(Utils::getCountryName(QTimeZone::systemTimeZone().country())) + .arg(QTimeZone::systemTimeZone().standardTimeOffset(QDateTime::currentDateTime())) + .arg(QString(QTimeZone::systemTimeZoneId())); // Deal with received messages and CLI. QObject::connect(this, &App::receivedMessage, this, [](int, const QByteArray &byteArray) { @@ -566,11 +567,11 @@ if (mEngine->rootObjects().isEmpty()) qFatal("Unable to open main window."); QObject::connect(CoreManager::getInstance(), &CoreManager::coreManagerInitialized, CoreManager::getInstance(), - [this, mustBeIconified]() mutable { - if (CoreManager::getInstance()->started()) { - openAppAfterInit(mustBeIconified); - } - }); + [this, mustBeIconified]() mutable { + if (CoreManager::getInstance()->started()) { + openAppAfterInit(mustBeIconified); + } + }); } // ----------------------------------------------------------------------------- @@ -650,20 +651,20 @@ mParser = new QCommandLineParser(); mParser->setApplicationDescription(tr("applicationDescription")); mParser->addPositionalArgument("command", tr("commandLineDescription").replace("%1", APPLICATION_NAME), - "[command]"); + "[command]"); mParser->addOptions({ - {{"h", "help"}, tr("commandLineOptionHelp")}, - {"cli-help", tr("commandLineOptionCliHelp").replace("%1", APPLICATION_NAME)}, - {{"v", "version"}, tr("commandLineOptionVersion")}, - {"config", tr("commandLineOptionConfig").replace("%1", EXECUTABLE_NAME), tr("commandLineOptionConfigArg")}, - {"fetch-config", tr("commandLineOptionFetchConfig").replace("%1", EXECUTABLE_NAME), - tr("commandLineOptionFetchConfigArg")}, - {{"c", "call"}, tr("commandLineOptionCall").replace("%1", EXECUTABLE_NAME), tr("commandLineOptionCallArg")}, + {{"h", "help"}, tr("commandLineOptionHelp")}, + {"cli-help", tr("commandLineOptionCliHelp").replace("%1", APPLICATION_NAME)}, + {{"v", "version"}, tr("commandLineOptionVersion")}, + {"config", tr("commandLineOptionConfig").replace("%1", EXECUTABLE_NAME), tr("commandLineOptionConfigArg")}, + {"fetch-config", tr("commandLineOptionFetchConfig").replace("%1", EXECUTABLE_NAME), + tr("commandLineOptionFetchConfigArg")}, + {{"c", "call"}, tr("commandLineOptionCall").replace("%1", EXECUTABLE_NAME), tr("commandLineOptionCallArg")}, #ifndef Q_OS_MACOS - {"iconified", tr("commandLineOptionIconified")}, + {"iconified", tr("commandLineOptionIconified")}, #endif // ifndef Q_OS_MACOS - {{"V", "verbose"}, tr("commandLineOptionVerbose")}, - {"qt-logs-only", tr("commandLineOptionQtLogsOnly")}, + {{"V", "verbose"}, tr("commandLineOptionVerbose")}, + {"qt-logs-only", tr("commandLineOptionQtLogsOnly")}, }); } @@ -713,7 +714,7 @@ template <typename T> static inline void registerSingletonType(const char *name) { qmlRegisterSingletonType<T>(Constants::MainQmlUri, 1, 0, name, - [](QQmlEngine *engine, QJSEngine *) -> QObject * { return new T(engine); }); + [](QQmlEngine *engine, QJSEngine *) -> QObject * { return new T(engine); }); } template <typename T> @@ -724,7 +725,7 @@ template <typename T> static inline void registerToolType(const char *name, const int &major_version = 1, const int &minor_version = 0) { qmlRegisterSingletonType<T>(name, major_version, minor_version, name, - [](QQmlEngine *engine, QJSEngine *) -> QObject * { return new T(engine); }); + [](QQmlEngine *engine, QJSEngine *) -> QObject * { return new T(engine); }); } template <typename T, typename Owner, T *(Owner::*function)() const> @@ -835,7 +836,7 @@ registerUncreatableType<ParticipantImdnStateListModel>("ParticipantImdnStateListModel"); qmlRegisterUncreatableMetaObject(LinphoneEnums::staticMetaObject, "LinphoneEnums", 1, 0, "LinphoneEnums", - "Only enums"); + "Only enums"); } void App::registerSharedTypes() { @@ -850,7 +851,7 @@ registerSharedSingletonType<CallsListModel, &CoreManager::getCallsListModel>("CallsListModel"); registerSharedSingletonType<ContactsListModel, &CoreManager::getContactsListModel>("ContactsListModel"); registerSharedSingletonType<ContactsImporterListModel, &CoreManager::getContactsImporterListModel>( - "ContactsImporterListModel"); + "ContactsImporterListModel"); registerSharedSingletonType<LdapListModel, &CoreManager::getLdapListModel>("LdapListModel"); registerSharedSingletonType<TimelineListModel, &CoreManager::getTimelineListModel>("TimelineListModel"); registerSharedSingletonType<RecorderManager, &CoreManager::getRecorderManager>("RecorderManager"); @@ -887,10 +888,10 @@ void App::setTrayIcon() { QQuickWindow *root = getMainWindow(); QSystemTrayIcon *systemTrayIcon = - (mSystemTrayIcon - ? mSystemTrayIcon - : new QSystemTrayIcon( - nullptr)); // Workaround : QSystemTrayIcon cannot be deleted because of setContextMenu (indirectly) + (mSystemTrayIcon + ? mSystemTrayIcon + : new QSystemTrayIcon( + nullptr)); // Workaround : QSystemTrayIcon cannot be deleted because of setContextMenu (indirectly) // trayIcon: Right click actions. QAction *settingsAction = new QAction(tr("settings"), root); @@ -906,8 +907,8 @@ root->connect(aboutAction, &QAction::triggered, root, [root] { App::smartShowWindow(root); QMetaObject::invokeMethod(root, Constants::AttachVirtualWindowMethodName, Qt::DirectConnection, - Q_ARG(QVariant, QUrl(Constants::AboutPath)), Q_ARG(QVariant, QVariant()), - Q_ARG(QVariant, QVariant())); + Q_ARG(QVariant, QUrl(Constants::AboutPath)), Q_ARG(QVariant, QVariant()), + Q_ARG(QVariant, QVariant())); }); QAction *restoreAction = new QAction(tr("restore"), root); @@ -918,7 +919,7 @@ // trayIcon: Left click actions. static QMenu *menu = - new QMenu(); // Static : Workaround about a bug with setContextMenu where it cannot be called more than once. + new QMenu(); // Static : Workaround about a bug with setContextMenu where it cannot be called more than once. root->connect(systemTrayIcon, &QSystemTrayIcon::activated, [root](QSystemTrayIcon::ActivationReason reason) { if (reason == QSystemTrayIcon::Trigger) { if (root->visibility() == QWindow::Hidden) smartShowWindow(root); @@ -936,7 +937,7 @@ menu->addAction(quitAction); if (!mSystemTrayIcon) systemTrayIcon->setContextMenu(menu); // This is a Qt bug. We cannot call setContextMenu more than once. So we - // have to keep an instance of the menu. + // have to keep an instance of the menu. systemTrayIcon->setIcon(QIcon(Constants::WindowIconPath)); systemTrayIcon->setToolTip(APPLICATION_NAME); systemTrayIcon->show(); @@ -976,8 +977,8 @@ // QLocale sysLocale = QLocale(qtLocale.join('_')); // #else QLocale sysLocale(QLocale::system().name()); // Use Locale from name because Qt has a bug where it didn't use the - // QLocale::language (aka : translator.language != locale.language) on - // Mac. #endif + // QLocale::language (aka : translator.language != locale.language) on + // Mac. #endif if (installLocale(*this, *mTranslator, sysLocale)) { mLocale = sysLocale; return; @@ -986,12 +987,12 @@ QString App::getConfigLocale() const { return Utils::coreStringToAppString( - CoreManager::getInstance()->getCore()->getConfig()->getString(SettingsModel::UiSection, "locale", "")); + CoreManager::getInstance()->getCore()->getConfig()->getString(SettingsModel::UiSection, "locale", "")); } void App::setConfigLocale(const QString &locale) { CoreManager::getInstance()->getCore()->getConfig()->setString(SettingsModel::UiSection, "locale", - Utils::appStringToCoreString(locale)); + Utils::appStringToCoreString(locale)); emit configLocaleChanged(locale); } @@ -1091,20 +1092,20 @@ } QTextStream(&file) - << QString("[Desktop Entry]\n" - "Name=" APPLICATION_NAME "\n" - "GenericName=SIP Phone\n" - "Comment=" APPLICATION_DESCRIPTION "\n" - "Type=Application\n") - << (openInBackground ? "Exec=" + exec + " --iconified %u\n" : "Exec=" + exec + " %u\n") - << (haveIcon ? "Icon=" + iconPath + "\n" : "Icon=" EXECUTABLE_NAME "\n") - << "Terminal=false\n" - "Categories=Network;Telephony;\n" - "MimeType=x-scheme-handler/sip-" EXECUTABLE_NAME - ";x-scheme-handler/sip;x-scheme-handler/sips-" EXECUTABLE_NAME - ";x-scheme-handler/sips;x-scheme-handler/tel;x-scheme-handler/callto;x-scheme-handler/" EXECUTABLE_NAME - "-config;\n" - "X-PulseAudio-Properties=media.role=phone\n"; + << QString("[Desktop Entry]\n" + "Name=" APPLICATION_NAME "\n" + "GenericName=SIP Phone\n" + "Comment=" APPLICATION_DESCRIPTION "\n" + "Type=Application\n") + << (openInBackground ? "Exec=" + exec + " --iconified %u\n" : "Exec=" + exec + " %u\n") + << (haveIcon ? "Icon=" + iconPath + "\n" : "Icon=" EXECUTABLE_NAME "\n") + << "Terminal=false\n" + "Categories=Network;Telephony;\n" + "MimeType=x-scheme-handler/sip-" EXECUTABLE_NAME + ";x-scheme-handler/sip;x-scheme-handler/sips-" EXECUTABLE_NAME + ";x-scheme-handler/sips;x-scheme-handler/tel;x-scheme-handler/callto;x-scheme-handler/" EXECUTABLE_NAME + "-config;\n" + "X-PulseAudio-Properties=media.role=phone\n"; return true; } @@ -1121,12 +1122,12 @@ if (enabled) QProcess::execute(OsascriptExecutable, - {"-e", "tell application \"System Events\" to make login item at end with properties" - "{ path: \"" + - getMacOsBundlePath() + "\", hidden: false }"}); + {"-e", "tell application \"System Events\" to make login item at end with properties" + "{ path: \"" + + getMacOsBundlePath() + "\", hidden: false }"}); else QProcess::execute(OsascriptExecutable, {"-e", "tell application \"System Events\" to delete login item \"" + - getMacOsBundleName() + "\""}); + getMacOsBundleName() + "\""}); mAutoStart = enabled; emit autoStartChanged(enabled); @@ -1175,7 +1176,7 @@ // Display Assistant if it does not exist proxy config. if (coreManager->getAccountList().empty()) QMetaObject::invokeMethod(mainWindow, "setView", Q_ARG(QVariant, Constants::AssistantViewName), - Q_ARG(QVariant, QString("")), Q_ARG(QVariant, QString(""))); + Q_ARG(QVariant, QString("")), Q_ARG(QVariant, QString(""))); #ifdef ENABLE_UPDATE_CHECK QTimer *timer = new QTimer(mEngine); @@ -1188,9 +1189,9 @@ #endif // ifdef ENABLE_UPDATE_CHECK QString fetchFilePath = getFetchConfig(mParser); mustBeIconified = - mustBeIconified && - (fetchFilePath.isEmpty() || - CoreManager::getInstance()->getSettingsModel()->getAutoApplyProvisioningConfigUriHandlerEnabled()); + mustBeIconified && + (fetchFilePath.isEmpty() || + CoreManager::getInstance()->getSettingsModel()->getAutoApplyProvisioningConfigUriHandlerEnabled()); bool showWindow = true; if (fetchFilePath.isEmpty()) { QString lastRunningVersion = CoreManager::getInstance()->getSettingsModel()->getLastRunningVersionOfApp(); @@ -1207,13 +1208,13 @@ } else { QObject *context = new QObject(); QObject::connect(CoreManager::getInstance(), &CoreManager::coreManagerInitialized, context, - [sipAddress, coreManager, context]() mutable { - if (context) { - delete context; - context = nullptr; - coreManager->getCallsListModel()->launchAudioCall(sipAddress); - } - }); + [sipAddress, coreManager, context]() mutable { + if (context) { + delete context; + context = nullptr; + coreManager->getCallsListModel()->launchAudioCall(sipAddress); + } + }); } } else { // Execute command argument if needed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linphone-desktop-5.2.4/linphone-app/src/components/chat-events/ChatMessageModel.cpp new/linphone-desktop-5.2.6/linphone-app/src/components/chat-events/ChatMessageModel.cpp --- old/linphone-desktop-5.2.4/linphone-app/src/components/chat-events/ChatMessageModel.cpp 2024-04-11 14:10:51.000000000 +0200 +++ new/linphone-desktop-5.2.6/linphone-app/src/components/chat-events/ChatMessageModel.cpp 2024-07-22 11:08:44.000000000 +0200 @@ -19,94 +19,98 @@ */ #include "ChatMessageModel.hpp" - #include <QQmlApplicationEngine> -#include <algorithm> #include <QDateTime> #include <QDesktopServices> #include <QElapsedTimer> #include <QFileInfo> +#include <QImageReader> +#include <QMessageBox> #include <QMimeDatabase> #include <QTimer> -#include <QUuid> -#include <QMessageBox> #include <QUrlQuery> -#include <QImageReader> +#include <QUuid> +#include <algorithm> #include "ChatMessageListener.hpp" #include "app/App.hpp" #include "app/paths/Paths.hpp" -#include "components/chat-reaction/ChatReactionModel.hpp" +#include "app/providers/ThumbnailProvider.hpp" #include "components/chat-reaction/ChatReactionListModel.hpp" +#include "components/chat-reaction/ChatReactionModel.hpp" #include "components/contact/ContactModel.hpp" #include "components/contacts/ContactsListModel.hpp" #include "components/content/ContentListModel.hpp" #include "components/content/ContentModel.hpp" #include "components/content/ContentProxyModel.hpp" #include "components/core/CoreManager.hpp" -#include "app/providers/ThumbnailProvider.hpp" #include "components/notifier/Notifier.hpp" #include "components/participant-imdn/ParticipantImdnStateListModel.hpp" #include "components/participant-imdn/ParticipantImdnStateProxyModel.hpp" #include "components/settings/AccountSettingsModel.hpp" #include "components/settings/SettingsModel.hpp" +#include "utils/Constants.hpp" #include "utils/QExifImageHeader.hpp" #include "utils/Utils.hpp" -#include "utils/Constants.hpp" - -void ChatMessageModel::connectTo(ChatMessageListener * listener){ +void ChatMessageModel::connectTo(ChatMessageListener *listener) { connect(listener, &ChatMessageListener::fileTransferRecv, this, &ChatMessageModel::onFileTransferRecv); connect(listener, &ChatMessageListener::fileTransferSendChunk, this, &ChatMessageModel::onFileTransferSendChunk); connect(listener, &ChatMessageListener::fileTransferSend, this, &ChatMessageModel::onFileTransferSend); - connect(listener, &ChatMessageListener::fileTransferProgressIndication, this, &ChatMessageModel::onFileTransferProgressIndication); + connect(listener, &ChatMessageListener::fileTransferProgressIndication, this, + &ChatMessageModel::onFileTransferProgressIndication); connect(listener, &ChatMessageListener::msgStateChanged, this, &ChatMessageModel::onMsgStateChanged); connect(listener, &ChatMessageListener::newMessageReaction, this, &ChatMessageModel::onNewMessageReaction); - connect(listener, &ChatMessageListener::participantImdnStateChanged, this, &ChatMessageModel::onParticipantImdnStateChanged); - connect(listener, &ChatMessageListener::ephemeralMessageTimerStarted, this, &ChatMessageModel::onEphemeralMessageTimerStarted); - connect(listener, &ChatMessageListener::ephemeralMessageDeleted, this, &ChatMessageModel::onEphemeralMessageDeleted); - connect(listener, &ChatMessageListener::participantImdnStateChanged, this->getParticipantImdnStates().get(), &ParticipantImdnStateListModel::onParticipantImdnStateChanged); + connect(listener, &ChatMessageListener::participantImdnStateChanged, this, + &ChatMessageModel::onParticipantImdnStateChanged); + connect(listener, &ChatMessageListener::ephemeralMessageTimerStarted, this, + &ChatMessageModel::onEphemeralMessageTimerStarted); + connect(listener, &ChatMessageListener::ephemeralMessageDeleted, this, + &ChatMessageModel::onEphemeralMessageDeleted); + connect(listener, &ChatMessageListener::participantImdnStateChanged, this->getParticipantImdnStates().get(), + &ParticipantImdnStateListModel::onParticipantImdnStateChanged); connect(listener, &ChatMessageListener::reactionRemoved, this, &ChatMessageModel::onReactionRemoved); } // ============================================================================= -ChatMessageModel::ChatMessageModel (const std::shared_ptr<linphone::ChatMessage>& chatMessage, const std::shared_ptr<const linphone::EventLog>& chatMessageLog, QObject * parent) : ChatEvent(ChatRoomModel::EntryType::MessageEntry, parent) { - App::getInstance()->getEngine()->setObjectOwnership(this, QQmlEngine::CppOwnership);// Avoid QML to destroy it +ChatMessageModel::ChatMessageModel(const std::shared_ptr<linphone::ChatMessage> &chatMessage, + const std::shared_ptr<const linphone::EventLog> &chatMessageLog, + QObject *parent) + : ChatEvent(ChatRoomModel::EntryType::MessageEntry, parent) { + App::getInstance()->getEngine()->setObjectOwnership(this, QQmlEngine::CppOwnership); // Avoid QML to destroy it init(chatMessage, chatMessageLog); } -ChatMessageModel::~ChatMessageModel(){ - if(mChatMessage) - mChatMessage->removeListener(mChatMessageListener); +ChatMessageModel::~ChatMessageModel() { + if (mChatMessage) mChatMessage->removeListener(mChatMessageListener); } -void ChatMessageModel::init(const std::shared_ptr<linphone::ChatMessage>& chatMessage, const std::shared_ptr<const linphone::EventLog>& chatMessageLog){ - if(chatMessage){ +void ChatMessageModel::init(const std::shared_ptr<linphone::ChatMessage> &chatMessage, + const std::shared_ptr<const linphone::EventLog> &chatMessageLog) { + if (chatMessage) { mParticipantImdnStateListModel = QSharedPointer<ParticipantImdnStateListModel>::create(chatMessage); mChatMessageListener = std::make_shared<ChatMessageListener>(); connectTo(mChatMessageListener.get()); mChatMessage = chatMessage; mChatMessage->addListener(mChatMessageListener); - if( mChatMessage->isReply()){ + if (mChatMessage->isReply()) { auto replyMessage = mChatMessage->getReplyMessage(); - if( replyMessage)// Reply message could be inexistant (for example : when locally deleted) + if (replyMessage) // Reply message could be inexistant (for example : when locally deleted) mReplyChatMessageModel = create(replyMessage, this->parent()); } std::list<std::shared_ptr<linphone::Content>> contents = chatMessage->getContents(); QString txt; - for(auto content : contents){ - if(content->isText()) - txt += content->getUtf8Text().c_str(); + for (auto content : contents) { + if (content->isText()) txt += content->getUtf8Text().c_str(); } mContent = txt; - + mTimestamp = QDateTime::fromMSecsSinceEpoch(chatMessage->getTime() * 1000); - if(chatMessageLog) + if (chatMessageLog) mReceivedTimestamp = QDateTime::fromMSecsSinceEpoch(chatMessageLog->getCreationTime() * 1000); - else - mReceivedTimestamp = mTimestamp; + else mReceivedTimestamp = mTimestamp; } mWasDownloaded = false; @@ -114,101 +118,107 @@ mChatReactionListModel = QSharedPointer<ChatReactionListModel>::create(this); } -QSharedPointer<ChatMessageModel> ChatMessageModel::create(const std::shared_ptr<const linphone::EventLog>& chatMessageLog, QObject * parent){ +QSharedPointer<ChatMessageModel> +ChatMessageModel::create(const std::shared_ptr<const linphone::EventLog> &chatMessageLog, QObject *parent) { auto model = QSharedPointer<ChatMessageModel>::create(chatMessageLog->getChatMessage(), chatMessageLog, parent); return model; } -QSharedPointer<ChatMessageModel> ChatMessageModel::create(const std::shared_ptr<linphone::ChatMessage>& chatMessage, QObject * parent){ +QSharedPointer<ChatMessageModel> ChatMessageModel::create(const std::shared_ptr<linphone::ChatMessage> &chatMessage, + QObject *parent) { auto model = QSharedPointer<ChatMessageModel>::create(chatMessage, nullptr, parent); return model; } -std::shared_ptr<linphone::ChatMessage> ChatMessageModel::getChatMessage(){ +std::shared_ptr<linphone::ChatMessage> ChatMessageModel::getChatMessage() { return mChatMessage; } -QSharedPointer<ContentModel> ChatMessageModel::getContentModel(std::shared_ptr<linphone::Content> content){ +QSharedPointer<ContentModel> ChatMessageModel::getContentModel(std::shared_ptr<linphone::Content> content) { return mContentListModel->getContentModel(content); } //----------------------------------------------------------------------------------------------------------------------- -QString ChatMessageModel::getFromDisplayName(){ - if(!mFromDisplayNameCache.isEmpty()) - return mFromDisplayNameCache; - if(!mChatMessage) - return ""; +QString ChatMessageModel::getFromDisplayName() { + if (!mFromDisplayNameCache.isEmpty()) return mFromDisplayNameCache; + if (!mChatMessage) return ""; mFromDisplayNameCache = Utils::getDisplayName(mChatMessage->getFromAddress()); return mFromDisplayNameCache; } -QString ChatMessageModel::getFromDisplayNameReplyMessage(){ - if( isReply()){ - if(!fromDisplayNameReplyMessage.isEmpty()) - return fromDisplayNameReplyMessage; - if(!mChatMessage) - return ""; +QString ChatMessageModel::getFromDisplayNameReplyMessage() { + if (isReply()) { + if (!fromDisplayNameReplyMessage.isEmpty()) return fromDisplayNameReplyMessage; + if (!mChatMessage) return ""; fromDisplayNameReplyMessage = Utils::getDisplayName(mChatMessage->getReplyMessageSenderAddress()); return fromDisplayNameReplyMessage; - }else - return ""; + } else return ""; } -QString ChatMessageModel::getFromSipAddress() const{ - return mChatMessage ? Utils::cleanSipAddress(Utils::coreStringToAppString(mChatMessage->getFromAddress()->asStringUriOnly())) : ""; +QString ChatMessageModel::getFromSipAddress() const { + return mChatMessage + ? Utils::cleanSipAddress(Utils::coreStringToAppString(mChatMessage->getFromAddress()->asStringUriOnly())) + : ""; } -QString ChatMessageModel::getToDisplayName() const{ +QString ChatMessageModel::getToDisplayName() const { return mChatMessage ? Utils::getDisplayName(mChatMessage->getToAddress()) : ""; } -QString ChatMessageModel::getToSipAddress() const{ - return mChatMessage ? Utils::cleanSipAddress(Utils::coreStringToAppString(mChatMessage->getToAddress()->asStringUriOnly())) : ""; +QString ChatMessageModel::getToSipAddress() const { + return mChatMessage + ? Utils::cleanSipAddress(Utils::coreStringToAppString(mChatMessage->getToAddress()->asStringUriOnly())) + : ""; } QString ChatMessageModel::getMyReaction() const { - if(!mChatMessage) return ""; + if (!mChatMessage) return ""; auto myReaction = mChatMessage->getOwnReaction(); return myReaction ? Utils::coreStringToAppString(myReaction->getBody()) : ""; } -ContactModel * ChatMessageModel::getContactModel() const{ - return mChatMessage ? CoreManager::getInstance()->getContactsListModel()->findContactModelFromSipAddress(Utils::cleanSipAddress(Utils::coreStringToAppString(mChatMessage->getFromAddress()->asStringUriOnly()))).get() : nullptr; +ContactModel *ChatMessageModel::getContactModel() const { + return mChatMessage ? CoreManager::getInstance() + ->getContactsListModel() + ->findContactModelFromSipAddress(Utils::cleanSipAddress( + Utils::coreStringToAppString(mChatMessage->getFromAddress()->asStringUriOnly()))) + .get() + : nullptr; } -bool ChatMessageModel::isEphemeral() const{ +bool ChatMessageModel::isEphemeral() const { return mChatMessage && mChatMessage->isEphemeral(); } -qint64 ChatMessageModel::getEphemeralExpireTime() const{ +qint64 ChatMessageModel::getEphemeralExpireTime() const { time_t t = mChatMessage ? mChatMessage->getEphemeralExpireTime() : 0; - return t >0 ? t - QDateTime::currentSecsSinceEpoch() : 0; + return t > 0 ? t - QDateTime::currentSecsSinceEpoch() : 0; } -long ChatMessageModel::getEphemeralLifetime() const{ +long ChatMessageModel::getEphemeralLifetime() const { return mChatMessage ? mChatMessage->getEphemeralLifetime() : 0; } -LinphoneEnums::ChatMessageState ChatMessageModel::getState() const{ +LinphoneEnums::ChatMessageState ChatMessageModel::getState() const { return mChatMessage ? LinphoneEnums::fromLinphone(mChatMessage->getState()) : LinphoneEnums::ChatMessageStateIdle; } -bool ChatMessageModel::isOutgoing() const{ +bool ChatMessageModel::isOutgoing() const { return mChatMessage && mChatMessage->isOutgoing(); } -ParticipantImdnStateProxyModel * ChatMessageModel::getProxyImdnStates(){ - ParticipantImdnStateProxyModel * proxy = new ParticipantImdnStateProxyModel(); +ParticipantImdnStateProxyModel *ChatMessageModel::getProxyImdnStates() { + ParticipantImdnStateProxyModel *proxy = new ParticipantImdnStateProxyModel(); proxy->setChatMessageModel(this); return proxy; } -QSharedPointer<ParticipantImdnStateListModel> ChatMessageModel::getParticipantImdnStates() const{ +QSharedPointer<ParticipantImdnStateListModel> ChatMessageModel::getParticipantImdnStates() const { return mParticipantImdnStateListModel; } -QSharedPointer<ContentListModel> ChatMessageModel::getContents() const{ +QSharedPointer<ContentListModel> ChatMessageModel::getContents() const { return mContentListModel; } @@ -216,52 +226,48 @@ return mChatReactionListModel; } -bool ChatMessageModel::isReply() const{ +bool ChatMessageModel::isReply() const { return mChatMessage && mChatMessage->isReply(); } -ChatMessageModel * ChatMessageModel::getReplyChatMessageModel() const{ +ChatMessageModel *ChatMessageModel::getReplyChatMessageModel() const { return mReplyChatMessageModel.get(); } -bool ChatMessageModel::isForward() const{ +bool ChatMessageModel::isForward() const { return mChatMessage && mChatMessage->isForward(); } -QString ChatMessageModel::getForwardInfo() const{ +QString ChatMessageModel::getForwardInfo() const { return mChatMessage ? Utils::coreStringToAppString(mChatMessage->getForwardInfo()) : ""; } -QString ChatMessageModel::getForwardInfoDisplayName() const{ +QString ChatMessageModel::getForwardInfoDisplayName() const { QString forwardInfo = getForwardInfo(); auto forwardAddress = Utils::interpretUrl(forwardInfo); - if(!forwardAddress || Utils::isMe(forwardAddress)) - return "";// myself - else - return Utils::getDisplayName(forwardInfo); + if (!forwardAddress || Utils::isMe(forwardAddress)) return ""; // myself + else return Utils::getDisplayName(forwardInfo); } //----------------------------------------------------------------------------------------------------------------------- - - -void ChatMessageModel::setWasDownloaded(bool wasDownloaded){ - if( mWasDownloaded != wasDownloaded) { +void ChatMessageModel::setWasDownloaded(bool wasDownloaded) { + if (mWasDownloaded != wasDownloaded) { mWasDownloaded = wasDownloaded; emit wasDownloadedChanged(); } } -void ChatMessageModel::setTimestamp(const QDateTime& timestamp) { +void ChatMessageModel::setTimestamp(const QDateTime ×tamp) { mTimestamp = timestamp; } -void ChatMessageModel::setReceivedTimestamp(const QDateTime& timestamp) { +void ChatMessageModel::setReceivedTimestamp(const QDateTime ×tamp) { mReceivedTimestamp = timestamp; } //----------------------------------------------------------------------------------------------------------------------- -void ChatMessageModel::resendMessage (){ +void ChatMessageModel::resendMessage() { switch (getState()) { case LinphoneEnums::ChatMessageStateFileTransferError: case LinphoneEnums::ChatMessageStateNotDelivered: { @@ -269,55 +275,64 @@ emit stateChanged(); break; } - + default: qWarning() << QStringLiteral("Unable to resend message: %1. Bad state.").arg(getState()); } } -void ChatMessageModel::sendChatReaction(const QString& reaction){ +void ChatMessageModel::sendChatReaction(const QString &reaction) { auto myReaction = mChatMessage->getOwnReaction(); - if( myReaction && Utils::coreStringToAppString(myReaction->getBody()) == reaction) { + if (myReaction && Utils::coreStringToAppString(myReaction->getBody()) == reaction) { auto chatReaction = mChatMessage->createReaction(""); chatReaction->send(); - //emit reactionRemoved(mChatMessage, chatReaction->getFromAddress()); // Do not emit because we want to display what the server got - }else{ + // emit reactionRemoved(mChatMessage, chatReaction->getFromAddress()); // Do not emit because we want to + // display what the server got + } else { auto chatReaction = mChatMessage->createReaction(Utils::appStringToCoreString(reaction)); chatReaction->send(); - //emit newMessageReaction(mChatMessage, chatReaction);// Do not emit because we want to display what the server got + // emit newMessageReaction(mChatMessage, chatReaction);// Do not emit because we want to display what the server + // got } } -void ChatMessageModel::deleteEvent(){ +void ChatMessageModel::deleteEvent() { if (mChatMessage && mChatMessage->getFileTransferInformation()) { mChatMessage->cancelFileTransfer(); } - if(mChatMessage) - mChatMessage->getChatRoom()->deleteMessage(mChatMessage); + if (mChatMessage) mChatMessage->getChatRoom()->deleteMessage(mChatMessage); } - -void ChatMessageModel::updateFileTransferInformation(){ +void ChatMessageModel::updateFileTransferInformation() { mContentListModel->updateContents(this); } -void ChatMessageModel::onFileTransferRecv(const std::shared_ptr<linphone::ChatMessage> & message, const std::shared_ptr<linphone::Content> & content, const std::shared_ptr<const linphone::Buffer> & buffer){ +void ChatMessageModel::onFileTransferRecv(const std::shared_ptr<linphone::ChatMessage> &message, + const std::shared_ptr<linphone::Content> &content, + const std::shared_ptr<const linphone::Buffer> &buffer) { +} +void ChatMessageModel::onFileTransferSendChunk(const std::shared_ptr<linphone::ChatMessage> &message, + const std::shared_ptr<linphone::Content> &content, + size_t offset, + size_t size, + const std::shared_ptr<linphone::Buffer> &buffer) { } -void ChatMessageModel::onFileTransferSendChunk(const std::shared_ptr<linphone::ChatMessage> & message, const std::shared_ptr<linphone::Content> & content, size_t offset, size_t size, const std::shared_ptr<linphone::Buffer> & buffer) { - -} -std::shared_ptr<linphone::Buffer> ChatMessageModel::onFileTransferSend (const std::shared_ptr<linphone::ChatMessage> &,const std::shared_ptr<linphone::Content> &content,size_t,size_t) { +std::shared_ptr<linphone::Buffer> ChatMessageModel::onFileTransferSend( + const std::shared_ptr<linphone::ChatMessage> &, const std::shared_ptr<linphone::Content> &content, size_t, size_t) { return nullptr; } -void ChatMessageModel::onFileTransferProgressIndication (const std::shared_ptr<linphone::ChatMessage> &message,const std::shared_ptr<linphone::Content> &content,size_t offset,size_t total) { +void ChatMessageModel::onFileTransferProgressIndication(const std::shared_ptr<linphone::ChatMessage> &message, + const std::shared_ptr<linphone::Content> &content, + size_t offset, + size_t total) { auto contentModel = mContentListModel->getContentModel(content); - if(contentModel) { + if (contentModel) { contentModel->setFileOffset(offset); if (total == offset && mChatMessage && !mChatMessage->isOutgoing()) { mContentListModel->downloaded(); bool allAreDownloaded = true; - for(auto content : mContentListModel->getSharedList<ContentModel>()) + for (auto content : mContentListModel->getSharedList<ContentModel>()) allAreDownloaded &= content->mWasDownloaded; setWasDownloaded(allAreDownloaded); QTimer::singleShot(60, App::getInstance(), @@ -330,13 +345,14 @@ } } -void ChatMessageModel::onMsgStateChanged (const std::shared_ptr<linphone::ChatMessage> &message, linphone::ChatMessage::State state) { - updateFileTransferInformation();// On message state, file transfert information Content can be changed - if( state == linphone::ChatMessage::State::FileTransferDone) { - mContentListModel->updateContents(this);// Avoid having leak contents - if( !mWasDownloaded){// Update states +void ChatMessageModel::onMsgStateChanged(const std::shared_ptr<linphone::ChatMessage> &message, + linphone::ChatMessage::State state) { + updateFileTransferInformation(); // On message state, file transfert information Content can be changed + if (state == linphone::ChatMessage::State::FileTransferDone) { + mContentListModel->updateContents(this); // Avoid having leak contents + if (!mWasDownloaded) { // Update states bool allAreDownloaded = true; - for(auto content : mContentListModel->getSharedList<ContentModel>()) + for (auto content : mContentListModel->getSharedList<ContentModel>()) allAreDownloaded &= content->mWasDownloaded; setWasDownloaded(allAreDownloaded); } @@ -344,30 +360,28 @@ emit stateChanged(); } -void ChatMessageModel::onNewMessageReaction(const std::shared_ptr<linphone::ChatMessage> & message, const std::shared_ptr<const linphone::ChatMessageReaction> & reaction){ - if(reaction->getFromAddress()->weakEqual(message->getLocalAddress())) - emit myReactionChanged(); +void ChatMessageModel::onNewMessageReaction(const std::shared_ptr<linphone::ChatMessage> &message, + const std::shared_ptr<const linphone::ChatMessageReaction> &reaction) { + if (reaction->getFromAddress()->weakEqual(message->getLocalAddress())) emit myReactionChanged(); emit newMessageReaction(message, reaction); } -void ChatMessageModel::onParticipantImdnStateChanged(const std::shared_ptr<linphone::ChatMessage> & message, const std::shared_ptr<const linphone::ParticipantImdnState> & state){ - +void ChatMessageModel::onParticipantImdnStateChanged( + const std::shared_ptr<linphone::ChatMessage> &message, + const std::shared_ptr<const linphone::ParticipantImdnState> &state) { } -void ChatMessageModel::onEphemeralMessageTimerStarted(const std::shared_ptr<linphone::ChatMessage> & message) { +void ChatMessageModel::onEphemeralMessageTimerStarted(const std::shared_ptr<linphone::ChatMessage> &message) { emit ephemeralExpireTimeChanged(); } -void ChatMessageModel::onEphemeralMessageDeleted(const std::shared_ptr<linphone::ChatMessage> & message) { - //emit remove(mSelf.lock()); - if(!isOutgoing()) - mContentListModel->removeDownloadedFiles(); +void ChatMessageModel::onEphemeralMessageDeleted(const std::shared_ptr<linphone::ChatMessage> &message) { + // emit remove(mSelf.lock()); + if (!isOutgoing()) mContentListModel->removeDownloadedFiles(); emit remove(this); } -void ChatMessageModel::onReactionRemoved(const std::shared_ptr<linphone::ChatMessage> & message, const std::shared_ptr<const linphone::Address> & address) { - if(address->weakEqual(message->getLocalAddress())) - emit myReactionChanged(); +void ChatMessageModel::onReactionRemoved(const std::shared_ptr<linphone::ChatMessage> &message, + const std::shared_ptr<const linphone::Address> &address) { + if (address->weakEqual(message->getLocalAddress())) emit myReactionChanged(); emit reactionRemoved(message, address); } //------------------------------------------------------------------------------------------------------- - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linphone-desktop-5.2.4/linphone-app/src/utils/Constants.hpp new/linphone-desktop-5.2.6/linphone-app/src/utils/Constants.hpp --- old/linphone-desktop-5.2.4/linphone-app/src/utils/Constants.hpp 2024-04-11 14:10:51.000000000 +0200 +++ new/linphone-desktop-5.2.6/linphone-app/src/utils/Constants.hpp 2024-07-22 11:08:44.000000000 +0200 @@ -21,21 +21,22 @@ #ifndef CONSTANTS_H_ #define CONSTANTS_H_ +#include <QDir> #include <QObject> #include <QString> -#include <QDir> #include "config.h" // ============================================================================= -class Constants : public QObject{ +class Constants : public QObject { Q_OBJECT public: - Constants(QObject * parent = nullptr) : QObject(parent){} - - //---------------------------------------------------------------------------------- - + Constants(QObject *parent = nullptr) : QObject(parent) { + } + + //---------------------------------------------------------------------------------- + static constexpr char DefaultLocale[] = "en"; static constexpr char DefaultFont[] = "Noto Sans"; static constexpr int DefaultFontPointSize = 10; @@ -46,13 +47,13 @@ #endif static constexpr int DefaultEmojiFontPointSize = 10; static QStringList getReactionsList(); - - static constexpr size_t MaxLogsCollectionSize = 10485760*5; // 50MB. - + + static constexpr size_t MaxLogsCollectionSize = 10485760 * 5; // 50MB. + #ifdef ENABLE_UPDATE_CHECK static constexpr int VersionUpdateCheckInterval = 86400000; // 24 hours in milliseconds. -#endif // ifdef ENABLE_UPDATE_CHECK - +#endif // ifdef ENABLE_UPDATE_CHECK + static constexpr char DefaultXmlrpcUri[] = "https://subscribe.linphone.org:444/wizard.php"; static constexpr char DefaultUploadLogsServer[] = "https://www.linphone.org:444/lft.php"; static constexpr char DefaultContactParameters[] = "message-expires=2419200"; @@ -67,18 +68,19 @@ static constexpr char PrivatePolicyUrl[] = "https://www.linphone.org/privacy-policy"; static constexpr char ContactUrl[] = "https://www.linphone.org/contact"; static constexpr char TranslationUrl[] = "https://weblate.linphone.org/projects/linphone-desktop/"; - - static constexpr int MaxMosaicParticipants = 6;// From 7, the mosaic quality will be limited to avoid useless computations - + + static constexpr int MaxMosaicParticipants = + 6; // From 7, the mosaic quality will be limited to avoid useless computations + static constexpr char LinphoneBZip2_exe[] = "https://www.linphone.org/releases/windows/tools/bzip2/bzip2.exe"; static constexpr char LinphoneBZip2_dll[] = "https://www.linphone.org/releases/windows/tools/bzip2/bzip2.dll"; static constexpr char DefaultRlsUri[] = "sips:r...@sip.linphone.org"; static constexpr char DefaultLogsEmail[] = "linphone-desk...@belledonne-communications.com"; - - static constexpr char DefaultFlexiAPIURL[] = "https://subscribe.linphone.org/api/";// Need "/" at the end + + static constexpr char DefaultFlexiAPIURL[] = "https://subscribe.linphone.org/api/"; // Need "/" at the end static constexpr char RemoteProvisioningURL[] = "https://subscribe.linphone.org/api/provisioning"; static constexpr char RemoteProvisioningBasicAuth[] = ""; -// OAuth2 settings + // OAuth2 settings static constexpr char OAuth2AuthorizationUrl[] = ""; static constexpr char OAuth2AccessTokenUrl[] = ""; static constexpr char OAuth2RedirectUri[] = ""; @@ -86,8 +88,7 @@ static constexpr char OAuth2Password[] = ""; static constexpr char OAuth2Scope[] = ""; static constexpr char DefaultOAuth2RemoteProvisioningHeader[] = "x-linphone-oauth2-token"; - - + Q_PROPERTY(QString PasswordRecoveryUrl MEMBER PasswordRecoveryUrl CONSTANT) Q_PROPERTY(QString CguUrl MEMBER CguUrl CONSTANT) Q_PROPERTY(QString PrivatePolicyUrl MEMBER PrivatePolicyUrl CONSTANT) @@ -96,35 +97,38 @@ Q_PROPERTY(int maxMosaicParticipants MEMBER MaxMosaicParticipants CONSTANT) Q_PROPERTY(QStringList reactionsList READ getReactionsList CONSTANT) -// For Webviews + // For Webviews static constexpr char DefaultAssistantRegistrationUrl[] = "https://subscribe.linphone.org/register"; static constexpr char DefaultAssistantLoginUrl[] = "https://subscribe.linphone.org/login"; static constexpr char DefaultAssistantLogoutUrl[] = "https://subscribe.linphone.org/logout"; -//-------------- + //-------------- // Max image size in bytes. (1Mb) - static constexpr qint64 MaxImageSize = 1024000;// In Bytes. - static constexpr qint64 FileSizeLimit = 524288000;// In Bytes. + static constexpr qint64 MaxImageSize = 1024000; // In Bytes. + static constexpr qint64 FileSizeLimit = 524288000; // In Bytes. static constexpr int ThumbnailImageFileWidth = 100; static constexpr int ThumbnailImageFileHeight = 100; - -//-------------------------------------------------------------------------------- -// LINPHONE -//-------------------------------------------------------------------------------- - static constexpr char LinphoneDomain[] = "sip.linphone.org"; // Use for checking if config are a Linphone + //-------------------------------------------------------------------------------- + // LINPHONE + //-------------------------------------------------------------------------------- + + static constexpr char LinphoneDomain[] = "sip.linphone.org"; // Use for checking if config are a Linphone static constexpr char WindowIconPath[] = ":/assets/images/linphone_logo.svg"; static constexpr char ApplicationMinimalQtVersion[] = "5.10.0"; - static constexpr char DefaultConferenceURI[] = "sip:conference-fact...@sip.linphone.org"; // Default for a Linphone account - static constexpr char DefaultVideoConferenceURI[] = "sip:videoconference-fact...@sip.linphone.org"; // Default for a Linphone account - static constexpr char DefaultLimeServerURL[] = "https://lime.linphone.org/lime-server/lime-server.php"; // Default for a Linphone account - + static constexpr char DefaultConferenceURI[] = + "sip:conference-fact...@sip.linphone.org"; // Default for a Linphone account + static constexpr char DefaultVideoConferenceURI[] = + "sip:videoconference-fact...@sip.linphone.org"; // Default for a Linphone account + static constexpr char DefaultLimeServerURL[] = + "https://lime.linphone.org/lime-server/lime-server.php"; // Default for a Linphone account + static constexpr char PathAssistantConfig[] = "/" EXECUTABLE_NAME "/assistant/"; static constexpr char PathAvatars[] = "/avatars/"; static constexpr char PathCaptures[] = "/" EXECUTABLE_NAME "/captures/"; - static constexpr char PathCodecs[] = "/codecs/"; - static constexpr char PathData[] = "/" EXECUTABLE_NAME; - static constexpr char PathTools[] = "/tools/"; + static constexpr char PathCodecs[] = "/codecs/"; + static constexpr char PathData[] = "/" EXECUTABLE_NAME; + static constexpr char PathTools[] = "/tools/"; static constexpr char PathLogs[] = "/logs/"; static constexpr char PathVfs[] = "/vfs/"; #ifdef APPLE @@ -135,7 +139,7 @@ static constexpr char PathPluginsApp[] = "app/"; static constexpr char PathSounds[] = "/sounds/" EXECUTABLE_NAME; static constexpr char PathUserCertificates[] = "/usr-crt/"; - + static constexpr char PathCallHistoryList[] = "/call-history.db"; static constexpr char PathConfig[] = "/linphonerc"; static constexpr char PathDatabase[] = "/linphone.db"; @@ -147,45 +151,47 @@ static constexpr char PathZrtpSecrets[] = "/zidcache"; static constexpr char PathISpellDicts[] = "/" EXECUTABLE_NAME "/ispell_dictionaries/"; static constexpr char PathISpellOwnDict[] = "/" EXECUTABLE_NAME "/ispell_own_dict"; - + static constexpr char LanguagePath[] = ":/languages/"; - + // The main windows of Linphone desktop. static constexpr char QmlViewMainWindow[] = "qrc:/ui/views/App/Main/MainWindow.qml"; static constexpr char QmlViewCallsWindow[] = "qrc:/ui/views/App/Calls/CallsWindow.qml"; static constexpr char QmlViewSettingsWindow[] = "qrc:/ui/views/App/Settings/SettingsWindow.qml"; - + static constexpr char MainQmlUri[] = "Linphone"; - + static constexpr char AttachVirtualWindowMethodName[] = "attachVirtualWindow"; static constexpr char AboutPath[] = "qrc:/ui/views/App/Main/Dialogs/About.qml"; - + static constexpr char AssistantViewName[] = "Assistant"; - + static constexpr char QtDomain[] = "qt"; static constexpr char SrcPattern[] = "/src/"; - static constexpr char LinphoneLocaleEncoding[] = "UTF-8";// Alternative is to use "locale" + static constexpr char LinphoneLocaleEncoding[] = "UTF-8"; // Alternative is to use "locale" static constexpr char VcardScheme[] = EXECUTABLE_NAME "-desktop:/"; static constexpr int CbsCallInterval = 20; static constexpr char RcVersionName[] = "rc_version"; - static constexpr int RcVersionCurrent = 6; // 2 = Conference URI - // 3 = CPIM on basic chat rooms - // 4 = RTP bundle mode - // 5 = Video Conference URI - // 6 = Publish expires -//-------------------------------------------------------------------------------- + static constexpr int RcVersionCurrent = 6; // 2 = Conference URI + // 3 = CPIM on basic chat rooms + // 4 = RTP bundle mode + // 5 = Video Conference URI + // 6 = Publish expires +//-------------------------------------------------------------------------------- // CISCO //-------------------------------------------------------------------------------- #if defined(Q_OS_LINUX) || defined(Q_OS_WIN) static constexpr char H264Description[] = "Provided by CISCO SYSTEM,INC"; #endif // if defined(Q_OS_LINUX) || defined(Q_OS_WIN) - + #ifdef Q_OS_LINUX static constexpr char LibraryExtension[] = "so"; static constexpr char H264InstallName[] = "libopenh264.so"; #ifdef Q_PROCESSOR_X86_64 - static constexpr char PluginUrlH264[] = "http://ciscobinary.openh264.org/libopenh264-2.2.0-linux64.6.so.bz2"; - static constexpr char PluginH264Check[] = "45ba1aaeb6213c19cd9622b79788e16b05beabc4d16a3a74e57f046a0826fd77"; + // static constexpr char PluginUrlH264[] = "http://ciscobinary.openh264.org/libopenh264-2.2.0-linux64.6.so.bz2"; + // static constexpr char PluginH264Check[] = "45ba1aaeb6213c19cd9622b79788e16b05beabc4d16a3a74e57f046a0826fd77"; + static constexpr char PluginUrlH264[] = "http://ciscobinary.openh264.org/libopenh264-2.4.1-linux64.7.so.bz2"; + static constexpr char PluginH264Check[] = ""; #else static constexpr char PluginUrlH264[] = "http://ciscobinary.openh264.org/libopenh264-2.2.0-linux32.6.so.bz2"; static constexpr char PluginH264Check[] = "bf18e0e79c4a23018b0ea5ad6d7dd14fd1b6a6189d2f88fd56dece019fc415c8"; @@ -202,7 +208,7 @@ #endif // ifdef Q_OS_WIN64 #endif // ifdef Q_OS_LINUX -//-------------------------------------------------------------------------------- + //-------------------------------------------------------------------------------- }; #endif