Commit 3ea2478c authored by Ronan's avatar Ronan

feat(app): deal with peer/local addresses

parent 578e1a27
......@@ -142,7 +142,7 @@ set(SOURCES
src/components/contacts/ContactsListProxyModel.cpp
src/components/core/CoreHandlers.cpp
src/components/core/CoreManager.cpp
src/components/core/messages-count-notifier/AbstractMessagesCountNotifier.cpp
src/components/core/messages-count-notifier/AbstractMessageCountNotifier.cpp
src/components/file/FileDownloader.cpp
src/components/file/FileExtractor.cpp
src/components/notifier/Notifier.cpp
......@@ -200,7 +200,7 @@ set(HEADERS
src/components/contacts/ContactsListProxyModel.hpp
src/components/core/CoreHandlers.hpp
src/components/core/CoreManager.hpp
src/components/core/messages-count-notifier/AbstractMessagesCountNotifier.hpp
src/components/core/messages-count-notifier/AbstractMessageCountNotifier.hpp
src/components/file/FileDownloader.hpp
src/components/file/FileExtractor.hpp
src/components/notifier/Notifier.hpp
......@@ -230,37 +230,37 @@ set(MAIN_FILE src/app/main.cpp)
if (APPLE)
list(APPEND SOURCES
src/app/single-application/SingleApplication.cpp
src/components/core/messages-count-notifier/MessagesCountNotifierMacOs.m
src/components/core/messages-count-notifier/MessageCountNotifierMacOs.m
src/components/other/desktop-tools/DesktopToolsMacOs.cpp
src/components/other/desktop-tools/screen-saver/ScreenSaverMacOs.m
)
list(APPEND HEADERS
src/app/single-application/SingleApplicationPrivate.hpp
src/components/core/messages-count-notifier/MessagesCountNotifierMacOs.hpp
src/components/core/messages-count-notifier/MessageCountNotifierMacOs.hpp
src/components/other/desktop-tools/DesktopToolsMacOs.hpp
)
elseif (WIN32)
list(APPEND SOURCES
src/app/single-application/SingleApplication.cpp
src/components/core/messages-count-notifier/MessagesCountNotifierSystemTrayIcon.cpp
src/components/core/messages-count-notifier/MessageCountNotifierSystemTrayIcon.cpp
src/components/other/desktop-tools/DesktopToolsWindows.cpp
)
list(APPEND HEADERS
src/app/single-application/SingleApplicationPrivate.hpp
src/components/core/messages-count-notifier/MessagesCountNotifierSystemTrayIcon.hpp
src/components/core/messages-count-notifier/MessageCountNotifierSystemTrayIcon.hpp
src/components/other/desktop-tools/DesktopToolsWindows.hpp
)
else ()
list(APPEND SOURCES
src/app/single-application/SingleApplicationDBus.cpp
src/components/core/messages-count-notifier/MessagesCountNotifierSystemTrayIcon.cpp
src/components/core/messages-count-notifier/MessageCountNotifierSystemTrayIcon.cpp
src/components/other/desktop-tools/DesktopToolsLinux.cpp
src/components/other/desktop-tools/screen-saver/ScreenSaverDBus.cpp
src/components/other/desktop-tools/screen-saver/ScreenSaverXdg.cpp
)
list(APPEND HEADERS
src/app/single-application/SingleApplicationDBusPrivate.hpp
src/components/core/messages-count-notifier/MessagesCountNotifierSystemTrayIcon.hpp
src/components/core/messages-count-notifier/MessageCountNotifierSystemTrayIcon.hpp
src/components/other/desktop-tools/DesktopToolsLinux.hpp
src/components/other/desktop-tools/screen-saver/ScreenSaverDBus.hpp
src/components/other/desktop-tools/screen-saver/ScreenSaverXdg.hpp
......
<?xml version="1.0" encoding="UTF-8"?>
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
<title>call_lost</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
<g id="call_lost" class="color-error-stroke" stroke="#FF0000" stroke-width="2">
<path d="M12.9852814,5.74407768 L-1.15685425,5.74407768" id="Line" transform="translate(6.266032, 5.768485) rotate(-45.000000) translate(-6.266032, -5.768485) "></path>
<path d="M11,11 L1,1" id="Line"></path>
</g>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="18"
height="18"
viewBox="0 0 18 18"
version="1.1"
id="svg13"
sodipodi:docname="declined_incoming_call.svg"
inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata
id="metadata17">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>call_lost</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="985"
id="namedview15"
showgrid="false"
inkscape:zoom="6.9532167"
inkscape:cx="1.925277"
inkscape:cy="3.533194"
inkscape:window-x="0"
inkscape:window-y="35"
inkscape:window-maximized="1"
inkscape:current-layer="svg13" />
<!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
<title
id="title2">call_lost</title>
<desc
id="desc4">Created with Sketch.</desc>
<defs
id="defs6" />
<g
id="Symbols"
style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round"
transform="translate(3,3)">
<g
id="call_lost"
class="color-error-stroke"
style="stroke:#ff0000;stroke-width:2">
<path
d="M 12.985281,5.7440777 H -1.1568543"
id="Line"
transform="rotate(-45,6.266032,5.768485)"
inkscape:connector-curvature="0" />
<path
d="M 11,11 1,1"
id="path9"
inkscape:connector-curvature="0" />
</g>
</svg>
\ No newline at end of file
</g>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
<title>call_lost</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
<g id="call_lost" class="color-error-stroke" stroke="#FF0000" stroke-width="2">
<path d="M12.9852814,5.74407768 L-1.15685425,5.74407768" id="Line" transform="translate(6.266032, 5.768485) rotate(-45.000000) translate(-6.266032, -5.768485) "></path>
<path d="M11,11 L1,1" id="Line"></path>
</g>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="18"
height="18"
viewBox="0 0 18 18"
version="1.1"
id="svg13"
sodipodi:docname="declined_incoming_call.svg"
inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata
id="metadata17">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>call_lost</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="985"
id="namedview15"
showgrid="false"
inkscape:zoom="6.9532167"
inkscape:cx="1.925277"
inkscape:cy="3.533194"
inkscape:window-x="0"
inkscape:window-y="35"
inkscape:window-maximized="1"
inkscape:current-layer="svg13" />
<!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
<title
id="title2">call_lost</title>
<desc
id="desc4">Created with Sketch.</desc>
<defs
id="defs6" />
<g
id="Symbols"
style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round"
transform="translate(3,3)">
<g
id="call_lost"
class="color-error-stroke"
style="stroke:#ff0000;stroke-width:2">
<path
d="M 12.985281,5.7440777 H -1.1568543"
id="Line"
transform="rotate(-45,6.266032,5.768485)"
inkscape:connector-curvature="0" />
<path
d="M 11,11 1,1"
id="path9"
inkscape:connector-curvature="0" />
</g>
</svg>
\ No newline at end of file
</g>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
<title>call_lost</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
<g id="call_lost" class="color-error-stroke" stroke="#FF0000" stroke-width="2">
<path d="M12.9852814,5.74407768 L-1.15685425,5.74407768" id="Line" transform="translate(6.266032, 5.768485) rotate(-45.000000) translate(-6.266032, -5.768485) "></path>
<path d="M11,11 L1,1" id="Line"></path>
</g>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="18"
height="18"
viewBox="0 0 18 18"
version="1.1"
id="svg13"
sodipodi:docname="declined_incoming_call.svg"
inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata
id="metadata17">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>call_lost</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="985"
id="namedview15"
showgrid="false"
inkscape:zoom="6.9532167"
inkscape:cx="1.925277"
inkscape:cy="3.533194"
inkscape:window-x="0"
inkscape:window-y="35"
inkscape:window-maximized="1"
inkscape:current-layer="svg13" />
<!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
<title
id="title2">call_lost</title>
<desc
id="desc4">Created with Sketch.</desc>
<defs
id="defs6" />
<g
id="Symbols"
style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round"
transform="translate(3,3)">
<g
id="call_lost"
class="color-error-stroke"
style="stroke:#ff0000;stroke-width:2">
<path
d="M 12.985281,5.7440777 H -1.1568543"
id="Line"
transform="rotate(-45,6.266032,5.768485)"
inkscape:connector-curvature="0" />
<path
d="M 11,11 1,1"
id="path9"
inkscape:connector-curvature="0" />
</g>
</svg>
\ No newline at end of file
</g>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
<title>call_lost</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
<g id="call_lost" class="color-error-stroke" stroke="#FF0000" stroke-width="2">
<path d="M12.9852814,5.74407768 L-1.15685425,5.74407768" id="Line" transform="translate(6.266032, 5.768485) rotate(-45.000000) translate(-6.266032, -5.768485) "></path>
<path d="M11,11 L1,1" id="Line"></path>
</g>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="18"
height="18"
viewBox="0 0 18 18"
version="1.1"
id="svg13"
sodipodi:docname="declined_incoming_call.svg"
inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata
id="metadata17">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>call_lost</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="985"
id="namedview15"
showgrid="false"
inkscape:zoom="6.9532167"
inkscape:cx="1.925277"
inkscape:cy="3.533194"
inkscape:window-x="0"
inkscape:window-y="35"
inkscape:window-maximized="1"
inkscape:current-layer="svg13" />
<!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
<title
id="title2">call_lost</title>
<desc
id="desc4">Created with Sketch.</desc>
<defs
id="defs6" />
<g
id="Symbols"
style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round"
transform="translate(3,3)">
<g
id="call_lost"
class="color-error-stroke"
style="stroke:#ff0000;stroke-width:2">
<path
d="M 12.985281,5.7440777 H -1.1568543"
id="Line"
transform="rotate(-45,6.266032,5.768485)"
inkscape:connector-curvature="0" />
<path
d="M 11,11 1,1"
id="path9"
inkscape:connector-curvature="0" />
</g>
</svg>
\ No newline at end of file
</g>
</svg>
......@@ -22,7 +22,7 @@
lcb_define_target("linphoneqt" "linphone" "ms2plugins")
lcb_blacklist_dependencies("libxsd" "soci") # linphone do not need them for the moment.
lcb_blacklist_dependencies("libxsd") # linphone do not need them for the moment.
if (NOT WIN32 AND NOT APPLE)
lcb_blacklist_dependencies("turbo-jpeg") # turbo-jpeg is already provided by Qt5 so do not build it.
......
......@@ -332,7 +332,7 @@
<file>ui/modules/Linphone/Contact/Avatar.qml</file>
<file>ui/modules/Linphone/Contact/ContactDescription.qml</file>
<file>ui/modules/Linphone/Contact/Contact.qml</file>
<file>ui/modules/Linphone/Contact/MessagesCounter.qml</file>
<file>ui/modules/Linphone/Contact/MessageCounter.qml</file>
<file>ui/modules/Linphone/Dialog/OnlineInstallerDialog.qml</file>
<file>ui/modules/Linphone/Menus/SipAddressesMenu.qml</file>
<file>ui/modules/Linphone/Notifications/NotificationBasic.qml</file>
......@@ -358,7 +358,7 @@
<file>ui/modules/Linphone/Styles/Contact/AvatarStyle.qml</file>
<file>ui/modules/Linphone/Styles/Contact/ContactDescriptionStyle.qml</file>
<file>ui/modules/Linphone/Styles/Contact/ContactStyle.qml</file>
<file>ui/modules/Linphone/Styles/Contact/MessagesCounterStyle.qml</file>
<file>ui/modules/Linphone/Styles/Contact/MessageCounterStyle.qml</file>
<file>ui/modules/Linphone/Styles/Dialog/OnlineInstallerDialogStyle.qml</file>
<file>ui/modules/Linphone/Styles/Menus/SipAddressesMenuStyle.qml</file>
<file>ui/modules/Linphone/Styles/Notifications/NotificationBasicStyle.qml</file>
......
......@@ -87,22 +87,22 @@ private:
using LogLevel = linphone::LogLevel;
const char *format;
switch (level) {
case LogLevel::LogLevelDebug:
case LogLevel::Debug:
format = GREEN "[%s][Debug]" YELLOW "Core:%s: " RESET "%s\n";
break;
case LogLevel::LogLevelTrace:
case LogLevel::Trace:
format = BLUE "[%s][Trace]" YELLOW "Core:%s: " RESET "%s\n";
break;
case LogLevel::LogLevelMessage:
case LogLevel::Message:
format = BLUE "[%s][Info]" YELLOW "Core:%s: " RESET "%s\n";
break;
case LogLevel::LogLevelWarning:
case LogLevel::Warning:
format = RED "[%s][Warning]" YELLOW "Core:%s: " RESET "%s\n";
break;
case LogLevel::LogLevelError:
case LogLevel::Error:
format = RED "[%s][Error]" YELLOW "Core:%s: " RESET "%s\n";
break;
case LogLevel::LogLevelFatal:
case LogLevel::Fatal:
format = RED "[%s][Fatal]" YELLOW "Core:%s: " RESET "%s\n";
break;
}
......@@ -115,7 +115,7 @@ private:
message.c_str()
);
if (level == LogLevel::LogLevelFatal)
if (level == LogLevel::Fatal)
terminate();
};
......@@ -183,8 +183,8 @@ void Logger::log (QtMsgType type, const QMessageLogContext &context, const QStri
void Logger::enable (bool status) {
linphone::Core::enableLogCollection(
status
? linphone::LogCollectionStateEnabled
: linphone::LogCollectionStateDisabled
? linphone::LogCollectionState::Enabled
: linphone::LogCollectionState::Disabled
);
}
......@@ -201,7 +201,7 @@ void Logger::init (const shared_ptr<linphone::Config> &config) {
{
shared_ptr<linphone::LoggingService> loggingService = mInstance->mLoggingService = linphone::LoggingService::get();
loggingService->setLogLevel(linphone::LogLevel::LogLevelMessage);
loggingService->setLogLevel(linphone::LogLevel::Message);
loggingService->setListener(make_shared<LinphoneLogger>(mInstance));
}
......
......@@ -52,15 +52,15 @@ private:
void onCreateAccount (
const shared_ptr<linphone::AccountCreator> &,
linphone::AccountCreatorStatus status,
linphone::AccountCreator::Status status,
const string &
) override {
if (status == linphone::AccountCreatorStatusAccountCreated)
if (status == linphone::AccountCreator::Status::AccountCreated)
emit mAssistant->createStatusChanged(QString(""));
else {
if (status == linphone::AccountCreatorStatusRequestFailed)
if (status == linphone::AccountCreator::Status::RequestFailed)
emit mAssistant->createStatusChanged(tr("requestFailed"));
else if (status == linphone::AccountCreatorStatusServerError)
else if (status == linphone::AccountCreator::Status::ServerError)
emit mAssistant->createStatusChanged(tr("cannotSendSms"));
else
emit mAssistant->createStatusChanged(tr("accountAlreadyExists"));
......@@ -69,14 +69,14 @@ private:
void onIsAccountExist (
const shared_ptr<linphone::AccountCreator> &creator,
linphone::AccountCreatorStatus status,
linphone::AccountCreator::Status status,
const string &
) override {
if (status == linphone::AccountCreatorStatusAccountExist || status == linphone::AccountCreatorStatusAccountExistWithAlias) {
if (status == linphone::AccountCreator::Status::AccountExist || status == linphone::AccountCreator::Status::AccountExistWithAlias) {
createProxyConfig(creator);
emit mAssistant->loginStatusChanged(QString(""));
} else {
if (status == linphone::AccountCreatorStatusRequestFailed)
if (status == linphone::AccountCreator::Status::RequestFailed)
emit mAssistant->loginStatusChanged(tr("requestFailed"));
else
emit mAssistant->loginStatusChanged(tr("loginWithUsernameFailed"));
......@@ -85,19 +85,19 @@ private:
void onActivateAccount (
const shared_ptr<linphone::AccountCreator> &creator,
linphone::AccountCreatorStatus status,
linphone::AccountCreator::Status status,
const string &
) override {
if (
status == linphone::AccountCreatorStatusAccountActivated ||
status == linphone::AccountCreatorStatusAccountAlreadyActivated
status == linphone::AccountCreator::Status::AccountActivated ||
status == linphone::AccountCreator::Status::AccountAlreadyActivated
) {
if (creator->getEmail().empty())
createProxyConfig(creator);
emit mAssistant->activateStatusChanged(QString(""));
} else {
if (status == linphone::AccountCreatorStatusRequestFailed)
if (status == linphone::AccountCreator::Status::RequestFailed)
emit mAssistant->activateStatusChanged(tr("requestFailed"));
else
emit mAssistant->activateStatusChanged(tr("smsActivationFailed"));
......@@ -106,14 +106,14 @@ private:
void onIsAccountActivated (
const shared_ptr<linphone::AccountCreator> &creator,
linphone::AccountCreatorStatus status,
linphone::AccountCreator::Status status,
const string &
) override {
if (status == linphone::AccountCreatorStatusAccountActivated) {
if (status == linphone::AccountCreator::Status::AccountActivated) {
createProxyConfig(creator);
emit mAssistant->activateStatusChanged(QString(""));
} else {
if (status == linphone::AccountCreatorStatusRequestFailed)
if (status == linphone::AccountCreator::Status::RequestFailed)
emit mAssistant->activateStatusChanged(tr("requestFailed"));
else
emit mAssistant->activateStatusChanged(tr("emailActivationFailed"));
......@@ -122,15 +122,15 @@ private:
void onRecoverAccount (
const shared_ptr<linphone::AccountCreator> &,
linphone::AccountCreatorStatus status,
linphone::AccountCreator::Status status,
const string &
) override {
if (status == linphone::AccountCreatorStatusRequestOk) {
if (status == linphone::AccountCreator::Status::RequestOk) {
emit mAssistant->recoverStatusChanged(QString(""));
} else {
if (status == linphone::AccountCreatorStatusRequestFailed)
if (status == linphone::AccountCreator::Status::RequestFailed)
emit mAssistant->recoverStatusChanged(tr("requestFailed"));
else if (status == linphone::AccountCreatorStatusServerError)
else if (status == linphone::AccountCreator::Status::ServerError)
emit mAssistant->recoverStatusChanged(tr("cannotSendSms"));
else
emit mAssistant->recoverStatusChanged(tr("loginWithPhoneNumberFailed"));
......@@ -268,12 +268,12 @@ void AssistantModel::setEmail (const QString &email) {
QString error;
switch (mAccountCreator->setEmail(Utils::appStringToCoreString(email))) {
case linphone::AccountCreatorEmailStatusOk:
case linphone::AccountCreator::EmailStatus::Ok:
break;
case linphone::AccountCreatorEmailStatusMalformed:
case linphone::AccountCreator::EmailStatus::Malformed:
error = tr("emailStatusMalformed");
break;
case linphone::AccountCreatorEmailStatusInvalidCharacters:
case linphone::AccountCreator::EmailStatus::InvalidCharacters:
error = tr("emailStatusMalformedInvalidCharacters");
break;
}
......@@ -292,19 +292,19 @@ void AssistantModel::setPassword (const QString &password) {
QString error;
switch (mAccountCreator->setPassword(Utils::appStringToCoreString(password))) {
case linphone::AccountCreatorPasswordStatusOk:
case linphone::AccountCreator::PasswordStatus::Ok:
break;
case linphone::AccountCreatorPasswordStatusTooShort:
case linphone::AccountCreator::PasswordStatus::TooShort:
error = tr("passwordStatusTooShort").arg(config->getInt("assistant", "password_min_length", 1));
break;
case linphone::AccountCreatorPasswordStatusTooLong:
case linphone::AccountCreator::PasswordStatus::TooLong:
error = tr("passwordStatusTooLong").arg(config->getInt("assistant", "password_max_length", -1));
break;
case linphone::AccountCreatorPasswordStatusInvalidCharacters:
case linphone::AccountCreator::PasswordStatus::InvalidCharacters:
error = tr("passwordStatusInvalidCharacters")
.arg(Utils::coreStringToAppString(config->getString("assistant", "password_regex", "")));
break;
case linphone::AccountCreatorPasswordStatusMissingCharacters:
case linphone::AccountCreator::PasswordStatus::MissingCharacters:
error = tr("passwordStatusMissingCharacters")
.arg(Utils::coreStringToAppString(config->getString("assistant", "missing_characters", "")));
break;
......@@ -334,19 +334,21 @@ void AssistantModel::setPhoneNumber (const QString &phoneNumber) {
shared_ptr<linphone::Config> config = CoreManager::getInstance()->getCore()->getConfig();
QString error;
switch (mAccountCreator->setPhoneNumber(Utils::appStringToCoreString(phoneNumber), Utils::appStringToCoreString(mCountryCode))) {
case linphone::AccountCreatorPhoneNumberStatusOk:
switch (static_cast<linphone::AccountCreator::PhoneNumberStatus>(
mAccountCreator->setPhoneNumber(Utils::appStringToCoreString(phoneNumber), Utils::appStringToCoreString(mCountryCode))
)) {
case linphone::AccountCreator::PhoneNumberStatus::Ok:
break;
case linphone::AccountCreatorPhoneNumberStatusInvalid:
case linphone::AccountCreator::PhoneNumberStatus::Invalid:
error = tr("phoneNumberStatusInvalid");
break;
case linphone::AccountCreatorPhoneNumberStatusTooShort:
case linphone::AccountCreator::PhoneNumberStatus::TooShort:
error = tr("phoneNumberStatusTooShort");
break;
case linphone::AccountCreatorPhoneNumberStatusTooLong:
case linphone::AccountCreator::PhoneNumberStatus::TooLong:
error = tr("phoneNumberStatusTooLong");
break;
case linphone::AccountCreatorPhoneNumberStatusInvalidCountryCode:
case linphone::AccountCreator::PhoneNumberStatus::InvalidCountryCode:
error = tr("phoneNumberStatusInvalidCountryCode");
break;
default:
......@@ -418,24 +420,24 @@ void AssistantModel::setConfigFilename (const QString &configFilename) {
// -----------------------------------------------------------------------------
QString AssistantModel::mapAccountCreatorUsernameStatusToString (linphone::AccountCreatorUsernameStatus status) const {
QString AssistantModel::mapAccountCreatorUsernameStatusToString (linphone::AccountCreator::UsernameStatus status) const {
shared_ptr<linphone::Config> config = CoreManager::getInstance()->getCore()->getConfig();
QString error;
switch (status) {
case linphone::AccountCreatorUsernameStatusOk:
case linphone::AccountCreator::UsernameStatus::Ok:
break;
case linphone::AccountCreatorUsernameStatusTooShort:
case linphone::AccountCreator::UsernameStatus::TooShort:
error = tr("usernameStatusTooShort").arg(config->getInt("assistant", "username_min_length", 1));
break;
case linphone::AccountCreatorUsernameStatusTooLong:
case linphone::AccountCreator::UsernameStatus::TooLong:
error = tr("usernameStatusTooLong").arg(config->getInt("assistant", "username_max_length", -1));
break;
case linphone::AccountCreatorUsernameStatusInvalidCharacters:
case linphone::AccountCreator::UsernameStatus::InvalidCharacters:
error = tr("usernameStatusInvalidCharacters")
.arg(Utils::coreStringToAppString(config->getString("assistant", "username_regex", "")));
break;
case linphone::AccountCreatorUsernameStatusInvalid:
case linphone::AccountCreator::UsernameStatus::Invalid:
error = tr