diff --git a/.gitignore b/.gitignore index b5a7a4d0b..eaafa02dc 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ CMakeLists.txt.user build-*-Debug build-*-Default prepare.conf.user +build-desktop/* # Tags ------------------------------------------------------------------------- diff --git a/.gitlab-ci-files/job-linux-desktop.yml b/.gitlab-ci-files/job-linux-desktop.yml index 12c37efe9..839ce142b 100644 --- a/.gitlab-ci-files/job-linux-desktop.yml +++ b/.gitlab-ci-files/job-linux-desktop.yml @@ -8,6 +8,7 @@ extends: .linux-prepare script: + - cmake --version - export CC=$CC - export CXX=$CXX - mkdir -p build-desktop/OUTPUT @@ -17,27 +18,20 @@ - echo $CMAKE_OPTIONS - echo $CMAKE_SANITIZER_OPTIONS # SDK Building - - mkdir -p linphone-sdk/build-sdk - - cd linphone-sdk/build-sdk - - cmake .. -G "$CMAKE_GENERATOR" -DLINPHONESDK_PLATFORM=Desktop $DEFAULT_LINUX_CMAKE_OPTIONS $CMAKE_OPTIONS $SCHEDULE_CMAKE_OPTIONS $CMAKE_SANITIZER_OPTIONS - - cmake --build . --target sdk $LBC_NODEBUG_OPTIONS - - cd ../../submodules/externals/minizip -# Minizip submodule Building - - mkdir -p build-minizip - - cd build-minizip - - cmake .. -G "$CMAKE_GENERATOR" $DEFAULT_LINUX_CMAKE_OPTIONS $CMAKE_OPTIONS $SCHEDULE_CMAKE_OPTIONS $CMAKE_SANITIZER_OPTIONS -DCMAKE_INSTALL_PREFIX=OUTPUT -DCMAKE_PREFIX_PATH="../../../linphone-sdk/build-sdk/linphone-sdk/desktop" + - cd build-desktop + - cmake .. -G "$CMAKE_GENERATOR" -DCMAKE_VERBOSE_MAKEFILE=ON -DLINPHONESDK_PLATFORM=Desktop $DEFAULT_LINUX_CMAKE_OPTIONS $CMAKE_OPTIONS $SCHEDULE_CMAKE_OPTIONS $CMAKE_SANITIZER_OPTIONS - cmake --build . --target all $LBC_NODEBUG_OPTIONS - - cmake --build . --target install -# Desktop Building - - cd ../../../../build-desktop - - cmake .. -G "$CMAKE_GENERATOR" $DEFAULT_LINUX_CMAKE_OPTIONS $CMAKE_OPTIONS $SCHEDULE_CMAKE_OPTIONS $CMAKE_SANITIZER_OPTIONS -DCMAKE_INSTALL_PREFIX=OUTPUT -DCMAKE_PREFIX_PATH="linphone-sdk/build-sdk/linphone-sdk/desktop;submodules/externals/minizip/build-minizip/OUTPUT" - - cmake --build . --target all -- $ADDITIONAL_BUILD_OPTIONS - - cmake --build . --target install -- $ADDITIONAL_BUILD_OPTIONS +# Minizip install to OUTPUT folder + - cmake .. + - cmake --build . --target minizip $LBC_NODEBUG_OPTIONS + - cmake --build . --target install $LBC_NODEBUG_OPTIONS +# Update CMake installation + - cmake .. -G "$CMAKE_GENERATOR" $DEFAULT_LINUX_CMAKE_OPTIONS $CMAKE_OPTIONS $SCHEDULE_CMAKE_OPTIONS $CMAKE_SANITIZER_OPTIONS + - cmake --build . --target linphone-qt $LBC_NODEBUG_OPTIONS + - cmake --build . --target install artifacts: paths: - build-desktop/OUTPUT - - linphone-sdk/build-sdk/linphone-sdk/desktop - - submodules/externals/minizip/build-minizip/OUTPUT expire_in: 1 week diff --git a/.gitlab-ci-files/job-macosx-desktop.yml b/.gitlab-ci-files/job-macosx-desktop.yml index 3c8054cd0..51553daa5 100644 --- a/.gitlab-ci-files/job-macosx-desktop.yml +++ b/.gitlab-ci-files/job-macosx-desktop.yml @@ -11,38 +11,28 @@ - export PATH=$PATH:/usr/local/opt/qt/bin - if [ -d "build-desktop" ]; then rm -rf build-desktop; fi; - mkdir -p build-desktop/OUTPUT - - cd linphone-sdk + - cd build-desktop #SDK Building - - if [ -d "build-sdk" ]; then rm -rf build-sdk; fi; - - mkdir -p build-sdk - - cd build-sdk - echo $CMAKE_GENERATOR - echo $DEFAULT_MACOS_CMAKE_OPTIONS - echo $CMAKE_OPTIONS - echo $ADDITIONAL_BUILD_OPTIONS - cmake .. -G "$CMAKE_GENERATOR" -DLINPHONESDK_PLATFORM=Desktop $DEFAULT_MACOS_CMAKE_OPTIONS $XCODE_OPTIONS $CMAKE_OPTIONS - - cmake --build . $LBC_NODEBUG_OPTIONS - - cd ../../submodules/externals/minizip -# Minizip submodule Building - - if [ -d "build-minizip" ]; then rm -rf build-minizip; fi; - - mkdir -p build-minizip - - cd build-minizip - - cmake .. -G "$CMAKE_GENERATOR" $DEFAULT_MACOS_CMAKE_OPTIONS $XCODE_OPTIONS $CMAKE_OPTIONS -DCMAKE_INSTALL_PREFIX=OUTPUT -DCMAKE_PREFIX_PATH="../../../linphone-sdk/build-sdk/linphone-sdk/desktop" - cmake --build . --target all $LBC_NODEBUG_OPTIONS - - cmake --build . --target install -# Desktop Building - - cd ../../../../build-desktop - - cmake .. -G "$CMAKE_GENERATOR" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 $DEFAULT_MACOS_CMAKE_OPTIONS $XCODE_OPTIONS $CMAKE_OPTIONS -DCMAKE_INSTALL_PREFIX=OUTPUT -DCMAKE_PREFIX_PATH="linphone-sdk/build-sdk/linphone-sdk/desktop;submodules/externals/minizip/build-minizip/OUTPUT" - - cmake --build . --target all -- $ADDITIONAL_BUILD_OPTIONS +# Minizip install to OUTPUT folder + - cmake .. + - cmake --build . --target minizip + - cmake --build . --target install +# Update CMake installation + - cmake .. -G "$CMAKE_GENERATOR" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 $DEFAULT_MACOS_CMAKE_OPTIONS $XCODE_OPTIONS $CMAKE_OPTIONS + - cmake --build . --target linphone-qt -- $ADDITIONAL_BUILD_OPTIONS # - codesign --verbose -s "$MACOS_SIGNING_IDENTITY" WORK/desktop/Build/linphone_package/Linphone-*.dmg -# - cmake --build . --target install -- $ADDITIONAL_BUILD_OPTIONS + - cmake --build . --target install -- $ADDITIONAL_BUILD_OPTIONS - ccache -s artifacts: paths: - build-desktop/OUTPUT - - linphone-sdk/build-sdk/linphone-sdk/desktop - - submodules/externals/minizip/build-minizip/OUTPUT expire_in: 1 week @@ -72,7 +62,6 @@ job-macosx-ninja: variables: CMAKE_GENERATOR: Ninja - CMAKE_OPTIONS: -DENABLE_UNIT_TESTS=ON extends: .job-macosx-desktop diff --git a/.gitlab-ci-files/job-windows-desktop.yml b/.gitlab-ci-files/job-windows-desktop.yml index f984a2c00..60357f858 100644 --- a/.gitlab-ci-files/job-windows-desktop.yml +++ b/.gitlab-ci-files/job-windows-desktop.yml @@ -57,39 +57,27 @@ - mkdir build-desktop - cd build-desktop - mkdir OUTPUT -#SDK Building - - cd ../linphone-sdk - #handling the case of previous job cancellation - - IF EXIST build-sdkdesktop RMDIR /S /Q build-sdkdesktop - - mkdir build-sdk - - cd build-sdk +#SDK Building #we launch the msvc-cl wrapper located in python scripts folder #this wrapper relays only needed calls to the real compiler #cache stats display - C:\PROGRA~1\Python37\Scripts\cl -s - - cmake .. -G "Visual Studio 15 2017" -DLINPHONESDK_PLATFORM=Desktop -DENABLE_CSHARP_WRAPPER=YES -DCMAKE_BUILD_TYPE=Release %DEFAULT_WINDOWS_CMAKE_OPTIONS% %CMAKE_OPTIONS% - - cmake --build . --target sdk --config Release %LBC_NODEBUG_OPTIONS% -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false - - cd ../../submodules/externals/minizip -# Minizip submodule Building - - IF EXIST build-minizip RMDIR /S /Q build-minizip - - mkdir build-minizip - - cd build-minizip - - cmake .. -G "Visual Studio 15 2017" -DCMAKE_BUILD_TYPE=Release %DEFAULT_WINDOWS_CMAKE_OPTIONS% %CMAKE_OPTIONS% -DCMAKE_INSTALL_PREFIX=OUTPUT -DCMAKE_PREFIX_PATH="../../../linphone-sdk/build-sdk/linphone-sdk/desktop" - - cmake --build . --target all_build --config Release %LBC_NODEBUG_OPTIONS% -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false + - cmake .. -G "Visual Studio 15 2017" -DLINPHONESDK_PLATFORM=Desktop -DENABLE_CSHARP_WRAPPER=YES -DCMAKE_BUILD_TYPE=Release %DEFAULT_WINDOWS_CMAKE_OPTIONS% %CMAKE_OPTIONS% + - cmake --build . --target ALL_BUILD --config Release %LBC_NODEBUG_OPTIONS% -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false +# Minizip install to OUTPUT folder + - cmake .. + - cmake --build . --target minizip - cmake --build . --target install --config Release %LBC_NODEBUG_OPTIONS% -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false -# Desktop Building - - cd ../../../../build-desktop - - cmake .. -G "Visual Studio 15 2017" -DENABLE_CSHARP_WRAPPER=YES -DCMAKE_BUILD_TYPE=Release %DEFAULT_WINDOWS_CMAKE_OPTIONS% %CMAKE_OPTIONS% -DCMAKE_INSTALL_PREFIX=OUTPUT -DCMAKE_PREFIX_PATH="linphone-sdk/build-sdk/linphone-sdk/desktop;submodules/externals/minizip/build-minizip/OUTPUT" - - cmake --build . --target all_build --config Release -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false +# Update CMake installation + - cmake .. -G "Visual Studio 15 2017" -DCMAKE_BUILD_TYPE=Release %DEFAULT_WINDOWS_CMAKE_OPTIONS% %CMAKE_OPTIONS% + - cmake --build . --target linphone-qt --config Release -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false - cmake --build . --target install --config Release -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false - C:\PROGRA~1\Python37\Scripts\cl -s artifacts: paths: - build-desktop\OUTPUT - - linphone-sdk\build-sdk\linphone-sdk\desktop - - submodules\externals\minizip\build-minizip\OUTPUT - expire_in: 1 week + expire_in: 2 days .job-windows-vs2017-scheduled: extends: .job-windows-vs2017 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d250197dc..c4882e8e1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,11 +7,7 @@ variables: MAKEFILE_JOBS: 5 CCACHE_SIZE: 2G #this option is used to speedup submodule building times, when we don't need to trace debug (like SDK where it is already tested in its project) - LBC_NODEBUG_OPTIONS : --parallel $MAKEFILE_JOBS - DEFAULT_LINUX_CMAKE_OPTIONS : -DENABLE_TOOLS=OFF - DEFAULT_MACOS_CMAKE_OPTIONS : -DENABLE_TOOLS=OFF - DEFAULT_WINDOWS_CMAKE_OPTIONS : -DENABLE_TOOLS=OFF - + LBC_NODEBUG_OPTIONS : --parallel $MAKEFILE_JOBS # DEFAULT_LINUX_CMAKE_OPTIONS: -DENABLE_NON_FREE_CODECS=YES -DENABLE_OPENH264=YES # DEFAULT_MACOS_CMAKE_OPTIONS: -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 -DENABLE_UPDATE_CHECK=YES diff --git a/CHANGELOG.md b/CHANGELOG.md index fbd742e39..6fbaca50c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,10 +17,12 @@ - TelKeypad supports A, B, C and D keys. - TelKeypad supports keyboard. - OpenH264 codec can be download in the application. -- Remove useless splashscreen. +- New icons - Disable screensaver on fullscreen video call. - Add caller/callee on saved files. - Supports totally french, english, portuguese, russian, turkish, ukrainian. +- App Nap avoiding for MacOs + ### Fixes @@ -29,6 +31,11 @@ - Do not use `:` separator when a file is saved on Windows. - Avoid mark as read on selected chat room if window is not active. +### Removed + +- Prepare.py configuration +- Remove useless splashscreen. + ## 4.1.0 - 2017-07-19 ### Features diff --git a/CMakeLists.txt b/CMakeLists.txt index 5646aabf6..35d86577f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,9 +20,31 @@ # ################################################################################ +# First building command: +# cmake .. -DENABLE_VPX=NO && cmake --build . --target all --parallel 10 && cmake --build . --target install && cmake .. +# Logic : Prepare first building of the SDK and Minizip. Install binaries and prepare for application building. +# Next, we can build the application with cmake --build . --target all --parallel 10 && cmake --build . --target install + cmake_minimum_required(VERSION 3.1) project(linphoneqt VERSION 4.1.1) +# Prepare gobal CMAKE configuration specific to the current project +list(APPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}/linphone-sdk/desktop;${CMAKE_BINARY_DIR}/OUTPUT") +message("${CMAKE_PREFIX_PATH}") +set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/OUTPUT") +if(UNIX AND NOT APPLE) + set(CMAKE_INSTALL_RPATH "$ORIGIN;$ORIGIN/lib64;$ORIGIN/../lib64;$ORIGIN/lib;$ORIGIN/../lib") + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +endif() +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +# Avoid cmake warning if CMP0071 is not set. +if (POLICY CMP0071) + cmake_policy(SET CMP0071 NEW) +endif () +#set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +#------------------------------------------------------------------------------ + set(APP_LIBRARY app-library) include(application_info.cmake) @@ -32,460 +54,487 @@ set(TARGET_NAME linphone-qt) set(CMAKE_CXX_STANDARD 11) -set(ASSETS_DIR "assets") +#------------------------------------------------------------------------------- +# SET OPTIONS +#------------------------------------------------------------------------------- option(ENABLE_UPDATE_CHECK "Enable update check." NO) +option(ENABLE_UNIT_TESTS "Enable unit test of SDK." NO ) +option(ENABLE_TESTS "Build with testing binaries of SDK" NO ) +option(ENABLE_TESTS_COMPONENTS "Build libbctoolbox-tester" NO ) +option(ENABLE_TOOLS "Enable tools of SDK" NO) +option(ENABLE_STRICT "Build with strict compilator flags e.g. -Wall -Werror" NO) + +option(ENABLE_FFMPEG "Build mediastreamer2 with ffmpeg video support." YES) + +if(WIN32 OR APPLE) + option(ENABLE_OPUS "Build mediastreamer2 with the OPUS codec." YES) +else()##Opus crash on Linux. The version for 4.3 is old. We have to use a switch in configuration to select the newest version for desktop. + option(ENABLE_OPUS "Build mediastreamer2 with the OPUS codec." NO) + option(ENABLE_V4L "Ability to capture and display video using libv4l2 or libv4l." YES) +endif() + + +option(ENABLE_RELATIVE_PREFIX "Set Internal packages relative to the binary" YES) include(GNUInstallDirs) include(CheckCXXCompilerFlag) -# Use automatically moc from Qt5. -set(CMAKE_AUTOMOC ON) -set(CMAKE_INCLUDE_CURRENT_DIR ON) -# Avoid cmake warning if CMP0071 is not set. -if (POLICY CMP0071) - cmake_policy(SET CMP0071 NEW) -endif () -if (NOT WIN32) - check_cxx_compiler_flag("-Wsuggest-override" SUGGEST_OVERRIDE) - set(CUSTOM_FLAGS "\ --Wall \ --Wcast-align \ --Wconversion \ --Werror=old-style-cast \ --Werror=return-type \ --Wextra \ --Wfloat-equal \ --Winit-self \ --Wnon-virtual-dtor \ --Woverloaded-virtual \ --Wpointer-arith \ --Wsign-conversion \ --Wuninitialized \ --Wunused \ -") - if (NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang") - set(CUSTOM_FLAGS "${CUSTOM_FLAGS} -Wlogical-op") - endif () - if (SUGGEST_OVERRIDE) - set(CUSTOM_FLAGS "${CUSTOM_FLAGS} -Wsuggest-override -Werror=suggest-override") - endif () -endif () +add_subdirectory("linphone-sdk" "linphone-sdk/build-sdk") -set(CUSTOM_FLAGS "${CUSTOM_FLAGS} -DQT_NO_EXCEPTIONS") +find_package(LinphoneCxx CONFIG) +find_package(Linphone CONFIG) +find_package(bctoolbox CONFIG) +find_package(belcard CONFIG) +find_package(Mediastreamer2 CONFIG) +find_package(ortp CONFIG) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CUSTOM_FLAGS}") -# See: http://stackoverflow.com/a/1372836 -if (WIN32) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WINSOCKAPI_") -endif () -set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG -DQT_NO_DEBUG") -set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG") +if( NOT (LinphoneCxx_FOUND)) + message("Linphone packages are not installed. Build and install it in order to build Minizip and then Desktop Application.") +else() +# Linphone SDK has been builded + message("LINPHONECXX : ${LINPHONECXX_INCLUDE_DIRS} => ${LINPHONECXX_LIBRARIES}") + add_subdirectory(submodules/externals/minizip "submodules/externals/minizip/build-minizip") + add_dependencies(minizip sdk) + find_package(Minizip) + if( NOT(Minizip_FOUND)) + message("Minizip are not installed. Build and install it in order to build Desktop Application.") + else() + message("MINIZIP : ${MINIZIP_INCLUDE_DIRS} => ${MINIZIP_LIBRARIES}") + message("INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} FRAMEWORK_PATH=${CMAKE_FRAMEWORK_PATH}") + message("LINPHONE : ${LINPHONE_INCLUDE_DIRS} => ${LINPHONE_LIBRARIES}") + message("LINPHONECXX : ${LINPHONECXX_INCLUDE_DIRS} => ${LINPHONECXX_LIBRARIES}") + +# Build configuration + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG -DQT_NO_DEBUG") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG") + if( WIN32) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WINSOCKAPI_")#remove error from windows headers order + endif() + set(CMAKE_INCLUDE_CURRENT_DIR ON)#useful for config.h + + set(QT5_PACKAGES Core Gui Quick Widgets QuickControls2 Svg LinguistTools Concurrent Network) + if (UNIX AND NOT APPLE) + list(APPEND QT5_PACKAGES DBus) + endif () + set(QT5_PACKAGES_OPTIONAL TextToSpeech) + set(CMAKE_AUTOMOC ON) +#------------------------------------------------- + set(ASSETS_DIR "assets") + set(SOURCES + src/app/App.cpp + src/app/AppController.cpp + src/app/cli/Cli.cpp + src/app/logger/Logger.cpp + src/app/paths/Paths.cpp + src/app/providers/AvatarProvider.cpp + src/app/providers/ImageProvider.cpp + src/app/providers/ThumbnailProvider.cpp + src/app/translator/DefaultTranslator.cpp + src/components/assistant/AssistantModel.cpp + src/components/authentication/AuthenticationNotifier.cpp + src/components/call/CallModel.cpp + src/components/calls/CallsListModel.cpp + src/components/calls/CallsListProxyModel.cpp + src/components/camera/Camera.cpp + src/components/camera/CameraPreview.cpp + src/components/camera/MSFunctions.cpp + src/components/chat/ChatModel.cpp + src/components/chat/ChatProxyModel.cpp + src/components/codecs/AbstractCodecsModel.cpp + src/components/codecs/AudioCodecsModel.cpp + src/components/codecs/VideoCodecsModel.cpp + src/components/conference/ConferenceAddModel.cpp + src/components/conference/ConferenceHelperModel.cpp + src/components/conference/ConferenceModel.cpp + src/components/contact/ContactModel.cpp + src/components/contact/VcardModel.cpp + src/components/contacts/ContactsListModel.cpp + src/components/contacts/ContactsListProxyModel.cpp + src/components/core/CoreHandlers.cpp + src/components/core/CoreManager.cpp + src/components/core/event-count-notifier/AbstractEventCountNotifier.cpp + src/components/file/FileDownloader.cpp + src/components/file/FileExtractor.cpp + src/components/notifier/Notifier.cpp + src/components/other/clipboard/Clipboard.cpp + src/components/other/colors/Colors.cpp + src/components/other/text-to-speech/TextToSpeech.cpp + src/components/other/units/Units.cpp + src/components/presence/OwnPresenceModel.cpp + src/components/presence/Presence.cpp + src/components/settings/AccountSettingsModel.cpp + src/components/settings/SettingsModel.cpp + src/components/sip-addresses/SipAddressesModel.cpp + src/components/sip-addresses/SipAddressesProxyModel.cpp + src/components/sip-addresses/SipAddressObserver.cpp + src/components/sound-player/SoundPlayer.cpp + src/components/telephone-numbers/TelephoneNumbersModel.cpp + src/components/timeline/TimelineModel.cpp + src/components/url-handlers/UrlHandlers.cpp + src/utils/LinphoneUtils.cpp + src/utils/MediastreamerUtils.cpp + src/utils/QExifImageHeader.cpp + src/utils/Utils.cpp + ) -# ------------------------------------------------------------------------------ -# Define packages, libs, sources, headers, resources and languages. -# ------------------------------------------------------------------------------ + set(HEADERS + src/app/App.hpp + src/app/AppController.hpp + src/app/cli/Cli.hpp + src/app/logger/Logger.hpp + src/app/paths/Paths.hpp + src/app/providers/AvatarProvider.hpp + src/app/providers/ImageProvider.hpp + src/app/providers/ThumbnailProvider.hpp + src/app/single-application/SingleApplication.hpp + src/app/translator/DefaultTranslator.hpp + src/components/assistant/AssistantModel.hpp + src/components/authentication/AuthenticationNotifier.hpp + src/components/call/CallModel.hpp + src/components/calls/CallsListModel.hpp + src/components/calls/CallsListProxyModel.hpp + src/components/camera/Camera.hpp + src/components/camera/CameraPreview.hpp + src/components/camera/MSFunctions.hpp + src/components/chat/ChatModel.hpp + src/components/chat/ChatProxyModel.hpp + src/components/codecs/AbstractCodecsModel.hpp + src/components/codecs/AudioCodecsModel.hpp + src/components/codecs/VideoCodecsModel.hpp + src/components/Components.hpp + src/components/conference/ConferenceAddModel.hpp + src/components/conference/ConferenceHelperModel.hpp + src/components/conference/ConferenceModel.hpp + src/components/contact/ContactModel.hpp + src/components/contact/VcardModel.hpp + src/components/contacts/ContactsListModel.hpp + src/components/contacts/ContactsListProxyModel.hpp + src/components/core/CoreHandlers.hpp + src/components/core/CoreManager.hpp + src/components/core/event-count-notifier/AbstractEventCountNotifier.hpp + src/components/file/FileDownloader.hpp + src/components/file/FileExtractor.hpp + src/components/notifier/Notifier.hpp + src/components/other/clipboard/Clipboard.hpp + src/components/other/colors/Colors.hpp + src/components/other/desktop-tools/DesktopTools.hpp + src/components/other/text-to-speech/TextToSpeech.hpp + src/components/other/units/Units.hpp + src/components/presence/OwnPresenceModel.hpp + src/components/presence/Presence.hpp + src/components/settings/AccountSettingsModel.hpp + src/components/settings/SettingsModel.hpp + src/components/sip-addresses/SipAddressesModel.hpp + src/components/sip-addresses/SipAddressesProxyModel.hpp + src/components/sip-addresses/SipAddressObserver.hpp + src/components/sound-player/SoundPlayer.hpp + src/components/telephone-numbers/TelephoneNumbersModel.hpp + src/components/timeline/TimelineModel.hpp + src/components/url-handlers/UrlHandlers.hpp + src/utils/LinphoneUtils.hpp + src/utils/MediastreamerUtils.hpp + src/utils/QExifImageHeader.hpp + src/utils/Utils.hpp + ) -set(QT5_PACKAGES Core Gui Quick Widgets QuickControls2 Svg LinguistTools Concurrent Network) -if (UNIX AND NOT APPLE) - list(APPEND QT5_PACKAGES DBus) -endif () -set(QT5_PACKAGES_OPTIONAL TextToSpeech) + set(MAIN_FILE src/app/main.cpp) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + if (APPLE) + list(APPEND SOURCES + src/app/single-application/SingleApplication.cpp + src/components/core/event-count-notifier/EventCountNotifierMacOs.m + src/components/other/desktop-tools/DesktopToolsMacOs.cpp + src/components/other/desktop-tools/screen-saver/ScreenSaverMacOs.m + src/components/other/desktop-tools/state-process/StateProcessMacOs.mm + ) + list(APPEND HEADERS + src/app/single-application/SingleApplicationPrivate.hpp + src/components/core/event-count-notifier/EventCountNotifierMacOs.hpp + src/components/other/desktop-tools/DesktopToolsMacOs.hpp + ) + elseif (WIN32) + list(APPEND SOURCES + src/app/single-application/SingleApplication.cpp + src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.cpp + src/components/other/desktop-tools/DesktopToolsWindows.cpp + ) + list(APPEND HEADERS + src/app/single-application/SingleApplicationPrivate.hpp + src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.hpp + src/components/other/desktop-tools/DesktopToolsWindows.hpp + ) + else () + list(APPEND SOURCES + src/app/single-application/SingleApplicationDBus.cpp + src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.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/event-count-notifier/EventCountNotifierSystemTrayIcon.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 + ) + endif () -find_package(LinphoneCxx CONFIG REQUIRED) -find_package(Linphone CONFIG REQUIRED) -find_package(bctoolbox CONFIG REQUIRED) -find_package(belcard CONFIG REQUIRED) -find_package(Mediastreamer2 CONFIG REQUIRED) -find_package(ortp CONFIG REQUIRED) + set(QRC_RESOURCES resources.qrc) -find_package(Minizip REQUIRED) + set(LANGUAGES_DIRECTORY "${ASSETS_DIR}/languages") + set(I18N_FILENAME i18n.qrc) + set(LANGUAGES de en fr_FR ja lt ru sv tr pt_BR) -message("INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} FRAMEWORK_PATH=${CMAKE_FRAMEWORK_PATH}") -message("LINPHONE : ${LINPHONE_INCLUDE_DIRS} => ${LINPHONE_LIBRARIES}") -message("LINPHONECXX : ${LINPHONECXX_INCLUDE_DIRS} => ${LINPHONECXX_LIBRARIES}") + # ------------------------------------------------------------------------------ -set(SOURCES - src/app/App.cpp - src/app/AppController.cpp - src/app/cli/Cli.cpp - src/app/logger/Logger.cpp - src/app/paths/Paths.cpp - src/app/providers/AvatarProvider.cpp - src/app/providers/ImageProvider.cpp - src/app/providers/ThumbnailProvider.cpp - src/app/translator/DefaultTranslator.cpp - src/components/assistant/AssistantModel.cpp - src/components/authentication/AuthenticationNotifier.cpp - src/components/call/CallModel.cpp - src/components/calls/CallsListModel.cpp - src/components/calls/CallsListProxyModel.cpp - src/components/camera/Camera.cpp - src/components/camera/CameraPreview.cpp - src/components/camera/MSFunctions.cpp - src/components/chat/ChatModel.cpp - src/components/chat/ChatProxyModel.cpp - src/components/codecs/AbstractCodecsModel.cpp - src/components/codecs/AudioCodecsModel.cpp - src/components/codecs/VideoCodecsModel.cpp - src/components/conference/ConferenceAddModel.cpp - src/components/conference/ConferenceHelperModel.cpp - src/components/conference/ConferenceModel.cpp - src/components/contact/ContactModel.cpp - src/components/contact/VcardModel.cpp - src/components/contacts/ContactsListModel.cpp - src/components/contacts/ContactsListProxyModel.cpp - src/components/core/CoreHandlers.cpp - src/components/core/CoreManager.cpp - src/components/core/event-count-notifier/AbstractEventCountNotifier.cpp - src/components/file/FileDownloader.cpp - src/components/file/FileExtractor.cpp - src/components/notifier/Notifier.cpp - src/components/other/clipboard/Clipboard.cpp - src/components/other/colors/Colors.cpp - src/components/other/text-to-speech/TextToSpeech.cpp - src/components/other/units/Units.cpp - src/components/presence/OwnPresenceModel.cpp - src/components/presence/Presence.cpp - src/components/settings/AccountSettingsModel.cpp - src/components/settings/SettingsModel.cpp - src/components/sip-addresses/SipAddressesModel.cpp - src/components/sip-addresses/SipAddressesProxyModel.cpp - src/components/sip-addresses/SipAddressObserver.cpp - src/components/sound-player/SoundPlayer.cpp - src/components/telephone-numbers/TelephoneNumbersModel.cpp - src/components/timeline/TimelineModel.cpp - src/components/url-handlers/UrlHandlers.cpp - src/utils/LinphoneUtils.cpp - src/utils/MediastreamerUtils.cpp - src/utils/QExifImageHeader.cpp - src/utils/Utils.cpp -) + function (PREPEND list prefix) + set(new_list "") -set(HEADERS - src/app/App.hpp - src/app/AppController.hpp - src/app/cli/Cli.hpp - src/app/logger/Logger.hpp - src/app/paths/Paths.hpp - src/app/providers/AvatarProvider.hpp - src/app/providers/ImageProvider.hpp - src/app/providers/ThumbnailProvider.hpp - src/app/single-application/SingleApplication.hpp - src/app/translator/DefaultTranslator.hpp - src/components/assistant/AssistantModel.hpp - src/components/authentication/AuthenticationNotifier.hpp - src/components/call/CallModel.hpp - src/components/calls/CallsListModel.hpp - src/components/calls/CallsListProxyModel.hpp - src/components/camera/Camera.hpp - src/components/camera/CameraPreview.hpp - src/components/camera/MSFunctions.hpp - src/components/chat/ChatModel.hpp - src/components/chat/ChatProxyModel.hpp - src/components/codecs/AbstractCodecsModel.hpp - src/components/codecs/AudioCodecsModel.hpp - src/components/codecs/VideoCodecsModel.hpp - src/components/Components.hpp - src/components/conference/ConferenceAddModel.hpp - src/components/conference/ConferenceHelperModel.hpp - src/components/conference/ConferenceModel.hpp - src/components/contact/ContactModel.hpp - src/components/contact/VcardModel.hpp - src/components/contacts/ContactsListModel.hpp - src/components/contacts/ContactsListProxyModel.hpp - src/components/core/CoreHandlers.hpp - src/components/core/CoreManager.hpp - src/components/core/event-count-notifier/AbstractEventCountNotifier.hpp - src/components/file/FileDownloader.hpp - src/components/file/FileExtractor.hpp - src/components/notifier/Notifier.hpp - src/components/other/clipboard/Clipboard.hpp - src/components/other/colors/Colors.hpp - src/components/other/desktop-tools/DesktopTools.hpp - src/components/other/text-to-speech/TextToSpeech.hpp - src/components/other/units/Units.hpp - src/components/presence/OwnPresenceModel.hpp - src/components/presence/Presence.hpp - src/components/settings/AccountSettingsModel.hpp - src/components/settings/SettingsModel.hpp - src/components/sip-addresses/SipAddressesModel.hpp - src/components/sip-addresses/SipAddressesProxyModel.hpp - src/components/sip-addresses/SipAddressObserver.hpp - src/components/sound-player/SoundPlayer.hpp - src/components/telephone-numbers/TelephoneNumbersModel.hpp - src/components/timeline/TimelineModel.hpp - src/components/url-handlers/UrlHandlers.hpp - src/utils/LinphoneUtils.hpp - src/utils/MediastreamerUtils.hpp - src/utils/QExifImageHeader.hpp - src/utils/Utils.hpp -) + foreach (elem ${${list}}) + list(APPEND new_list "${prefix}${elem}") + endforeach () -set(MAIN_FILE src/app/main.cpp) + set(${list} ${new_list} PARENT_SCOPE) + endfunction () -if (APPLE) - list(APPEND SOURCES - src/app/single-application/SingleApplication.cpp - src/components/core/event-count-notifier/EventCountNotifierMacOs.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/event-count-notifier/EventCountNotifierMacOs.hpp - src/components/other/desktop-tools/DesktopToolsMacOs.hpp - ) -elseif (WIN32) - list(APPEND SOURCES - src/app/single-application/SingleApplication.cpp - src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.cpp - src/components/other/desktop-tools/DesktopToolsWindows.cpp - ) - list(APPEND HEADERS - src/app/single-application/SingleApplicationPrivate.hpp - src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.hpp - src/components/other/desktop-tools/DesktopToolsWindows.hpp - ) -else () - list(APPEND SOURCES - src/app/single-application/SingleApplicationDBus.cpp - src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.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/event-count-notifier/EventCountNotifierSystemTrayIcon.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 - ) -endif () + # Force absolute paths. + PREPEND(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/") + PREPEND(HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/") -set(QRC_RESOURCES resources.qrc) + # ------------------------------------------------------------------------------ + # Compute QML files list. + # ------------------------------------------------------------------------------ -set(LANGUAGES_DIRECTORY "${ASSETS_DIR}/languages") -set(I18N_FILENAME i18n.qrc) -set(LANGUAGES de en fr_FR ja lt ru sv tr pt_BR) + set(QML_SOURCES) + file(STRINGS ${QRC_RESOURCES} QRC_RESOURCES_CONTENT) + foreach (line ${QRC_RESOURCES_CONTENT}) + set(result) + string(REGEX REPLACE + "^[ \t]*<[ \t]*file[ \t]*>[ \t]*(.+\\.[a-z]+)[ \t]*<[ \t]*/[ \t]*file[ \t]*>[ \t]*$" + "\\1" + result + "${line}" + ) + string(REGEX MATCH "\\.[a-z]+$" is_ui ${result}) + if (NOT ${is_ui} STREQUAL "") + list(APPEND QML_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${result}") + endif () + endforeach () -# ------------------------------------------------------------------------------ + # ------------------------------------------------------------------------------ + # Init git hooks. + # ------------------------------------------------------------------------------ -function (PREPEND list prefix) - set(new_list "") + if (NOT WIN32) + add_custom_target( + check_qml DEPENDS ${QML_SOURCES} + COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tools/check_qml_syntax" + ) + endif() - foreach (elem ${${list}}) - list(APPEND new_list "${prefix}${elem}") - endforeach () + execute_process(COMMAND ${CMAKE_COMMAND} -E copy + "${CMAKE_CURRENT_SOURCE_DIR}/tools/private/pre-commit" + "${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/pre-commit" + ) + set(_QML_IMPORT_PATHS "") + list(APPEND _QML_IMPORT_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/ui/modules") + list(APPEND _QML_IMPORT_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/ui/dev-modules") + list(APPEND _QML_IMPORT_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/ui/scripts") + list(APPEND _QML_IMPORT_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/ui/views") - set(${list} ${new_list} PARENT_SCOPE) -endfunction () -# Force absolute paths. -PREPEND(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/") -PREPEND(HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/") + set(QML_IMPORT_PATH ${_QML_IMPORT_PATHS} CACHE STRING "Path used to locate CMake modules by Qt Creator" FORCE) -# ------------------------------------------------------------------------------ -# Compute QML files list. -# ------------------------------------------------------------------------------ -set(QML_SOURCES) -file(STRINGS ${QRC_RESOURCES} QRC_RESOURCES_CONTENT) -foreach (line ${QRC_RESOURCES_CONTENT}) - set(result) - string(REGEX REPLACE - "^[ \t]*<[ \t]*file[ \t]*>[ \t]*(.+\\.[a-z]+)[ \t]*<[ \t]*/[ \t]*file[ \t]*>[ \t]*$" - "\\1" - result - "${line}" - ) - string(REGEX MATCH "\\.[a-z]+$" is_ui ${result}) - if (NOT ${is_ui} STREQUAL "") - list(APPEND QML_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${result}") - endif () -endforeach () - -# ------------------------------------------------------------------------------ -# Init git hooks. -# ------------------------------------------------------------------------------ - -if (NOT WIN32) - add_custom_target( - check_qml DEPENDS ${QML_SOURCES} - COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tools/check_qml_syntax" - ) +if(APPLE) + if(MS2_PLUGINS_LOCATION) + set(MSPLUGINS_DIR ${MS2_PLUGINS_LOCATION}) + else() + set(MSPLUGINS_DIR "Frameworks/mediastreamer2.framework/Versions/A/Libraries") + endif() +else() + set(MSPLUGINS_DIR "${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins") endif() + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.cmake" "${CMAKE_CURRENT_BINARY_DIR}/config.h") + # ------------------------------------------------------------------------------ + # Build. + # ------------------------------------------------------------------------------ -execute_process(COMMAND ${CMAKE_COMMAND} -E copy - "${CMAKE_CURRENT_SOURCE_DIR}/tools/private/pre-commit" - "${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/pre-commit" -) + include_directories(src/) -# ------------------------------------------------------------------------------ -# Create config.h file -# ------------------------------------------------------------------------------ + find_package(Qt5 COMPONENTS ${QT5_PACKAGES} REQUIRED) + find_package(Qt5 COMPONENTS ${QT5_PACKAGES_OPTIONAL} QUIET) -set(MSPLUGINS_DIR "${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins") -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.cmake" "${CMAKE_CURRENT_BINARY_DIR}/config.h") + if (CMAKE_INSTALL_RPATH) + #Retrieve lib path from a know QT executable + get_target_property(LUPDATE_PATH Qt5::lupdate LOCATION) + get_filename_component(LUPDATE_PATH "${LUPDATE_PATH}" DIRECTORY) + get_filename_component(QT_PATH "${LUPDATE_PATH}/../lib" ABSOLUTE) + list(APPEND CMAKE_INSTALL_RPATH "${QT_PATH}") + endif () + # Add languages support. + add_subdirectory(${LANGUAGES_DIRECTORY}) -# ------------------------------------------------------------------------------ -# Build. -# ------------------------------------------------------------------------------ + list(APPEND SOURCES "${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGES_DIRECTORY}/${I18N_FILENAME}") -include_directories(src/) + # Build. + #add_library(${APP_LIBRARY} OBJECT ${SOURCES} ${HEADERS} ${RESOURCES} ${QML_SOURCES}) + add_library(${APP_LIBRARY} OBJECT ${SOURCES} ${HEADERS} ${QML_SOURCES} ${QRC_RESOURCES}) + set_property(TARGET ${APP_LIBRARY} PROPERTY POSITION_INDEPENDENT_CODE ON) -find_package(Qt5 COMPONENTS ${QT5_PACKAGES} REQUIRED) -find_package(Qt5 COMPONENTS ${QT5_PACKAGES_OPTIONAL} QUIET) + #Turn on automatic resources compilation by cmake + #Instead of excplicitely calling qt5_add_resources + set_property(TARGET ${APP_LIBRARY} PROPERTY AUTORCC ON) -if (CMAKE_INSTALL_RPATH) - #Retrieve lib path from a know QT executable - get_target_property(LUPDATE_PATH Qt5::lupdate LOCATION) - get_filename_component(LUPDATE_PATH "${LUPDATE_PATH}" DIRECTORY) - get_filename_component(QT_PATH "${LUPDATE_PATH}/../lib" ABSOLUTE) - list(APPEND CMAKE_INSTALL_RPATH "${QT_PATH}") -endif () -# Add languages support. -add_subdirectory(${LANGUAGES_DIRECTORY}) + bc_git_version(${TARGET_NAME} ${PROJECT_VERSION}) + add_dependencies(${APP_LIBRARY} ${TARGET_NAME}-git-version) + add_dependencies(${APP_LIBRARY} update_translations) + if (WIN32) + add_executable(${TARGET_NAME} WIN32 $ ${ASSETS_DIR}/app-icon.rc ${MAIN_FILE}) + else () + add_executable(${TARGET_NAME} $ ${MAIN_FILE}) + endif () -list(APPEND SOURCES "${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGES_DIRECTORY}/${I18N_FILENAME}") + set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME "${EXECUTABLE_NAME}") + set(INCLUDED_DIRECTORIES "${LINPHONECXX_INCLUDE_DIRS}" "${LINPHONE_INCLUDE_DIRS}" "${BELCARD_INCLUDE_DIRS}" "${BCTOOLBOX_INCLUDE_DIRS}" "${MEDIASTREAMER2_INCLUDE_DIRS}" "${MINIZIP_INCLUDE_DIRS}") + set(LIBRARIES ${BCTOOLBOX_CORE_LIBRARIES} ${BELCARD_LIBRARIES} ${LINPHONE_LIBRARIES} ${LINPHONECXX_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES} ${ORTP_LIBRARIES} ${OPUS_LIBRARIES}) + if(WIN32) + list(APPEND LIBRARIES ${MINIZIP_LIBRARIES}) + endif() + foreach (package ${QT5_PACKAGES}) + list(APPEND INCLUDED_DIRECTORIES "${Qt5${package}_INCLUDE_DIRS}") + # `qt5_create_translation` is provided from `LinguistTools` package. + # But the `Qt5::LinguistTools` lib does not exist. Remove it. + if (NOT (${package} STREQUAL LinguistTools)) + list(APPEND LIBRARIES ${Qt5${package}_LIBRARIES}) + endif () + endforeach () -# Build. -#add_library(${APP_LIBRARY} OBJECT ${SOURCES} ${HEADERS} ${RESOURCES} ${QML_SOURCES}) -add_library(${APP_LIBRARY} OBJECT ${SOURCES} ${HEADERS} ${QML_SOURCES} ${QRC_RESOURCES}) -set_property(TARGET ${APP_LIBRARY} PROPERTY POSITION_INDEPENDENT_CODE ON) + foreach (package ${QT5_PACKAGES_OPTIONAL}) + if ("${Qt5${package}_FOUND}") + message("Optional package ${package} found.") + list(APPEND INCLUDED_DIRECTORIES "${Qt5${package}_INCLUDE_DIRS}") + list(APPEND LIBRARIES ${Qt5${package}_LIBRARIES}) -#Turn on automatic resources compilation by cmake -#Instead of excplicitely calling qt5_add_resources -set_property(TARGET ${APP_LIBRARY} PROPERTY AUTORCC ON) + string(TOUPPER "${package}" INCLUDE_NAME) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D${INCLUDE_NAME}_ENABLED") + else () + message("Optional package ${package} not found.") + endif () + endforeach () -bc_git_version(${TARGET_NAME} ${PROJECT_VERSION}) -add_dependencies(${APP_LIBRARY} ${TARGET_NAME}-git-version) -add_dependencies(${APP_LIBRARY} update_translations) + if (APPLE) + list(APPEND LIBRARIES "-framework Cocoa -framework IOKit") + # -framework linphone") #This doesn't work yet + endif () + target_include_directories(${APP_LIBRARY} SYSTEM PRIVATE ${INCLUDED_DIRECTORIES}) + target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${INCLUDED_DIRECTORIES}) -if (WIN32) - add_executable(${TARGET_NAME} WIN32 $ ${ASSETS_DIR}/app-icon.rc ${MAIN_FILE}) -else () - add_executable(${TARGET_NAME} $ ${MAIN_FILE}) -endif () + target_link_libraries(${TARGET_NAME} ${LIBRARIES}) + if(WIN32) + target_link_libraries(${TARGET_NAME} wsock32 ws2_32) + endif() -set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME "${EXECUTABLE_NAME}") -set(INCLUDED_DIRECTORIES "${LINPHONECXX_INCLUDE_DIRS}" "${LINPHONE_INCLUDE_DIRS}" "${BELCARD_INCLUDE_DIRS}" "${BCTOOLBOX_INCLUDE_DIRS}" "${MEDIASTREAMER2_INCLUDE_DIRS}" "${MINIZIP_INCLUDE_DIRS}") -set(LIBRARIES ${BCTOOLBOX_CORE_LIBRARIES} ${BELCARD_LIBRARIES} ${LINPHONE_LIBRARIES} ${LINPHONECXX_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES} ${ORTP_LIBRARIES} ${MINIZIP_LIBRARIES} ${OPUS_LIBRARIES}) + foreach (target ${TARGET_NAME}) + install(TARGETS ${target} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) + endforeach () -foreach (package ${QT5_PACKAGES}) - list(APPEND INCLUDED_DIRECTORIES "${Qt5${package}_INCLUDE_DIRS}") - # `qt5_create_translation` is provided from `LinguistTools` package. - # But the `Qt5::LinguistTools` lib does not exist. Remove it. - if (NOT (${package} STREQUAL LinguistTools)) - list(APPEND LIBRARIES ${Qt5${package}_LIBRARIES}) - endif () -endforeach () + if (UNIX AND NOT APPLE) + # Install desktop/icon files. + configure_file("${ASSETS_DIR}/linphone.desktop.cmake" "${EXECUTABLE_NAME}.desktop" @ONLY) -foreach (package ${QT5_PACKAGES_OPTIONAL}) - if ("${Qt5${package}_FOUND}") - message("Optional package ${package} found.") - list(APPEND INCLUDED_DIRECTORIES "${Qt5${package}_INCLUDE_DIRS}") - list(APPEND LIBRARIES ${Qt5${package}_LIBRARIES}) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE_NAME}.desktop" + DESTINATION "${CMAKE_INSTALL_DATADIR}/applications" + ) + install(FILES "${ASSETS_DIR}/images/linphone_logo.svg" + DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps/" + RENAME "${EXECUTABLE_NAME}.svg" + ) - string(TOUPPER "${package}" INCLUDE_NAME) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D${INCLUDE_NAME}_ENABLED") - else () - message("Optional package ${package} not found.") - endif () -endforeach () + set(ICON_DIRS 16x16 22x22 24x24 32x32 64x64 128x128 256x256) + foreach (DIR ${ICON_DIRS}) + install(FILES "${ASSETS_DIR}/icons/hicolor/${DIR}/apps/icon.png" + DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/${DIR}/apps/" + RENAME "${EXECUTABLE_NAME}.png" + ) + endforeach () + endif () -if (APPLE) - list(APPEND LIBRARIES "-framework Cocoa -framework IOKit") -# -framework linphone") #This doesn't work yet -endif () + # ------------------------------------------------------------------------------ + # Install rc files. + # ------------------------------------------------------------------------------ -target_include_directories(${APP_LIBRARY} SYSTEM PRIVATE ${INCLUDED_DIRECTORIES}) -target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${INCLUDED_DIRECTORIES}) + install(FILES "${ASSETS_DIR}/linphonerc-factory" + DESTINATION "${CMAKE_INSTALL_DATADIR}/${APPLICATION_NAME}" + ) -target_link_libraries(${TARGET_NAME} ${LIBRARIES}) + set(ASSETS_ASSISTANT_DIR "${ASSETS_DIR}/assistant") + set(ASSISTANT_INSTALL_DATADIR "${CMAKE_INSTALL_DATADIR}/${APPLICATION_NAME}/assistant") + install(FILES "${ASSETS_ASSISTANT_DIR}/use-other-sip-account.rc" + DESTINATION "${ASSISTANT_INSTALL_DATADIR}" + ) + install(FILES "${ASSETS_ASSISTANT_DIR}/create-app-sip-account.rc" + DESTINATION "${ASSISTANT_INSTALL_DATADIR}" + ) + install(FILES "${ASSETS_ASSISTANT_DIR}/use-app-sip-account.rc" + DESTINATION "${ASSISTANT_INSTALL_DATADIR}" + ) -foreach (target ${TARGET_NAME}) - install(TARGETS ${target} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - ) -endforeach () + # ------------------------------------------------------------------------------ + # CPack settings & RPM. + # ------------------------------------------------------------------------------ + set(LINPHONE_DESKTOP_DIR "${CMAKE_SOURCE_DIR}") + set(LINPHONE_OUTPUT_DIR "${CMAKE_INSTALL_PREFIX}") + set(LINPHONE_SDK_DIR "${CMAKE_BINARY_DIR}/linphone-sdk") + set(TOOLS_DIR "${CMAKE_BINARY_DIR}/programs") + set(LINPHONE_SOURCE_DIR ${EP_linphone_SOURCE_DIR}) + set(LINPHONE_BUILDER_SIGNING_IDENTITY ${LINPHONE_BUILDER_SIGNING_IDENTITY}) + set(LINPHONE_SDK_TMP "${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE_NAME}-sdk-tmp") -if (UNIX AND NOT APPLE) - # Install desktop/icon files. - configure_file("${ASSETS_DIR}/linphone.desktop.cmake" "${EXECUTABLE_NAME}.desktop" @ONLY) + add_subdirectory(build) + add_subdirectory(cmake_builder/linphone_package) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE_NAME}.desktop" - DESTINATION "${CMAKE_INSTALL_DATADIR}/applications" - ) - install(FILES "${ASSETS_DIR}/images/linphone_logo.svg" - DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps/" - RENAME "${EXECUTABLE_NAME}.svg" - ) + # ------------------------------------------------------------------------------ + # To start better integration into IDE. + # ------------------------------------------------------------------------------ - set(ICON_DIRS 16x16 22x22 24x24 32x32 64x64 128x128) - foreach (DIR ${ICON_DIRS}) - install(FILES "${ASSETS_DIR}/icons/hicolor/${DIR}/apps/icon.png" - DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/${DIR}/apps/" - RENAME "${EXECUTABLE_NAME}.png" - ) - endforeach () -endif () - -# ------------------------------------------------------------------------------ -# Install rc files. -# ------------------------------------------------------------------------------ - -install(FILES "${ASSETS_DIR}/linphonerc-factory" - DESTINATION "${CMAKE_INSTALL_DATADIR}/${EXECUTABLE_NAME}" -) - -set(ASSETS_ASSISTANT_DIR "${ASSETS_DIR}/assistant") -set(ASSISTANT_INSTALL_DATADIR "${CMAKE_INSTALL_DATADIR}/${EXECUTABLE_NAME}/assistant") - -install(FILES "${ASSETS_ASSISTANT_DIR}/use-other-sip-account.rc" - DESTINATION "${ASSISTANT_INSTALL_DATADIR}" -) -install(FILES "${ASSETS_ASSISTANT_DIR}/create-app-sip-account.rc" - DESTINATION "${ASSISTANT_INSTALL_DATADIR}" -) -install(FILES "${ASSETS_ASSISTANT_DIR}/use-app-sip-account.rc" - DESTINATION "${ASSISTANT_INSTALL_DATADIR}" -) - -# ------------------------------------------------------------------------------ -# CPack settings & RPM. -# ------------------------------------------------------------------------------ - -add_subdirectory(build) - -# ------------------------------------------------------------------------------ -# To start better integration into IDE. -# ------------------------------------------------------------------------------ - -source_group( - "Qml" REGULAR_EXPRESSION ".+\.qml$" -) -source_group( - "Js" REGULAR_EXPRESSION ".+\.js$" -) -source_group( - "Svg" REGULAR_EXPRESSION ".+\.svg$" -) - -# ------------------------------ -# Installation -# ------------------------------ -install(SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/cmake_builder/install.cmake") -#endif () + source_group( + "Qml" REGULAR_EXPRESSION ".+\.qml$" + ) + source_group( + "Js" REGULAR_EXPRESSION ".+\.js$" + ) + source_group( + "Svg" REGULAR_EXPRESSION ".+\.svg$" + ) + # ------------------------------ + # Installation + # ------------------------------ + install(SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/cmake_builder/install.cmake") + #endif () + if(APPLE) + target_link_libraries(${TARGET_NAME} "${CMAKE_INSTALL_PREFIX}/lib/libminizip.dylib") + elseif(NOT WIN32) + if( EXISTS "${CMAKE_INSTALL_PREFIX}/lib64/libminizip.so") + target_link_libraries(${TARGET_NAME} "${CMAKE_INSTALL_PREFIX}/lib64/libminizip.so") + elseif(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/libminizip.so") + target_link_libraries(${TARGET_NAME} "${CMAKE_INSTALL_PREFIX}/lib/libminizip.so") + else() + message("Error cannot find ${CMAKE_INSTALL_PREFIX}/lib*/libminizip.so while linking") + endif() + endif() + endif()#If (LinphoneCxx_FOUND AND Minizip_FOUND) +endif()#If (LinphoneCxx_FOUND) \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index 23cb79033..53d1f3d01 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,281 +1,622 @@ GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + Version 3, 29 June 2007 - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + TERMS AND CONDITIONS - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". + 0. Definitions. -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. + "This License" refers to version 3 of the GNU General Public License. - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. + A "covered work" means either the unmodified Program or a work based +on the Program. - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. + 1. Source Code. -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. + The Corresponding Source for a work in source code form is that +same work. -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. + 2. Basic Permissions. - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of this License. - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. + 13. Use with the GNU Affero General Public License. -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. + 14. Revised Versions of this License. - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. - NO WARRANTY + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. + 15. Disclaimer of Warranty. - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. END OF TERMS AND CONDITIONS @@ -287,15 +628,15 @@ free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least +state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - {description} - Copyright (C) {year} {fullname} + + Copyright (C) - This program is free software; you can redistribute it and/or modify + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -303,37 +644,32 @@ the "copyright" line and a pointer to where the full notice is found. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + You should have received a copy of the GNU General Public License + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. - {signature of Ty Coon}, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/README.md b/README.md index be471cf59..df0e64e10 100644 --- a/README.md +++ b/README.md @@ -2,45 +2,95 @@ # Linphone Desktop -![screenshot](readme_screen.png) +Linphone is an open source softphone for voice and video over IP calling and instant messaging. -Linphone is a free VoIP and video softphone based on the SIP protocol. +It is fully SIP-based, for all calling, presence and IM features. + +General description is available from [linphone web site](https://www.linphone.org/technical-corner/linphone) + +### License + +Copyright © Belledonne Communications + +Linphone is dual licensed, and is available either : + + - under a [GNU/GPLv3 license](https://www.gnu.org/licenses/gpl-3.0.en.html), for free (open source). Please make sure that you understand and agree with the terms of this license before using it (see LICENSE file for details). + + - under a proprietary license, for a fee, to be used in closed source applications. Contact [Belledonne Communications](https://www.linphone.org/contact) for any question about costs and services. + +### Documentation + +- Supported features and RFCs : https://www.linphone.org/technical-corner/linphone/features + +- Linphone public wiki : https://wiki.linphone.org/xwiki/wiki/public/view/Linphone/ ## Getting started -Installing dependencies: - -apt-get install libqt53dcore5:amd64 libqt53dextras5:amd64 libqt53dinput5:amd64 libqt53dlogic5:amd64 libqt53dquick5:amd64 libqt53dquickextras5:amd64 libqt53dquickinput5:amd64 libqt53dquickrender5:amd64 libqt53drender5:amd64 libqt5concurrent5:amd64 libqt5core5a:amd64 libqt5dbus5:amd64 libqt5designer5:amd64 libqt5designercomponents5:amd64 libqt5gui5:amd64 libqt5help5:amd64 libqt5multimedia5:amd64 libqt5multimedia5-plugins:amd64 libqt5multimediawidgets5:amd64 libqt5network5:amd64 libqt5opengl5:amd64 libqt5opengl5-dev:amd64 libqt5positioning5:amd64 libqt5printsupport5:amd64 libqt5qml5:amd64 libqt5quick5:amd64 libqt5quickcontrols2-5:amd64 libqt5quickparticles5:amd64 libqt5quicktemplates2-5:amd64 libqt5quicktest5:amd64 libqt5quickwidgets5:amd64 libqt5script5:amd64 libqt5scripttools5:amd64 libqt5sensors5:amd64 libqt5serialport5:amd64 libqt5sql5:amd64 libqt5sql5-sqlite:amd64 libqt5svg5:amd64 libqt5svg5-dev:amd64 libqt5test5:amd64 libqt5webchannel5:amd64 libqt5webengine-data libqt5webenginecore5:amd64 libqt5webenginewidgets5:amd64 libqt5webkit5:amd64 libqt5widgets5:amd64 libqt5x11extras5:amd64 libqt5xml5:amd64 libqt5xmlpatterns5:amd64 qt5-default:amd64 qt5-doc qt5-gtk-platformtheme:amd64 qt5-qmake:amd64 qt5-qmltooling-plugins:amd64 - - - Here are the general instructions to build linphone for desktop. The specific instructions for each build platform is described just below. +You will need the tools defined for Linphone-SDK 4.3 : +- cmake >= 3.6 +- python = 2.7 (python 3.7 if C# wrapper generation is disabled) +- pip +- yasm +- nasm +- doxygen +- Pystache (use pip install pystache) +- six (use pip install six) +- Perl (can be downloaded at http://strawberryperl.com/ for Windows. Set your Path to perl binaries) -1. Install some build tools: `CMake`, `Python` and `Qt5` (_5.9 or newer_). `C++11` support is required! - It's necessary to install the `pip` command and to execute: +For Desktop : you will need `Qt5` (_5.9 or newer_). `C++11` support is required! + +### Set your environment + + +1. It's necessary to install the `pip` command and to execute: pip install pystache -2. It's necessary to set the environment variable `Qt5_DIR` to point to the path containing the cmake folders of Qt5. Example: +2. You have to set the environment variable `Qt5_DIR` to point to the path containing the cmake folders of Qt5, and the `PATH` to the Qt5 `bin`. Example: Qt5_DIR="~/Qt/5.9/gcc_64/lib/cmake" - -3. The `PATH` environment variable must point to the Qt5 directory `bin`. Example: - PATH="~/Qt/5.9/gcc_64/bin/:$PATH" -4. Prepare the build by running the `prepare.py` script. -5. Build the project using the appropriate build tool (`make`, `ninja`, `Xcode`, `Visual Studio (2013 or 2015 version)`). +Note: If you have `qtchooser` set in your `PATH`, the best use is : -### Specific instructions for the GNU/Linux and Mac OS X platforms + eval "$(qtchooser -print-env)" + export Qt5_DIR=${QTLIBDIR}/cmake/Qt5 + export PATH=${QTTOOLDIR}:$PATH + + +### Building + +The build is done in 3 steps. First, you need to build the SDK, then the submodule Minizip and finally, the application. + +1. Create your build folder at the root of the project : `mkdir build-desktop` +Go to this new folder and begin the build process : `cd build-desktop` + +2. Prepare your options : `cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo` By default, it will try compile all dependencies. You can remove some by adding `-ENABLE_=NO` to the command. You can use `cmake-gui ..` if you want to have a better access to them. + +3. Build the SDK : `cmake --build . --target sdk`. You can add `--parallel 10` if you have CMake>3.12 to speedup the process. + +4. Build The submodule. `cmake ..` and `cmake --build . --target install` + +5. Finish the process with a new `cmake ..` and `cmake --build . --target install`. + +When all are over, the files will be in the OUTPUT folder in the build directory. + +You can find a script file for each supported platform to achieve the first building. They only exist for convenience. +There are called `build_all_linux.sh`, `build_all_macos.sh` and `build_all_win.bat`. + +#### General Troubleshooting + +* The latest version of Doxygen doesn't work with the SDK. If you have a specific version of Doxygen that is not in your PATH, you can use `-DLINPHONESDK_DOXYGEN_PROGRAM`. + +Eg on Mac : `-DLINPHONESDK_DOXYGEN_PROGRAM=/Applications/Doxygen.app/Contents/Resources/doxygen=/Applications/Doxygen.app/Contents/Resources/doxygen` + +* If the build of the SDK crash with something like "cmd.exe failed" and no more info, it can be a dependency that is not available. You have to check if all are in your PATH. +Usually, if it is about VPX or Decaf, this could come from your Perl installation. -1. Prepare the build in a terminal by running the following command in the current directory: - ./prepare.py -DENABLE_DOC=OFF -2. Build the project in a terminal with: - make #### Mac OS X Troubleshooting To install the required dependencies on Mac OS X, you can use [Homebrew](https://brew.sh/). @@ -57,69 +107,36 @@ Before you install packages with Brew, you may have to change directories permis pip install pystache pip install graphviz -3. Finish the pre-build by cleaning the obsolete files and then run prepare.py and make again: - - ./prepare.py -c - ./prepare.py -DENABLE_DOC=OFF - make ### Specific instructions for the Windows platform -1. Ensure that you have downloaded the `Qt msvc2015 version` (32-bit). (64-bit version is not supported at this moment by Linphone Desktop.) `MinGW` must be installed too. +1. Ensure that you have downloaded the `Qt msvc2015 version` or `Qt msvc2017 version` (32-bit). (64-bit version is not supported at this moment by Linphone Desktop.) `MinGW` must be installed too. 2. Define the `Qt5_DIR` and `PATH` environment variable to the Qt5 installation path: - Qt5_DIR="C:\Qt\5.9\msvc2015\lib\cmake" - PATH="C:\Qt\5.9\msvc2015\bin;%PATH%" + Qt5_DIR="C:\Qt\\msvc2015\lib\cmake" + PATH="C:\Qt\\msvc2015\bin;%PATH%" -3. Open a Windows command line (cmd.exe) in the current directory and run: +2. Or open a Command line with Visual Studio `Developer Comand Prompt for VS 2017` and call qtenv2.bat that is in your qt binaries eg: C:\Qt\5.12.6\msvc2017\bin\qtenv2.bat - python prepare.py -G "Visual Studio 15 2017" -DENABLE_DOC=OFF +3. Install msys-coreutils : `mingw-get install msys-coreutils` -4. Run the following command in the root directory of linphone-desktop: +4. Build as usual with adding `-A Win32` to each command (General Steps) - cmake --build WORK\desktop\cmake --config Release +5. The project folder will be in the build directory. + +### Installing Linux dependencies + + +From 4.1 version of Desktop: + +apt-get install libqt53dcore5:amd64 libqt53dextras5:amd64 libqt53dinput5:amd64 libqt53dlogic5:amd64 libqt53dquick5:amd64 libqt53dquickextras5:amd64 libqt53dquickinput5:amd64 libqt53dquickrender5:amd64 libqt53drender5:amd64 libqt5concurrent5:amd64 libqt5core5a:amd64 libqt5dbus5:amd64 libqt5designer5:amd64 libqt5designercomponents5:amd64 libqt5gui5:amd64 libqt5help5:amd64 libqt5multimedia5:amd64 libqt5multimedia5-plugins:amd64 libqt5multimediawidgets5:amd64 libqt5network5:amd64 libqt5opengl5:amd64 libqt5opengl5-dev:amd64 libqt5positioning5:amd64 libqt5printsupport5:amd64 libqt5qml5:amd64 libqt5quick5:amd64 libqt5quickcontrols2-5:amd64 libqt5quickparticles5:amd64 libqt5quicktemplates2-5:amd64 libqt5quicktest5:amd64 libqt5quickwidgets5:amd64 libqt5script5:amd64 libqt5scripttools5:amd64 libqt5sensors5:amd64 libqt5serialport5:amd64 libqt5sql5:amd64 libqt5sql5-sqlite:amd64 libqt5svg5:amd64 libqt5svg5-dev:amd64 libqt5test5:amd64 libqt5webchannel5:amd64 libqt5webengine-data libqt5webenginecore5:amd64 libqt5webenginewidgets5:amd64 libqt5webkit5:amd64 libqt5widgets5:amd64 libqt5x11extras5:amd64 libqt5xml5:amd64 libqt5xmlpatterns5:amd64 qt5-default:amd64 qt5-doc qt5-gtk-platformtheme:amd64 qt5-qmake:amd64 qt5-qmltooling-plugins:amd64 - Or Open the generated Visual Studio solution `Project.sln.lnk` and build it. Check if the `Release` option is selected in Visual Studio. (With `Win32`!) ## Known bugs and issues * __4K (High DPI Displays)__ If you encounter troubles with high DPI displays on Windows, please to see this link: https://bugreports.qt.io/browse/QTBUG-53022 -## Customizing your build - -Some options can be given during the `prepare.py` step to customize the build. The basic usage of the `prepare.py` script is: - - ./prepare.py [options] - -Here are the main options you can use. - -### Building with debug symbols - -Building with debug symbols is necessary if you want to be able to debug the application using some tools like GDB or the Visual Studio debugger. To do so, pass the `--debug` option to `prepare.py`: - - ./prepare.py --debug [other options] - -### Generating an installation package (on Windows and Mac OS X platforms) - -You might want to generate an installation package to ease the distribution of the application. To add the package generation step to the build just run: - - ./prepare.py --package [other options] - -### Activate the build of all codecs - - ./prepare.py --all-codecs - -### Using more advanced options - -The `prepare.py` script is wrapper around CMake. Therefore you can give any CMake option to the `prepare.py` script. -To get a list of the options you can pass, you can run: - - ./prepare.py --list-cmake-variables - -The options that enable you to configure what will be built are the ones beginning with `ENABLE_`. So for example, you might want to build linphone without the opus codec support. To do so use: - - ./prepare.py -DENABLE_OPUS=NO ## Updating your build @@ -129,9 +146,7 @@ You need to update the project: git submodule sync && git submodule update --init --recursive Then simply re-building using the appropriate tool corresponding to your platform (make, Visual Studio...) should be sufficient to update the build (after having updated the source code via git). -However if the compilation fails, you may need to rebuild everything from scratch using: - - ./prepare.py -c && ./prepare.py [options] +However if the compilation fails, you may need to rebuild everything from scratch (Delete all files in your build-desktop folder). Then you re-build as usual. @@ -142,6 +157,12 @@ Then you re-build as usual. Linphone is getting a full internationalization support, using Transifex platform. If you want you can contribute at: https://www.transifex.com/belledonne-communications/linphone-desktop/languages/ -## License +### Feedback or bug reporting -GPLv2 © [Linphone](https://linphone.org) +Launch the application with `--verbose` parameter to get full logs and send it with your request. + +On some OS (like Fedora 22 and later), they disable Qt debug output by default. To get full output, you need to create `~/.config/QtProject/qtlogging.ini` and add : + + [Rules] + *.debug=true + qt.*.debug=false diff --git a/assets/icons/genicons.sh b/assets/icons/genicons.sh index 66934c644..858411db9 100755 --- a/assets/icons/genicons.sh +++ b/assets/icons/genicons.sh @@ -1,4 +1,23 @@ #!/usr/bin/env bash +## +## Copyright (c) 2010-2020 Belledonne Communications SARL. +## +## This file is part of linphone-desktop +## (see https://www.linphone.org). +## +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program. If not, see . +## for i in 16 22 24 32 64 128 256 do diff --git a/build_all_linux.sh b/build_all_linux.sh new file mode 100755 index 000000000..bcd7eb351 --- /dev/null +++ b/build_all_linux.sh @@ -0,0 +1,55 @@ +#!/bin/bash +## +## Copyright (c) 2010-2020 Belledonne Communications SARL. +## +## This file is part of linphone-desktop +## (see https://www.linphone.org). +## +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program. If not, see . +## + +################################################################################ +# Linux First building script +#------------------------------------------------------------------------------- + +#Stop at error +set -e + +if [[ -z ${Qt5_DIR} ]]; then + eval "$(qtchooser -print-env)" + export Qt5_DIR=${QTLIBDIR}/cmake/Qt5 + export PATH=${QTTOOLDIR}:$PATH +fi + +#Creation of folders +mkdir -p build-desktop +#Opus crash on Linux. The version for 4.3 is old. We have to use a switch in configuration to select the newest version for desktop. +#SDK building +cd build-desktop +#cmake .. -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_VPX=YES -DENABLE_GPL_THIRD_PARTIES=YES -DENABLE_NON_FREE_CODECS=YES -DENABLE_AMRNB=YES -DENABLE_AMRWB=YES -DENABLE_G729=YES -DENABLE_GSM=YES -DENABLE_ILBC=YES -DENABLE_ISAC=YES -DENABLE_SILK=YES -DENABLE_SPEEX=YES -DENABLE_H263=YES -DENABLE_H263P=YES -DENABLE_MPEG4=YES -DENABLE_OPENH264=YES -DENABLE_FFMPEG=YES -DENABLE_VIDEO=YES -DENABLE_GL=YES -DENABLE_OPUS=NO +cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_OPUS=NO +cmake --build . --target sdk --config RelWithDebInfo --parallel 10 + +#MiniZip Building +cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo +cmake --build . --target minizip --config RelWithDebInfo --parallel 10 +cmake --build . --target install + +#Desktop Building +cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo +cmake --build . --target all --config RelWithDebInfo --parallel 10 +cmake --build . --target install + + + diff --git a/build_all_macos.sh b/build_all_macos.sh index 2d15fee6e..95c31a790 100755 --- a/build_all_macos.sh +++ b/build_all_macos.sh @@ -1,25 +1,26 @@ #!/bin/sh +## +## Copyright (c) 2010-2020 Belledonne Communications SARL. +## +## This file is part of linphone-desktop +## (see https://www.linphone.org). +## +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program. If not, see . +## ################################################################################ -# CMakeLists.txt -# Copyright (C) 2020 Belledonne Communications, Grenoble France -# -################################################################################ -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -################################################################################ + +#------------------------------------------------------------------------------- # MAC OSX First building script #------------------------------------------------------------------------------- #Stop at error @@ -32,28 +33,21 @@ fi #Creation of folders mkdir -p build-desktop -mkdir -p linphone-sdk/build-sdk -mkdir -p submodules/externals/minizip/build-minizip +cd build-desktop #SDK building -cd linphone-sdk/build-sdk #LINPHONESDK_DOXYGEN_PROGRAM is set just to be sure to get the version of the Application folder -cmake .. -DLINPHONESDK_DOXYGEN_PROGRAM=/Applications/Doxygen.app/Contents/Resources/doxygen -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 -cmake --build . --target all --parallel 5 -rsync -a linphone-sdk/desktop/ ../../build-desktop/OUTPUT/ -cd ../.. +cmake .. -DLINPHONESDK_DOXYGEN_PROGRAM=/Applications/Doxygen.app/Contents/Resources/doxygen -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 -DCMAKE_BUILD_TYPE=RelWithDebInfo +cmake --build . --target all --config RelWithDebInfo --parallel 10 #MiniZip Building -cd submodules/externals/minizip/build-minizip -cmake .. -DCMAKE_INSTALL_PREFIX=../../../../build-desktop/OUTPUT -DCMAKE_PREFIX_PATH=../../../build-desktop/OUTPUT -cmake --build . --target all --parallel 5 +cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo +cmake --build . --target all --config RelWithDebInfo --parallel 10 cmake --build . --target install -cd ../../../.. #Desktop Building -cd build-desktop -cmake .. -DCMAKE_INSTALL_PREFIX=OUTPUT -cmake --build . --target all +cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo +cmake --build . --target all --config RelWithDebInfo cmake --build . --target install diff --git a/build_all_win.bat b/build_all_win.bat index 7c7959707..de71f6f30 100644 --- a/build_all_win.bat +++ b/build_all_win.bat @@ -1,31 +1,24 @@ :: Preparing folders IF NOT EXIST build-desktop mkdir build-desktop -cd linphone-sdk -IF NOT EXIST build-sdk mkdir build-sdk -cd ../submodules/externals/minizip -IF NOT EXIST build-minizip mkdir build-minizip -cd ../../.. :: SDK Building -cd linphone-sdk/build-sdk -cmake .. -DLINPHONESDK_PLATFORM=Desktop -DENABLE_CSHARP_WRAPPER=YES -DCMAKE_BUILD_TYPE=Debug -DENABLE_VPX=ON -A Win32 +cd build-desktop +:: Default config +cmake .. -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=RelWithDebInfo -A Win32 +:: Mini config +::cmake .. -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_VPX=NO -DENABLE_OPUS=NO -A Win32 -DENABLE_VIDEO=YES -DENABLE_GL=YES if %errorlevel% neq 0 exit /b %errorlevel% -cmake --build . --target sdk --parallel 5 +cmake --build . --target sdk --config RelWithDebInfo --parallel 10 if %errorlevel% neq 0 exit /b %errorlevel% -robocopy linphone-sdk\desktop ..\..\build-desktop\OUTPUT /e /njh /njs /ndl /nc /ns -cd ../.. :: Minizip Submodule Building -cd submodules/externals/minizip/build-minizip -cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../build-desktop/OUTPUT -DCMAKE_PREFIX_PATH="../../../linphone-sdk/build-sdk/linphone-sdk/desktop" -A Win32 -cmake --build . --target all_build --config Debug -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false -cmake --build . --target install --config Debug -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false -cd ../../../.. +cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -A Win32 +cmake --build . --target all_build --parallel 10 --config RelWithDebInfo -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false +cmake --build . --target install --config RelWithDebInfo -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false :: Desktop Building -cd build-desktop -cmake .. -DENABLE_CSHARP_WRAPPER=YES -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=OUTPUT -DCMAKE_PREFIX_PATH="linphone-sdk/build-sdk/linphone-sdk/desktop;submodules/externals/minizip/build-minizip/OUTPUT" -A Win32 +cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -A Win32 if %errorlevel% neq 0 exit /b %errorlevel% -cmake --build . --target all_build --config Debug -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false -cmake --build . --target install --config Debug -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false +cmake --build . --target all_build --config RelWithDebInfo --parallel 10 -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false +cmake --build . --target install --config RelWithDebInfo -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false diff --git a/cmake_builder/install.cmake b/cmake_builder/install.cmake index 05b88cc53..a2ab59415 100644 --- a/cmake_builder/install.cmake +++ b/cmake_builder/install.cmake @@ -21,7 +21,7 @@ ############################################################################ if (APPLE) - execute_process(COMMAND install_name_tool -id "@executable_path/../lib/libminizip.dylib" "${CMAKE_INSTALL_PREFIX}/lib/libminizip.dylib") + #execute_process(COMMAND install_name_tool -id "@executable_path/../lib/libminizip.dylib" "${CMAKE_INSTALL_PREFIX}/lib/libminizip.dylib") execute_process(COMMAND install_name_tool -add_rpath "@executable_path/../Frameworks/" "${CMAKE_INSTALL_PREFIX}/bin/linphone") execute_process(COMMAND install_name_tool -add_rpath "@executable_path/../lib/" "${CMAKE_INSTALL_PREFIX}/bin/linphone") else () diff --git a/cmake_builder/linphone_package/CMakeLists.txt b/cmake_builder/linphone_package/CMakeLists.txt index 209dfed9a..08a66abbb 100644 --- a/cmake_builder/linphone_package/CMakeLists.txt +++ b/cmake_builder/linphone_package/CMakeLists.txt @@ -20,13 +20,17 @@ # ############################################################################ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.1) project(LINPHONE_PACKAGE) # Dummy project. include("${LINPHONE_DESKTOP_DIR}/application_info.cmake") find_package(Linphone REQUIRED) find_package(Git) +#Policy set to allow link from other directory (cmake 3.13) +if (POLICY CMP0079) + cmake_policy(SET CMP0079 NEW) +endif () set(LINPHONE_QML_DIR "${LINPHONE_DESKTOP_DIR}/ui") @@ -58,9 +62,16 @@ set(PACKAGE_VERSION "${LINPHONE_VERSION}") # Preparing the Linphone SDK bundle. # ============================================================================== -set(LINPHONE_SDK_TMP "${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE_NAME}-sdk-tmp") +# Create sdk-temp folder where we can find all needed files (libs, includes etc.) + file(REMOVE_RECURSE "${LINPHONE_SDK_TMP}") -file(COPY "${LINPHONE_OUTPUT_DIR}" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") +message(" Linphone_SDK_DIR : ${LINPHONE_SDK_DIR}") +file(COPY "${LINPHONE_SDK_DIR}/" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") +if(APPLE) + execute_process(COMMAND install_name_tool -id "@executable_path/../Frameworks/libminizip.dylib" "${CMAKE_INSTALL_PREFIX}/lib/libminizip.dylib") +elseif(WIN32) + +endif() file(RENAME "${CMAKE_CURRENT_BINARY_DIR}/desktop" "${LINPHONE_SDK_TMP}") # Generates a zip archive containing the development files. @@ -88,6 +99,7 @@ add_sdk_list_file(ortp) add_sdk_list_file(ms2) add_sdk_list_file(ms2plugins) add_sdk_list_file(linphone) +add_sdk_list_file(linphonecxx) if (WIN32) add_sdk_list_file(sqlite3) add_sdk_list_file(xml2) @@ -155,83 +167,71 @@ endif () # ============================================================================== if (WIN32) - execute_process( - COMMAND windeployqt "${LINPHONE_OUTPUT_DIR}/bin/${EXECUTABLE_NAME}.exe" "--qmldir" "${LINPHONE_QML_DIR}" - ) + #execute_process( + # COMMAND windeployqt "${LINPHONE_OUTPUT_DIR}/bin/${EXECUTABLE_NAME}.exe" "--qmldir" "${LINPHONE_QML_DIR}" + #) + install( CODE "execute_process(COMMAND windeployqt ${LINPHONE_OUTPUT_DIR}/bin/${EXECUTABLE_NAME}.exe --qmldir=${LINPHONE_QML_DIR})")# -verbose=2)" ) - file(GLOB SHARE_CONTENT RELATIVE "${LINPHONE_OUTPUT_DIR}" "${LINPHONE_OUTPUT_DIR}/share/*") - list(REMOVE_ITEM SHARE_CONTENT "share/belr" "share/Belr" "share/images" "share/${APPLICATION_NAME}" "share/${EXECUTABLE_NAME}" "share/sounds") - foreach (ITEM IN LISTS SHARE_CONTENT) - list(APPEND SHARE_CONTENT_EXCLUDE PATTERN "${ITEM}" EXCLUDE) - endforeach () - - install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/" - DESTINATION "." - PATTERN "bin/*_tester.exe" EXCLUDE - PATTERN "bin/belcard*.exe" EXCLUDE - PATTERN "bin/openh264.dll" EXCLUDE - PATTERN "cmake" EXCLUDE - PATTERN "include" EXCLUDE - PATTERN "lib/*.a" EXCLUDE - PATTERN "lib/*.def" EXCLUDE - PATTERN "lib/*.exp" EXCLUDE - PATTERN "lib/cmake" EXCLUDE - PATTERN "lib/*.la" EXCLUDE - PATTERN "lib/*.lib" EXCLUDE - PATTERN "lib/mediastreamer/plugins/*openh264.*" EXCLUDE - PATTERN "lib/pkgconfig" EXCLUDE - PATTERN "lib/Win32" EXCLUDE - PATTERN "${EXECUTABLE_NAME}.lnk" EXCLUDE - PATTERN "share/${APPLICATION_NAME}/cmake" EXCLUDE - PATTERN "share/Belr/cmake" EXCLUDE - ${SHARE_CONTENT_EXCLUDE} - ) - - install(FILES "${LINPHONE_OUTPUT_DIR}/share/Linphone/rootca.pem" DESTINATION "share/${EXECUTABLE_NAME}") - - if (ENABLE_OPENH264) - install(FILES "${LINPHONE_OUTPUT_DIR}/lib/mediastreamer/plugins/libmsopenh264.dll" - DESTINATION "lib/mediastreamer/plugins" - ) - endif () + file(GLOB LIB_FILES "${LINPHONE_SDK_TMP}/lib/*.dll") + install(FILES ${LIB_FILES} DESTINATION "bin/") + file(GLOB LIB_FILES "${LINPHONE_SDK_TMP}/bin/*.dll") + install(FILES ${LIB_FILES} DESTINATION "bin/") + file(GLOB EXE_FILES "${LINPHONE_SDK_TMP}/bin/*.exe") + install(FILES ${EXE_FILES} DESTINATION "bin/") + if (EXISTS "${LINPHONE_SDK_TMP}/lib/mediastreamer") + install(DIRECTORY "${LINPHONE_SDK_TMP}/lib/mediastreamer" DESTINATION "lib" USE_SOURCE_PERMISSIONS) + endif () + install(DIRECTORY "${LINPHONE_SDK_TMP}/share/images" DESTINATION "share" USE_SOURCE_PERMISSIONS) + install(DIRECTORY "${LINPHONE_SDK_TMP}/share/sounds" DESTINATION "share" USE_SOURCE_PERMISSIONS) + install(FILES "${LINPHONE_SDK_TMP}/share/Linphone/rootca.pem" DESTINATION "share/Linphone/") + +# list(REMOVE_ITEM SHARE_CONTENT "share/belr" "share/Belr" "share/images" "share/${APPLICATION_NAME}" "share/${APPLICATION_NAME}" "share/sounds") +# foreach (ITEM IN LISTS SHARE_CONTENT) +# list(APPEND SHARE_CONTENT_EXCLUDE PATTERN "${ITEM}" EXCLUDE) +# endforeach () elseif (APPLE) - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/macos/Info.plist.in" "${APPLICATION_NAME}.app/Contents/Info.plist" @ONLY) - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/macos/linphone.icns" "${APPLICATION_NAME}.app/Contents/Resources/${EXECUTABLE_NAME}.icns" COPYONLY) - file(COPY "${LINPHONE_OUTPUT_DIR}/bin/${EXECUTABLE_NAME}" DESTINATION "${APPLICATION_NAME}.app/Contents/MacOS") - file(GLOB SHARED_LIBRARIES "${LINPHONE_OUTPUT_DIR}/lib/lib*.dylib") + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/macos/Info.plist.in" "${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app/Contents/Info.plist" @ONLY) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/macos/linphone.icns" "${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app/Contents/Resources/${EXECUTABLE_NAME}.icns" COPYONLY) + install(DIRECTORY "${LINPHONE_SDK_TMP}/Frameworks/" DESTINATION "${APPLICATION_NAME}.app/Contents/Frameworks" USE_SOURCE_PERMISSIONS) + install(PROGRAMS "${CMAKE_INSTALL_PREFIX}/bin/${EXECUTABLE_NAME}" DESTINATION "${APPLICATION_NAME}.app/Contents/MacOS") + file(GLOB SHARED_LIBRARIES "${LINPHONE_SDK_TMP}/lib/lib*.dylib") foreach (LIBRARY ${SHARED_LIBRARIES}) - file(COPY "${LIBRARY}" DESTINATION "${APPLICATION_NAME}.app/Contents/Frameworks") + install(FILES "${LIBRARY}" DESTINATION "${APPLICATION_NAME}.app/Contents/Frameworks") endforeach () find_program(DEPLOYQT_PROGRAM macdeployqt) if (NOT DEPLOYQT_PROGRAM) message(FATAL_ERROR "Could not find the macdeployqt program. Make sure it is in the PATH.") endif () - execute_process( - COMMAND "${DEPLOYQT_PROGRAM}" "${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_NAME}.app" "-qmldir=${LINPHONE_QML_DIR}" "-verbose=2" - ) + if (EXISTS "${LINPHONE_OUTPUT_DIR}/lib/mediastreamer") file(COPY "${LINPHONE_OUTPUT_DIR}/lib/mediastreamer" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/lib" USE_SOURCE_PERMISSIONS) endif () - file(COPY "${LINPHONE_OUTPUT_DIR}/share/Belr/grammars/cpim_grammar" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/belr/grammars/") - file(COPY "${LINPHONE_OUTPUT_DIR}/share/Belr/grammars/vcard_grammar" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/belr/grammars/") - file(COPY "${LINPHONE_OUTPUT_DIR}/share/images" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share" USE_SOURCE_PERMISSIONS) - file(COPY "${LINPHONE_OUTPUT_DIR}/share/sounds" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share" USE_SOURCE_PERMISSIONS) - file(COPY "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/rootca.pem" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/${EXECUTABLE_NAME}") - file(COPY "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/linphonerc-factory" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/${EXECUTABLE_NAME}") + install(FILES "${LINPHONE_OUTPUT_DIR}/lib/libminizip.dylib" DESTINATION "${APPLICATION_NAME}.app/Contents/Frameworks/") + install(FILES "${LINPHONE_SDK_TMP}/share/Belr/grammars/cpim_grammar" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/belr/grammars/") + install(FILES "${LINPHONE_SDK_TMP}/share/Belr/grammars/vcard_grammar" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/belr/grammars/") + install(DIRECTORY "${LINPHONE_SDK_TMP}/share/images" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share" USE_SOURCE_PERMISSIONS) + install(DIRECTORY "${LINPHONE_SDK_TMP}/share/sounds" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share" USE_SOURCE_PERMISSIONS) + install(FILES "${LINPHONE_SDK_TMP}/share/${APPLICATION_NAME}/rootca.pem" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/${APPLICATION_NAME}") + install(FILES "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/linphonerc-factory" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/${APPLICATION_NAME}") - file(COPY "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/assistant/use-other-sip-account.rc" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/${EXECUTABLE_NAME}/assistant") - file(COPY "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/assistant/create-app-sip-account.rc" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/${EXECUTABLE_NAME}/assistant") - file(COPY "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/assistant/use-app-sip-account.rc" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/${EXECUTABLE_NAME}/assistant") + install(FILES "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/assistant/use-other-sip-account.rc" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/${APPLICATION_NAME}/assistant") + install(FILES "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/assistant/create-app-sip-account.rc" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/${APPLICATION_NAME}/assistant") + install(FILES "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/assistant/use-app-sip-account.rc" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/share/${APPLICATION_NAME}/assistant") file(GLOB SHARED_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_NAME}.app/Contents/Frameworks/lib*.dylib") + foreach (LIBRARY ${SHARED_LIBRARIES}) get_filename_component(LIBRARY_FILENAME ${LIBRARY} NAME) - message("Changing RPATH of ${LIBRARY_FILENAME} from '${LINPHONE_OUTPUT_DIR}/lib' to '@executable_path/../Frameworks'") - execute_process(COMMAND install_name_tool -rpath "${LINPHONE_OUTPUT_DIR}/lib" "@executable_path/../Frameworks" "${LIBRARY}") + if(NOT ("${LIBRARY_FILENAME}" STREQUAL "libminizip.dylib")) + message("Changing RPATH of ${LIBRARY_FILENAME} from '${LINPHONE_OUTPUT_DIR}/lib' to '@executable_path/../Frameworks'") + execute_process(COMMAND install_name_tool -rpath "${LINPHONE_OUTPUT_DIR}/lib" "@executable_path/../Frameworks" "${LIBRARY}") + endif() endforeach () + install( CODE "execute_process(COMMAND ${DEPLOYQT_PROGRAM} ${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app -qmldir=${LINPHONE_QML_DIR})")# -verbose=2)" ) + if (LINPHONE_BUILDER_SIGNING_IDENTITY) file(GLOB FRAMEWORKS_NAMES "${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_NAME}.app/Contents/Frameworks/*") foreach (FRAMEWORK ${FRAMEWORKS_NAMES}) @@ -246,36 +246,71 @@ elseif (APPLE) endforeach () execute_process(COMMAND "codesign" "--verbose" "-s" "${LINPHONE_BUILDER_SIGNING_IDENTITY}" "${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_NAME}.app") endif () +# install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_NAME}.app" DESTINATION "." USE_SOURCE_PERMISSIONS) - install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_NAME}.app" DESTINATION "." USE_SOURCE_PERMISSIONS) +# configure_file("${CMAKE_CURRENT_SOURCE_DIR}/macos/packaging.cmake.in" "packaging.cmake" @ONLY) +# install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/packaging.cmake") +else()# Not Windows and Apple + foreach (LIBRARY ${SHARED_LIBRARIES}) + get_filename_component(LIBRARY_FILENAME ${LIBRARY} NAME) + #if(NOT ("${LIBRARY_FILENAME}" STREQUAL "libminizip.dylib")) + message("Changing RPATH of ${LIBRARY_FILENAME} from '${LINPHONE_OUTPUT_DIR}/lib' to '$ORIGIN/../lib'") + execute_process(COMMAND install_name_tool -rpath "${LINPHONE_OUTPUT_DIR}/lib" "$ORIGIN/../lib" "${LIBRARY}") + execute_process(COMMAND install_name_tool -add_rpath "$ORIGIN/../lib64" "${LIBRARY}") + #endif() + endforeach () + install(DIRECTORY "${LINPHONE_SDK_TMP}/bin/" DESTINATION "bin" USE_SOURCE_PERMISSIONS) +#Just in case. This is useless because we have to use CMAKE_INSTALL_LIBDIR + if( EXISTS "${LINPHONE_SDK_TMP}/lib/") + install(DIRECTORY "${LINPHONE_SDK_TMP}/lib/" DESTINATION "lib" USE_SOURCE_PERMISSIONS) + endif() + if( EXISTS "${LINPHONE_SDK_TMP}/lib64/") + install(DIRECTORY "${LINPHONE_SDK_TMP}/lib64/" DESTINATION "lib64" USE_SOURCE_PERMISSIONS) + endif() + install(DIRECTORY "${LINPHONE_SDK_TMP}/share/" DESTINATION "share" USE_SOURCE_PERMISSIONS) + #install(PROGRAMS "${CMAKE_INSTALL_PREFIX}/bin/${EXECUTABLE_NAME}" DESTINATION "/bin") - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/macos/packaging.cmake.in" "packaging.cmake" @ONLY) - install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/packaging.cmake") + + if (EXISTS "${LINPHONE_SDK_TMP}/lib/mediastreamer") + file(COPY "${LINPHONE_SDK_TMP}/lib/mediastreamer" DESTINATION "lib" USE_SOURCE_PERMISSIONS) + endif () + install(FILES "${LINPHONE_SDK_TMP}/share/belr/grammars/cpim_grammar" DESTINATION "share/belr/grammars/") + install(FILES "${LINPHONE_SDK_TMP}/share/belr/grammars/vcard_grammar" DESTINATION "share/belr/grammars/") +# install(DIRECTORY "${LINPHONE_SDK_TMP}/share/images" DESTINATION "share" USE_SOURCE_PERMISSIONS) +# install(DIRECTORY "${LINPHONE_SDK_TMP}/share/sounds" DESTINATION "share" USE_SOURCE_PERMISSIONS) + #install(FILES "${LINPHONE_SDK_TMP}/share/${APPLICATION_NAME}/rootca.pem" DESTINATION "share/${APPLICATION_NAME}") + install(FILES "${LINPHONE_SDK_TMP}/share/${EXECUTABLE_NAME}/rootca.pem" DESTINATION "share/${APPLICATION_NAME}") #We use executable_name because of name folder that is not harmonized from the SDK +# install(FILES "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/linphonerc-factory" DESTINATION "share/${APPLICATION_NAME}") + +# install(FILES "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/assistant/use-other-sip-account.rc" DESTINATION "share/${APPLICATION_NAME}/assistant") +# install(FILES "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/assistant/create-app-sip-account.rc" DESTINATION "share/${APPLICATION_NAME}/assistant") +# install(FILES "${LINPHONE_OUTPUT_DIR}/share/${APPLICATION_NAME}/assistant/use-app-sip-account.rc" DESTINATION "share/${APPLICATION_NAME}/assistant") endif () -if (MSVC) - string(REGEX REPLACE "Visual Studio ([0-9]+).*" "\\1" MSVC_VERSION "${CMAKE_GENERATOR}") - find_file(MSVCP_LIB "msvcp${MSVC_VERSION}0.dll" PATHS "C:/Windows/System32") - find_file(UCRTBASE_LIB "ucrtbase.dll" PATHS "C:/Windows/System32") - # Starting with Visual Studio 2015 (MSVC_VERSION==14) the msvcr dll has been renamed to vcruntime. - find_file(VCRUNTIME_LIB "vcruntime${MSVC_VERSION}0.dll" PATHS "C:/Windows/System32") - if (NOT VCRUNTIME_LIB) - find_file(VCRUNTIME_LIB "msvcr${MSVC_VERSION}0.dll" PATHS "C:/Windows/System32") - endif () - install(FILES ${MSVCP_LIB} ${UCRTBASE_LIB} ${VCRUNTIME_LIB} DESTINATION "bin") - if (CMAKE_BUILD_TYPE STREQUAL "Debug") - find_file(MSVCPD_LIB "msvcp${MSVC_VERSION}0d.dll" PATHS "C:/Windows/System32") - find_file(UCRTBASED_LIB "ucrtbased.dll" PATHS "C:/Windows/System32") - find_file(VCRUNTIMED_LIB "vcruntime${MSVC_VERSION}0d.dll" PATHS "C:/Windows/System32") - if (NOT VCRUNTIMED_LIB) - find_file(VCRUNTIMED_LIB "msvcr${MSVC_VERSION}0d.dll" PATHS "C:/Windows/System32") - endif () - install(FILES ${MSVCPD_LIB} ${UCRTBASED_LIB} ${VCRUNTIMED_LIB} DESTINATION "bin") - endif () -endif () +# Temporary deactivate +#if (MSVC) +# string(REGEX REPLACE "Visual Studio ([0-9]+).*" "\\1" MSVC_VERSION "${CMAKE_GENERATOR}") +# find_file(MSVCP_LIB "msvcp${MSVC_VERSION}0.dll" PATHS "C:/Windows/System32") +# find_file(UCRTBASE_LIB "ucrtbase.dll" PATHS "C:/Windows/System32") +# # Starting with Visual Studio 2015 (MSVC_VERSION==14) the msvcr dll has been renamed to vcruntime. +# find_file(VCRUNTIME_LIB "vcruntime${MSVC_VERSION}0.dll" PATHS "C:/Windows/System32") +# if (NOT VCRUNTIME_LIB) +# find_file(VCRUNTIME_LIB "msvcr${MSVC_VERSION}0.dll" PATHS "C:/Windows/System32") +# endif () +# install(FILES ${MSVCP_LIB} ${UCRTBASE_LIB} ${VCRUNTIME_LIB} DESTINATION "bin") +# if (CMAKE_BUILD_TYPE STREQUAL "Debug") +# find_file(MSVCPD_LIB "msvcp${MSVC_VERSION}0d.dll" PATHS "C:/Windows/System32") +# find_file(UCRTBASED_LIB "ucrtbased.dll" PATHS "C:/Windows/System32") +# find_file(VCRUNTIMED_LIB "vcruntime${MSVC_VERSION}0d.dll" PATHS "C:/Windows/System32") +# if (NOT VCRUNTIMED_LIB) +# find_file(VCRUNTIMED_LIB "msvcr${MSVC_VERSION}0d.dll" PATHS "C:/Windows/System32") +# endif () +# install(FILES ${MSVCPD_LIB} ${UCRTBASED_LIB} ${VCRUNTIMED_LIB} DESTINATION "bin") +# endif () +#endif () # ============================================================================== -# CPack. +# CPack. # ============================================================================== set(CPACK_PACKAGE_NAME "${APPLICATION_NAME}") @@ -359,6 +394,6 @@ if (WIN32) message(STATUS "No signtool certificate found; assuming development machine (${PFX_FILE})") endif () configure_file("${CMAKE_CURRENT_SOURCE_DIR}/windows/packaging.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/packaging.cmake" @ONLY) - install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/packaging.cmake") + # install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/packaging.cmake") endif () include(CPack) diff --git a/cmake_builder/linphone_package/macos/Info.plist.in b/cmake_builder/linphone_package/macos/Info.plist.in index 6e4b7c817..1703aa7e8 100644 --- a/cmake_builder/linphone_package/macos/Info.plist.in +++ b/cmake_builder/linphone_package/macos/Info.plist.in @@ -27,7 +27,7 @@ CFBundleVersion @PACKAGE_VERSION@ NSHumanReadableCopyright - Copyright 2011-2018 @APPLICATION_VENDOR@ + Copyright 2011-2020 @APPLICATION_VENDOR@ LSMinimumSystemVersion @CMAKE_OSX_DEPLOYMENT_TARGET@ NSAppSleepDisabled @@ -50,5 +50,7 @@ NSApplication NSHighResolutionCapable True + NSCameraUsageDescription + Streaming Video between devices diff --git a/cmake_builder/linphone_package/macos/linphone.icns b/cmake_builder/linphone_package/macos/linphone.icns index 0a0a20727..88f76b37b 100644 Binary files a/cmake_builder/linphone_package/macos/linphone.icns and b/cmake_builder/linphone_package/macos/linphone.icns differ diff --git a/cmake_builder/linphone_package/sdk_content/linphonecxx.list.in b/cmake_builder/linphone_package/sdk_content/linphonecxx.list.in new file mode 100644 index 000000000..6ed9fc40d --- /dev/null +++ b/cmake_builder/linphone_package/sdk_content/linphonecxx.list.in @@ -0,0 +1,4 @@ +@LIBDIR@/@LIBPREFIX@linphone*.@LIBEXT@ +include/linphone++/* +share/doc/linphoneCxx-* +share/LinphoneCxx/cmake/* \ No newline at end of file diff --git a/cmake_builder/linphone_package/windows/signtool.py b/cmake_builder/linphone_package/windows/signtool.py index b7ef4fc1e..18f20b828 100644 --- a/cmake_builder/linphone_package/windows/signtool.py +++ b/cmake_builder/linphone_package/windows/signtool.py @@ -1,4 +1,23 @@ #!/usr/bin/env python +# +# Copyright (c) 2010-2020 Belledonne Communications SARL. +# +# This file is part of linphone-desktop +# (see https://www.linphone.org). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# import os, sys import subprocess class PassFile: diff --git a/create_appimage.sh b/create_appimage.sh index 371ca0778..94ebb944a 100755 --- a/create_appimage.sh +++ b/create_appimage.sh @@ -1,4 +1,23 @@ #!/bin/bash +## +## Copyright (c) 2010-2020 Belledonne Communications SARL. +## +## This file is part of linphone-desktop +## (see https://www.linphone.org). +## +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program. If not, see . +## APP_NAME="linphone" diff --git a/linphone-sdk b/linphone-sdk index b3dbedd10..9bbf905c4 160000 --- a/linphone-sdk +++ b/linphone-sdk @@ -1 +1 @@ -Subproject commit b3dbedd109f9d4357f5b73410a132c11c2660b58 +Subproject commit 9bbf905c45d298d98dca5ef2eac6288e5cb70af7 diff --git a/resources.qrc b/resources.qrc index 58a27a6c0..aac0c7fd2 100644 --- a/resources.qrc +++ b/resources.qrc @@ -404,7 +404,6 @@ ui/views/App/Calls/IncomingCall.qml ui/views/App/Calls/OutgoingCall.qml ui/views/App/Calls/ZrtpTokenAuthentication.qml - ui/views/App/Main/+5.9/MainWindowMenuBar.qml ui/views/App/Main/Assistant/ActivateAppSipAccountWithEmail.qml ui/views/App/Main/Assistant/ActivateAppSipAccountWithPhoneNumber.qml ui/views/App/Main/Assistant/AssistantAbstractView.qml @@ -430,7 +429,6 @@ ui/views/App/Main/Dialogs/ManageAccounts.qml ui/views/App/Main/Home.qml ui/views/App/Main/InviteFriends.qml - ui/views/App/Main/+mac/MainWindowMenuBar.qml ui/views/App/Main/MainWindow.js ui/views/App/Main/MainWindowMenuBar.qml ui/views/App/Main/MainWindow.qml @@ -479,5 +477,9 @@ ui/views/App/Styles/Settings/SettingsAudioStyle.qml ui/views/App/Styles/Settings/SettingsWindowStyle.qml assets/images/linphone_logo.svg + ui/views/App/Main/MainWindowTopMenuBar.qml + ui/dev-modules/Colors/Colors.qml + ui/dev-modules/Units/Units.qml + assets/icon.ico diff --git a/src/app/App.cpp b/src/app/App.cpp index 72886dbbe..febb9efd9 100644 --- a/src/app/App.cpp +++ b/src/app/App.cpp @@ -1,11 +1,13 @@ /* - * App.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,13 +15,13 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ +#include "App.hpp" +#ifdef Q_OS_WIN + #include +#endif // ifdef Q_OS_WIN #include #include #include @@ -31,12 +33,7 @@ #include #include -#ifdef Q_OS_WIN - #include -#endif // ifdef Q_OS_WIN - #include "config.h" - #include "cli/Cli.hpp" #include "components/Components.hpp" #include "logger/Logger.hpp" @@ -47,8 +44,7 @@ #include "translator/DefaultTranslator.hpp" #include "utils/LinphoneUtils.hpp" #include "utils/Utils.hpp" - -#include "App.hpp" +#include "components/other/desktop-tools/DesktopTools.hpp" // ============================================================================= @@ -173,6 +169,9 @@ static inline shared_ptr getConfigIfExists (const QCommandLine // ----------------------------------------------------------------------------- App::App (int &argc, char *argv[]) : SingleApplication(argc, argv, true, Mode::User | Mode::ExcludeAppPath | Mode::ExcludeAppVersion) { + + connect(this, SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(stateChanged(Qt::ApplicationState))); + setWindowIcon(QIcon(LinphoneUtils::WindowIconPath)); createParser(); @@ -405,11 +404,12 @@ void App::smartShowWindow (QQuickWindow *window) { } // ----------------------------------------------------------------------------- - bool App::hasFocus () const { return getMainWindow()->isActive() || (mCallsWindow && mCallsWindow->isActive()); } - +void App::stateChanged(Qt::ApplicationState pState) { + DesktopTools::applicationStateChanged(pState); +} // ----------------------------------------------------------------------------- void App::createParser () { @@ -558,6 +558,8 @@ void App::registerSharedToolTypes () { // ----------------------------------------------------------------------------- void App::setTrayIcon () { + if(!QSystemTrayIcon::isSystemTrayAvailable()) + qInfo() << "System tray is not available"; QQuickWindow *root = getMainWindow(); QSystemTrayIcon *systemTrayIcon = new QSystemTrayIcon(mEngine); @@ -596,7 +598,7 @@ void App::setTrayIcon () { root->hide(); } }); - + menu->setTitle(APPLICATION_NAME); // Build trayIcon menu. menu->addAction(settingsAction); menu->addAction(aboutAction); @@ -605,11 +607,12 @@ void App::setTrayIcon () { menu->addSeparator(); menu->addAction(quitAction); + + systemTrayIcon->setContextMenu(menu); systemTrayIcon->setIcon(QIcon(LinphoneUtils::WindowIconPath)); systemTrayIcon->setToolTip(APPLICATION_NAME); systemTrayIcon->show(); - mSystemTrayIcon = systemTrayIcon; } diff --git a/src/app/App.hpp b/src/app/App.hpp index f57c8db75..7025fb9c1 100644 --- a/src/app/App.hpp +++ b/src/app/App.hpp @@ -1,11 +1,13 @@ /* - * App.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef APP_H_ @@ -103,6 +101,9 @@ public: Q_INVOKABLE static void smartShowWindow (QQuickWindow *window); +public slots: + void stateChanged(Qt::ApplicationState); + signals: void configLocaleChanged (const QString &locale); diff --git a/src/app/AppController.cpp b/src/app/AppController.cpp index 653407fd0..af2a2a1b3 100644 --- a/src/app/AppController.cpp +++ b/src/app/AppController.cpp @@ -1,11 +1,13 @@ /* - * AppController.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: July 17, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include @@ -40,7 +38,7 @@ namespace { } AppController::AppController (int &argc, char *argv[]) { - QT_REQUIRE_VERSION(argc, argv, ApplicationMinimalQtVersion); + QT_REQUIRE_VERSION(argc, argv, ApplicationMinimalQtVersion) Q_ASSERT(!mApp); // Disable QML cache. Avoid malformed cache. diff --git a/src/app/AppController.hpp b/src/app/AppController.hpp index 9f0a4aaed..f2ab8d4d4 100644 --- a/src/app/AppController.hpp +++ b/src/app/AppController.hpp @@ -1,11 +1,13 @@ /* - * AppController.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: July 17, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef APP_CONTROLLER_H_ diff --git a/src/app/cli/Cli.cpp b/src/app/cli/Cli.cpp index 2cdd79d5e..bbfdbc59b 100644 --- a/src/app/cli/Cli.cpp +++ b/src/app/cli/Cli.cpp @@ -1,11 +1,13 @@ /* - * Cli.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 6, 2017 - * Author: Nicolas Follet + * along with this program. If not, see . */ #include diff --git a/src/app/cli/Cli.hpp b/src/app/cli/Cli.hpp index 04ef41006..d84c0abed 100644 --- a/src/app/cli/Cli.hpp +++ b/src/app/cli/Cli.hpp @@ -1,11 +1,13 @@ /* - * Cli.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 6, 2017 - * Author: Nicolas Follet + * along with this program. If not, see . */ #ifndef CLI_H_ diff --git a/src/app/logger/Logger.cpp b/src/app/logger/Logger.cpp index 092065511..b0c138f3d 100644 --- a/src/app/logger/Logger.cpp +++ b/src/app/logger/Logger.cpp @@ -1,11 +1,13 @@ /* - * Logger.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/app/logger/Logger.hpp b/src/app/logger/Logger.hpp index b55c484db..36a63cb3a 100644 --- a/src/app/logger/Logger.hpp +++ b/src/app/logger/Logger.hpp @@ -1,11 +1,13 @@ /* - * Logger.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef LOGGER_H_ diff --git a/src/app/main.cpp b/src/app/main.cpp index 5719f2f33..f5e277863 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -1,11 +1,13 @@ /* - * main.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,19 +15,18 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "AppController.hpp" - +#include // ============================================================================= int main (int argc, char *argv[]) { + QApplication::setOrganizationName("Belledonne-Communications"); + QApplication::setOrganizationDomain("linphone.org"); AppController controller(argc, argv); + //QLoggingCategory::setFilterRules("*.debug=true;qml=false"); App *app = controller.getApp(); if (app->isSecondary()) { diff --git a/src/app/paths/Paths.cpp b/src/app/paths/Paths.cpp index 5554a4676..21acfb6dc 100644 --- a/src/app/paths/Paths.cpp +++ b/src/app/paths/Paths.cpp @@ -1,11 +1,13 @@ /* - * Paths.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include @@ -42,7 +40,7 @@ namespace { constexpr char PathCaptures[] = "/" EXECUTABLE_NAME "/captures/"; constexpr char PathCodecs[] = "/codecs/"; constexpr char PathLogs[] = "/logs/"; - constexpr char PathPlugins[] = "/plugins/"; + //constexpr char PathPlugins[] = "/plugins/"; // Unused constexpr char PathThumbnails[] = "/thumbnails/"; constexpr char PathUserCertificates[] = "/usr-crt/"; @@ -103,23 +101,46 @@ static inline string getWritableFilePath (const QString &filename) { } // ----------------------------------------------------------------------------- +// On Windows or Linux, the folders of the application are : +// bin/linphone +// lib/ +// lib64/ +// share/ + +// But in some cases, it can be : +// /linphone +// lib/ +// lib64/ +// share/ + +// On Mac, we have : +// Contents/ +// Frameworks/ +// MacOs/linphone +// Plugins/ +// Resources/ +// share/ static inline QDir getAppPackageDir () { QDir dir(QCoreApplication::applicationDirPath()); if (dir.dirName() == QLatin1String("MacOS")) { dir.cdUp(); - if (!dir.cd("Resources")) - { - dir.mkdir("Resources"); - dir.cd("Resources"); - } - } else + + } else if( !dir.exists("lib") && !dir.exists("lib64")){// Check if these folders are in the current path dir.cdUp(); + if(!dir.exists("lib") && !dir.exists("lib64")) + qWarning() << QObject::tr("The application's location is not correct: You have to put your 'bin/' folder next to 'lib/' folder."); + } return dir; } static inline QString getAppPackageDataDirPath() { QDir dir = getAppPackageDir(); + if (!dir.cd("Resources")) + { + dir.mkdir("Resources"); + dir.cd("Resources"); + } if (!dir.cd("share")) { dir.mkdir("share"); diff --git a/src/app/paths/Paths.hpp b/src/app/paths/Paths.hpp index 57ba3da03..34f277d6c 100644 --- a/src/app/paths/Paths.hpp +++ b/src/app/paths/Paths.hpp @@ -1,11 +1,13 @@ /* - * Paths.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef PATHS_H_ diff --git a/src/app/providers/AvatarProvider.cpp b/src/app/providers/AvatarProvider.cpp index 8045d6795..1be0306a7 100644 --- a/src/app/providers/AvatarProvider.cpp +++ b/src/app/providers/AvatarProvider.cpp @@ -1,11 +1,13 @@ /* - * AvatarProvider.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "app/paths/Paths.hpp" diff --git a/src/app/providers/AvatarProvider.hpp b/src/app/providers/AvatarProvider.hpp index 273a68e93..662f8411e 100644 --- a/src/app/providers/AvatarProvider.hpp +++ b/src/app/providers/AvatarProvider.hpp @@ -1,11 +1,13 @@ /* - * AvatarProvider.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef AVATAR_PROVIDER_H_ diff --git a/src/app/providers/ImageProvider.cpp b/src/app/providers/ImageProvider.cpp index 5364b3d31..1ad4d4f8c 100644 --- a/src/app/providers/ImageProvider.cpp +++ b/src/app/providers/ImageProvider.cpp @@ -1,11 +1,13 @@ /* - * ImageProvider.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 19, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include @@ -247,8 +245,8 @@ ImageProvider::ImageProvider () : QQuickImageProvider( QImage ImageProvider::requestImage (const QString &id, QSize *size, const QSize &requestedSize) { const QString path = QStringLiteral(":%1").arg(id); - qDebug() << QStringLiteral("Image `%1` requested with size: (%2, %3).") - .arg(path).arg(requestedSize.width()).arg(requestedSize.height()); +// qDebug() << QStringLiteral("Image `%1` requested with size: (%2, %3).") +// .arg(path).arg(requestedSize.width()).arg(requestedSize.height()); QElapsedTimer timer; timer.start(); @@ -298,7 +296,7 @@ QImage ImageProvider::requestImage (const QString &id, QSize *size, const QSize QPainter painter(&image); renderer.render(&painter); - qDebug() << QStringLiteral("Image `%1` loaded in %2 milliseconds.").arg(path).arg(timer.elapsed()); +// qDebug() << QStringLiteral("Image `%1` loaded in %2 milliseconds.").arg(path).arg(timer.elapsed()); return image; } diff --git a/src/app/providers/ImageProvider.hpp b/src/app/providers/ImageProvider.hpp index b9c450da1..05d3af083 100644 --- a/src/app/providers/ImageProvider.hpp +++ b/src/app/providers/ImageProvider.hpp @@ -1,11 +1,13 @@ /* - * ImageProvider.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 19, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef IMAGE_PROVIDER_H_ diff --git a/src/app/providers/ThumbnailProvider.cpp b/src/app/providers/ThumbnailProvider.cpp index 9a516681a..ffe62e13b 100644 --- a/src/app/providers/ThumbnailProvider.cpp +++ b/src/app/providers/ThumbnailProvider.cpp @@ -1,11 +1,13 @@ /* - * ThumbnailProvider.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "app/paths/Paths.hpp" diff --git a/src/app/providers/ThumbnailProvider.hpp b/src/app/providers/ThumbnailProvider.hpp index 899fd7b73..380dc6b0f 100644 --- a/src/app/providers/ThumbnailProvider.hpp +++ b/src/app/providers/ThumbnailProvider.hpp @@ -1,11 +1,13 @@ /* - * ThumbnailProvider.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef THUMBNAIL_PROVIDER_H_ diff --git a/src/app/single-application/SingleApplication.cpp b/src/app/single-application/SingleApplication.cpp index 38a5f4465..195f64837 100644 --- a/src/app/single-application/SingleApplication.cpp +++ b/src/app/single-application/SingleApplication.cpp @@ -38,16 +38,16 @@ #include #endif // ifdef Q_OS_UNIX -#ifdef Q_OS_WIN - #include - #include -#endif // ifdef Q_OS_WIN #include "utils/Utils.hpp" #include "SingleApplication.hpp" #include "SingleApplicationPrivate.hpp" +#ifdef Q_OS_WIN + #include + #include +#endif // ifdef Q_OS_WIN // ============================================================================= using namespace std; @@ -61,7 +61,7 @@ namespace { // ----------------------------------------------------------------------------- -SingleApplicationPrivate::SingleApplicationPrivate (SingleApplication *q_ptr) : q_ptr(q_ptr) { +SingleApplicationPrivate::SingleApplicationPrivate (SingleApplication *p_ptr) : q_ptr(p_ptr) { server = nullptr; socket = nullptr; } @@ -104,7 +104,7 @@ void SingleApplicationPrivate::genBlockServerName (int timeout) { // User level block requires a user specific data in the hash if (options & SingleApplication::Mode::User) { #ifdef Q_OS_WIN - Q_UNUSED(timeout); + Q_UNUSED(timeout) wchar_t username[UNLEN + 1]; // Specifies size of the buffer on input DWORD usernameLength = UNLEN + 1; @@ -265,7 +265,9 @@ void SingleApplicationPrivate::slotConnectionEstablished () { tmp = nextConnSocket->read(checksum.length()); if (checksum == tmp) break; // Otherwise set to invalid connection (next line) - } UTILS_NO_BREAK; + connectionType = InvalidConnection; + break; + } default: connectionType = InvalidConnection; } diff --git a/src/app/single-application/SingleApplicationDBus.cpp b/src/app/single-application/SingleApplicationDBus.cpp index 1ece4fe93..9ddba55ff 100644 --- a/src/app/single-application/SingleApplicationDBus.cpp +++ b/src/app/single-application/SingleApplicationDBus.cpp @@ -1,11 +1,13 @@ /* - * SingleApplicationDBus.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 20, 2017 - * Author: Ghislain MARY + * along with this program. If not, see . */ #include diff --git a/src/app/single-application/SingleApplicationDBusPrivate.hpp b/src/app/single-application/SingleApplicationDBusPrivate.hpp index 55d6076f1..b98167aef 100644 --- a/src/app/single-application/SingleApplicationDBusPrivate.hpp +++ b/src/app/single-application/SingleApplicationDBusPrivate.hpp @@ -1,11 +1,13 @@ /* - * SingleApplicationDBusPrivate.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 20, 2017 - * Author: Ghislain MARY + * along with this program. If not, see . */ #ifndef SINGLE_APPLICATION_DBUS_PRIVATE_H_ diff --git a/src/app/single-application/SingleApplicationPrivate.hpp b/src/app/single-application/SingleApplicationPrivate.hpp index c7ffe1ea2..8db9a288e 100644 --- a/src/app/single-application/SingleApplicationPrivate.hpp +++ b/src/app/single-application/SingleApplicationPrivate.hpp @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // The MIT License (MIT) // // Copyright (c) Itay Grudev 2015 - 2016 @@ -44,7 +63,7 @@ struct InstancesInfo { bool primary; quint32 secondary; - quint64 primaryId; + qint64 primaryId; }; class SingleApplicationPrivate : public QObject { diff --git a/src/app/translator/DefaultTranslator.cpp b/src/app/translator/DefaultTranslator.cpp index d119aa340..7ef0c2941 100644 --- a/src/app/translator/DefaultTranslator.cpp +++ b/src/app/translator/DefaultTranslator.cpp @@ -1,11 +1,13 @@ /* - * DefaultTranslator.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/app/translator/DefaultTranslator.hpp b/src/app/translator/DefaultTranslator.hpp index 7c2583a2b..2d8b1262a 100644 --- a/src/app/translator/DefaultTranslator.hpp +++ b/src/app/translator/DefaultTranslator.hpp @@ -1,11 +1,13 @@ /* - * DefaultTranslator.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef DEFAULT_TRANSLATOR_H_ diff --git a/src/components/Components.hpp b/src/components/Components.hpp index 5fd463470..8147d8432 100644 --- a/src/components/Components.hpp +++ b/src/components/Components.hpp @@ -1,11 +1,13 @@ /* - * Components.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: April 6, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef COMPONENTS_H_ diff --git a/src/components/assistant/AssistantModel.cpp b/src/components/assistant/AssistantModel.cpp index 918e31e53..d53591662 100644 --- a/src/components/assistant/AssistantModel.cpp +++ b/src/components/assistant/AssistantModel.cpp @@ -1,11 +1,13 @@ /* - * AssistantModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: April 6, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "app/paths/Paths.hpp" diff --git a/src/components/assistant/AssistantModel.hpp b/src/components/assistant/AssistantModel.hpp index 5d1574422..dddfc05f1 100644 --- a/src/components/assistant/AssistantModel.hpp +++ b/src/components/assistant/AssistantModel.hpp @@ -1,11 +1,13 @@ /* - * AssistantModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: April 6, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef ASSISTANT_MODEL_H_ diff --git a/src/components/authentication/AuthenticationNotifier.cpp b/src/components/authentication/AuthenticationNotifier.cpp index b0caa193c..858bb9ae9 100644 --- a/src/components/authentication/AuthenticationNotifier.cpp +++ b/src/components/authentication/AuthenticationNotifier.cpp @@ -1,11 +1,13 @@ /* - * AuthenticationNotifier.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: April 13, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "components/core/CoreHandlers.hpp" diff --git a/src/components/authentication/AuthenticationNotifier.hpp b/src/components/authentication/AuthenticationNotifier.hpp index 0d934820d..bf76963e8 100644 --- a/src/components/authentication/AuthenticationNotifier.hpp +++ b/src/components/authentication/AuthenticationNotifier.hpp @@ -1,11 +1,13 @@ /* - * AuthenticationNotifier.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: April 13, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef AUTHENTICATION_NOTIFIER_H_ diff --git a/src/components/call/CallModel.cpp b/src/components/call/CallModel.cpp index f98b7adce..89e735d1a 100644 --- a/src/components/call/CallModel.cpp +++ b/src/components/call/CallModel.cpp @@ -1,11 +1,13 @@ /* - * CallModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,12 +15,9 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ +#include "CallModel.hpp" #include #include @@ -36,7 +35,7 @@ #include "utils/MediastreamerUtils.hpp" #include "utils/Utils.hpp" -#include "CallModel.hpp" + // ============================================================================= @@ -282,11 +281,14 @@ void CallModel::handleCallStateChanged (const shared_ptr &call, mPausedByRemote = false; break; - case linphone::Call::State::StreamsRunning: + case linphone::Call::State::StreamsRunning: { if (!mWasConnected && CoreManager::getInstance()->getSettingsModel()->getAutomaticallyRecordCalls()) { startRecording(); mWasConnected = true; - } UTILS_NO_BREAK; + } + mPausedByRemote = false; + break; + } case linphone::Call::State::Connected: case linphone::Call::State::Referred: case linphone::Call::State::Released: @@ -703,8 +705,8 @@ void CallModel::updateStats (const shared_ptr &callSt statsList << createStat(tr("callStatsDownloadBandwidth"), QStringLiteral("%1 kbits/s").arg(int(callStats->getDownloadBandwidth()))); statsList << createStat(tr("callStatsIceState"), iceStateToString(callStats->getIceState())); statsList << createStat(tr("callStatsIpFamily"), family); - statsList << createStat(tr("callStatsSenderLossRate"), QStringLiteral("%1 %").arg(callStats->getSenderLossRate())); - statsList << createStat(tr("callStatsReceiverLossRate"), QStringLiteral("%1 %").arg(callStats->getReceiverLossRate())); + statsList << createStat(tr("callStatsSenderLossRate"), QStringLiteral("%1 %").arg(static_cast(callStats->getSenderLossRate()))); + statsList << createStat(tr("callStatsReceiverLossRate"), QStringLiteral("%1 %").arg(static_cast(callStats->getReceiverLossRate()))); switch (callStats->getType()) { case linphone::StreamType::Audio: @@ -730,8 +732,8 @@ void CallModel::updateStats (const shared_ptr &callSt ? receivedVideoDefinition : QString("%1 (%2)").arg(receivedVideoDefinition).arg(receivedVideoDefinitionName)); - statsList << createStat(tr("callStatsReceivedFramerate"), QStringLiteral("%1 FPS").arg(params->getReceivedFramerate())); - statsList << createStat(tr("callStatsSentFramerate"), QStringLiteral("%1 FPS").arg(params->getSentFramerate())); + statsList << createStat(tr("callStatsReceivedFramerate"), QStringLiteral("%1 FPS").arg(static_cast(params->getReceivedFramerate()))); + statsList << createStat(tr("callStatsSentFramerate"), QStringLiteral("%1 FPS").arg(static_cast(params->getSentFramerate()))); } break; default: diff --git a/src/components/call/CallModel.hpp b/src/components/call/CallModel.hpp index a8b394349..195c88600 100644 --- a/src/components/call/CallModel.hpp +++ b/src/components/call/CallModel.hpp @@ -1,11 +1,13 @@ /* - * CallModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,18 +15,15 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef CALL_MODEL_H_ #define CALL_MODEL_H_ -#include #include +#include + // ============================================================================= diff --git a/src/components/calls/CallsListModel.cpp b/src/components/calls/CallsListModel.cpp index c3b2d5cea..e9b394c5c 100644 --- a/src/components/calls/CallsListModel.cpp +++ b/src/components/calls/CallsListModel.cpp @@ -1,11 +1,13 @@ /* - * CallsListModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/calls/CallsListModel.hpp b/src/components/calls/CallsListModel.hpp index 8b61d7f35..be8be3a54 100644 --- a/src/components/calls/CallsListModel.hpp +++ b/src/components/calls/CallsListModel.hpp @@ -1,11 +1,13 @@ /* - * CallsListModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef CALLS_LIST_MODEL_H_ diff --git a/src/components/calls/CallsListProxyModel.cpp b/src/components/calls/CallsListProxyModel.cpp index 40fa13e15..5a2a82501 100644 --- a/src/components/calls/CallsListProxyModel.cpp +++ b/src/components/calls/CallsListProxyModel.cpp @@ -1,11 +1,13 @@ /* - * CallsListProxyModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: May 22, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "components/call/CallModel.hpp" diff --git a/src/components/calls/CallsListProxyModel.hpp b/src/components/calls/CallsListProxyModel.hpp index 87429f085..10e59f72b 100644 --- a/src/components/calls/CallsListProxyModel.hpp +++ b/src/components/calls/CallsListProxyModel.hpp @@ -1,11 +1,13 @@ /* - * CallsListProxyModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: May 22, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef CALLS_LIST_PROXY_MODEL_H_ diff --git a/src/components/camera/Camera.cpp b/src/components/camera/Camera.cpp index df113935e..3604faae9 100644 --- a/src/components/camera/Camera.cpp +++ b/src/components/camera/Camera.cpp @@ -1,11 +1,13 @@ /* - * Camera.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/camera/Camera.hpp b/src/components/camera/Camera.hpp index a87c90124..2fbb7b0ec 100644 --- a/src/components/camera/Camera.hpp +++ b/src/components/camera/Camera.hpp @@ -1,11 +1,13 @@ /* - * Camera.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef CAMERA_H_ diff --git a/src/components/camera/CameraPreview.cpp b/src/components/camera/CameraPreview.cpp index 7acc534d6..c284c669f 100644 --- a/src/components/camera/CameraPreview.cpp +++ b/src/components/camera/CameraPreview.cpp @@ -1,11 +1,13 @@ /* - * CameraPreview.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: April 19, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/camera/CameraPreview.hpp b/src/components/camera/CameraPreview.hpp index 5a82c3e84..2127dbca4 100644 --- a/src/components/camera/CameraPreview.hpp +++ b/src/components/camera/CameraPreview.hpp @@ -1,11 +1,13 @@ /* - * CameraPreview.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: April 19, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef CAMERA_PREVIEW_H_ diff --git a/src/components/camera/MSFunctions.cpp b/src/components/camera/MSFunctions.cpp index f06d51665..7b1ce9c31 100644 --- a/src/components/camera/MSFunctions.cpp +++ b/src/components/camera/MSFunctions.cpp @@ -1,11 +1,13 @@ /* - * MSFunctions.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 9, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "MSFunctions.hpp" diff --git a/src/components/camera/MSFunctions.hpp b/src/components/camera/MSFunctions.hpp index 00be3a1d5..52b645c1a 100644 --- a/src/components/camera/MSFunctions.hpp +++ b/src/components/camera/MSFunctions.hpp @@ -1,11 +1,13 @@ /* - * MSFunctions.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 9, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef MS_FUNCTIONS_H_ diff --git a/src/components/chat/ChatModel.cpp b/src/components/chat/ChatModel.cpp index 78f7a55cf..d2895ca83 100644 --- a/src/components/chat/ChatModel.cpp +++ b/src/components/chat/ChatModel.cpp @@ -1,11 +1,13 @@ /* - * ChatModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include @@ -53,88 +51,139 @@ namespace { // In Bytes. constexpr qint64 FileSizeLimit = 524288000; } - -static inline QString getFileId (const shared_ptr &message) { - return Utils::coreStringToAppString(message->getAppdata()).section(':', 0, 0); +// MessageAppData is using to parse what's it in Appdata field of a message +class MessageAppData +{ +public: + MessageAppData(){} + MessageAppData(const QString&); + QString m_id; + QString m_path; + QString toString()const; + void fromString(const QString& ); + static QString toString(const QVector& ); + static QVector fromListString(const QString& ); +}; +MessageAppData::MessageAppData(const QString& p_data) +{ + fromString(p_data); +} +QString MessageAppData::toString()const +{ + return m_id+':'+m_path; +} +void MessageAppData::fromString(const QString& p_data) +{ + QStringList fields = p_data.split(':'); + m_id = fields[0]; + m_path = fields[1]; +} +QString MessageAppData::toString(const QVector& p_data) +{ + QString serialization; + if( p_data.size() > 0) + { + serialization = p_data[0].toString(); + for(int i = 1 ; i < p_data.size() ; ++i) + serialization += ';'+p_data[i].toString(); + } + return serialization; +} +QVector MessageAppData::fromListString(const QString& p_data) +{ + QVector data; + QStringList files = p_data.split(";"); + for(int i = 0 ; i < files.size() ; ++i) + data.push_back(MessageAppData(files[i])); + return data; } -static inline QString getDownloadPath (const shared_ptr &message) { - return Utils::coreStringToAppString(message->getAppdata()).section(':', 1); + +// There is only one file (thumbnail) in appdata +static inline MessageAppData getMessageAppData (const shared_ptr &message) { + return MessageAppData(QString::fromStdString(message->getAppdata())); } static inline bool fileWasDownloaded (const shared_ptr &message) { - const QString path = getDownloadPath(message); - return !path.isEmpty() && QFileInfo(path).isFile(); + const MessageAppData appData = getMessageAppData(message); + return !appData.m_path.isEmpty() && QFileInfo(appData.m_path).isFile(); } - +// Set the thumbnail as the first content static inline void fillThumbnailProperty (QVariantMap &dest, const shared_ptr &message) { - QString fileId = getFileId(message); - if (!fileId.isEmpty() && !dest.contains("thumbnail")) - dest["thumbnail"] = QStringLiteral("image://%1/%2") - .arg(ThumbnailProvider::ProviderId).arg(fileId); + if( !dest.contains("thumbnail")) + { + MessageAppData thumbnailData = getMessageAppData(message); + dest["thumbnail"] = QStringLiteral("image://%1/%2") + .arg(ThumbnailProvider::ProviderId).arg(thumbnailData.m_id); + } } +// Create a thumbnail from the first content that have a file and store it in Appdata static inline void createThumbnail (const shared_ptr &message) { if (!message->getAppdata().empty()) - return; + return;// Already exist : no need to create one + std::list > contents = message->getContents(); + if( contents.size() > 0) + { + QString thumbnailPath = QString::fromStdString(contents.front()->getFilePath()); + QImage image(thumbnailPath); + if (image.isNull()) + return; - QString thumbnailPath = Utils::coreStringToAppString(message->getFileTransferFilepath()); - QImage image(thumbnailPath); - if (image.isNull()) - return; + int rotation = 0; + QExifImageHeader exifImageHeader; + if (exifImageHeader.loadFromJpeg(thumbnailPath)) + rotation = int(exifImageHeader.value(QExifImageHeader::ImageTag::Orientation).toShort()); - int rotation = 0; - QExifImageHeader exifImageHeader; - if (exifImageHeader.loadFromJpeg(thumbnailPath)) - rotation = int(exifImageHeader.value(QExifImageHeader::ImageTag::Orientation).toShort()); + QImage thumbnail = image.scaled( + ThumbnailImageFileWidth, ThumbnailImageFileHeight, + Qt::KeepAspectRatio, Qt::SmoothTransformation + ); - QImage thumbnail = image.scaled( - ThumbnailImageFileWidth, ThumbnailImageFileHeight, - Qt::KeepAspectRatio, Qt::SmoothTransformation - ); + if (rotation != 0) { + QTransform transform; + if (rotation == 3 || rotation == 4) + transform.rotate(180); + else if (rotation == 5 || rotation == 6) + transform.rotate(90); + else if (rotation == 7 || rotation == 8) + transform.rotate(-90); - if (rotation != 0) { - QTransform transform; - if (rotation == 3 || rotation == 4) - transform.rotate(180); - else if (rotation == 5 || rotation == 6) - transform.rotate(90); - else if (rotation == 7 || rotation == 8) - transform.rotate(-90); + thumbnail = thumbnail.transformed(transform); + if (rotation == 2 || rotation == 4 || rotation == 5 || rotation == 7) + thumbnail = thumbnail.mirrored(true, false); + } - thumbnail = thumbnail.transformed(transform); - if (rotation == 2 || rotation == 4 || rotation == 5 || rotation == 7) - thumbnail = thumbnail.mirrored(true, false); + QString uuid = QUuid::createUuid().toString(); + QString fileId = QStringLiteral("%1.jpg").arg(uuid.mid(1, uuid.length() - 2)); + + if (!thumbnail.save(Utils::coreStringToAppString(Paths::getThumbnailsDirPath()) + fileId, "jpg", 100)) { + qWarning() << QStringLiteral("Unable to create thumbnail of: `%1`.").arg(thumbnailPath); + return; + } + + message->setAppdata(Utils::appStringToCoreString(fileId)); } - - QString uuid = QUuid::createUuid().toString(); - QString fileId = QStringLiteral("%1.jpg").arg(uuid.mid(1, uuid.length() - 2)); - - if (!thumbnail.save(Utils::coreStringToAppString(Paths::getThumbnailsDirPath()) + fileId, "jpg", 100)) { - qWarning() << QStringLiteral("Unable to create thumbnail of: `%1`.").arg(thumbnailPath); - return; - } - - message->setAppdata(Utils::appStringToCoreString(fileId)); } static inline void removeFileMessageThumbnail (const shared_ptr &message) { - if (message && message->getFileTransferInformation()) { - message->cancelFileTransfer(); - - string fileId = message->getAppdata(); - if (!fileId.empty()) { - QString thumbnailPath = Utils::coreStringToAppString(Paths::getThumbnailsDirPath() + fileId); - if (!QFile::remove(thumbnailPath)) - qWarning() << QStringLiteral("Unable to remove `%1`.").arg(thumbnailPath); + if (message && message->getFileTransferInformation()) { + message->cancelFileTransfer(); + MessageAppData thumbnailFile = getMessageAppData(message); + if(thumbnailFile.m_path.size() > 0) + { + QString thumbnailPath = QString::fromStdString(Paths::getThumbnailsDirPath()) + thumbnailFile.m_path; + if (!QFile::remove(thumbnailPath)) + qWarning() << QStringLiteral("Unable to remove `%1`.").arg(thumbnailPath); + } + message->setAppdata("");// Remove completly Thumbnail from the message } - } } // ----------------------------------------------------------------------------- static inline void fillMessageEntry (QVariantMap &dest, const shared_ptr &message) { - dest["content"] = Utils::coreStringToAppString(message->getText()); + dest["content"] = Utils::coreStringToAppString(message->getTextContent()); dest["isOutgoing"] = message->isOutgoing() || message->getState() == linphone::ChatMessage::State::Idle; // Old workaround. @@ -232,9 +281,10 @@ private: createThumbnail(message); fillThumbnailProperty((*it).first, message); - message->setAppdata( - Utils::appStringToCoreString(getFileId(message)) + ':' + message->getFileTransferFilepath() - ); + MessageAppData thumbnailFile = getMessageAppData(message); + thumbnailFile.m_path = QString::fromStdString(message->getContents().front()->getFilePath()); + + message->setAppdata(thumbnailFile.toString().toStdString()); (*it).first["wasDownloaded"] = true; App::getInstance()->getNotifier()->notifyReceivedFileMessage(message); @@ -472,7 +522,7 @@ void ChatModel::sendFileMessage (const QString &path) { content->setName(Utils::appStringToCoreString(QFileInfo(file).fileName())); shared_ptr message = mChatRoom->createFileTransferMessage(content); - message->setFileTransferFilepath(Utils::appStringToCoreString(path)); + message->getContents().front()->setFilePath(path.toStdString());// Sending only one File Path? message->addListener(mMessageHandlers); createThumbnail(message); @@ -515,12 +565,12 @@ void ChatModel::downloadFile (int id) { if (!soFarSoGood) { qWarning() << QStringLiteral("Unable to create safe file path for: %1.").arg(id); return; - } - - message->setFileTransferFilepath(Utils::appStringToCoreString(safeFilePath)); + } message->addListener(mMessageHandlers); - if (!message->downloadFile()) + message->getContents().front()->setFilePath(safeFilePath.toStdString()); +// Download only the first content. Maybe a bug.. or not. + if (!message->downloadContent(message->getContents().front())) qWarning() << QStringLiteral("Unable to download file of entry %1.").arg(id); } @@ -535,7 +585,7 @@ void ChatModel::openFile (int id, bool showDirectory) { return; } - QFileInfo info(getDownloadPath(message)); + QFileInfo info(getMessageAppData(message).m_path); QDesktopServices::openUrl( QUrl(QStringLiteral("file:///%1").arg(showDirectory ? info.absolutePath() : info.absoluteFilePath())) ); @@ -637,7 +687,7 @@ void ChatModel::insertCall (const shared_ptr &callLog) { auto insertEntry = [this]( const ChatEntryData &entry, - const QList::iterator *start = NULL + const QList::iterator *start = nullptr ) { auto it = lower_bound(start ? *start : mEntries.begin(), mEntries.end(), entry, [](const ChatEntryData &a, const ChatEntryData &b) { return a.first["timestamp"] < b.first["timestamp"]; diff --git a/src/components/chat/ChatModel.hpp b/src/components/chat/ChatModel.hpp index b7e312ed7..60460f33e 100644 --- a/src/components/chat/ChatModel.hpp +++ b/src/components/chat/ChatModel.hpp @@ -1,11 +1,13 @@ /* - * ChatModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef CHAT_MODEL_H_ diff --git a/src/components/chat/ChatProxyModel.cpp b/src/components/chat/ChatProxyModel.cpp index 0a90c4430..3c4ac0acd 100644 --- a/src/components/chat/ChatProxyModel.cpp +++ b/src/components/chat/ChatProxyModel.cpp @@ -1,11 +1,13 @@ /* - * ChatProxyModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/chat/ChatProxyModel.hpp b/src/components/chat/ChatProxyModel.hpp index 7188fada6..4be4e7504 100644 --- a/src/components/chat/ChatProxyModel.hpp +++ b/src/components/chat/ChatProxyModel.hpp @@ -1,11 +1,13 @@ /* - * ChatProxyModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef CHAT_PROXY_MODEL_H_ diff --git a/src/components/codecs/AbstractCodecsModel.cpp b/src/components/codecs/AbstractCodecsModel.cpp index 74280cd13..ff95a173a 100644 --- a/src/components/codecs/AbstractCodecsModel.cpp +++ b/src/components/codecs/AbstractCodecsModel.cpp @@ -1,11 +1,13 @@ /* - * AbstractCodecsModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: April 4, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "app/paths/Paths.hpp" diff --git a/src/components/codecs/AbstractCodecsModel.hpp b/src/components/codecs/AbstractCodecsModel.hpp index c517e12e3..d4f10ce2d 100644 --- a/src/components/codecs/AbstractCodecsModel.hpp +++ b/src/components/codecs/AbstractCodecsModel.hpp @@ -1,11 +1,13 @@ /* - * AbstractCodecsModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: April 4, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef ABSTRACT_CODECS_MODEL_H_ diff --git a/src/components/codecs/AudioCodecsModel.cpp b/src/components/codecs/AudioCodecsModel.cpp index 5ceba7524..6d0fa4e3b 100644 --- a/src/components/codecs/AudioCodecsModel.cpp +++ b/src/components/codecs/AudioCodecsModel.cpp @@ -1,11 +1,13 @@ /* - * AudioCodecsModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: April 3, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "components/core/CoreManager.hpp" diff --git a/src/components/codecs/AudioCodecsModel.hpp b/src/components/codecs/AudioCodecsModel.hpp index 1b9d13656..57b7f4df0 100644 --- a/src/components/codecs/AudioCodecsModel.hpp +++ b/src/components/codecs/AudioCodecsModel.hpp @@ -1,11 +1,13 @@ /* - * AudioCodecsModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: April 3, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef AUDIO_CODECS_MODEL_H_ diff --git a/src/components/codecs/VideoCodecsModel.cpp b/src/components/codecs/VideoCodecsModel.cpp index 915bf74af..892b29f6a 100644 --- a/src/components/codecs/VideoCodecsModel.cpp +++ b/src/components/codecs/VideoCodecsModel.cpp @@ -1,11 +1,13 @@ /* - * VideoCodecsModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: April 3, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/codecs/VideoCodecsModel.hpp b/src/components/codecs/VideoCodecsModel.hpp index 65d1d8180..63e3a4382 100644 --- a/src/components/codecs/VideoCodecsModel.hpp +++ b/src/components/codecs/VideoCodecsModel.hpp @@ -1,11 +1,13 @@ /* - * VideoCodecsModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: April 3, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef VIDEO_CODECS_MODEL_H_ diff --git a/src/components/conference/ConferenceAddModel.cpp b/src/components/conference/ConferenceAddModel.cpp index 1e3bea103..a65536814 100644 --- a/src/components/conference/ConferenceAddModel.cpp +++ b/src/components/conference/ConferenceAddModel.cpp @@ -1,11 +1,13 @@ /* - * ConferenceAddModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: May 18, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "components/core/CoreManager.hpp" diff --git a/src/components/conference/ConferenceAddModel.hpp b/src/components/conference/ConferenceAddModel.hpp index 6854f0666..222691c55 100644 --- a/src/components/conference/ConferenceAddModel.hpp +++ b/src/components/conference/ConferenceAddModel.hpp @@ -1,11 +1,13 @@ /* - * ConferenceAddModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: May 18, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef CONFERENCE_ADD_MODEL_H_ diff --git a/src/components/conference/ConferenceHelperModel.cpp b/src/components/conference/ConferenceHelperModel.cpp index 45c519f46..f7db0b264 100644 --- a/src/components/conference/ConferenceHelperModel.cpp +++ b/src/components/conference/ConferenceHelperModel.cpp @@ -1,11 +1,13 @@ /* - * ConferenceHelperModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: May 11, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/conference/ConferenceHelperModel.hpp b/src/components/conference/ConferenceHelperModel.hpp index 93fa8aa7d..fffcef6d9 100644 --- a/src/components/conference/ConferenceHelperModel.hpp +++ b/src/components/conference/ConferenceHelperModel.hpp @@ -1,11 +1,13 @@ /* - * ConferenceHelperModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: May 11, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef CONFERENCE_HELPER_MODEL_H_ diff --git a/src/components/conference/ConferenceModel.cpp b/src/components/conference/ConferenceModel.cpp index 74a276320..d795bd77d 100644 --- a/src/components/conference/ConferenceModel.cpp +++ b/src/components/conference/ConferenceModel.cpp @@ -1,11 +1,13 @@ /* - * ConferenceModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: May 23, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/conference/ConferenceModel.hpp b/src/components/conference/ConferenceModel.hpp index 25f1ed385..ec35ffa77 100644 --- a/src/components/conference/ConferenceModel.hpp +++ b/src/components/conference/ConferenceModel.hpp @@ -1,11 +1,13 @@ /* - * ConferenceModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: May 23, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef CONFERENCE_MODEL_H_ diff --git a/src/components/contact/ContactModel.cpp b/src/components/contact/ContactModel.cpp index 39b6dd794..04d9a30f5 100644 --- a/src/components/contact/ContactModel.cpp +++ b/src/components/contact/ContactModel.cpp @@ -1,11 +1,13 @@ /* - * ContactModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/contact/ContactModel.hpp b/src/components/contact/ContactModel.hpp index 46c109b62..cb74adb64 100644 --- a/src/components/contact/ContactModel.hpp +++ b/src/components/contact/ContactModel.hpp @@ -1,11 +1,13 @@ /* - * ContactModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef CONTACT_MODEL_H_ diff --git a/src/components/contact/VcardModel.cpp b/src/components/contact/VcardModel.cpp index 1a8c729c5..a15b34d50 100644 --- a/src/components/contact/VcardModel.cpp +++ b/src/components/contact/VcardModel.cpp @@ -1,11 +1,13 @@ /* - * VcardModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/contact/VcardModel.hpp b/src/components/contact/VcardModel.hpp index e87ae3449..8dabe0ad2 100644 --- a/src/components/contact/VcardModel.hpp +++ b/src/components/contact/VcardModel.hpp @@ -1,11 +1,13 @@ /* - * VcardModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef VCARD_MODEL_H_ diff --git a/src/components/contacts/ContactsListModel.cpp b/src/components/contacts/ContactsListModel.cpp index 8464716c9..a4808a0a8 100644 --- a/src/components/contacts/ContactsListModel.cpp +++ b/src/components/contacts/ContactsListModel.cpp @@ -1,11 +1,13 @@ /* - * ContactsListModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/contacts/ContactsListModel.hpp b/src/components/contacts/ContactsListModel.hpp index 6b2858c37..cd155da86 100644 --- a/src/components/contacts/ContactsListModel.hpp +++ b/src/components/contacts/ContactsListModel.hpp @@ -1,11 +1,13 @@ /* - * ContactsListModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef CONTACTS_LIST_MODEL_H_ diff --git a/src/components/contacts/ContactsListProxyModel.cpp b/src/components/contacts/ContactsListProxyModel.cpp index 48e831e1c..ccb5496ac 100644 --- a/src/components/contacts/ContactsListProxyModel.cpp +++ b/src/components/contacts/ContactsListProxyModel.cpp @@ -1,11 +1,13 @@ /* - * ContactsListProxyModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/contacts/ContactsListProxyModel.hpp b/src/components/contacts/ContactsListProxyModel.hpp index 5cb243d4c..3fe08400f 100644 --- a/src/components/contacts/ContactsListProxyModel.hpp +++ b/src/components/contacts/ContactsListProxyModel.hpp @@ -1,11 +1,13 @@ /* - * ContactsListProxyModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef CONTACTS_LIST_PROXY_MODEL_H_ diff --git a/src/components/core/CoreHandlers.cpp b/src/components/core/CoreHandlers.cpp index 417765d1c..aff12c458 100644 --- a/src/components/core/CoreHandlers.cpp +++ b/src/components/core/CoreHandlers.cpp @@ -1,11 +1,13 @@ /* - * CoreHandlers.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/core/CoreHandlers.hpp b/src/components/core/CoreHandlers.hpp index bdb377d91..f47e69c7d 100644 --- a/src/components/core/CoreHandlers.hpp +++ b/src/components/core/CoreHandlers.hpp @@ -1,11 +1,13 @@ /* - * CoreHandlers.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef CORE_HANDLERS_H_ diff --git a/src/components/core/CoreManager.cpp b/src/components/core/CoreManager.cpp index 5df6e8db1..bacf0389a 100644 --- a/src/components/core/CoreManager.cpp +++ b/src/components/core/CoreManager.cpp @@ -1,11 +1,13 @@ /* - * CoreManager.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/core/CoreManager.hpp b/src/components/core/CoreManager.hpp index 5c29a28b1..33b33e581 100644 --- a/src/components/core/CoreManager.hpp +++ b/src/components/core/CoreManager.hpp @@ -1,11 +1,13 @@ /* - * CoreManager.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef CORE_MANAGER_H_ diff --git a/src/components/core/event-count-notifier/AbstractEventCountNotifier.cpp b/src/components/core/event-count-notifier/AbstractEventCountNotifier.cpp index 078ec2a70..16c1e85ea 100644 --- a/src/components/core/event-count-notifier/AbstractEventCountNotifier.cpp +++ b/src/components/core/event-count-notifier/AbstractEventCountNotifier.cpp @@ -1,11 +1,13 @@ /* - * AbstractEventCountNotifier.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 29, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "components/call/CallModel.hpp" diff --git a/src/components/core/event-count-notifier/AbstractEventCountNotifier.hpp b/src/components/core/event-count-notifier/AbstractEventCountNotifier.hpp index 5ed3d5349..09a84ceb4 100644 --- a/src/components/core/event-count-notifier/AbstractEventCountNotifier.hpp +++ b/src/components/core/event-count-notifier/AbstractEventCountNotifier.hpp @@ -1,11 +1,13 @@ /* - * AbstractEventCountNotifier.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 29, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef ABSTRACT_EVENT_COUNT_NOTIFIER_H_ diff --git a/src/components/core/event-count-notifier/EventCountNotifierMacOs.hpp b/src/components/core/event-count-notifier/EventCountNotifierMacOs.hpp index 48e5f126e..53487d711 100644 --- a/src/components/core/event-count-notifier/EventCountNotifierMacOs.hpp +++ b/src/components/core/event-count-notifier/EventCountNotifierMacOs.hpp @@ -1,11 +1,13 @@ /* - * EventCountNotifierMacOs.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 30, 2017 - * Author: Ghislain MARY + * along with this program. If not, see . */ #ifndef EVENT_COUNT_NOTIFIER_MAC_OS_H_ diff --git a/src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.cpp b/src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.cpp index 345916fb7..2499c741d 100644 --- a/src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.cpp +++ b/src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.cpp @@ -1,11 +1,13 @@ /* - * EventCountNotifierSystemTrayIcon.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: August 7, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.hpp b/src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.hpp index 61cfcf7f1..5a94c4359 100644 --- a/src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.hpp +++ b/src/components/core/event-count-notifier/EventCountNotifierSystemTrayIcon.hpp @@ -1,11 +1,13 @@ /* - * EventCountNotifierSystemTrayIcon.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: August 7, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef EVENT_COUNT_NOTIFIER_SYSTEM_TRAY_ICON_H_ diff --git a/src/components/file/FileDownloader.cpp b/src/components/file/FileDownloader.cpp index ecf988242..8ff2b4fa5 100644 --- a/src/components/file/FileDownloader.cpp +++ b/src/components/file/FileDownloader.cpp @@ -1,11 +1,13 @@ /* - * FileDownloader.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 6, 2018 - * Author: Danmei Chen + * along with this program. If not, see . */ #include "app/paths/Paths.hpp" diff --git a/src/components/file/FileDownloader.hpp b/src/components/file/FileDownloader.hpp index 4c845a022..782768bd0 100644 --- a/src/components/file/FileDownloader.hpp +++ b/src/components/file/FileDownloader.hpp @@ -1,11 +1,13 @@ /* - * FileDownloader.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 6, 2018 - * Author: Danmei Chen + * along with this program. If not, see . */ #ifndef FILE_DOWNLOADER_H_ diff --git a/src/components/file/FileExtractor.cpp b/src/components/file/FileExtractor.cpp index 2d12ec86d..0bc8379cb 100644 --- a/src/components/file/FileExtractor.cpp +++ b/src/components/file/FileExtractor.cpp @@ -1,11 +1,13 @@ /* - * FileExtractor.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: March 8, 2018 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/file/FileExtractor.hpp b/src/components/file/FileExtractor.hpp index b38925237..dffe29798 100644 --- a/src/components/file/FileExtractor.hpp +++ b/src/components/file/FileExtractor.hpp @@ -1,11 +1,13 @@ /* - * FileExtractor.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: March 8, 2018 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef FILE_EXTRACTOR_H_ diff --git a/src/components/notifier/Notifier.cpp b/src/components/notifier/Notifier.cpp index 8a40590bb..ab7e9e76a 100644 --- a/src/components/notifier/Notifier.cpp +++ b/src/components/notifier/Notifier.cpp @@ -1,11 +1,13 @@ /* - * Notifier.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/notifier/Notifier.hpp b/src/components/notifier/Notifier.hpp index 352f00e52..eacc8123a 100644 --- a/src/components/notifier/Notifier.hpp +++ b/src/components/notifier/Notifier.hpp @@ -1,11 +1,13 @@ /* - * Notifier.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef NOTIFIER_H_ diff --git a/src/components/other/clipboard/Clipboard.cpp b/src/components/other/clipboard/Clipboard.cpp index 146b4b05c..297621c80 100644 --- a/src/components/other/clipboard/Clipboard.cpp +++ b/src/components/other/clipboard/Clipboard.cpp @@ -1,11 +1,13 @@ /* - * Clipboard.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: May 30, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/other/clipboard/Clipboard.hpp b/src/components/other/clipboard/Clipboard.hpp index cc5e01c29..04d7856cb 100644 --- a/src/components/other/clipboard/Clipboard.hpp +++ b/src/components/other/clipboard/Clipboard.hpp @@ -1,11 +1,13 @@ /* - * Clipboard.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: May 30, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef CLIPBOARD_H_ diff --git a/src/components/other/colors/Colors.cpp b/src/components/other/colors/Colors.cpp index 73ffbbdce..fd6b5d556 100644 --- a/src/components/other/colors/Colors.cpp +++ b/src/components/other/colors/Colors.cpp @@ -1,11 +1,13 @@ /* - * Colors.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 18, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/other/colors/Colors.hpp b/src/components/other/colors/Colors.hpp index c80de6f78..8e32493b1 100644 --- a/src/components/other/colors/Colors.hpp +++ b/src/components/other/colors/Colors.hpp @@ -1,11 +1,13 @@ /* - * Colors.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 18, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef COLORS_H_ @@ -54,54 +52,54 @@ namespace linphone { } class Colors : public QObject { - Q_OBJECT; + Q_OBJECT - Q_PROPERTY(QStringList colorNames READ getColorNames CONSTANT); + Q_PROPERTY(QStringList colorNames READ getColorNames CONSTANT) - ADD_COLOR(a, "transparent"); + ADD_COLOR(a, "transparent") // Primary color for hovered items. - ADD_COLOR(b, "#D64D00"); + ADD_COLOR(b, "#D64D00") - ADD_COLOR(c, "#CBCBCB"); - ADD_COLOR(d, "#5A585B"); - ADD_COLOR(e, "#F3F3F3"); - ADD_COLOR(f, "#E8E8E8"); - ADD_COLOR(g, "#6B7A86"); - ADD_COLOR(h, "#687680"); + ADD_COLOR(c, "#CBCBCB") + ADD_COLOR(d, "#5A585B") + ADD_COLOR(e, "#F3F3F3") + ADD_COLOR(f, "#E8E8E8") + ADD_COLOR(g, "#6B7A86") + ADD_COLOR(h, "#687680") // Primary color. - ADD_COLOR(i, "#FE5E00"); + ADD_COLOR(i, "#FE5E00") - ADD_COLOR(j, "#4B5964"); + ADD_COLOR(j, "#4B5964") // Popups, home, call, assistant and settings background. - ADD_COLOR(k, "#FFFFFF"); + ADD_COLOR(k, "#FFFFFF") - ADD_COLOR(l, "#000000"); + ADD_COLOR(l, "#000000") // Primary color for clicked items. - ADD_COLOR(m, "#FF8600"); + ADD_COLOR(m, "#FF8600") - ADD_COLOR(n, "#A1A1A1"); - ADD_COLOR(o, "#D0D8DE"); + ADD_COLOR(n, "#A1A1A1") + ADD_COLOR(o, "#D0D8DE") // Progress bar. - ADD_COLOR(p, "#17A81A"); + ADD_COLOR(p, "#17A81A") // Fields, backgrounds and text color on some items. - ADD_COLOR(q, "#FFFFFF"); + ADD_COLOR(q, "#FFFFFF") // Field error. - ADD_COLOR(error, "#FF0000"); + ADD_COLOR(error, "#FF0000") - ADD_COLOR_WITH_ALPHA(g, 10); - ADD_COLOR_WITH_ALPHA(g, 20); - ADD_COLOR_WITH_ALPHA(g, 90); - ADD_COLOR_WITH_ALPHA(i, 30); - ADD_COLOR_WITH_ALPHA(l, 50); - ADD_COLOR_WITH_ALPHA(l, 80); - ADD_COLOR_WITH_ALPHA(q, 50); + ADD_COLOR_WITH_ALPHA(g, 10) + ADD_COLOR_WITH_ALPHA(g, 20) + ADD_COLOR_WITH_ALPHA(g, 90) + ADD_COLOR_WITH_ALPHA(i, 30) + ADD_COLOR_WITH_ALPHA(l, 50) + ADD_COLOR_WITH_ALPHA(l, 80) + ADD_COLOR_WITH_ALPHA(q, 50) public: Colors (QObject *parent = Q_NULLPTR); diff --git a/src/components/other/desktop-tools/DesktopTools.hpp b/src/components/other/desktop-tools/DesktopTools.hpp index ca04d11ec..a370a2fd3 100644 --- a/src/components/other/desktop-tools/DesktopTools.hpp +++ b/src/components/other/desktop-tools/DesktopTools.hpp @@ -1,11 +1,13 @@ /* - * DesktopTools.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 21, 2018 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef DESKTOP_TOOLS_H_ diff --git a/src/components/other/desktop-tools/DesktopToolsLinux.cpp b/src/components/other/desktop-tools/DesktopToolsLinux.cpp index 772e4a908..98fb0799e 100644 --- a/src/components/other/desktop-tools/DesktopToolsLinux.cpp +++ b/src/components/other/desktop-tools/DesktopToolsLinux.cpp @@ -1,11 +1,13 @@ /* - * DesktopToolsLinux.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 21, 2018 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "DesktopToolsLinux.hpp" diff --git a/src/components/other/desktop-tools/DesktopToolsLinux.hpp b/src/components/other/desktop-tools/DesktopToolsLinux.hpp index fb0385174..fce67e103 100644 --- a/src/components/other/desktop-tools/DesktopToolsLinux.hpp +++ b/src/components/other/desktop-tools/DesktopToolsLinux.hpp @@ -1,11 +1,13 @@ /* - * DesktopToolsLinux.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 21, 2018 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef DESKTOP_TOOLS_LINUX_H_ @@ -40,6 +38,8 @@ public: bool getScreenSaverStatus () const; void setScreenSaverStatus (bool status); + static void applicationStateChanged(Qt::ApplicationState){}; + signals: void screenSaverStatusChanged (bool status); diff --git a/src/components/other/desktop-tools/DesktopToolsMacOs.cpp b/src/components/other/desktop-tools/DesktopToolsMacOs.cpp index 1c2bb53b6..25365e8fd 100644 --- a/src/components/other/desktop-tools/DesktopToolsMacOs.cpp +++ b/src/components/other/desktop-tools/DesktopToolsMacOs.cpp @@ -1,11 +1,13 @@ /* - * DesktopToolsMacOs.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 21, 2018 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "DesktopToolsMacOs.hpp" diff --git a/src/components/other/desktop-tools/DesktopToolsMacOs.hpp b/src/components/other/desktop-tools/DesktopToolsMacOs.hpp index a61655d4c..a426d882a 100644 --- a/src/components/other/desktop-tools/DesktopToolsMacOs.hpp +++ b/src/components/other/desktop-tools/DesktopToolsMacOs.hpp @@ -1,11 +1,13 @@ /* - * DesktopToolsMacOs.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,18 +15,13 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 21, 2018 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef DESKTOP_TOOLS_MAC_OS_H_ #define DESKTOP_TOOLS_MAC_OS_H_ #include - // ============================================================================= class DesktopTools : public QObject { @@ -39,6 +36,8 @@ public: bool getScreenSaverStatus () const; void setScreenSaverStatus (bool status); + static void applicationStateChanged(Qt::ApplicationState currentState); + signals: void screenSaverStatusChanged (bool status); diff --git a/src/components/other/desktop-tools/DesktopToolsWindows.cpp b/src/components/other/desktop-tools/DesktopToolsWindows.cpp index 64c6c574e..cbabd3def 100644 --- a/src/components/other/desktop-tools/DesktopToolsWindows.cpp +++ b/src/components/other/desktop-tools/DesktopToolsWindows.cpp @@ -1,11 +1,13 @@ /* - * DesktopToolsWindows.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,17 +15,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 21, 2018 - * Author: Ronan Abhamon + * along with this program. If not, see . */ -#include + #include "DesktopToolsWindows.hpp" +#include // ============================================================================= DesktopTools::DesktopTools (QObject *parent) : QObject(parent) {} diff --git a/src/components/other/desktop-tools/DesktopToolsWindows.hpp b/src/components/other/desktop-tools/DesktopToolsWindows.hpp index 7f5fe28cc..a60b21c5b 100644 --- a/src/components/other/desktop-tools/DesktopToolsWindows.hpp +++ b/src/components/other/desktop-tools/DesktopToolsWindows.hpp @@ -1,11 +1,13 @@ /* - * DesktopToolsWindows.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 21, 2018 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef DESKTOP_TOOLS_WINDOWS_H_ @@ -39,6 +37,8 @@ public: bool getScreenSaverStatus () const; void setScreenSaverStatus (bool status); + static void applicationStateChanged(Qt::ApplicationState){}; + signals: void screenSaverStatusChanged (bool status); diff --git a/src/components/other/desktop-tools/screen-saver/ScreenSaverDBus.cpp b/src/components/other/desktop-tools/screen-saver/ScreenSaverDBus.cpp index 2d44a516b..3421f80e8 100644 --- a/src/components/other/desktop-tools/screen-saver/ScreenSaverDBus.cpp +++ b/src/components/other/desktop-tools/screen-saver/ScreenSaverDBus.cpp @@ -1,11 +1,13 @@ /* - * ScreenSaverDBusLinux.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 21, 2018 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/other/desktop-tools/screen-saver/ScreenSaverDBus.hpp b/src/components/other/desktop-tools/screen-saver/ScreenSaverDBus.hpp index 34146edaf..b2615205f 100644 --- a/src/components/other/desktop-tools/screen-saver/ScreenSaverDBus.hpp +++ b/src/components/other/desktop-tools/screen-saver/ScreenSaverDBus.hpp @@ -1,11 +1,13 @@ /* - * ScreenSaverDBus.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: July 11, 2018 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef SCREEN_SAVER_DBUS_H_ diff --git a/src/components/other/desktop-tools/screen-saver/ScreenSaverXdg.cpp b/src/components/other/desktop-tools/screen-saver/ScreenSaverXdg.cpp index 03f936d11..81a2af5b0 100644 --- a/src/components/other/desktop-tools/screen-saver/ScreenSaverXdg.cpp +++ b/src/components/other/desktop-tools/screen-saver/ScreenSaverXdg.cpp @@ -1,11 +1,13 @@ /* - * ScreenSaverXdg.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 21, 2018 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/other/desktop-tools/screen-saver/ScreenSaverXdg.hpp b/src/components/other/desktop-tools/screen-saver/ScreenSaverXdg.hpp index 1f24ecc4a..b84dfcadf 100644 --- a/src/components/other/desktop-tools/screen-saver/ScreenSaverXdg.hpp +++ b/src/components/other/desktop-tools/screen-saver/ScreenSaverXdg.hpp @@ -1,11 +1,13 @@ /* - * ScreenSaverXdg.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: July 11, 2018 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef SCREEN_SAVER_XDG_H_ diff --git a/src/components/other/desktop-tools/state-process/StateProcessMacOs.mm b/src/components/other/desktop-tools/state-process/StateProcessMacOs.mm new file mode 100644 index 000000000..cb536ba5a --- /dev/null +++ b/src/components/other/desktop-tools/state-process/StateProcessMacOs.mm @@ -0,0 +1,20 @@ +#include "../DesktopToolsMacOs.hpp" +#import +#import + +// Store a unique global instance of Activity to avoid App Nap of MacOs +static id g_backgroundActivity =0; + +void DesktopTools::applicationStateChanged(Qt::ApplicationState p_currentState) +{ + if( p_currentState == Qt::ApplicationActive && g_backgroundActivity != 0 ) + {// Entering Foreground + [[NSProcessInfo processInfo] endActivity:g_backgroundActivity]; + [g_backgroundActivity release]; + g_backgroundActivity = 0; + }else if( g_backgroundActivity == 0 ) + {// Doesn't begin activity if it is already started + g_backgroundActivity = [[NSProcessInfo processInfo] beginActivityWithOptions:NSActivityUserInitiatedAllowingIdleSystemSleep reason:@"Linphone : Continue to receive requests while in Background"]; + [g_backgroundActivity retain]; + } +} diff --git a/src/components/other/text-to-speech/TextToSpeech.cpp b/src/components/other/text-to-speech/TextToSpeech.cpp index 2e982077a..23d2e211e 100644 --- a/src/components/other/text-to-speech/TextToSpeech.cpp +++ b/src/components/other/text-to-speech/TextToSpeech.cpp @@ -1,11 +1,13 @@ /* - * TextToSpeech.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: May 31, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifdef TEXTTOSPEECH_ENABLED diff --git a/src/components/other/text-to-speech/TextToSpeech.hpp b/src/components/other/text-to-speech/TextToSpeech.hpp index 75ae5d0a4..2f12cfb1f 100644 --- a/src/components/other/text-to-speech/TextToSpeech.hpp +++ b/src/components/other/text-to-speech/TextToSpeech.hpp @@ -1,11 +1,13 @@ /* - * TextToSpeech.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: May 31, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef TEXT_TO_SPEECH_H_ diff --git a/src/components/other/units/Units.cpp b/src/components/other/units/Units.cpp index b1842425c..f0316d81e 100644 --- a/src/components/other/units/Units.cpp +++ b/src/components/other/units/Units.cpp @@ -1,11 +1,13 @@ /* - * Units.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 8, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "Units.hpp" diff --git a/src/components/other/units/Units.hpp b/src/components/other/units/Units.hpp index 118400d26..73672d495 100644 --- a/src/components/other/units/Units.hpp +++ b/src/components/other/units/Units.hpp @@ -1,11 +1,13 @@ /* - * Units.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 8, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef UNITS_H_ diff --git a/src/components/presence/OwnPresenceModel.cpp b/src/components/presence/OwnPresenceModel.cpp index c3e42e3ef..3997d2ed6 100644 --- a/src/components/presence/OwnPresenceModel.cpp +++ b/src/components/presence/OwnPresenceModel.cpp @@ -1,11 +1,13 @@ /* - * OwnPresenceModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: March 14, 2017 - * Author: Ghislain MARY + * along with this program. If not, see . */ #include "components/core/CoreManager.hpp" diff --git a/src/components/presence/OwnPresenceModel.hpp b/src/components/presence/OwnPresenceModel.hpp index 889f54798..f1e1a57f2 100644 --- a/src/components/presence/OwnPresenceModel.hpp +++ b/src/components/presence/OwnPresenceModel.hpp @@ -1,11 +1,13 @@ /* - * OwnPresenceModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: March 14, 2017 - * Author: Ghislain MARY + * along with this program. If not, see . */ #ifndef OWN_PRESENCE_MODEL_H_ diff --git a/src/components/presence/Presence.cpp b/src/components/presence/Presence.cpp index 853d6d5b6..e8c18ee97 100644 --- a/src/components/presence/Presence.cpp +++ b/src/components/presence/Presence.cpp @@ -1,11 +1,13 @@ /* - * Presence.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: March 14, 2017 - * Author: Ghislain MARY + * along with this program. If not, see . */ #include "Presence.hpp" diff --git a/src/components/presence/Presence.hpp b/src/components/presence/Presence.hpp index 7e84229e3..3471d7579 100644 --- a/src/components/presence/Presence.hpp +++ b/src/components/presence/Presence.hpp @@ -1,11 +1,13 @@ /* - * Presence.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef PRESENCE_H_ diff --git a/src/components/settings/AccountSettingsModel.cpp b/src/components/settings/AccountSettingsModel.cpp index 276864e1a..ee3e42ec6 100644 --- a/src/components/settings/AccountSettingsModel.cpp +++ b/src/components/settings/AccountSettingsModel.cpp @@ -1,11 +1,13 @@ /* - * AccountSettingsModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "config.h" @@ -119,14 +117,21 @@ QVariantMap AccountSettingsModel::getProxyConfigDescription (const shared_ptr
  • address = proxyConfig->getIdentityAddress(); map["sipAddress"] = address - ? Utils::coreStringToAppString(proxyConfig->getIdentityAddress()->asString()) + ? QString::fromStdString(proxyConfig->getIdentityAddress()->asString()) : QString(""); } - map["serverAddress"] = Utils::coreStringToAppString(proxyConfig->getServerAddr()); + map["serverAddress"] = QString::fromStdString(proxyConfig->getServerAddr()); map["registrationDuration"] = proxyConfig->getPublishExpires(); - map["transport"] = Utils::coreStringToAppString(proxyConfig->getTransport()); - map["route"] = Utils::coreStringToAppString(proxyConfig->getRoute()); - map["contactParams"] = Utils::coreStringToAppString(proxyConfig->getContactParameters()); + + if( map["serverAddress"].toString().toUpper().contains("TRANSPORT="))// transport has been specified : let the RFC select the transport + map["transport"] = QString::fromStdString(proxyConfig->getTransport()); + else// Set to TLS as default + map["transport"] = "tls"; + if( proxyConfig->getRoutes().size() > 0) + map["route"] = QString::fromStdString(proxyConfig->getRoutes().front()); + else + map["route"] = ""; + map["contactParams"] = QString::fromStdString(proxyConfig->getContactParameters()); map["avpfInterval"] = proxyConfig->getAvpfRrInterval(); map["registerEnabled"] = proxyConfig->registerEnabled(); map["publishPresence"] = proxyConfig->publishEnabled(); @@ -134,16 +139,20 @@ QVariantMap AccountSettingsModel::getProxyConfigDescription (const shared_ptr
  • getState()); shared_ptr natPolicy = proxyConfig->getNatPolicy(); - if (!natPolicy) - natPolicy = proxyConfig->getCore()->createNatPolicy(); + bool createdNat = !natPolicy; + if (createdNat) + natPolicy = proxyConfig->getCore()->createNatPolicy(); map["iceEnabled"] = natPolicy->iceEnabled(); map["turnEnabled"] = natPolicy->turnEnabled(); const string &turnUser(natPolicy->getStunServerUsername()); const string &stunServer(natPolicy->getStunServer()); - map["turnUser"] = Utils::coreStringToAppString(turnUser); - map["stunServer"] = Utils::coreStringToAppString(stunServer); + map["turnUser"] = QString::fromStdString(turnUser); + map["stunServer"] = QString::fromStdString(stunServer); + + if (createdNat) + proxyConfig->setNatPolicy(natPolicy); shared_ptr authInfo = CoreManager::getInstance()->getCore()->findAuthInfo( "", turnUser, stunServer @@ -236,25 +245,29 @@ bool AccountSettingsModel::addOrUpdateProxyConfig ( ); shared_ptr natPolicy = proxyConfig->getNatPolicy(); - if (!natPolicy) + bool createdNat = !natPolicy; + if (createdNat) natPolicy = proxyConfig->getCore()->createNatPolicy(); natPolicy->enableIce(data["iceEnabled"].toBool()); natPolicy->enableStun(data["iceEnabled"].toBool()); - const string turnUser(Utils::appStringToCoreString(data["turnUser"].toString())); - const string stunServer(Utils::appStringToCoreString(data["stunServer"].toString())); + const string turnUser(data["turnUser"].toString().toStdString()); + const string stunServer(data["stunServer"].toString().toStdString()); natPolicy->enableTurn(data["turnEnabled"].toBool()); natPolicy->setStunServerUsername(turnUser); natPolicy->setStunServer(stunServer); + if( createdNat) + proxyConfig->setNatPolicy(natPolicy); + shared_ptr core(proxyConfig->getCore()); shared_ptr authInfo(core->findAuthInfo("", turnUser, stunServer)); if (authInfo) { shared_ptr clonedAuthInfo(authInfo->clone()); clonedAuthInfo->setUserid(turnUser); clonedAuthInfo->setUsername(turnUser); - clonedAuthInfo->setPassword(Utils::appStringToCoreString(data["turnPassword"].toString())); + clonedAuthInfo->setPassword(data["turnPassword"].toString().toStdString()); core->addAuthInfo(clonedAuthInfo); core->removeAuthInfo(authInfo); @@ -262,7 +275,7 @@ bool AccountSettingsModel::addOrUpdateProxyConfig ( core->addAuthInfo(linphone::Factory::get()->createAuthInfo( turnUser, turnUser, - Utils::appStringToCoreString(data["turnPassword"].toString()), + data["turnPassword"].toString().toStdString(), "", "", "" diff --git a/src/components/settings/AccountSettingsModel.hpp b/src/components/settings/AccountSettingsModel.hpp index 5d3807c7d..50d3fa086 100644 --- a/src/components/settings/AccountSettingsModel.hpp +++ b/src/components/settings/AccountSettingsModel.hpp @@ -1,11 +1,13 @@ /* - * AccountSettingsModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef ACCOUNT_SETTINGS_MODEL_H_ diff --git a/src/components/settings/SettingsModel.cpp b/src/components/settings/SettingsModel.cpp index 57f9a4f9e..c6636d8e5 100644 --- a/src/components/settings/SettingsModel.cpp +++ b/src/components/settings/SettingsModel.cpp @@ -1,11 +1,13 @@ /* - * SettingsModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include @@ -631,7 +629,7 @@ void SettingsModel::setFileTransferUrl (const QString &url) { // ----------------------------------------------------------------------------- bool SettingsModel::getLimeIsSupported () const { - return CoreManager::getInstance()->getCore()->limeAvailable(); + return CoreManager::getInstance()->getCore()->limeX3DhAvailable(); } // ----------------------------------------------------------------------------- @@ -669,7 +667,7 @@ void SettingsModel::setMediaEncryption (MediaEncryption encryption) { return; if (encryption != SettingsModel::MediaEncryptionZrtp) - setLimeState(SettingsModel::LimeStateDisabled); + setLimeState(false); CoreManager::getInstance()->getCore()->setMediaEncryption( static_cast(encryption) @@ -701,22 +699,18 @@ void SettingsModel::enableMandatoryMediaEncryption(bool mandatory) { // ----------------------------------------------------------------------------- -SettingsModel::LimeState SettingsModel::getLimeState () const { - return static_cast( - CoreManager::getInstance()->getCore()->limeEnabled() - ); +bool SettingsModel::getLimeState () const { + return CoreManager::getInstance()->getCore()->limeX3DhEnabled(); } -void SettingsModel::setLimeState (LimeState state) { +void SettingsModel::setLimeState (const bool& state) { if (state == getLimeState()) return; - if (state != SettingsModel::LimeStateDisabled) + if (state) setMediaEncryption(SettingsModel::MediaEncryptionZrtp); - CoreManager::getInstance()->getCore()->enableLime( - static_cast(state) - ); + CoreManager::getInstance()->getCore()->enableLimeX3Dh(!state); emit limeStateChanged(state); } @@ -1242,15 +1236,16 @@ void SettingsModel::setDeveloperSettingsEnabled (bool status) { mConfig->setInt(UiSection, "developer_settings", status); emit developerSettingsEnabledChanged(status); #else + Q_UNUSED(status) qWarning() << QStringLiteral("Unable to change developer settings mode in release version."); #endif // ifdef DEBUG } -void SettingsModel::handleCallCreated(const shared_ptr &call) { +void SettingsModel::handleCallCreated(const shared_ptr &) { emit isInCallChanged(getIsInCall()); } -void SettingsModel::handleCallStateChanged(const shared_ptr &call, linphone::Call::State state) { +void SettingsModel::handleCallStateChanged(const shared_ptr &, linphone::Call::State) { emit isInCallChanged(getIsInCall()); } diff --git a/src/components/settings/SettingsModel.hpp b/src/components/settings/SettingsModel.hpp index 1c39482f9..5720786b0 100644 --- a/src/components/settings/SettingsModel.hpp +++ b/src/components/settings/SettingsModel.hpp @@ -1,11 +1,13 @@ /* - * SettingsModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef SETTINGS_MODEL_H_ @@ -32,7 +30,7 @@ // ============================================================================= class SettingsModel : public QObject { - Q_OBJECT; + Q_OBJECT // =========================================================================== // PROPERTIES. @@ -40,146 +38,146 @@ class SettingsModel : public QObject { // Assistant. ---------------------------------------------------------------- - Q_PROPERTY(bool createAppSipAccountEnabled READ getCreateAppSipAccountEnabled WRITE setCreateAppSipAccountEnabled NOTIFY createAppSipAccountEnabledChanged); - Q_PROPERTY(bool fetchRemoteConfigurationEnabled READ getFetchRemoteConfigurationEnabled WRITE setFetchRemoteConfigurationEnabled NOTIFY fetchRemoteConfigurationEnabledChanged); - Q_PROPERTY(bool useAppSipAccountEnabled READ getUseAppSipAccountEnabled WRITE setUseAppSipAccountEnabled NOTIFY useAppSipAccountEnabledChanged); - Q_PROPERTY(bool useOtherSipAccountEnabled READ getUseOtherSipAccountEnabled WRITE setUseOtherSipAccountEnabled NOTIFY useOtherSipAccountEnabledChanged); + Q_PROPERTY(bool createAppSipAccountEnabled READ getCreateAppSipAccountEnabled WRITE setCreateAppSipAccountEnabled NOTIFY createAppSipAccountEnabledChanged) + Q_PROPERTY(bool fetchRemoteConfigurationEnabled READ getFetchRemoteConfigurationEnabled WRITE setFetchRemoteConfigurationEnabled NOTIFY fetchRemoteConfigurationEnabledChanged) + Q_PROPERTY(bool useAppSipAccountEnabled READ getUseAppSipAccountEnabled WRITE setUseAppSipAccountEnabled NOTIFY useAppSipAccountEnabledChanged) + Q_PROPERTY(bool useOtherSipAccountEnabled READ getUseOtherSipAccountEnabled WRITE setUseOtherSipAccountEnabled NOTIFY useOtherSipAccountEnabledChanged) - Q_PROPERTY(bool assistantSupportsPhoneNumbers READ getAssistantSupportsPhoneNumbers WRITE setAssistantSupportsPhoneNumbers NOTIFY assistantSupportsPhoneNumbersChanged); + Q_PROPERTY(bool assistantSupportsPhoneNumbers READ getAssistantSupportsPhoneNumbers WRITE setAssistantSupportsPhoneNumbers NOTIFY assistantSupportsPhoneNumbersChanged) // Audio. -------------------------------------------------------------------- - Q_PROPERTY(bool captureGraphRunning READ getCaptureGraphRunning NOTIFY captureGraphRunningChanged); + Q_PROPERTY(bool captureGraphRunning READ getCaptureGraphRunning NOTIFY captureGraphRunningChanged) - Q_PROPERTY(QStringList captureDevices READ getCaptureDevices NOTIFY captureDevicesChanged); - Q_PROPERTY(QStringList playbackDevices READ getPlaybackDevices NOTIFY playbackDevicesChanged); + Q_PROPERTY(QStringList captureDevices READ getCaptureDevices NOTIFY captureDevicesChanged) + Q_PROPERTY(QStringList playbackDevices READ getPlaybackDevices NOTIFY playbackDevicesChanged) - Q_PROPERTY(float playbackGain READ getPlaybackGain WRITE setPlaybackGain NOTIFY playbackGainChanged); - Q_PROPERTY(float captureGain READ getCaptureGain WRITE setCaptureGain NOTIFY captureGainChanged); + Q_PROPERTY(float playbackGain READ getPlaybackGain WRITE setPlaybackGain NOTIFY playbackGainChanged) + Q_PROPERTY(float captureGain READ getCaptureGain WRITE setCaptureGain NOTIFY captureGainChanged) - Q_PROPERTY(QString captureDevice READ getCaptureDevice WRITE setCaptureDevice NOTIFY captureDeviceChanged); - Q_PROPERTY(QString playbackDevice READ getPlaybackDevice WRITE setPlaybackDevice NOTIFY playbackDeviceChanged); - Q_PROPERTY(QString ringerDevice READ getRingerDevice WRITE setRingerDevice NOTIFY ringerDeviceChanged); + Q_PROPERTY(QString captureDevice READ getCaptureDevice WRITE setCaptureDevice NOTIFY captureDeviceChanged) + Q_PROPERTY(QString playbackDevice READ getPlaybackDevice WRITE setPlaybackDevice NOTIFY playbackDeviceChanged) + Q_PROPERTY(QString ringerDevice READ getRingerDevice WRITE setRingerDevice NOTIFY ringerDeviceChanged) - Q_PROPERTY(QString ringPath READ getRingPath WRITE setRingPath NOTIFY ringPathChanged); + Q_PROPERTY(QString ringPath READ getRingPath WRITE setRingPath NOTIFY ringPathChanged) - Q_PROPERTY(bool echoCancellationEnabled READ getEchoCancellationEnabled WRITE setEchoCancellationEnabled NOTIFY echoCancellationEnabledChanged); + Q_PROPERTY(bool echoCancellationEnabled READ getEchoCancellationEnabled WRITE setEchoCancellationEnabled NOTIFY echoCancellationEnabledChanged) - Q_PROPERTY(bool showAudioCodecs READ getShowAudioCodecs WRITE setShowAudioCodecs NOTIFY showAudioCodecsChanged); + Q_PROPERTY(bool showAudioCodecs READ getShowAudioCodecs WRITE setShowAudioCodecs NOTIFY showAudioCodecsChanged) // Video. -------------------------------------------------------------------- - Q_PROPERTY(QStringList videoDevices READ getVideoDevices NOTIFY videoDevicesChanged); + Q_PROPERTY(QStringList videoDevices READ getVideoDevices NOTIFY videoDevicesChanged) - Q_PROPERTY(QString videoDevice READ getVideoDevice WRITE setVideoDevice NOTIFY videoDeviceChanged); + Q_PROPERTY(QString videoDevice READ getVideoDevice WRITE setVideoDevice NOTIFY videoDeviceChanged) - Q_PROPERTY(QString videoPreset READ getVideoPreset WRITE setVideoPreset NOTIFY videoPresetChanged); - Q_PROPERTY(int videoFramerate READ getVideoFramerate WRITE setVideoFramerate NOTIFY videoFramerateChanged); + Q_PROPERTY(QString videoPreset READ getVideoPreset WRITE setVideoPreset NOTIFY videoPresetChanged) + Q_PROPERTY(int videoFramerate READ getVideoFramerate WRITE setVideoFramerate NOTIFY videoFramerateChanged) - Q_PROPERTY(QVariantList supportedVideoDefinitions READ getSupportedVideoDefinitions CONSTANT); + Q_PROPERTY(QVariantList supportedVideoDefinitions READ getSupportedVideoDefinitions CONSTANT) - Q_PROPERTY(QVariantMap videoDefinition READ getVideoDefinition WRITE setVideoDefinition NOTIFY videoDefinitionChanged); + Q_PROPERTY(QVariantMap videoDefinition READ getVideoDefinition WRITE setVideoDefinition NOTIFY videoDefinitionChanged) - Q_PROPERTY(bool videoSupported READ getVideoSupported CONSTANT); + Q_PROPERTY(bool videoSupported READ getVideoSupported CONSTANT) - Q_PROPERTY(bool showVideoCodecs READ getShowVideoCodecs WRITE setShowVideoCodecs NOTIFY showVideoCodecsChanged); + Q_PROPERTY(bool showVideoCodecs READ getShowVideoCodecs WRITE setShowVideoCodecs NOTIFY showVideoCodecsChanged) // Chat & calls. ------------------------------------------------------------- - Q_PROPERTY(bool autoAnswerStatus READ getAutoAnswerStatus WRITE setAutoAnswerStatus NOTIFY autoAnswerStatusChanged); - Q_PROPERTY(bool autoAnswerVideoStatus READ getAutoAnswerVideoStatus WRITE setAutoAnswerVideoStatus NOTIFY autoAnswerVideoStatusChanged); - Q_PROPERTY(int autoAnswerDelay READ getAutoAnswerDelay WRITE setAutoAnswerDelay NOTIFY autoAnswerDelayChanged); + Q_PROPERTY(bool autoAnswerStatus READ getAutoAnswerStatus WRITE setAutoAnswerStatus NOTIFY autoAnswerStatusChanged) + Q_PROPERTY(bool autoAnswerVideoStatus READ getAutoAnswerVideoStatus WRITE setAutoAnswerVideoStatus NOTIFY autoAnswerVideoStatusChanged) + Q_PROPERTY(int autoAnswerDelay READ getAutoAnswerDelay WRITE setAutoAnswerDelay NOTIFY autoAnswerDelayChanged) - Q_PROPERTY(bool showTelKeypadAutomatically READ getShowTelKeypadAutomatically WRITE setShowTelKeypadAutomatically NOTIFY showTelKeypadAutomaticallyChanged); + Q_PROPERTY(bool showTelKeypadAutomatically READ getShowTelKeypadAutomatically WRITE setShowTelKeypadAutomatically NOTIFY showTelKeypadAutomaticallyChanged) - Q_PROPERTY(bool keepCallsWindowInBackground READ getKeepCallsWindowInBackground WRITE setKeepCallsWindowInBackground NOTIFY keepCallsWindowInBackgroundChanged); + Q_PROPERTY(bool keepCallsWindowInBackground READ getKeepCallsWindowInBackground WRITE setKeepCallsWindowInBackground NOTIFY keepCallsWindowInBackgroundChanged) - Q_PROPERTY(bool outgoingCallsEnabled READ getOutgoingCallsEnabled WRITE setOutgoingCallsEnabled NOTIFY outgoingCallsEnabledChanged); + Q_PROPERTY(bool outgoingCallsEnabled READ getOutgoingCallsEnabled WRITE setOutgoingCallsEnabled NOTIFY outgoingCallsEnabledChanged) - Q_PROPERTY(bool callRecorderEnabled READ getCallRecorderEnabled WRITE setCallRecorderEnabled NOTIFY callRecorderEnabledChanged); - Q_PROPERTY(bool automaticallyRecordCalls READ getAutomaticallyRecordCalls WRITE setAutomaticallyRecordCalls NOTIFY automaticallyRecordCallsChanged); + Q_PROPERTY(bool callRecorderEnabled READ getCallRecorderEnabled WRITE setCallRecorderEnabled NOTIFY callRecorderEnabledChanged) + Q_PROPERTY(bool automaticallyRecordCalls READ getAutomaticallyRecordCalls WRITE setAutomaticallyRecordCalls NOTIFY automaticallyRecordCallsChanged) - Q_PROPERTY(bool callPauseEnabled READ getCallPauseEnabled WRITE setCallPauseEnabled NOTIFY callPauseEnabledChanged); - Q_PROPERTY(bool muteMicrophoneEnabled READ getMuteMicrophoneEnabled WRITE setMuteMicrophoneEnabled NOTIFY muteMicrophoneEnabledChanged); + Q_PROPERTY(bool callPauseEnabled READ getCallPauseEnabled WRITE setCallPauseEnabled NOTIFY callPauseEnabledChanged) + Q_PROPERTY(bool muteMicrophoneEnabled READ getMuteMicrophoneEnabled WRITE setMuteMicrophoneEnabled NOTIFY muteMicrophoneEnabledChanged) - Q_PROPERTY(bool chatEnabled READ getChatEnabled WRITE setChatEnabled NOTIFY chatEnabledChanged); + Q_PROPERTY(bool chatEnabled READ getChatEnabled WRITE setChatEnabled NOTIFY chatEnabledChanged) - Q_PROPERTY(bool conferenceEnabled READ getConferenceEnabled WRITE setConferenceEnabled NOTIFY conferenceEnabledChanged); + Q_PROPERTY(bool conferenceEnabled READ getConferenceEnabled WRITE setConferenceEnabled NOTIFY conferenceEnabledChanged) - Q_PROPERTY(bool chatNotificationSoundEnabled READ getChatNotificationSoundEnabled WRITE setChatNotificationSoundEnabled NOTIFY chatNotificationSoundEnabledChanged); - Q_PROPERTY(QString chatNotificationSoundPath READ getChatNotificationSoundPath WRITE setChatNotificationSoundPath NOTIFY chatNotificationSoundPathChanged); + Q_PROPERTY(bool chatNotificationSoundEnabled READ getChatNotificationSoundEnabled WRITE setChatNotificationSoundEnabled NOTIFY chatNotificationSoundEnabledChanged) + Q_PROPERTY(QString chatNotificationSoundPath READ getChatNotificationSoundPath WRITE setChatNotificationSoundPath NOTIFY chatNotificationSoundPathChanged) - Q_PROPERTY(QString fileTransferUrl READ getFileTransferUrl WRITE setFileTransferUrl NOTIFY fileTransferUrlChanged); + Q_PROPERTY(QString fileTransferUrl READ getFileTransferUrl WRITE setFileTransferUrl NOTIFY fileTransferUrlChanged) - Q_PROPERTY(bool limeIsSupported READ getLimeIsSupported CONSTANT); - Q_PROPERTY(QVariantList supportedMediaEncryptions READ getSupportedMediaEncryptions CONSTANT); + Q_PROPERTY(bool limeIsSupported READ getLimeIsSupported CONSTANT) + Q_PROPERTY(QVariantList supportedMediaEncryptions READ getSupportedMediaEncryptions CONSTANT) - Q_PROPERTY(MediaEncryption mediaEncryption READ getMediaEncryption WRITE setMediaEncryption NOTIFY mediaEncryptionChanged); - Q_PROPERTY(bool mediaEncryptionMandatory READ mandatoryMediaEncryptionEnabled WRITE enableMandatoryMediaEncryption NOTIFY mediaEncryptionChanged); + Q_PROPERTY(MediaEncryption mediaEncryption READ getMediaEncryption WRITE setMediaEncryption NOTIFY mediaEncryptionChanged) + Q_PROPERTY(bool mediaEncryptionMandatory READ mandatoryMediaEncryptionEnabled WRITE enableMandatoryMediaEncryption NOTIFY mediaEncryptionChanged) - Q_PROPERTY(LimeState limeState READ getLimeState WRITE setLimeState NOTIFY limeStateChanged); + Q_PROPERTY(bool limeState READ getLimeState WRITE setLimeState NOTIFY limeStateChanged) - Q_PROPERTY(bool contactsEnabled READ getContactsEnabled WRITE setContactsEnabled NOTIFY contactsEnabledChanged); + Q_PROPERTY(bool contactsEnabled READ getContactsEnabled WRITE setContactsEnabled NOTIFY contactsEnabledChanged) // Network. ------------------------------------------------------------------ - Q_PROPERTY(bool showNetworkSettings READ getShowNetworkSettings WRITE setShowNetworkSettings NOTIFY showNetworkSettingsChanged); + Q_PROPERTY(bool showNetworkSettings READ getShowNetworkSettings WRITE setShowNetworkSettings NOTIFY showNetworkSettingsChanged) - Q_PROPERTY(bool useSipInfoForDtmfs READ getUseSipInfoForDtmfs WRITE setUseSipInfoForDtmfs NOTIFY dtmfsProtocolChanged); - Q_PROPERTY(bool useRfc2833ForDtmfs READ getUseRfc2833ForDtmfs WRITE setUseRfc2833ForDtmfs NOTIFY dtmfsProtocolChanged); + Q_PROPERTY(bool useSipInfoForDtmfs READ getUseSipInfoForDtmfs WRITE setUseSipInfoForDtmfs NOTIFY dtmfsProtocolChanged) + Q_PROPERTY(bool useRfc2833ForDtmfs READ getUseRfc2833ForDtmfs WRITE setUseRfc2833ForDtmfs NOTIFY dtmfsProtocolChanged) - Q_PROPERTY(bool ipv6Enabled READ getIpv6Enabled WRITE setIpv6Enabled NOTIFY ipv6EnabledChanged); + Q_PROPERTY(bool ipv6Enabled READ getIpv6Enabled WRITE setIpv6Enabled NOTIFY ipv6EnabledChanged) - Q_PROPERTY(int downloadBandwidth READ getDownloadBandwidth WRITE setDownloadBandwidth NOTIFY downloadBandWidthChanged); - Q_PROPERTY(int uploadBandwidth READ getUploadBandwidth WRITE setUploadBandwidth NOTIFY uploadBandWidthChanged); + Q_PROPERTY(int downloadBandwidth READ getDownloadBandwidth WRITE setDownloadBandwidth NOTIFY downloadBandWidthChanged) + Q_PROPERTY(int uploadBandwidth READ getUploadBandwidth WRITE setUploadBandwidth NOTIFY uploadBandWidthChanged) Q_PROPERTY( bool adaptiveRateControlEnabled READ getAdaptiveRateControlEnabled WRITE setAdaptiveRateControlEnabled NOTIFY adaptiveRateControlEnabledChanged - ); + ) - Q_PROPERTY(int tcpPort READ getTcpPort WRITE setTcpPort NOTIFY tcpPortChanged); - Q_PROPERTY(int udpPort READ getUdpPort WRITE setUdpPort NOTIFY udpPortChanged); + Q_PROPERTY(int tcpPort READ getTcpPort WRITE setTcpPort NOTIFY tcpPortChanged) + Q_PROPERTY(int udpPort READ getUdpPort WRITE setUdpPort NOTIFY udpPortChanged) - Q_PROPERTY(QList audioPortRange READ getAudioPortRange WRITE setAudioPortRange NOTIFY audioPortRangeChanged); - Q_PROPERTY(QList videoPortRange READ getVideoPortRange WRITE setVideoPortRange NOTIFY videoPortRangeChanged); + Q_PROPERTY(QList audioPortRange READ getAudioPortRange WRITE setAudioPortRange NOTIFY audioPortRangeChanged) + Q_PROPERTY(QList videoPortRange READ getVideoPortRange WRITE setVideoPortRange NOTIFY videoPortRangeChanged) - Q_PROPERTY(bool iceEnabled READ getIceEnabled WRITE setIceEnabled NOTIFY iceEnabledChanged); - Q_PROPERTY(bool turnEnabled READ getTurnEnabled WRITE setTurnEnabled NOTIFY turnEnabledChanged); + Q_PROPERTY(bool iceEnabled READ getIceEnabled WRITE setIceEnabled NOTIFY iceEnabledChanged) + Q_PROPERTY(bool turnEnabled READ getTurnEnabled WRITE setTurnEnabled NOTIFY turnEnabledChanged) - Q_PROPERTY(QString stunServer READ getStunServer WRITE setStunServer NOTIFY stunServerChanged); + Q_PROPERTY(QString stunServer READ getStunServer WRITE setStunServer NOTIFY stunServerChanged) - Q_PROPERTY(QString turnUser READ getTurnUser WRITE setTurnUser NOTIFY turnUserChanged); - Q_PROPERTY(QString turnPassword READ getTurnPassword WRITE setTurnPassword NOTIFY turnPasswordChanged); + Q_PROPERTY(QString turnUser READ getTurnUser WRITE setTurnUser NOTIFY turnUserChanged) + Q_PROPERTY(QString turnPassword READ getTurnPassword WRITE setTurnPassword NOTIFY turnPasswordChanged) - Q_PROPERTY(int dscpSip READ getDscpSip WRITE setDscpSip NOTIFY dscpSipChanged); - Q_PROPERTY(int dscpAudio READ getDscpAudio WRITE setDscpAudio NOTIFY dscpAudioChanged); - Q_PROPERTY(int dscpVideo READ getDscpVideo WRITE setDscpVideo NOTIFY dscpVideoChanged); + Q_PROPERTY(int dscpSip READ getDscpSip WRITE setDscpSip NOTIFY dscpSipChanged) + Q_PROPERTY(int dscpAudio READ getDscpAudio WRITE setDscpAudio NOTIFY dscpAudioChanged) + Q_PROPERTY(int dscpVideo READ getDscpVideo WRITE setDscpVideo NOTIFY dscpVideoChanged) - Q_PROPERTY(bool rlsUriEnabled READ getRlsUriEnabled WRITE setRlsUriEnabled NOTIFY rlsUriEnabledChanged); + Q_PROPERTY(bool rlsUriEnabled READ getRlsUriEnabled WRITE setRlsUriEnabled NOTIFY rlsUriEnabledChanged) // UI. ----------------------------------------------------------------------- - Q_PROPERTY(QString remoteProvisioning READ getRemoteProvisioning WRITE setRemoteProvisioning NOTIFY remoteProvisioningChanged); + Q_PROPERTY(QString remoteProvisioning READ getRemoteProvisioning WRITE setRemoteProvisioning NOTIFY remoteProvisioningChanged) - Q_PROPERTY(QString savedScreenshotsFolder READ getSavedScreenshotsFolder WRITE setSavedScreenshotsFolder NOTIFY savedScreenshotsFolderChanged); - Q_PROPERTY(QString savedCallsFolder READ getSavedCallsFolder WRITE setSavedCallsFolder NOTIFY savedCallsFolderChanged); - Q_PROPERTY(QString downloadFolder READ getDownloadFolder WRITE setDownloadFolder NOTIFY downloadFolderChanged); + Q_PROPERTY(QString savedScreenshotsFolder READ getSavedScreenshotsFolder WRITE setSavedScreenshotsFolder NOTIFY savedScreenshotsFolderChanged) + Q_PROPERTY(QString savedCallsFolder READ getSavedCallsFolder WRITE setSavedCallsFolder NOTIFY savedCallsFolderChanged) + Q_PROPERTY(QString downloadFolder READ getDownloadFolder WRITE setDownloadFolder NOTIFY downloadFolderChanged) - Q_PROPERTY(bool exitOnClose READ getExitOnClose WRITE setExitOnClose NOTIFY exitOnCloseChanged); + Q_PROPERTY(bool exitOnClose READ getExitOnClose WRITE setExitOnClose NOTIFY exitOnCloseChanged) // Advanced. ----------------------------------------------------------------- - Q_PROPERTY(QString logsFolder READ getLogsFolder WRITE setLogsFolder NOTIFY logsFolderChanged); - Q_PROPERTY(QString logsUploadUrl READ getLogsUploadUrl WRITE setLogsUploadUrl NOTIFY logsUploadUrlChanged); - Q_PROPERTY(bool logsEnabled READ getLogsEnabled WRITE setLogsEnabled NOTIFY logsEnabledChanged); - Q_PROPERTY(QString logsEmail READ getLogsEmail WRITE setLogsEmail NOTIFY logsEmailChanged); + Q_PROPERTY(QString logsFolder READ getLogsFolder WRITE setLogsFolder NOTIFY logsFolderChanged) + Q_PROPERTY(QString logsUploadUrl READ getLogsUploadUrl WRITE setLogsUploadUrl NOTIFY logsUploadUrlChanged) + Q_PROPERTY(bool logsEnabled READ getLogsEnabled WRITE setLogsEnabled NOTIFY logsEnabledChanged) + Q_PROPERTY(QString logsEmail READ getLogsEmail WRITE setLogsEmail NOTIFY logsEmailChanged) - Q_PROPERTY(bool developerSettingsEnabled READ getDeveloperSettingsEnabled WRITE setDeveloperSettingsEnabled NOTIFY developerSettingsEnabledChanged); + Q_PROPERTY(bool developerSettingsEnabled READ getDeveloperSettingsEnabled WRITE setDeveloperSettingsEnabled NOTIFY developerSettingsEnabledChanged) - Q_PROPERTY(bool isInCall READ getIsInCall NOTIFY isInCallChanged); + Q_PROPERTY(bool isInCall READ getIsInCall NOTIFY isInCallChanged) public: enum MediaEncryption { @@ -188,14 +186,8 @@ public: MediaEncryptionSrtp = int(linphone::MediaEncryption::SRTP), MediaEncryptionZrtp = int(linphone::MediaEncryption::ZRTP) }; - Q_ENUM(MediaEncryption); + Q_ENUM(MediaEncryption) - enum LimeState { - LimeStateDisabled = int(linphone::LimeState::Disabled), - LimeStateMandatory = int(linphone::LimeState::Mandatory), - LimeStatePreferred = int(linphone::LimeState::Preferred) - }; - Q_ENUM(LimeState); SettingsModel (QObject *parent = Q_NULLPTR); @@ -341,8 +333,8 @@ public: bool mandatoryMediaEncryptionEnabled () const; void enableMandatoryMediaEncryption(bool mandatory); - LimeState getLimeState () const; - void setLimeState (LimeState state); + bool getLimeState () const; + void setLimeState (const bool& state); bool getContactsEnabled () const; void setContactsEnabled (bool status); @@ -534,7 +526,7 @@ signals: void fileTransferUrlChanged (const QString &url); void mediaEncryptionChanged (MediaEncryption encryption); - void limeStateChanged (LimeState state); + void limeStateChanged (bool state); void contactsEnabledChanged (bool status); diff --git a/src/components/sip-addresses/SipAddressObserver.cpp b/src/components/sip-addresses/SipAddressObserver.cpp index 515ac0f43..0925dc971 100644 --- a/src/components/sip-addresses/SipAddressObserver.cpp +++ b/src/components/sip-addresses/SipAddressObserver.cpp @@ -1,11 +1,13 @@ /* - * SipAddressObserver.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: March 28, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "SipAddressObserver.hpp" diff --git a/src/components/sip-addresses/SipAddressObserver.hpp b/src/components/sip-addresses/SipAddressObserver.hpp index ee639e574..8751ccfe9 100644 --- a/src/components/sip-addresses/SipAddressObserver.hpp +++ b/src/components/sip-addresses/SipAddressObserver.hpp @@ -1,11 +1,13 @@ /* - * SipAddressObserver.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: March 28, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef SIP_ADDRESS_OBSERVER_H_ diff --git a/src/components/sip-addresses/SipAddressesModel.cpp b/src/components/sip-addresses/SipAddressesModel.cpp index 88f163f6c..b01052e57 100644 --- a/src/components/sip-addresses/SipAddressesModel.cpp +++ b/src/components/sip-addresses/SipAddressesModel.cpp @@ -1,11 +1,13 @@ /* - * SipAddressesModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include @@ -146,25 +144,28 @@ SipAddressObserver *SipAddressesModel::getSipAddressObserver (const QString &pee // ----------------------------------------------------------------------------- QString SipAddressesModel::getTransportFromSipAddress (const QString &sipAddress) { - const shared_ptr address = linphone::Factory::get()->createAddress( - Utils::appStringToCoreString(sipAddress) - ); + if( sipAddress.toUpper().contains("TRANSPORT=")) + {// Transport has been specified : check for it + const shared_ptr address = linphone::Factory::get()->createAddress( + Utils::appStringToCoreString(sipAddress) + ); - if (!address) - return QString(""); + if (!address) + return QString("TLS"); // Return TLS by default - switch (address->getTransport()) { - case linphone::TransportType::Udp: - return QStringLiteral("UDP"); - case linphone::TransportType::Tcp: - return QStringLiteral("TCP"); - case linphone::TransportType::Tls: - return QStringLiteral("TLS"); - case linphone::TransportType::Dtls: - return QStringLiteral("DTLS"); - } + switch (address->getTransport()) { + case linphone::TransportType::Udp: + return QStringLiteral("UDP"); + case linphone::TransportType::Tcp: + return QStringLiteral("TCP"); + case linphone::TransportType::Tls: + return QStringLiteral("TLS"); + case linphone::TransportType::Dtls: + return QStringLiteral("DTLS"); + } + } - return QString(""); + return QString("TLS"); } QString SipAddressesModel::addTransportToSipAddress (const QString &sipAddress, const QString &transport) { diff --git a/src/components/sip-addresses/SipAddressesModel.hpp b/src/components/sip-addresses/SipAddressesModel.hpp index d304dbabf..6684aed2c 100644 --- a/src/components/sip-addresses/SipAddressesModel.hpp +++ b/src/components/sip-addresses/SipAddressesModel.hpp @@ -1,11 +1,13 @@ /* - * SipAddressesModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef SIP_ADDRESSES_MODEL_H_ diff --git a/src/components/sip-addresses/SipAddressesProxyModel.cpp b/src/components/sip-addresses/SipAddressesProxyModel.cpp index 61034dfe7..e49ef6a3e 100644 --- a/src/components/sip-addresses/SipAddressesProxyModel.cpp +++ b/src/components/sip-addresses/SipAddressesProxyModel.cpp @@ -1,11 +1,13 @@ /* - * SipAddressesProxyModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "components/contact/ContactModel.hpp" diff --git a/src/components/sip-addresses/SipAddressesProxyModel.hpp b/src/components/sip-addresses/SipAddressesProxyModel.hpp index 7b4e97a15..37f8279a5 100644 --- a/src/components/sip-addresses/SipAddressesProxyModel.hpp +++ b/src/components/sip-addresses/SipAddressesProxyModel.hpp @@ -1,11 +1,13 @@ /* - * SipAddressesProxyModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef SIP_ADDRESSES_PROXY_MODEL_H_ diff --git a/src/components/sound-player/SoundPlayer.cpp b/src/components/sound-player/SoundPlayer.cpp index 2c2d4762e..1ce479606 100644 --- a/src/components/sound-player/SoundPlayer.cpp +++ b/src/components/sound-player/SoundPlayer.cpp @@ -1,11 +1,13 @@ /* - * SoundPlayer.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: April 25, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/sound-player/SoundPlayer.hpp b/src/components/sound-player/SoundPlayer.hpp index 9d68f2bdb..b7d4aa265 100644 --- a/src/components/sound-player/SoundPlayer.hpp +++ b/src/components/sound-player/SoundPlayer.hpp @@ -1,11 +1,13 @@ /* - * SoundPlayer.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: April 25, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef SOUND_PLAYER_H_ diff --git a/src/components/telephone-numbers/TelephoneNumbersModel.cpp b/src/components/telephone-numbers/TelephoneNumbersModel.cpp index 8aefd1a6c..558e19344 100644 --- a/src/components/telephone-numbers/TelephoneNumbersModel.cpp +++ b/src/components/telephone-numbers/TelephoneNumbersModel.cpp @@ -1,11 +1,13 @@ /* - * TelephoneNumbersModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: May 31, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "TelephoneNumbersModel.hpp" diff --git a/src/components/telephone-numbers/TelephoneNumbersModel.hpp b/src/components/telephone-numbers/TelephoneNumbersModel.hpp index 4918f038d..b1c1a9d6c 100644 --- a/src/components/telephone-numbers/TelephoneNumbersModel.hpp +++ b/src/components/telephone-numbers/TelephoneNumbersModel.hpp @@ -1,11 +1,13 @@ /* - * TelephoneNumbersModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: May 31, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef TELEPHONE_NUMBERS_MODEL_H_ diff --git a/src/components/timeline/TimelineModel.cpp b/src/components/timeline/TimelineModel.cpp index 8f6ca0686..ebd8473eb 100644 --- a/src/components/timeline/TimelineModel.cpp +++ b/src/components/timeline/TimelineModel.cpp @@ -1,11 +1,13 @@ /* - * TimelineModel.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include "components/core/CoreManager.hpp" diff --git a/src/components/timeline/TimelineModel.hpp b/src/components/timeline/TimelineModel.hpp index 9a7c4e9f9..e91a9c9d9 100644 --- a/src/components/timeline/TimelineModel.hpp +++ b/src/components/timeline/TimelineModel.hpp @@ -1,11 +1,13 @@ /* - * TimelineModel.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef TIMELINE_MODEL_H_ diff --git a/src/components/url-handlers/UrlHandlers.cpp b/src/components/url-handlers/UrlHandlers.cpp index 0023dcab2..54c87d963 100644 --- a/src/components/url-handlers/UrlHandlers.cpp +++ b/src/components/url-handlers/UrlHandlers.cpp @@ -1,11 +1,13 @@ /* - * UrlHandlers.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 16, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/components/url-handlers/UrlHandlers.hpp b/src/components/url-handlers/UrlHandlers.hpp index 5d976cb1a..abfc9c338 100644 --- a/src/components/url-handlers/UrlHandlers.hpp +++ b/src/components/url-handlers/UrlHandlers.hpp @@ -1,11 +1,13 @@ /* - * UrlHandlers.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 16, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef URL_HANDLERS_H_ diff --git a/src/utils/LinphoneUtils.cpp b/src/utils/LinphoneUtils.cpp index 3a90dcab9..9001f3503 100644 --- a/src/utils/LinphoneUtils.cpp +++ b/src/utils/LinphoneUtils.cpp @@ -1,11 +1,13 @@ /* - * LinphoneUtils.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/utils/LinphoneUtils.hpp b/src/utils/LinphoneUtils.hpp index 6a2de9c0d..1eeb73d1d 100644 --- a/src/utils/LinphoneUtils.hpp +++ b/src/utils/LinphoneUtils.hpp @@ -1,11 +1,13 @@ /* - * LinphoneUtils.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: June 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef LINPHONE_UTILS_H_ diff --git a/src/utils/MediastreamerUtils.cpp b/src/utils/MediastreamerUtils.cpp index a0742f476..8c0ef16ca 100644 --- a/src/utils/MediastreamerUtils.cpp +++ b/src/utils/MediastreamerUtils.cpp @@ -1,11 +1,13 @@ /* - * MediastreamerUtils.cpp - * Copyright (C) 2017-2019 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: Nov 6, 2019 - * Author: Nicolas Michon + * along with this program. If not, see . */ #include diff --git a/src/utils/MediastreamerUtils.hpp b/src/utils/MediastreamerUtils.hpp index 35ed99bcf..0afa33d9d 100644 --- a/src/utils/MediastreamerUtils.hpp +++ b/src/utils/MediastreamerUtils.hpp @@ -1,11 +1,13 @@ /* - * MediastreamerUtils.hpp - * Copyright (C) 2017-2019 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: Nov 6, 2019 - * Author: Nicolas Michon + * along with this program. If not, see . */ #ifndef MEDIASTREAMER_UTILS_H_ @@ -31,6 +29,8 @@ #include "mediastreamer2/msticker.h" #include +#include + // ============================================================================= namespace MediastreamerUtils { @@ -48,14 +48,14 @@ namespace MediastreamerUtils { } inline float dbToLinear(float volume) { - return static_cast(pow(10, volume / 10)); + return static_cast(pow(10.0, volume / 10.0)); } inline float linearToDb(float volume) { - if (volume == 0.0f) { + if (qFuzzyIsNull(volume)) { return MS_VOLUME_DB_LOWEST; } - return static_cast(10 * log10(volume)); + return static_cast(10.0 * log10(volume)); } //Simple mediastreamer audio capture graph diff --git a/src/utils/QExifImageHeader.cpp b/src/utils/QExifImageHeader.cpp index fc799f7c2..c9b8de7dc 100644 --- a/src/utils/QExifImageHeader.cpp +++ b/src/utils/QExifImageHeader.cpp @@ -120,7 +120,7 @@ public: QExifByteValuePrivate (const QVector &v) : QExifValuePrivate(QExifValue::Byte, v.size()), value(v) {} - + ~QExifByteValuePrivate(){} QVector value; }; @@ -491,13 +491,15 @@ QString QExifValue::toString () const { QTextCodec *codec = QTextCodec::codecForName("UTF-16"); if (codec) return codec->toUnicode(string); - } UTILS_NO_BREAK; + return QString::fromLocal8Bit(string.constData(), string.length()); + } case UndefinedEncoding: return QString::fromLocal8Bit(string.constData(), string.length()); default: break; } - } UTILS_NO_BREAK; + return QString(); + } default: return QString(); } @@ -1391,7 +1393,6 @@ QExifValue QExifImageHeader::readIfdValue (QDataStream &stream, int startPos, co } return QExifValue(value); } - break; case QExifValue::Rational: { QVector value(int(header.count)); diff --git a/src/utils/Utils.cpp b/src/utils/Utils.cpp index fb2097a82..c209062b1 100644 --- a/src/utils/Utils.cpp +++ b/src/utils/Utils.cpp @@ -1,11 +1,13 @@ /* - * utils.cpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: March 24, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #include diff --git a/src/utils/Utils.hpp b/src/utils/Utils.hpp index ebdd6108e..6c3b40bbf 100644 --- a/src/utils/Utils.hpp +++ b/src/utils/Utils.hpp @@ -1,11 +1,13 @@ /* - * utils.hpp - * Copyright (C) 2017-2018 Belledonne Communications, Grenoble, France + * Copyright (c) 2010-2020 Belledonne Communications SARL. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,11 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Created on: February 2, 2017 - * Author: Ronan Abhamon + * along with this program. If not, see . */ #ifndef UTILS_H_ diff --git a/ui/modules/Common/Form/ComboBox.js b/ui/modules/Common/Form/ComboBox.js index 4d881aba9..b06d2368f 100644 --- a/ui/modules/Common/Form/ComboBox.js +++ b/ui/modules/Common/Form/ComboBox.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `ComboBox.qml` Logic. // ============================================================================= diff --git a/ui/modules/Common/Form/ListForm.js b/ui/modules/Common/Form/ListForm.js index 2d0426a5a..e6676ef39 100644 --- a/ui/modules/Common/Form/ListForm.js +++ b/ui/modules/Common/Form/ListForm.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `ListForm.qml` Logic. // ============================================================================= diff --git a/ui/modules/Common/Form/ListItemSelector.js b/ui/modules/Common/Form/ListItemSelector.js index 9d25c7d42..f15cf2a2c 100644 --- a/ui/modules/Common/Form/ListItemSelector.js +++ b/ui/modules/Common/Form/ListItemSelector.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `ListItemSelector.qml` Logic. // ============================================================================= diff --git a/ui/modules/Common/Window/Window.js b/ui/modules/Common/Window/Window.js index 2051a318d..95363b874 100644 --- a/ui/modules/Common/Window/Window.js +++ b/ui/modules/Common/Window/Window.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // Windows (qml) Logic. // ============================================================================= diff --git a/ui/modules/Linphone/Calls/Calls.js b/ui/modules/Linphone/Calls/Calls.js index fa4b95be9..d942a8fe0 100644 --- a/ui/modules/Linphone/Calls/Calls.js +++ b/ui/modules/Linphone/Calls/Calls.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `Calls.qml` Logic. // ============================================================================= diff --git a/ui/modules/Linphone/Chat/Chat.js b/ui/modules/Linphone/Chat/Chat.js index 3e9cb1398..1e3c011da 100644 --- a/ui/modules/Linphone/Chat/Chat.js +++ b/ui/modules/Linphone/Chat/Chat.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `Chat.qml` Logic. // ============================================================================= diff --git a/ui/modules/Linphone/Chat/Message.js b/ui/modules/Linphone/Chat/Message.js index e4d41cc40..11edcc4c1 100644 --- a/ui/modules/Linphone/Chat/Message.js +++ b/ui/modules/Linphone/Chat/Message.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `Message.qml` Logic. // ============================================================================= diff --git a/ui/modules/Linphone/TelKeypad/TelKeypad.js b/ui/modules/Linphone/TelKeypad/TelKeypad.js index 8b4c3b191..5555b1bab 100644 --- a/ui/modules/Linphone/TelKeypad/TelKeypad.js +++ b/ui/modules/Linphone/TelKeypad/TelKeypad.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `TelKeypad.qml` Logic. // ============================================================================= diff --git a/ui/modules/Linphone/Timeline/Timeline.js b/ui/modules/Linphone/Timeline/Timeline.js index 15f321ebe..c3b4f1398 100644 --- a/ui/modules/Linphone/Timeline/Timeline.js +++ b/ui/modules/Linphone/Timeline/Timeline.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `Timeline.qml` Logic. // ============================================================================= diff --git a/ui/scripts/LinphoneUtils/linphone-utils.js b/ui/scripts/LinphoneUtils/linphone-utils.js index 86d3753f4..93b49afae 100644 --- a/ui/scripts/LinphoneUtils/linphone-utils.js +++ b/ui/scripts/LinphoneUtils/linphone-utils.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // Contains linphone helpers. // ============================================================================= diff --git a/ui/scripts/Utils/port-tools.js b/ui/scripts/Utils/port-tools.js index ed7019a5a..9c2f30c73 100644 --- a/ui/scripts/Utils/port-tools.js +++ b/ui/scripts/Utils/port-tools.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // Library to deal with Ports. // ============================================================================= diff --git a/ui/scripts/Utils/uri-tools.js b/ui/scripts/Utils/uri-tools.js index f106f8176..b32941cd4 100644 --- a/ui/scripts/Utils/uri-tools.js +++ b/ui/scripts/Utils/uri-tools.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // Library to deal with URI. // See: https://tools.ietf.org/html/rfc3986#section-1.3 diff --git a/ui/scripts/Utils/utils.js b/ui/scripts/Utils/utils.js index 2581d1f60..c9731d165 100644 --- a/ui/scripts/Utils/utils.js +++ b/ui/scripts/Utils/utils.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // Contains many common helpers. // ============================================================================= diff --git a/ui/views/App/Calls/CallsWindow.js b/ui/views/App/Calls/CallsWindow.js index bdf2d5368..b2bbc7990 100644 --- a/ui/views/App/Calls/CallsWindow.js +++ b/ui/views/App/Calls/CallsWindow.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `CallsWindow.qml` Logic. // ============================================================================= diff --git a/ui/views/App/Calls/Incall.js b/ui/views/App/Calls/Incall.js index 5d6ee1dd1..219bfe7ed 100644 --- a/ui/views/App/Calls/Incall.js +++ b/ui/views/App/Calls/Incall.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `Incall.qml` Logic. // ============================================================================= diff --git a/ui/views/App/Calls/Incall.qml b/ui/views/App/Calls/Incall.qml index 0e6d9c9af..e48dfb5e4 100644 --- a/ui/views/App/Calls/Incall.qml +++ b/ui/views/App/Calls/Incall.qml @@ -380,10 +380,13 @@ Rectangle { anchors.centerIn: parent height: CallStyle.actionArea.userVideo.height width: CallStyle.actionArea.userVideo.width +// Function to use if we want to manually Flip horizontally the preview without MSOGL +// transform: Matrix4x4 { +// matrix: Qt.matrix4x4(-1, 0, 0, CallStyle.actionArea.userVideo.width, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) +// } active: incall.width >= CallStyle.actionArea.lowWidth && incall.call.videoEnabled && !_fullscreen sourceComponent: cameraPreview - Component { id: cameraPreview diff --git a/ui/views/App/Main/+mac/MainWindowMenuBar.qml b/ui/views/App/Main/+mac/MainWindowMenuBar.qml deleted file mode 100644 index 48a0dde3b..000000000 --- a/ui/views/App/Main/+mac/MainWindowMenuBar.qml +++ /dev/null @@ -1,79 +0,0 @@ -import QtQuick 2.7 - -// Experimental. -import Qt.labs.platform 1.0 - -import Linphone 1.0 - -// ============================================================================= - -Item { - function open () { - menu.open() - } - - // --------------------------------------------------------------------------- - // Shortcuts. - // --------------------------------------------------------------------------- - - Shortcut { - id: settingsShortcut - - sequence: 'Ctrl+P' - - onActivated: App.smartShowWindow(App.getSettingsWindow()) - } - - Shortcut { - id: quitShortcut - - context: Qt.ApplicationShortcut - sequence: StandardKey.Quit - - onActivated: Qt.quit() - } - - Shortcut { - id: aboutShortcut - - sequence: StandardKey.HelpContents - - onActivated: { - window.detachVirtualWindow() - window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/About.qml')) - } - } - - // --------------------------------------------------------------------------- - // Menu. - // --------------------------------------------------------------------------- - - MenuBar { - Menu { - id: menu - - MenuItem { - role: MenuItem.PreferencesRole - shortcut: settingsShortcut.sequence - text: qsTr('settings') - - onTriggered: settingsShortcut.onActivated() - } - - MenuItem { - role: MenuItem.AboutRole - text: qsTr('about') - - onTriggered: aboutShortcut.onActivated() - } - - MenuItem { - role: MenuItem.QuitRole - shortcut: quitShortcut.sequence - text: qsTr('quit') - - onTriggered: quitShortcut.onActivated() - } - } - } -} diff --git a/ui/views/App/Main/ContactEdit.js b/ui/views/App/Main/ContactEdit.js index ffb9fe0e8..bb2629c64 100644 --- a/ui/views/App/Main/ContactEdit.js +++ b/ui/views/App/Main/ContactEdit.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `Conversation.qml` Logic. // ============================================================================= diff --git a/ui/views/App/Main/Conversation.js b/ui/views/App/Main/Conversation.js index 978a27d3f..df5d1e9d3 100644 --- a/ui/views/App/Main/Conversation.js +++ b/ui/views/App/Main/Conversation.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `Conversation.qml` Logic. // ============================================================================= diff --git a/ui/views/App/Main/Dialogs/AuthenticationRequest.js b/ui/views/App/Main/Dialogs/AuthenticationRequest.js index 48f4b838a..b367f7f91 100644 --- a/ui/views/App/Main/Dialogs/AuthenticationRequest.js +++ b/ui/views/App/Main/Dialogs/AuthenticationRequest.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `AuthenticationRequest.qml` Logic. // ============================================================================= diff --git a/ui/views/App/Main/Dialogs/ManageAccount.js b/ui/views/App/Main/Dialogs/ManageAccount.js index 622925c4e..762aaaf75 100644 --- a/ui/views/App/Main/Dialogs/ManageAccount.js +++ b/ui/views/App/Main/Dialogs/ManageAccount.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `ManageAccount.qml` Logic. // ============================================================================= diff --git a/ui/views/App/Main/MainWindow.js b/ui/views/App/Main/MainWindow.js index d5c2e9487..4761633e2 100644 --- a/ui/views/App/Main/MainWindow.js +++ b/ui/views/App/Main/MainWindow.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `MainWindow.qml` Logic. // ============================================================================= diff --git a/ui/views/App/Main/MainWindow.qml b/ui/views/App/Main/MainWindow.qml index 9661c6a0f..f0c062472 100644 --- a/ui/views/App/Main/MainWindow.qml +++ b/ui/views/App/Main/MainWindow.qml @@ -1,6 +1,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.3 +import Qt.labs.platform 1.0 import Common 1.0 import Linphone 1.0 @@ -192,14 +193,14 @@ ApplicationWindow { visible: Qt.platform.os !== 'osx' onClicked: menuBar.open() - MainWindowMenuBar { id: menuBar } + } } } - + MainWindowTopMenuBar{} // ----------------------------------------------------------------------- // Content. // ----------------------------------------------------------------------- diff --git a/ui/views/App/Main/MainWindowMenuBar.qml b/ui/views/App/Main/MainWindowMenuBar.qml index e32b8fe31..2ee2476bf 100644 --- a/ui/views/App/Main/MainWindowMenuBar.qml +++ b/ui/views/App/Main/MainWindowMenuBar.qml @@ -1,5 +1,6 @@ import QtQuick 2.7 import QtQuick.Controls 2.3 +import Qt.labs.platform 1.0 import Linphone 1.0 @@ -48,6 +49,7 @@ Item { Menu { id: menu + title: qsTr('settings') MenuItem { text: qsTr('settings') diff --git a/ui/views/App/Main/+5.9/MainWindowMenuBar.qml b/ui/views/App/Main/MainWindowTopMenuBar.qml similarity index 64% rename from ui/views/App/Main/+5.9/MainWindowMenuBar.qml rename to ui/views/App/Main/MainWindowTopMenuBar.qml index 48a0dde3b..9ed15d392 100644 --- a/ui/views/App/Main/+5.9/MainWindowMenuBar.qml +++ b/ui/views/App/Main/MainWindowTopMenuBar.qml @@ -1,13 +1,12 @@ import QtQuick 2.7 - -// Experimental. +import QtQuick.Controls 2.3 import Qt.labs.platform 1.0 import Linphone 1.0 // ============================================================================= -Item { +MenuBar { function open () { menu.open() } @@ -48,32 +47,26 @@ Item { // Menu. // --------------------------------------------------------------------------- - MenuBar { - Menu { - id: menu + Menu { + id: menu + title: qsTr('settings') - MenuItem { - role: MenuItem.PreferencesRole - shortcut: settingsShortcut.sequence - text: qsTr('settings') + MenuItem { + text: qsTr('settings') - onTriggered: settingsShortcut.onActivated() - } + onTriggered: settingsShortcut.onActivated() + } - MenuItem { - role: MenuItem.AboutRole - text: qsTr('about') + MenuItem { + text: qsTr('about') - onTriggered: aboutShortcut.onActivated() - } + onTriggered: aboutShortcut.onActivated() + } - MenuItem { - role: MenuItem.QuitRole - shortcut: quitShortcut.sequence - text: qsTr('quit') + MenuItem { + text: qsTr('quit') - onTriggered: quitShortcut.onActivated() - } + onTriggered: quitShortcut.onActivated() } } } diff --git a/ui/views/App/Settings/Dialogs/SettingsSipAccountsEdit.js b/ui/views/App/Settings/Dialogs/SettingsSipAccountsEdit.js index 83b5aa9f9..c38e5d398 100644 --- a/ui/views/App/Settings/Dialogs/SettingsSipAccountsEdit.js +++ b/ui/views/App/Settings/Dialogs/SettingsSipAccountsEdit.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `SettingsSipAccounts.qml` Logic. // ============================================================================= diff --git a/ui/views/App/Settings/Dialogs/SettingsSipAccountsEdit.qml b/ui/views/App/Settings/Dialogs/SettingsSipAccountsEdit.qml index 9b36866c3..4c18a9e6d 100644 --- a/ui/views/App/Settings/Dialogs/SettingsSipAccountsEdit.qml +++ b/ui/views/App/Settings/Dialogs/SettingsSipAccountsEdit.qml @@ -58,10 +58,12 @@ DialogPlus { TextField { id: sipAddress + placeholderText: 'sip:name@sip.example.net' error: dialog._sipAddressOk ? '' : qsTr('invalidSipAddress') onTextChanged: Logic.handleSipAddressChanged(text) + Keys.onReturnPressed: nextItemInFocusChain().forceActiveFocus() } } } @@ -72,10 +74,11 @@ DialogPlus { TextField { id: serverAddress - + placeholderText: 'sip:sip.example.net' error: dialog._serverAddressOk ? '' : qsTr('invalidServerAddress') - + onActiveFocusChanged: if(!activeFocus && dialog._serverAddressOk) Logic.handleTransportChanged(transport.model[transport.currentIndex]) onTextChanged: Logic.handleServerAddressChanged(text) + Keys.onReturnPressed: nextItemInFocusChain().forceActiveFocus() } } } @@ -86,6 +89,7 @@ DialogPlus { NumericField { id: registrationDuration + Keys.onReturnPressed: route.forceActiveFocus() } } } @@ -115,6 +119,7 @@ DialogPlus { error: dialog._routeOk ? '' : qsTr('invalidRoute') onTextChanged: Logic.handleRouteChanged(text) + Keys.onReturnPressed: nextItemInFocusChain().forceActiveFocus() } } } @@ -125,6 +130,7 @@ DialogPlus { TextField { id: contactParams + Keys.onReturnPressed: nextItemInFocusChain().forceActiveFocus() } } } @@ -138,6 +144,7 @@ DialogPlus { maxValue: 5 minValue: 1 + Keys.onReturnPressed: focus=false } } } @@ -203,8 +210,10 @@ DialogPlus { TextField { id: stunServer + placeholderText: 'stun.example.net' readOnly: !iceEnabled.checked + Keys.onReturnPressed: nextItemInFocusChain().forceActiveFocus() } } } @@ -229,6 +238,7 @@ DialogPlus { id: turnUser readOnly: !turnEnabled.checked || !turnEnabled.enabled + Keys.onReturnPressed: nextItemInFocusChain().forceActiveFocus() } } } diff --git a/ui/views/App/Settings/SettingsAdvanced.js b/ui/views/App/Settings/SettingsAdvanced.js index f199d9a77..c0f88a0ee 100644 --- a/ui/views/App/Settings/SettingsAdvanced.js +++ b/ui/views/App/Settings/SettingsAdvanced.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `SettingsAdvanced.qml` Logic. // ============================================================================= diff --git a/ui/views/App/Settings/SettingsSipAccounts.js b/ui/views/App/Settings/SettingsSipAccounts.js index 43a87cde1..fa42c63c5 100644 --- a/ui/views/App/Settings/SettingsSipAccounts.js +++ b/ui/views/App/Settings/SettingsSipAccounts.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `SettingsSipAccounts.qml` Logic. // ============================================================================= diff --git a/ui/views/App/Settings/SettingsUi.js b/ui/views/App/Settings/SettingsUi.js index 87f0af8bd..c5afb8114 100644 --- a/ui/views/App/Settings/SettingsUi.js +++ b/ui/views/App/Settings/SettingsUi.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `SettingsUi.qml` Logic. // ============================================================================= diff --git a/ui/views/App/Settings/SettingsVideo.js b/ui/views/App/Settings/SettingsVideo.js index 7acc12e1b..024967490 100644 --- a/ui/views/App/Settings/SettingsVideo.js +++ b/ui/views/App/Settings/SettingsVideo.js @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2010-2020 Belledonne Communications SARL. + * + * This file is part of linphone-desktop + * (see https://www.linphone.org). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // ============================================================================= // `SettingsVideo.qml` Logic. // =============================================================================