Commit fd54e736 authored by Matthieu Tanon's avatar Matthieu Tanon

Merge branch 'master' into dev_lime_v2

parents f5120fca 4cb8038c
......@@ -42,19 +42,17 @@ option(ENABLE_STATIC "Build static library." YES)
option(ENABLE_CONSOLE_UI "Turn on or off compilation of console interface." YES)
option(ENABLE_CSHARP_WRAPPER "Build the C# wrapper for Liblinphone." OFF)
option(ENABLE_JAVA_WRAPPER "Build the Java wrapper for Liblinphone." OFF)
option(ENABLE_CXX_WRAPPER "Build the C++ wrapper for Liblinphone." YES)
option(ENABLE_DAEMON "Enable the linphone daemon interface." YES)
option(ENABLE_DATE "Use build date in internal version number." NO)
option(ENABLE_DEBUG_LOGS "Turn on or off debug level logs." NO)
option(ENABLE_DOC "Enable API documentation generation." NO)
option(ENABLE_SPHINX_DOC "Enable sphinx documentation generation." NO)
option(ENABLE_LIME_V2 "Enable LIME v2 and X3DH." YES)
option(ENABLE_JAVA_WRAPPER "Build the Java wrapper for Liblinphone." OFF)
option(ENABLE_JAVADOC "Add a target to generate documentation for Java API" NO)
option(ENABLE_LDAP "Enable LDAP support." NO)
option(ENABLE_LIME_V2 "Enable LIME v2 and X3DH." YES)
option(ENABLE_LIME "Enable Instant Messaging Encryption." YES)
option(ENABLE_RELATIVE_PREFIX "Find resources relatively to the installation directory." NO)
option(ENABLE_ROOTCA_DOWNLOAD "Download rootca.pem at build time." YES)
option(ENABLE_SQLITE_STORAGE "Turn on compilation sqlite storage, for messages, contacts, history" YES)
option(ENABLE_STRICT "Build with strict compile options." YES)
option(ENABLE_TOOLS "Turn on or off compilation of tools." YES)
option(ENABLE_TUNNEL "Turn on compilation of tunnel support." NO)
......@@ -64,7 +62,6 @@ option(ENABLE_UPDATE_CHECK "Enable update check." NO)
option(ENABLE_VCARD "Turn on compilation of vcard4 support." YES)
option(ENABLE_VIDEO "Build with video support." YES)
cmake_dependent_option(ENABLE_LIME "Enable Instant Messaging Encryption." NO "ENABLE_SQLITE_STORAGE" NO)
cmake_dependent_option(ENABLE_NOTIFY "Enable libnotify support." YES "ENABLE_GTK_UI;NOT APPLE" NO)
cmake_dependent_option(ENABLE_ASSISTANT "Turn on assistant compiling." YES "ENABLE_GTK_UI" NO)
......@@ -135,10 +132,14 @@ else()
find_package(BcToolbox 0.0.3 REQUIRED OPTIONAL_COMPONENTS tester)
find_package(Belr REQUIRED)
endif()
find_package(XML2 REQUIRED)
find_package(LibXsd REQUIRED)
find_package(Sqlite3 REQUIRED)
find_package(XML2 REQUIRED)
find_package(Soci)
find_package(ZLIB)
if(ENABLE_TUNNEL)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_tunnel_CONFIG_DIR}/TunnelConfig.cmake")
......@@ -150,9 +151,6 @@ if(ENABLE_TUNNEL)
set(ENABLE_TUNNEL OFF CACHE BOOL "Enable tunnel support." FORCE)
endif()
endif()
if(ENABLE_SQLITE_STORAGE)
find_package(Sqlite3 REQUIRED)
endif()
if(ENABLE_NOTIFY)
find_package(Notify)
if(NOTIFY_FOUND)
......@@ -244,17 +242,12 @@ if (ENABLE_VCARD)
endif()
list(APPEND LINPHONE_INCLUDE_DIRS ${XML2_INCLUDE_DIRS})
list(APPEND LINPHONE_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIRS})
if(ZLIB_FOUND)
list(APPEND LINPHONE_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS})
set(HAVE_ZLIB 1)
endif()
if(SQLITE3_FOUND)
list(APPEND LINPHONE_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIRS})
if(ENABLE_SQLITE_STORAGE)
add_definitions("-DSQLITE_STORAGE_ENABLED")
endif()
endif()
if(INTL_FOUND)
set(HAVE_INTL 1)
list(APPEND LINPHONE_INCLUDE_DIRS ${INTL_INCLUDE_DIRS})
......
......@@ -33,7 +33,7 @@ This library is used by Linphone. It's source code is available at *linphone-des
## Build instructions
cmake . -DCMAKE_INSTALL_PREFIX=<prefix> -DCMAKE_PREFIX_PATH=<search_prefixes>
make
make install
......@@ -48,7 +48,6 @@ This library is used by Linphone. It's source code is available at *linphone-des
* **`ENABLE_DOC=YES`** : Make the reference documentation of liblinphone to generated
* **`ENABLE_UNIT_TESTS=NO`** : do not build testing binaries
* **`ENABLE_VCARD=NO`** : disable VCard support
* **`ENABLE_SQLITE_STORAGE=NO`** : disable SQlite user data storage (message, history, contacts list)
* **`ENABLE_TOOLS=NO`** : do not build tool binaries
* **`ENABLE_LIME=YES`** : disable Linphone Instant Messaging Encryption
......@@ -79,9 +78,9 @@ This software is distributed under GNU GPLv2. Please read COPYING file for full
------------------------------
- [1] linphone-desktop: git://git.linphone.org/linphone-desktop.git
- [2] bctoolbox: git://git.linphone.org/bctoolbox.git *or* <https://www.linphone.org/releases/sources/bctoolbox>
- [3] belle-sip: git://git.linphone.org/belle-sip.git *or* <https://www.linphone.org/releases/sources/belle-sip>
- [4] mediastreamer2: git://git.linphone.org/mediastreamer2.git *or* <https://www.linphone.org/releases/sources/mediastreamer>
- [5] belcard: git://git.linphone.org/belcard.git *or* <https://www.linphone.org/releases/sources/belcard>
- [6] bzrtp: git://git.linphone.org/bzrtp.git *or* <https://www.linphone.org/releases/sources/bzrtp>
- [1] linphone-desktop: https://gitlab.linphone.org/BC/public/linphone-desktop
- [2] bctoolbox: https://gitlab.linphone.org/BC/public/bctoolbox *or* <https://www.linphone.org/releases/sources/bctoolbox>
- [3] belle-sip: https://gitlab.linphone.org/BC/public/belle-sip *or* <https://www.linphone.org/releases/sources/belle-sip>
- [4] mediastreamer2: https://gitlab.linphone.org/BC/public/mediastreamer2 *or* <https://www.linphone.org/releases/sources/mediastreamer>
- [5] belcard: https://gitlab.linphone.org/BC/public/belcard *or* <https://www.linphone.org/releases/sources/belcard>
- [6] bzrtp: https://gitlab.linphone.org/BC/public/bzrtp *or* <https://www.linphone.org/releases/sources/bzrtp>
This diff is collapsed.
AUTOMAKE_OPTIONS = subdir-objects
GITVERSION_FILE=liblinphone_gitversion.h
GITVERSION_FILE_TMP=liblinphone_gitversion.h.tmp
GITDESCRIBE=`cd $(top_srcdir) && git describe --always`
GIT_TAG=`cd $(top_srcdir) && git describe --abbrev=0`
GITREVISION=`cd $(top_srcdir) && git rev-parse HEAD`
## This command is used to check if the sources are cloned in a git repo.
## We can't only depend on the presence of the .git/ directory anymore,
## because of gits submodule handling.
## We now simply issue a git log on configure.ac and if the output is empty (error or file not tracked), then we are not in git.
GITLOG=`cd $(top_srcdir) && git log -1 --pretty=format:%H configure.ac`
ECHO=/bin/echo
SUBDIRS=.
EXTRA_DIST=linphonecore_jni.cc $(GITVERSION_FILE)
BUILT_SOURCES=$(GITVERSION_FILE)
CLEANFILES=$(GITVERSION_FILE)
## Process this file with automake to produce Makefile.in
lib_LTLIBRARIES=liblinphone.la
liblinphone_la_SOURCES=\
account_creator.c \
account_creator_service.c \
address.c \
authentication.c \
buffer.c \
callbacks.c \
carddav.h \
call_log.c \
call_params.c \
carddav.c \
chat.c \
chat_file_transfer.c \
conference.cc conference_private.h \
contactprovider.c contact_providers_priv.h \
dial_plan.c \
dict.c \
ec-calibrator.c \
echo-tester.c \
enum.c enum.h \
error_info.c \
event.c \
factory.c \
friend.c \
friendlist.c \
im_notif_policy.c \
info.c \
ldapprovider.c \
linphonecall.c \
linphonecore.c \
localplayer.c \
lpc2xml.c lpc2xml.h \
lime.c lime.h\
im_encryption_engine.c \
lpconfig.c \
lsd.c \
message_storage.c \
misc.c \
nat_policy.c \
offeranswer.c offeranswer.h\
payload_type.c \
player.c \
presence.c \
private.h \
proxy.c \
quality_reporting.c quality_reporting.h\
remote_provisioning.c \
ringtoneplayer.c \
sal.c \
siplogin.c \
sipsetup.c \
sqlite3_bctbx_vfs.c sqlite3_bctbx_vfs.h\
vcard_private.h \
vtables.c \
video_definition.c \
xml2lpc.c xml2lpc.h \
xml.c \
xmlrpc.c \
$(GITVERSION_FILE)
if BUILD_UPNP
liblinphone_la_SOURCES+=upnp.c upnp.h
endif
liblinphone_la_SOURCES+= bellesip_sal/sal_address_impl.c \
bellesip_sal/sal_impl.c bellesip_sal/sal_impl.h \
bellesip_sal/sal_op_impl.c \
bellesip_sal/sal_op_call.c \
bellesip_sal/sal_op_registration.c \
bellesip_sal/sal_sdp.c \
bellesip_sal/sal_op_message.c \
bellesip_sal/sal_op_presence.c \
bellesip_sal/sal_op_publish.c \
bellesip_sal/sal_op_call_transfer.c \
bellesip_sal/sal_op_info.c \
bellesip_sal/sal_op_events.c
liblinphone_la_SOURCES+=linphone_tunnel_config.c
if BUILD_TUNNEL
liblinphone_la_SOURCES+=linphone_tunnel.cc TunnelManager.cc TunnelManager.hh
else
liblinphone_la_SOURCES+=linphone_tunnel_stubs.c
endif
if BUILD_VCARD
liblinphone_la_SOURCES+=vcard.cc
else
liblinphone_la_SOURCES+=vcard_stubs.c
endif
liblinphone_la_LDFLAGS= -version-info $(LIBLINPHONE_SO_VERSION) -no-undefined
if HAVE_LD_OUTPUT_DEF
liblinphone_la_LDFLAGS += -Wl,--output-def,liblinphone-$(LIBLINPHONE_SO_CURRENT).def
defexecdir = $(libdir)
defexec_DATA = liblinphone-$(LIBLINPHONE_SO_CURRENT).def
CLEANFILES += $(defexec_DATA)
liblinphone-$(LIBLINPHONE_SO_CURRENT).def: liblinphone.la
if BUILD_WIN32
defexec_DATA += liblinphone-$(LIBLINPHONE_SO_CURRENT).lib
liblinphone-$(LIBLINPHONE_SO_CURRENT).lib: liblinphone-$(LIBLINPHONE_SO_CURRENT).def liblinphone.la
$(DLLTOOL) --dllname liblinphone-$(LIBLINPHONE_SO_CURRENT).dll --input-def liblinphone-$(LIBLINPHONE_SO_CURRENT).def --output-lib $@ liblinphone.la
endif
endif
liblinphone_la_LIBADD= \
$(MEDIASTREAMER_LIBS) \
$(ORTP_LIBS) \
$(SIPSTACK_LIBS) \
$(TUNNEL_LIBS) \
$(SQLITE3_LIBS) \
$(LIBXML2_LIBS) \
$(LDAP_LIBS) \
$(SASL_LIBS) \
$(BELCARD_LIBS) \
$(ZLIB_LIBS) \
$(BCTOOLBOX_LIBS)
AM_CPPFLAGS=\
-I$(top_srcdir) -I$(top_srcdir)/include -I$(builddir) \
$(ORTP_CFLAGS) \
$(MEDIASTREAMER_CFLAGS) \
$(LIBXML2_CFLAGS)
COMMON_CFLAGS=\
$(STRICT_OPTIONS) \
$(SIPSTACK_CFLAGS) \
-DENABLE_TRACE \
-DLOG_DOMAIN=\"LinphoneCore\" \
$(IPV6_CFLAGS) \
-DORTP_INET6 \
$(VIDEO_CFLAGS) \
$(TUNNEL_CFLAGS) \
$(SQLITE3_CFLAGS) \
$(LIBXML2_CFLAGS) \
$(LDAP_CFLAGS) \
$(SASL_CFLAGS) \
$(BELCARD_CFLAGS) \
$(ZLIB_CFLAGS) \
$(BCTOOLBOX_CFLAGS)
if BUILD_WIZARD
COMMON_CFLAGS+= -DBUILD_WIZARD
endif
COMMON_CFLAGS+= -DUSE_BELLESIP
AM_CFLAGS=$(COMMON_CFLAGS) $(STRICT_OPTIONS_CC)
AM_CXXFLAGS=$(COMMON_CFLAGS) $(STRICT_OPTIONS_CXX)
if BUILD_VCARD
AM_CXXFLAGS+=-std=c++11
endif
#Make sure that we are in linphone's git tree by doing git log $(top_srcdir)/configure.ac.
#if it is something known to git, then that will be ok to check the git describe number and make sure it is consistent with
#the PACKAGE_VERSION given in configure.ac
make_gitversion_h:
if test -n "$(GITLOG)" ; then \
if test "$(GITDESCRIBE)" != "" ; then \
if [ "$(GIT_TAG)" != "$(PACKAGE_VERSION)" ]; then \
$(ECHO) "*** PACKAGE_VERSION and git tag differ. Please put them identical."; \
exit 1; \
fi ; \
printf "#define LIBLINPHONE_GIT_VERSION \"$(GITDESCRIBE)\"\n" > $(builddir)/$(GITVERSION_FILE_TMP) ; \
elif test "$(GITREVISION)" != "" ; then \
printf "#define LIBLINPHONE_GIT_VERSION \"$(LINPHONE_VERSION)_$(GITREVISION)\"\n" > $(builddir)/$(GITVERSION_FILE_TMP) ; \
else \
printf "" > $(builddir)/$(GITVERSION_FILE_TMP) ; \
fi ; \
if ! test -f $(builddir)/$(GITVERSION_FILE) ; then \
cp -f $(builddir)/$(GITVERSION_FILE_TMP) $(builddir)/$(GITVERSION_FILE) ; \
fi ; \
if test "`cat $(builddir)/$(GITVERSION_FILE_TMP)`" != "`cat $(builddir)/$(GITVERSION_FILE)`" ; then \
cp -f $(builddir)/$(GITVERSION_FILE_TMP) $(builddir)/$(GITVERSION_FILE) ; \
fi ; \
rm -f $(builddir)/$(GITVERSION_FILE_TMP) ; \
else \
touch $(GITVERSION_FILE) ; \
fi
$(GITVERSION_FILE): make_gitversion_h
......@@ -486,7 +486,7 @@ static void sdp_parse_payload_types(belle_sdp_media_description_t *media_desc, S
static void sdp_parse_media_crypto_parameters(belle_sdp_media_description_t *media_desc, SalStreamDescription *stream) {
belle_sip_list_t *attribute_it;
belle_sdp_attribute_t *attribute;
char tmp[257]={0}, tmp2[128]={0}, parameters[257]={0};
char tmp[257]={0}, tmp2[129]={0}, parameters[257]={0};
int valid_count = 0;
int nb;
......
......@@ -23,17 +23,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <time.h>
#ifdef SQLITE_STORAGE_ENABLED
#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__QNXNTO__)
#include <langinfo.h>
#include <iconv.h>
#include <string.h>
#endif
#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__QNXNTO__)
#include <langinfo.h>
#include <iconv.h>
#include <string.h>
#endif // if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__QNXNTO__)
#include "sqlite3.h"
#define MAX_PATH_SIZE 1024
#endif
#define MAX_PATH_SIZE 1024
#include "c-wrapper/c-wrapper.h"
......@@ -171,7 +167,7 @@ bctbx_list_t * linphone_core_read_call_logs_from_config_file(LinphoneCore *lc){
* Public functions *
******************************************************************************/
LinphoneCallLog *linphone_core_create_call_log(LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, LinphoneCallDir dir,
LinphoneCallLog *linphone_core_create_call_log(LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, LinphoneCallDir dir,
int duration, time_t start_time, time_t connected_time, LinphoneCallStatus status, bool_t video_enabled, float quality) {
LinphoneCallLog *log = linphone_call_log_new(dir, linphone_address_ref(from), linphone_address_ref(to));
......@@ -374,8 +370,6 @@ BELLE_SIP_INSTANCIATE_VPTR(LinphoneCallLog, belle_sip_object_t,
* SQL storage related functions *
******************************************************************************/
#ifdef SQLITE_STORAGE_ENABLED
static void linphone_create_call_log_table(sqlite3* db) {
char* errmsg=NULL;
int ret;
......@@ -725,42 +719,3 @@ LinphoneCallLog * linphone_core_find_call_log_from_call_id(LinphoneCore *lc, con
return result;
}
#else
void linphone_core_call_log_storage_init(LinphoneCore *lc) {
}
void linphone_core_call_log_storage_close(LinphoneCore *lc) {
}
void linphone_core_store_call_log(LinphoneCore *lc, LinphoneCallLog *log) {
}
const bctbx_list_t *linphone_core_get_call_history(LinphoneCore *lc) {
return NULL;
}
void linphone_core_delete_call_history(LinphoneCore *lc) {
}
void linphone_core_delete_call_log(LinphoneCore *lc, LinphoneCallLog *log) {
}
int linphone_core_get_call_history_size(LinphoneCore *lc) {
return 0;
}
bctbx_list_t * linphone_core_get_call_history_for_address(LinphoneCore *lc, const LinphoneAddress *addr) {
return NULL;
}
LinphoneCallLog * linphone_core_get_last_outgoing_call_log(LinphoneCore *lc) {
return NULL;
}
LinphoneCallLog * linphone_core_find_call_log_from_call_id(LinphoneCore *lc, const char *call_id) {
return NULL;
}
#endif
......@@ -140,11 +140,16 @@ static void call_received(SalCallOp *h) {
shared_ptr<AbstractChatRoom> chatRoom = L_GET_CPP_PTR_FROM_C_OBJECT(lc)->findChatRoom(
ConferenceId(IdentityAddress(h->getFrom()), IdentityAddress(h->getTo()))
);
if (!chatRoom) {
if (chatRoom && chatRoom->getCapabilities() & ChatRoom::Capabilities::Basic) {
lError() << "Invalid basic chat room found. It should have been a ClientGroupChatRoom... Recreating it...";
chatRoom->deleteFromDb();
chatRoom.reset();
}
if (!chatRoom)
chatRoom = L_GET_PRIVATE_FROM_C_OBJECT(lc)->createClientGroupChatRoom(
h->getSubject(), h->getRemoteContact(), h->getRemoteBody(), false
);
}
const char *oneToOneChatRoomStr = sal_custom_header_find(h->getRecvCustomHeaders(), "One-To-One-Chat-Room");
if (oneToOneChatRoomStr && (strcmp(oneToOneChatRoomStr, "true") == 0))
L_GET_PRIVATE(static_pointer_cast<ClientGroupChatRoom>(chatRoom))->addOneToOneCapability();
......
......@@ -25,20 +25,13 @@
#include "linphone/core.h"
#include "linphone/lpconfig.h"
#ifdef SQLITE_STORAGE_ENABLED
#ifndef _WIN32
#if !defined(__ANDROID__) && !defined(__QNXNTO__)
#include <langinfo.h>
#include <iconv.h>
#include <string.h>
#endif
#else
#include <Windows.h>
#endif
#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__QNXNTO__)
#include <langinfo.h>
#include <iconv.h>
#include <string.h>
#endif // if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__QNXNTO__)
#define MAX_PATH_SIZE 1024
#include "sqlite3.h"
#endif
#include "c-wrapper/c-wrapper.h"
#include "core/core-p.h"
......@@ -778,16 +771,8 @@ void linphone_friend_update_subscribes(LinphoneFriend *fr, bool_t only_when_regi
}
void linphone_friend_save(LinphoneFriend *fr, LinphoneCore *lc) {
if (!lc) return;
#ifdef SQLITE_STORAGE_ENABLED
if (lc->friends_db_file) {
if (lc && lc->friends_db_file)
linphone_core_store_friend_in_db(lc, fr);
} else {
linphone_core_write_friends_config(lc);
}
#else
linphone_core_write_friends_config(lc);
#endif
}
void linphone_friend_apply(LinphoneFriend *fr, LinphoneCore *lc) {
......@@ -1077,50 +1062,6 @@ const char *__policy_enum_to_str(LinphoneSubscribePolicy pol){
return "wait";
}
void linphone_friend_write_to_config_file(LpConfig *config, LinphoneFriend *lf, int index){
char key[50];
char *tmp;
const char *refkey;
sprintf(key,"friend_%i",index);
if (lf==NULL){
lp_config_clean_section(config,key);
return;
}
if (lf->uri!=NULL){
tmp=linphone_address_as_string(lf->uri);
if (tmp==NULL) {
return;
}
lp_config_set_string(config,key,"url",tmp);
ms_free(tmp);
}
lp_config_set_string(config,key,"pol",__policy_enum_to_str(lf->pol));
lp_config_set_int(config,key,"subscribe",lf->subscribe);
lp_config_set_int(config, key, "presence_received", lf->presence_received);
refkey=linphone_friend_get_ref_key(lf);
if (refkey){
lp_config_set_string(config,key,"refkey",refkey);
}
}
void linphone_core_write_friends_config(LinphoneCore* lc) {
bctbx_list_t *elem;
int i;
int store_friends;
if (! linphone_core_ready(lc)) return; /*dont write config when reading it !*/
store_friends = lp_config_get_int(lc->config, "misc", "store_friends", 1);
if (store_friends) {
for (elem=linphone_core_get_default_friend_list(lc)->friends,i=0; elem!=NULL; elem=bctbx_list_next(elem),i++){
linphone_friend_write_to_config_file(lc->config,(LinphoneFriend*)bctbx_list_get_data(elem),i);
}
linphone_friend_write_to_config_file(lc->config,NULL,i); /* set the end */
}
}
LinphoneCore *linphone_friend_get_core(const LinphoneFriend *fr){
return fr->lc;
}
......@@ -1239,8 +1180,6 @@ BELLE_SIP_INSTANCIATE_VPTR(LinphoneFriend, belle_sip_object_t,
* SQL storage related functions *
******************************************************************************/
#ifdef SQLITE_STORAGE_ENABLED
static void linphone_create_friends_table(sqlite3* db) {
char* errmsg = NULL;
int ret;
......@@ -1698,36 +1637,6 @@ bctbx_list_t* linphone_core_fetch_friends_lists_from_db(LinphoneCore *lc) {
return result;
}
#else
void linphone_core_friends_storage_init(LinphoneCore *lc) {
}
void linphone_core_friends_storage_close(LinphoneCore *lc) {
}
void linphone_core_store_friend_in_db(LinphoneCore *lc, LinphoneFriend *lf) {
}
void linphone_core_store_friends_list_in_db(LinphoneCore *lc, LinphoneFriendList *list) {
}
void linphone_core_remove_friend_from_db(LinphoneCore *lc, LinphoneFriend *lf) {
}
void linphone_core_remove_friends_list_from_db(LinphoneCore *lc, LinphoneFriendList *list) {
}
bctbx_list_t* linphone_core_fetch_friends_from_db(LinphoneCore *lc, LinphoneFriendList *list) {
return NULL;
}
bctbx_list_t* linphone_core_fetch_friends_lists_from_db(LinphoneCore *lc) {
return NULL;
}
#endif
void linphone_core_set_friends_database_path(LinphoneCore *lc, const char *path) {
if (!linphone_core_conference_server_enabled(lc))
L_GET_PRIVATE(lc->cppPtr)->mainDb->import(LinphonePrivate::MainDb::Sqlite3, path);
......
......@@ -678,11 +678,10 @@ static LinphoneFriendListStatus _linphone_friend_list_remove_friend(LinphoneFrie
bctbx_list_t *elem = bctbx_list_find(list->friends, lf);
if (elem == NULL) return LinphoneFriendListNonExistentFriend;
#ifdef SQLITE_STORAGE_ENABLED
if (lf && lf->lc && lf->lc->friends_db) {
linphone_core_remove_friend_from_db(lf->lc, lf);
}
#endif
if (remove_from_server) {
LinphoneVcard *lvc = linphone_friend_get_vcard(lf);
if (lvc && linphone_vcard_get_uid(lvc)) {
......@@ -696,9 +695,6 @@ static LinphoneFriendListStatus _linphone_friend_list_remove_friend(LinphoneFrie
}
}
}
if (!list->lc->friends_db_file) {
linphone_core_write_friends_config(list->lc);
}
list->friends = bctbx_list_erase_link(list->friends, elem);
if(lf->refkey) {
bctbx_iterator_t * it = bctbx_map_cchar_find_key(list->friends_map, lf->refkey);
......
......@@ -20,37 +20,29 @@
#
################################################################################
if (ENABLE_DOC OR ENABLE_CXX_WRAPPER OR ENABLE_CSHARP_WRAPPER OR ENABLE_JAVA_WRAPPER)
find_package(Doxygen)
if(ENABLE_DOC OR ENABLE_CXX_WRAPPER OR ENABLE_CSHARP_WRAPPER OR ENABLE_JAVA_WRAPPER)
find_package(Doxygen REQUIRED)
if(DOXYGEN_FOUND)
if(DOXYGEN_DOT_FOUND)
set(top_srcdir "${PROJECT_SOURCE_DIR}")
set(DOXYGEN_INPUT "")
foreach (HEADER_FILE ${LINPHONE_HEADER_FILES})
string(CONCAT DOXYGEN_INPUT ${DOXYGEN_INPUT} " \"${HEADER_FILE}\"")
endforeach ()
string(CONCAT DOXYGEN_INPUT ${DOXYGEN_INPUT} " \"${CMAKE_CURRENT_SOURCE_DIR}\"")
string(CONCAT DOXYGEN_INPUT ${DOXYGEN_INPUT} " \"${PROJECT_SOURCE_DIR}/coreapi/help/examples/C\"")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
set(DOC_INPUT_FILES ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
${CMAKE_CURRENT_SOURCE_DIR}/doxygen.dox
${LINPHONE_HEADER_FILES}
)
set(XML_DIR "${CMAKE_CURRENT_BINARY_DIR}/xml")
set(LINPHONE_DOXYGEN_XML_DIR ${XML_DIR} PARENT_SCOPE)
add_custom_command(OUTPUT "${XML_DIR}/index.xml"
COMMAND ${CMAKE_COMMAND} -E remove -f xml/*
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
DEPENDS ${DOC_INPUT_FILES}
)
add_custom_target(linphone-doc ALL DEPENDS "${XML_DIR}/index.xml")
else()
if (ENABLE_CXX_WRAPPER)
message(FATAL_ERROR "The dot program is needed to generate the linphone documentation. You can get it from http://www.graphviz.org/.")
else()
message(WARNING "The dot program is needed to generate the linphone documentation. You can get it from http://www.graphviz.org/.")
endif()
endif()
set(top_srcdir "${PROJECT_SOURCE_DIR}")
set(DOXYGEN_INPUT "")
foreach (HEADER_FILE ${LINPHONE_HEADER_FILES})
string(CONCAT DOXYGEN_INPUT ${DOXYGEN_INPUT} " \"${HEADER_FILE}\"")
endforeach ()
string(CONCAT DOXYGEN_INPUT ${DOXYGEN_INPUT} " \"${CMAKE_CURRENT_SOURCE_DIR}\"")
string(CONCAT DOXYGEN_INPUT ${DOXYGEN_INPUT} " \"${PROJECT_SOURCE_DIR}/coreapi/help/examples/C\"")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
set(DOC_INPUT_FILES ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
${CMAKE_CURRENT_SOURCE_DIR}/doxygen.dox
${LINPHONE_HEADER_FILES}
)
set(XML_DIR "${CMAKE_CURRENT_BINARY_DIR}/xml")
set(LINPHONE_DOXYGEN_XML_DIR ${XML_DIR} PARENT_SCOPE)
add_custom_command(OUTPUT "${XML_DIR}/index.xml"
COMMAND ${CMAKE_COMMAND} -E remove -f xml/*
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
DEPENDS ${DOC_INPUT_FILES}
)
add_custom_target(linphone-doc ALL DEPENDS "${XML_DIR}/index.xml")
endif()
endif()
This diff is collapsed.
......@@ -519,6 +519,7 @@ const char* linphone_config_load_from_xml_file(LinphoneConfig *lpc, const char *
if (path) {
context = xml2lpc_context_new(NULL, NULL);
error_msg = _linphone_config_xml_convert(lpc, context, xml2lpc_set_xml_file(context, path));
bctbx_free(path);
}
if (context) xml2lpc_context_destroy(context);
return error_msg;
......
......@@ -458,11 +458,11 @@ LinphoneReason linphone_reason_from_sal(SalReason r){
* @ingroup media_parameters
**/
void linphone_core_set_video_display_filter(LinphoneCore *lc, const char *filter_name){
lp_config_set_string(lc->config,"video","displaytype",filter_name);
lp_config_set_string(lc->config,"video", "displaytype", filter_name);
}
const char *linphone_core_get_video_display_filter(LinphoneCore *lc){
return lp_config_get_string(lc->config,"video","displaytype",NULL);
return lp_config_get_string(lc->config, "video","displaytype", NULL);
}
void linphone_core_set_echo_canceller_filter_name(LinphoneCore *lc, const char *filtername) {
......@@ -932,12 +932,11 @@ void linphone_core_report_call_log(LinphoneCore *lc, LinphoneCallLog *call_log){
return;
// End of workaround
#ifdef SQLITE_STORAGE_ENABLED
if (lc->logs_db) {
call_logs_sqlite_db_found = TRUE;
linphone_core_store_call_log(lc, call_log);
}
#endif
if (!call_logs_sqlite_db_found) {
lc->call_logs=bctbx_list_prepend(lc->call_logs,linphone_call_log_ref(call_log));
if (bctbx_list_size(lc->call_logs)>(size_t)lc->max_call_logs){
......
......@@ -1282,10 +1282,11 @@ static int process_pidf_xml_presence_services(xmlparsing_context_t *xml_ctx, Lin
}
snprintf(xpath_str, sizeof(xpath_str), "%s[%i]/pidf:status/pidfonline:online", service_prefix, i);
if ((pidfonline_object = linphone_get_xml_xpath_object_for_node_list(xml_ctx, xpath_str)) != NULL
&& pidfonline_object->nodesetval
&& pidfonline_object->nodesetval->nodeNr >0) {
model->is_online = TRUE;
pidfonline_object = linphone_get_xml_xpath_object_for_node_list(xml_ctx, xpath_str);
if (pidfonline_object) {
if (pidfonline_object->nodesetval && pidfonline_object->nodesetval->nodeNr > 0)
model->is_online = TRUE;
xmlXPathFreeObject(pidfonline_object);
}
snprintf(xpath_str, sizeof(xpath_str), "%s[%i]/pidf:timestamp", service_prefix, i);
......
......@@ -113,10 +113,7 @@
#endif
#ifdef SQLITE_STORAGE_ENABLED
#include <sqlite3.h>
#endif