Commit e0b3b4ad authored by Amin Bandali's avatar Amin Bandali
Browse files

misc: vendor libjamiclient into 'src/libclient/'

This is libjamiclient from the jami-libclient.git repository as of
767c45b8b09806ac05cbada720864df93588c047, with the following changes:

* src/libclient/newaccountmodel.cpp:
(NewAccountModelPimpl::removeFromAccounts): The lock wait inside
'#ifdef CHK_FREEABLE_BEFORE_ERASE_ACCOUNT' was not updated when the
type of 'accounts' was changed over the years from this:
std::map<std::string, account::Info>
to this:
std::map<QString, std::pair<account::Info, std::shared_ptr<Database>>>
Basically we need to get the 'first' of the pair for 'account::Info'.
So we now do that.

* src/libclient/avmodel.cpp:
* src/libclient/callbackshandler.cpp:
* src/libclient/contactmodel.cpp:
* src/libclient/conversationmodel.cpp:
* src/libclient/database.cpp:
* src/libclient/namedirectory.cpp:
* src/libclient/newaccountmodel.cpp:
* src/libclient/newcallmodel.cpp:
* src/libclient/newdevicemodel.cpp:
* src/libclient/peerdiscoverymodel.cpp:
* src/libclient/pluginmodel.cpp:
* src/libclien...
parent a7735dfa
......@@ -6,3 +6,9 @@ file_filter = translations/ring_client_windows_<lang>.ts
source_file = translations/ring_client_windows.ts
source_lang = en
type = TS
[jami.lrc_en_ts]
file_filter = translations/lrc_<lang>.ts
source_file = translations/lrc_en.ts
source_lang = en
type = TS
This diff is collapsed.
# Copyright (C) 2015-2022 Savoir-faire Linux Inc.
#
# Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
# Author: Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>
#
# This program is free software; you can 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, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Once done, this find module will set:
#
# LIBJAMI_INCLUDE_DIRS - libjami include directories
# LIBJAMI_FOUND - whether it was able to find the include directories
# LIBJAMI_LIB - path to libjami or libring library
set(LIBJAMI_FOUND true)
if(EXISTS ${LIBJAMI_INCLUDE_DIR}/jami.h)
set(LIBJAMI_INCLUDE_DIRS ${LIBJAMI_INCLUDE_DIR})
elseif(EXISTS ${LIBJAMI_BUILD_DIR}/jami/jami.h)
set(LIBJAMI_INCLUDE_DIRS ${LIBJAMI_BUILD_DIR}/jami)
elseif(EXISTS ${RING_INCLUDE_DIR}/jami.h)
set(LIBJAMI_INCLUDE_DIRS ${RING_INCLUDE_DIR})
elseif(EXISTS ${RING_BUILD_DIR}/jami/jami.h)
set(LIBJAMI_INCLUDE_DIRS ${RING_BUILD_DIR}/jami)
elseif(EXISTS ${CMAKE_INSTALL_PREFIX}/include/jami/jami.h)
set(LIBJAMI_INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/include/jami)
else()
message(STATUS "Jami daemon headers not found!
Set -DLIBJAMI_BUILD_DIR or -DCMAKE_INSTALL_PREFIX")
set(LIBJAMI_FOUND false)
endif()
# Save the current value of CMAKE_FIND_LIBRARY_SUFFIXES.
set(CMAKE_FIND_LIBRARY_SUFFIXES_orig ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib;.so;.dll")
# Search only in these given PATHS.
find_library(LIBJAMI_LIB NAMES jami
PATHS ${LIBJAMI_BUILD_DIR}/.libs
PATHS ${RING_BUILD_DIR}/.libs
PATHS ${CMAKE_INSTALL_PREFIX}/lib
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
PATHS ${CMAKE_INSTALL_PREFIX}/bin
NO_DEFAULT_PATH)
if(NOT LIBJAMI_LIB)
find_library(LIBJAMI_LIB NAMES ring
PATHS ${LIBJAMI_BUILD_DIR}/.libs
PATHS ${RING_BUILD_DIR}/.libs
PATHS ${CMAKE_INSTALL_PREFIX}/lib
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
PATHS ${CMAKE_INSTALL_PREFIX}/bin
NO_DEFAULT_PATH)
endif()
# Search elsewhere as well (e.g. system-wide).
if(NOT LIBJAMI_LIB)
find_library(LIBJAMI_LIB NAMES jami
PATHS ${LIBJAMI_BUILD_DIR}/.libs
PATHS ${RING_BUILD_DIR}/.libs
PATHS ${CMAKE_INSTALL_PREFIX}/lib
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
PATHS ${CMAKE_INSTALL_PREFIX}/bin)
if(NOT LIBJAMI_LIB)
find_library(LIBJAMI_LIB NAMES ring
PATHS ${LIBJAMI_BUILD_DIR}/.libs
PATHS ${RING_BUILD_DIR}/.libs
PATHS ${CMAKE_INSTALL_PREFIX}/lib
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
PATHS ${CMAKE_INSTALL_PREFIX}/bin)
endif()
endif()
# Try for a static version also.
if(NOT LIBJAMI_LIB)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.lib")
# Search only in these given PATHS.
find_library(LIBJAMI_LIB NAMES jami
PATHS ${LIBJAMI_BUILD_DIR}/.libs
PATHS ${RING_BUILD_DIR}/.libs
PATHS ${CMAKE_INSTALL_PREFIX}/lib
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
NO_DEFAULT_PATH)
if(NOT LIBJAMI_LIB)
find_library(LIBJAMI_LIB NAMES ring
PATHS ${LIBJAMI_BUILD_DIR}/.libs
PATHS ${RING_BUILD_DIR}/.libs
PATHS ${CMAKE_INSTALL_PREFIX}/lib
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
NO_DEFAULT_PATH)
endif()
# Search elsewhere as well (e.g. system-wide).
if(NOT LIBJAMI_LIB)
find_library(LIBJAMI_LIB NAMES jami
PATHS ${LIBJAMI_BUILD_DIR}/.libs
PATHS ${RING_BUILD_DIR}/.libs
PATHS ${CMAKE_INSTALL_PREFIX}/lib
PATHS ${CMAKE_INSTALL_PREFIX}/libexec)
if(NOT LIBJAMI_LIB)
find_library(LIBJAMI_LIB NAMES ring
PATHS ${LIBJAMI_BUILD_DIR}/.libs
PATHS ${RING_BUILD_DIR}/.libs
PATHS ${CMAKE_INSTALL_PREFIX}/lib
PATHS ${CMAKE_INSTALL_PREFIX}/libexec)
endif()
endif()
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
add_definitions(-fPIC)
endif()
endif()
# Restore the original value of CMAKE_FIND_LIBRARY_SUFFIXES.
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_orig})
message(STATUS "Jami daemon headers are in " ${LIBJAMI_INCLUDE_DIRS})
message(STATUS "Jami daemon library is at " ${LIBJAMI_LIB})
......@@ -99,13 +99,13 @@ AppSettingsManager::loadTranslations()
QTranslator* lrcTranslator_lang = new QTranslator(qApp);
QTranslator* lrcTranslator_name = new QTranslator(qApp);
if (locale_name != locale_lang) {
if (lrcTranslator_lang->load(appDir + QDir::separator() + "libringclient" + QDir::separator()
if (lrcTranslator_lang->load(appDir + QDir::separator() + "jami" + QDir::separator()
+ "translations" + QDir::separator() + "lrc_" + locale_lang)) {
qApp->installTranslator(lrcTranslator_lang);
installedTr_.append(lrcTranslator_lang);
}
}
if (lrcTranslator_name->load(appDir + QDir::separator() + "libringclient" + QDir::separator()
if (lrcTranslator_name->load(appDir + QDir::separator() + "jami" + QDir::separator()
+ "translations" + QDir::separator() + "lrc_" + locale_name)) {
qApp->installTranslator(lrcTranslator_name);
installedTr_.append(lrcTranslator_name);
......@@ -114,14 +114,14 @@ AppSettingsManager::loadTranslations()
QTranslator* mainTranslator_lang = new QTranslator(qApp);
QTranslator* mainTranslator_name = new QTranslator(qApp);
if (locale_name != locale_lang) {
if (mainTranslator_lang->load(appDir + QDir::separator() + "ring" + QDir::separator()
if (mainTranslator_lang->load(appDir + QDir::separator() + "jami" + QDir::separator()
+ "translations" + QDir::separator() + "ring_client_windows_"
+ locale_lang)) {
qApp->installTranslator(mainTranslator_lang);
installedTr_.append(mainTranslator_lang);
}
}
if (mainTranslator_name->load(appDir + QDir::separator() + "ring" + QDir::separator()
if (mainTranslator_name->load(appDir + QDir::separator() + "jami" + QDir::separator()
+ "translations" + QDir::separator() + "ring_client_windows_"
+ locale_name)) {
qApp->installTranslator(mainTranslator_name);
......
......@@ -457,7 +457,7 @@ UtilsAdapter::supportedLang()
#else
QString appDir = qApp->applicationDirPath() + QDir::separator() + "share";
#endif
auto trDir = QDir(appDir + QDir::separator() + "ring" + QDir::separator() + "translations");
auto trDir = QDir(appDir + QDir::separator() + "jami" + QDir::separator() + "translations");
QStringList trFiles = trDir.entryList(QStringList() << "ring_client_windows_*.qm", QDir::Files);
QVariantMap result;
result["SYSTEM"] = tr("System");
......
# Copyright (C) 2015-2022 Savoir-faire Linux Inc.
#
# Author: Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>
# Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
# Author: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
# Author: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
# Author: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
# Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
# Author: Nicolas Jager <nicolas.jager@savoirfairelinux.com>
# Author: Hugo Lefeuvre <hugo.lefeuvre@savoirfairelinux.com>
# Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
# Author: Albert Babí <albert.babi@savoirfairelinux.com>
# Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
# Author: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>
#
# This program is free software; you can 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, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
cmake_minimum_required(VERSION 3.16)
project(jami-libclient)
# First, check if the compiler is new enough. Most versions of Clang
# are fine until specific problems arise. Checking for GCC is enough.
if(CMAKE_COMPILER_IS_GNUCC)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
if(GCC_VERSION VERSION_GREATER_EQUAL 4.8)
message(STATUS "Found GCC version >= 4.8: " ${GCC_VERSION})
else()
message(FATAL_ERROR "Your version of GCC is too old, \
please install GCC 4.8 or later")
endif()
endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS_DEBUG "-Og -ggdb")
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true)
# libjami (daemon)
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake")
find_package(LibJami REQUIRED)
if(LIBJAMI_FOUND)
include_directories(${LIBJAMI_INCLUDE_DIRS})
endif()
string(SUBSTRING ${CMAKE_GENERATOR} 0 14 CMAKE_GENERATOR_SHORT)
if(CMAKE_GENERATOR_SHORT MATCHES "Visual Studio ")
message(STATUS "Generating VS project")
set(CMAKE_CXX_COMPILER_ID "MSVC")
set(ENABLE_TEST false)
add_definitions(-DUNICODE -D_UNICODE)
remove_definitions(-D_MBCS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zi /W0 /MP /EHsc")
endif()
if (NOT (CMAKE_CXX_COMPILER_ID MATCHES "MSVC"))
add_definitions(
${QT_DEFINITIONS}
-fexceptions
-O2
# Enable some useful warnings
-Wall
-pedantic
-Wextra
-Wmissing-declarations
-Wmissing-noreturn
-Wpointer-arith
-Wcast-align
-Wwrite-strings
-Wformat-nonliteral
-Wformat-security
-Wmissing-include-dirs
-Wundef
-Wmissing-format-attribute
-Wno-reorder
-Wunused
-Woverloaded-virtual
-Wvarargs)
endif()
# Add more warnings for compilers that support it.
# I used pipelines like the following:
# curl https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/Warning-Options.html | \
# grep -E "^[\t ]+<br><dt><code>-W[a-zA-Z=-]*" -o | \
# grep -E "\-W[a-zA-Z=-]*" -o > /tmp/48;
# curl https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Warning-Options.html | \
# grep -E "^[\t ]+<br><dt><code>-W[a-zA-Z=-]*" -o | \
# grep -E "\-W[a-zA-Z=-]*" -o > /tmp/49;
# sort /tmp/48 /tmp/49 | uniq -u
if(CMAKE_COMPILER_IS_GNUCC)
if(GCC_VERSION VERSION_GREATER_EQUAL 4.9)
add_definitions(
-Wconditionally-supported
-Wno-cpp
-Wdouble-promotion
-Wdate-time
-Wfloat-conversion)
endif()
if(GCC_VERSION VERSION_GREATER_EQUAL 5.1)
add_definitions(
-Wformat-signedness
-Wnormalized
-Wshift-count-negative
-Wshift-count-overflow
-Wsized-deallocation
-Wsizeof-array-argument)
endif()
if(GCC_VERSION VERSION_GREATER_EQUAL 6.0)
add_definitions(
-Wnull-dereference
-Wshift-negative-value
-Wshift-overflow
-Wduplicated-cond)
endif()
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_definitions(
-Wno-c++98-compat
-Wno-c++98-compat-pedantic
-Wno-unknown-pragmas
-Wno-documentation-unknown-command
-Wno-padded
-Wno-old-style-cast
-Wno-sign-conversion
-Wno-exit-time-destructors
-Wno-global-constructors
-Wno-shorten-64-to-32
# -Weverything
)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_MACOSX_RPATH on)
set(CMAKE_SKIP_BUILD_RPATH false)
set(CMAKE_BUILD_WITH_INSTALL_RPATH false)
set(CMAKE_INSTALL_RPATH "${CMAKE_CURRENT_SOURCE_DIR}")
endif()
if(NOT ENABLE_TEST)
set(ENABLE_TEST false)
endif()
if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
OR ENABLE_LIBWRAP
# because mocks use the same interface present in qtwrapper/
OR ENABLE_TEST)
set(ENABLE_LIBWRAP true)
set(ENABLE_LIBWRAP ${ENABLE_LIBWRAP} PARENT_SCOPE)
endif()
if(NOT (${ENABLE_VIDEO} MATCHES false))
message(STATUS "VIDEO enabled")
set(ENABLE_VIDEO 1 CACHE BOOL "Enable video")
add_definitions(-DENABLE_VIDEO=true)
endif()
if(NOT (${ENABLE_PLUGIN} MATCHES false))
message(STATUS "PLUGIN enabled")
set(ENABLE_PLUGIN 1 CACHE BOOL "Enable plugin")
add_definitions(-DENABLE_PLUGIN=true)
endif()
set(CHK_FREEABLE_BEFORE_ERASE_ACCOUNT_DESCRIPTION
"Check that an account has been marked freeable by the client
before freeing the structures. This avoids various race conditions
conditions while removing accounts but may not be supported by all
clients. ON by default on GNU/Linux systems, otherwise OFF.")
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
option(CHK_FREEABLE_BEFORE_ERASE_ACCOUNT
CHK_FREEABLE_BEFORE_ERASE_ACCOUNT_DESCRIPTION ON)
else()
option(CHK_FREEABLE_BEFORE_ERASE_ACCOUNT
CHK_FREEABLE_BEFORE_ERASE_ACCOUNT_DESCRIPTION OFF)
endif()
if(CHK_FREEABLE_BEFORE_ERASE_ACCOUNT)
add_definitions(-DCHK_FREEABLE_BEFORE_ERASE_ACCOUNT)
endif()
include_directories(SYSTEM ${QT_INCLUDES})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
# Here we let find_package(<PackageName>...) try to find Qt 6.
# If it is found, find_package will succeed, and the CMake variable
# QT_VERSION_MAJOR will be set to 6.
if(QT6_VER AND QT6_PATH)
find_package(QT NAMES Qt6 REQUIRED
PATHS ${QT6_PATH} NO_DEFAULT_PATH)
else()
find_package(QT NAMES Qt6 REQUIRED)
endif()
if (${QT_VERSION_MAJOR} STRLESS 6)
if (${QT_VERSION_MINOR} STRLESS 2)
message(FATAL_ERROR "Qt 6.2 or higher is required.")
endif()
endif()
set(QT_MODULES Core Gui Sql)
if(NOT ENABLE_LIBWRAP)
list(APPEND QT_MODULES DBus)
endif()
if(QT6_VER AND QT6_PATH)
message(STATUS "Using custom Qt version")
find_package(Qt${QT_VERSION_MAJOR}
REQUIRED COMPONENTS ${QT_MODULES}
OPTIONAL_COMPONENTS LinguistTools
PATHS ${QT6_PATH} NO_DEFAULT_PATH)
else()
find_package(Qt${QT_VERSION_MAJOR}
REQUIRED COMPONENTS ${QT_MODULES}
OPTIONAL_COMPONENTS LinguistTools)
endif()
if(ENABLE_LIBWRAP)
# The daemon is only required for when using direct linking
if(NOT LIBJAMI_LIB)
message(FATAL_ERROR "Jami daemon library is required when \
building with ENABLE_LIBWRAP")
endif()
# Use native calls (no DBus)
add_definitions(-DENABLE_LIBWRAP=true)
if (NOT (CMAKE_CXX_COMPILER_ID MATCHES "MSVC"))
add_definitions(-Wno-unknown-pragmas)
endif()
message(STATUS "Compiling with qtwrapper enabled, \
Qt${QT_VERSION_MAJOR} enabled.")
add_subdirectory(qtwrapper)
include_directories(qtwrapper)
if(${VERBOSE_IPC} MATCHES true)
message(STATUS "Adding more debug output")
add_definitions(-DVERBOSE_IPC=true)
endif()
endif()
set(LIBCLIENT_SOURCES
# data objects
uri.cpp
# models
contactmodel.cpp
callparticipantsmodel.cpp
newcallmodel.cpp
newdevicemodel.cpp
newcodecmodel.cpp
conversationmodel.cpp
database.cpp
authority/daemon.cpp
authority/storagehelper.cpp
lrc.cpp
newaccountmodel.cpp
peerdiscoverymodel.cpp
callbackshandler.cpp
behaviorcontroller.cpp
datatransfermodel.cpp
messagelistmodel.cpp
# communication
dbus/configurationmanager.cpp
dbus/callmanager.cpp
dbus/instancemanager.cpp
dbus/videomanager.cpp
dbus/presencemanager.cpp
dbus/pluginmanager.cpp
# default interface implementations
globalinstances.cpp
pixmapmanipulatordefault.cpp
dbuserrorhandlerdefault.cpp
# other
avmodel.cpp
pluginmodel.cpp
namedirectory.cpp
smartinfohub.cpp
chatview.cpp
renderer.cpp)
set(LIBCLIENT_HEADERS
uri.h
globalinstances.h
pixmapmanipulatordefault.h
dbuserrorhandlerdefault.h
smartinfohub.h
vcard.h
namedirectory.h
messagelistmodel.h
# interfaces
interfaces/pixmapmanipulatori.h
interfaces/dbuserrorhandleri.h
# extra
typedefs.h
containerview.h
renderer.h)
set(LIBCLIENT_HEADERS_API
api/account.h
api/avmodel.h
api/behaviorcontroller.h
api/chatview.h
api/call.h
api/contact.h
api/conversation.h
api/contactmodel.h
api/conversationmodel.h
api/datatransfermodel.h
api/datatransfer.h
api/interaction.h
api/lrc.h
api/member.h
api/newaccountmodel.h
api/newcallmodel.h
api/callparticipantsmodel.h
api/newcodecmodel.h
api/newdevicemodel.h
api/pluginmodel.h
api/peerdiscoverymodel.h
api/profile.h
api/video.h)
# For libavutil/avframe.
set(LIBJAMI_CONTRIB_DIR
"${PROJECT_SOURCE_DIR}/../../../daemon/contrib")
find_path(AVUTIL_INCLUDE_DIR libavutil/avutil.h
PATHS
${LIBJAMI_CONTRIB_DIR}/native/ffmpeg
${LIBJAMI_CONTRIB_DIR}/build/ffmpeg/Build/win32/x64/include)
include_directories(${AVUTIL_INCLUDE_DIR})
if(ENABLE_LIBWRAP)
list(APPEND LIBCLIENT_HEADERS directrenderer.h)
list(APPEND LIBCLIENT_SOURCES directrenderer.cpp)
else()
list(APPEND LIBCLIENT_HEADERS shmrenderer.h)
list(APPEND LIBCLIENT_SOURCES shmrenderer.cpp)
# Build DBus API
if(DEFINED RING_XML_INTERFACES_DIR)
set(dbus_xml_introspecs_path ${RING_XML_INTERFACES_DIR})
elseif(DEFINED LIBJAMI_XML_INTERFACES_DIR)
set(dbus_xml_introspecs_path ${LIBJAMI_XML_INTERFACES_DIR})
elseif(EXISTS "${LIBJAMI_BUILD_DIR}/../bin/dbus")
set(dbus_xml_introspecs_path ${LIBJAMI_BUILD_DIR}/../bin/dbus)
else()
set(dbus_xml_introspecs_path
${CMAKE_INSTALL_PREFIX}/share/dbus-1/interfaces)
endif()
message(STATUS "Using Jami (Ring) DBus-XML interfaces in \
${dbus_xml_introspecs_path}")
set(presencemanager_xml
${dbus_xml_introspecs_path}/cx.ring.Ring.PresenceManager.xml)
set(dbus_metatype_path "dbus/metatypes.h")
set_source_files_properties(
${presencemanager_xml}
PROPERTIES
CLASSNAME PresenceManagerInterface
INCLUDE ${dbus_metatype_path})
set(configurationmanager_xml
${dbus_xml_introspecs_path}/cx.ring.Ring.ConfigurationManager.xml)
set_source_files_properties(
${configurationmanager_xml}
PROPERTIES
CLASSNAME ConfigurationManagerInterface
INCLUDE ${dbus_metatype_path})
set(callmanager_xml
${dbus_xml_introspecs_path}/cx.ring.Ring.CallManager.xml)
set_source_files_properties(
${callmanager_xml}
PROPERTIES
CLASSNAME CallManagerInterface
INCLUDE ${dbus_metatype_path})
set(video_xml
${dbus_xml_introspecs_path}/cx.ring.Ring.VideoManager.xml)
set_source_files_properties(
${video_xml}
PROPERTIES
CLASSNAME VideoManagerInterface
INCLUDE ${dbus_metatype_path})
set(plugin_xml
${dbus_xml_introspecs_path}/cx.ring.Ring.PluginManagerInterface.xml)
set_source_files_properties(
${plugin_xml}
PROPERTIES
CLASSNAME PluginManagerInterface
INCLUDE ${dbus_metatype_path})
set(instance_xml
${dbus_xml_introspecs_path}/cx.ring.Ring.Instance.xml)
set_source_files_properties(
${instance_xml}
PROPERTIES
CLASSNAME InstanceManagerInterface
INCLUDE ${dbus_metatype_path})
qt_add_dbus_interface(
LIBCLIENT_SOURCES
${presencemanager_xml}
presencemanager_dbus_interface)
qt_add_dbus_interface(