Commit 6654e66e authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Merge branch 'dev_vcard'

parents f1c86b86 a3290da4
......@@ -58,6 +58,8 @@ cmake_dependent_option(ENABLE_ASSISTANT "Turn on assistant compiling." YES "ENAB
option(ENABLE_DEBUG_LOGS "Turn on or off debug level logs." NO)
option(ENABLE_NLS "Build with internationalisation support" YES)
option(ENABLE_CALL_LOGS_STORAGE "Turn on compilation of call logs storage." YES)
option(ENABLE_FRIENDS_SQL_STORAGE "Turn on compilation of friends sql storage." YES)
option(ENABLE_VCARD "Turn on compilation of vcard4 support." YES)
macro(apply_compile_flags SOURCE_FILES)
......@@ -159,9 +161,25 @@ endif()
if(ENABLE_CALL_LOGS_STORAGE)
find_package(Sqlite3 REQUIRED)
endif()
if (ENABLE_FRIENDS_SQL_STORAGE)
find_package(Sqlite3 REQUIRED)
endif()
if(ENABLE_LIME)
set(HAVE_LIME 1)
endif()
if (ENABLE_VCARD)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_belcard_CONFIG_DIR}/BelcardConfig.cmake")
else()
find_package(Belcard)
endif()
if(NOT BELCARD_FOUND)
message(WARNING "Could not find the belcard library!")
set(ENABLE_VCARD OFF CACHE BOOL "Enable vcard support." FORCE)
else()
add_definitions(-DVCARD_ENABLED)
endif()
endif()
if(UNIX AND NOT APPLE)
include(CheckIncludeFiles)
......@@ -182,6 +200,9 @@ include_directories(
if(ENABLE_TUNNEL)
include_directories(${TUNNEL_INCLUDE_DIRS})
endif()
if (ENABLE_VCARD)
include_directories(${BELCARD_INCLUDE_DIRS})
endif()
include_directories(${XML2_INCLUDE_DIRS})
......@@ -197,6 +218,9 @@ if(SQLITE3_FOUND)
if(ENABLE_CALL_LOGS_STORAGE)
add_definitions("-DCALL_LOGS_STORAGE_ENABLED")
endif()
if(ENABLE_FRIENDS_SQL_STORAGE)
add_definitions("-DFRIENDS_SQL_STORAGE_ENABLED")
endif()
endif()
if(INTL_FOUND)
set(HAVE_INTL 1)
......
......@@ -45,6 +45,7 @@ LOCAL_SRC_FILES := \
callbacks.c \
call_log.c \
call_params.c \
carddav.c \
chat.c \
chat_file_transfer.c \
conference.cc \
......@@ -80,7 +81,6 @@ LOCAL_SRC_FILES := \
vtables.c \
ringtoneplayer.c
ifndef LIBLINPHONE_VERSION
LIBLINPHONE_VERSION = "Devel"
endif
......@@ -129,7 +129,7 @@ LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/../../../gen \
$(LOCAL_PATH)/../../externals/libxml2/include \
$(LOCAL_PATH)/../../externals/build/libxml2 \
$(LOCAL_PATH)/../../externals/polarssl/include
$(LOCAL_PATH)/../../externals/polarssl/include \
LOCAL_LDLIBS += -llog -ldl -lz
......@@ -262,6 +262,16 @@ ifeq ($(BUILD_SRTP), 1)
LOCAL_C_INCLUDES += $(SRTP_C_INCLUDE)
endif
ifeq ($(BUILD_VCARD),1)
LOCAL_C_INCLUDES += $(VCARD_C_INCLUDE)
endif
ifeq ($(BUILD_ILBC), 1)
ifneq ($(TARGET_ARCH_ABI),armeabi)
LOCAL_CFLAGS += -DHAVE_ILBC=1
LOCAL_STATIC_LIBRARIES += libmsilbc
endif
endif
LOCAL_C_INCLUDES += $(LIBLINPHONE_EXTENDED_C_INCLUDES)
LOCAL_WHOLE_STATIC_LIBRARIES += $(LIBLINPHONE_EXTENDED_STATIC_LIBS)
......@@ -277,8 +287,16 @@ ifeq ($(BUILD_SRTP),1)
LOCAL_STATIC_LIBRARIES += libsrtp
endif
ifeq ($(BUILD_VCARD),1)
LOCAL_CFLAGS += -DVCARD_ENABLED
LOCAL_SRC_FILES += vcard.cc
LOCAL_STATIC_LIBRARIES += libbelr libbelcard
else
LOCAL_SRC_FILES += vcard_stubs.c
endif
ifeq ($(BUILD_SQLITE),1)
LOCAL_CFLAGS += -DMSG_STORAGE_ENABLED -DCALL_LOGS_STORAGE_ENABLED
LOCAL_CFLAGS += -DMSG_STORAGE_ENABLED -DCALL_LOGS_STORAGE_ENABLED -DFRIENDS_SQL_STORAGE_ENABLED
LOCAL_STATIC_LIBRARIES += liblinsqlite
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/../../externals/sqlite3/
......@@ -300,7 +318,7 @@ LOCAL_MODULE_FILENAME := liblinphone-$(TARGET_ARCH_ABI)
include $(BUILD_SHARED_LIBRARY)
LOCAL_CPPFLAGS=$(LOCAL_CFLAGS)
LOCAL_CPPFLAGS += $(LOCAL_CFLAGS)
LOCAL_CFLAGS += -Wdeclaration-after-statement
LOCAL_LDFLAGS := -Wl,-soname,$(LOCAL_MODULE_FILENAME).so
......
......@@ -24,7 +24,8 @@ common_SRC_FILES := \
tunnel_tester.c \
upnp_tester.c \
multicast_call_tester.c \
complex_sip_call_tester.c
vcard_tester.c \
complex_sip_call_tester.c \
common_C_INCLUDES += \
$(LOCAL_PATH) \
......
......@@ -277,6 +277,12 @@
<Content Include="Assets\certificates\cn\openssl-cn.cnf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\common\vcards.vcf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\common\thousand_vcards.vcf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Logo.png" />
<Content Include="Assets\SmallLogo.png" />
<Content Include="Assets\SplashScreen.png" />
......@@ -309,7 +315,8 @@ XCopy /I /Y $(ProjectDir)..\..\..\tester\certificates\altname $(ProjectDir)Asset
XCopy /I /Y $(ProjectDir)..\..\..\tester\certificates\cn $(ProjectDir)Assets\certificates\cn
XCopy /I /Y $(ProjectDir)..\..\..\tester\images $(ProjectDir)Assets\images
XCopy /I /Y $(ProjectDir)..\..\..\tester\rcfiles $(ProjectDir)Assets\rcfiles
XCopy /I /Y $(ProjectDir)..\..\..\tester\sounds $(ProjectDir)Assets\sounds</PreBuildEvent>
XCopy /I /Y $(ProjectDir)..\..\..\tester\sounds $(ProjectDir)Assets\sounds
XCopy /I /Y $(ProjectDir)..\..\..\tester\common $(ProjectDir)Assets\common</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
......@@ -318,4 +325,4 @@ XCopy /I /Y $(ProjectDir)..\..\..\tester\sounds $(ProjectDir)Assets\sounds</PreB
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
</Project>
############################################################################
# FindBelcard.cmake
# Copyright (C) 2015 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
#
# - Find the belcard include file and library
#
# BELCARD_FOUND - system has belcard
# BELCARD_INCLUDE_DIRS - the belcard include directory
# BELCARD_LIBRARIES - The libraries needed to use belcard
set(_BELCARD_ROOT_PATHS
${CMAKE_INSTALL_PREFIX}
)
find_path(BELCARD_INCLUDE_DIRS
NAMES belcard.hpp
HINTS _BELCARD_ROOT_PATHS
PATH_SUFFIXES include/belcard
)
if(BELCARD_INCLUDE_DIRS)
set(HAVE_BELCARD_H 1)
endif()
find_library(BELCARD_LIBRARIES
NAMES belcard
HINTS ${_BELCARD_ROOT_PATHS}
PATH_SUFFIXES bin lib
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Belcard
DEFAULT_MSG
BELCARD_INCLUDE_DIRS BELCARD_LIBRARIES HAVE_BELCARD_H
)
mark_as_advanced(BELCARD_INCLUDE_DIRS BELCARD_LIBRARIES HAVE_BELCARD_H)
......@@ -42,6 +42,13 @@ if(@ENABLE_TUNNEL@)
find_package(Tunnel)
endif()
endif()
if(@ENABLE_VCARD@)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_belcard_CONFIG_DIR}/BelcardConfig.cmake")
else()
find_package(Belcard)
endif()
endif()
get_filename_component(LINPHONE_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(LINPHONE_INCLUDE_DIRS "${LINPHONE_CMAKE_DIR}/../../../include")
......@@ -59,4 +66,8 @@ if(TUNNEL_FOUND)
list(APPEND LINPHONE_INCLUDE_DIRS ${TUNNEL_INCLUDE_DIRS})
list(APPEND LINPHONE_LIBRARIES ${TUNNEL_LIBRARIES})
endif()
if(BELCARD_FOUND)
list(APPEND LINPHONE_INCLUDE_DIRS ${BELCARD_INCLUDE_DIRS})
list(APPEND LINPHONE_LIBRARIES ${BELCARD_LIBRARIES})
endif()
set(LINPHONE_FOUND 1)
......@@ -880,6 +880,40 @@ if test x$enable_tunnel = xtrue; then
AC_DEFINE(TUNNEL_ENABLED,1,[Tells tunnel extension is built-in])
fi
AC_ARG_ENABLE(vcard,
[AS_HELP_STRING([--enable-vcard=[yes/no]], [Turn on compilation of vcard (default=auto)])],
[case "${enableval}" in
yes) enable_vcard=true ;;
no) enable_vcard=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-vcard) ;;
esac],
[enable_vcard=auto]
)
if test x$enable_vcard != xfalse; then
PKG_CHECK_MODULES(BELCARD, belcard, [found_vcard=yes],[found_vcard=no])
if test "$found_vcard" = "no"; then
dnl Check the lib presence in case the PKG-CONFIG version is not found
AC_LANG_CPLUSPLUS
AC_CHECK_LIB(belcard, main, [BELCARD_LIBS+=" -lbelr -lbelcard"; found_vcard=yes], [foo=bar])
AC_LANG_C
fi
if test "$found_vcard" = "yes"; then
BELCARD_CFLAGS+=" -DVCARD_ENABLED"
enable_vcard=true
else
if test x$enable_vcard = xtrue; then
AC_MSG_ERROR([belcard, required for vcard support, not found])
fi
enable_vcard=false
fi
AC_SUBST(BELCARD_CFLAGS)
AC_SUBST(BELCARD_LIBS)
fi
AM_CONDITIONAL(BUILD_VCARD, test x$enable_vcard = xtrue)
AC_ARG_ENABLE(msg-storage,
[AS_HELP_STRING([--enable-msg-storage=[yes/no]], [Turn on compilation of message storage (default=auto)])],
[case "${enableval}" in
......@@ -950,6 +984,41 @@ fi
AM_CONDITIONAL(BUILD_CALL_LOGS_STORAGE, test x$enable_call_logs_storage = xtrue)
AC_ARG_ENABLE(friends-db-storage,
[AS_HELP_STRING([--enable-friends-db-storage=[yes/no]], [Turn on compilation of friends database storage (default=auto)])],
[case "${enableval}" in
yes) enable_friends_db_storage=true ;;
no) enable_friends_db_storage=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-friends-db-storage) ;;
esac],
[enable_friends_db_storage=auto]
)
if test x$enable_friends_db_storage != xfalse; then
PKG_CHECK_MODULES(SQLITE3,[sqlite3 >= 3.6.0],[found_sqlite=yes],[found_sqlite=no])
if test "$found_sqlite" = "no"; then
dnl Check the lib presence in case the PKG-CONFIG version is not found
AC_CHECK_LIB(sqlite3, sqlite3_open, [SQLITE3_LIBS+=" -lsqlite3 "; found_sqlite=yes], [foo=bar])
fi
if test "$found_sqlite" = "yes"; then
SQLITE3_CFLAGS+=" -DFRIENDS_SQL_STORAGE_ENABLED"
if test "$build_macos" = "yes" -o "$ios_found" = "yes"; then
SQLITE3_LIBS+=" -liconv"
fi
enable_friends_db_storage=true
else
if test x$enable_friends_db_storage = xtrue; then
AC_MSG_ERROR([sqlite3, required for friends database storage, not found])
fi
enable_friends_db_storage=false
fi
AC_SUBST(SQLITE3_CFLAGS)
AC_SUBST(SQLITE3_LIBS)
fi
AM_CONDITIONAL(BUILD_FRIENDS_DB_STORAGE, test x$enable_friends_db_storage = xtrue)
PKG_CHECK_MODULES(BELLESIP, [belle-sip >= 1.4.0])
SIPSTACK_CFLAGS="$BELLESIP_CFLAGS"
......@@ -1077,7 +1146,9 @@ printf "* %-30s %s\n" "Account assistant" $build_wizard
printf "* %-30s %s\n" "Console interface" $console_ui
printf "* %-30s %s\n" "Tools" $build_tools
printf "* %-30s %s\n" "Message storage" $enable_msg_storage
printf "* %-30s %s\n" "Call logs storage" $enable_call_logs_storage
printf "* %-30s %s\n" "Call logs storage" $enable_call_logs_storage
printf "* %-30s %s\n" "Friends db storage" $enable_friends_db_storage
printf "* %-30s %s\n" "VCard support" $enable_vcard
printf "* %-30s %s\n" "IM encryption" $lime
printf "* %-30s %s\n" "uPnP support" $build_upnp
printf "* %-30s %s\n" "LDAP support" $enable_ldap
......
......@@ -35,6 +35,7 @@ set(LINPHONE_HEADER_FILES
buffer.h
call_log.h
call_params.h
carddav.h
conference.h
content.h
event.h
......@@ -51,6 +52,7 @@ set(LINPHONE_HEADER_FILES
sipsetup.h
xml2lpc.h
xmlrpc.h
vcard.h
)
set(LINPHONE_SOURCE_FILES_C
......@@ -74,6 +76,7 @@ set(LINPHONE_SOURCE_FILES_C
callbacks.c
call_log.c
call_params.c
carddav.c
chat.c
chat_file_transfer.c
contactprovider.c
......@@ -144,10 +147,6 @@ add_definitions(
-DLIBLINPHONE_EXPORTS
)
apply_compile_flags(LINPHONE_SOURCE_FILES_C "CPP" "C")
apply_compile_flags(LINPHONE_SOURCE_FILES_CXX "CPP" "CXX")
apply_compile_flags(LINPHONE_SOURCE_FILES_OBJC "CPP" "OBJC")
set(LIBS
${BCTOOLBOX_CORE_LIBRARIES}
${BELLESIP_LIBRARIES}
......@@ -175,6 +174,17 @@ endif()
if(INTL_FOUND)
list(APPEND LIBS ${INTL_LIBRARIES})
endif()
if(BELCARD_FOUND)
list(APPEND LIBS ${BELCARD_LIBRARIES})
list(APPEND LINPHONE_SOURCE_FILES_CXX vcard.cc)
list(APPEND STRICT_OPTIONS_CXX "-std=c++11")
else()
list(APPEND LINPHONE_SOURCE_FILES_C vcard_stubs.c)
endif()
apply_compile_flags(LINPHONE_SOURCE_FILES_C "CPP" "C")
apply_compile_flags(LINPHONE_SOURCE_FILES_CXX "CPP" "CXX")
apply_compile_flags(LINPHONE_SOURCE_FILES_OBJC "CPP" "OBJC")
if(ENABLE_STATIC)
add_library(linphone-static STATIC ${LINPHONE_HEADER_FILES} ${LINPHONE_SOURCE_FILES_C} ${LINPHONE_SOURCE_FILES_CXX} ${LINPHONE_SOURCE_FILES_OBJC})
......
......@@ -44,7 +44,9 @@ linphone_include_HEADERS=\
lpconfig.h \
sipsetup.h \
xml2lpc.h \
xmlrpc.h
xmlrpc.h \
vcard.h \
carddav.h
lib_LTLIBRARIES=liblinphone.la
......@@ -92,6 +94,7 @@ liblinphone_la_SOURCES=\
xml.c \
xmlrpc.c \
vtables.c \
carddav.c \
ringtoneplayer.c ringtoneplayer.h\
$(GITVERSION_FILE)
......@@ -119,6 +122,12 @@ else
liblinphone_la_SOURCES+=linphone_tunnel_stubs.c linphone_tunnel.h
endif
if BUILD_VCARD
liblinphone_la_SOURCES+=vcard.cc
liblinphone_la_CXXFLAGS=-std=c++11
else
liblinphone_la_SOURCES+=vcard_stubs.c
endif
liblinphone_la_LDFLAGS= -version-info $(LIBLINPHONE_SO_VERSION) -no-undefined
......@@ -146,19 +155,22 @@ liblinphone_la_LIBADD= \
$(LIBXML2_LIBS) \
$(LDAP_LIBS) \
$(SASL_LIBS) \
$(BELCARD_LIBS) \
$(ZLIB_LIBS)
AM_CPPFLAGS=\
-DIN_LINPHONE \
-I$(top_srcdir) -I$(top_srcdir)/include -I$(builddir) \
$(ORTP_CFLAGS) \
$(MEDIASTREAMER_CFLAGS)
$(ORTP_CFLAGS) \
$(MEDIASTREAMER_CFLAGS) \
$(LIBXML2_CFLAGS)
COMMON_CFLAGS=\
$(STRICT_OPTIONS) \
-DIN_LINPHONE \
$(SIPSTACK_CFLAGS) \
-DENABLE_TRACE \
-DENABLE_TRACE \
-DLOG_DOMAIN=\"LinphoneCore\" \
$(IPV6_CFLAGS) \
-DORTP_INET6 \
......@@ -168,6 +180,7 @@ COMMON_CFLAGS=\
$(LIBXML2_CFLAGS) \
$(LDAP_CFLAGS) \
$(SASL_CFLAGS) \
$(BELCARD_CFLAGS) \
$(ZLIB_CFLAGS)
if BUILD_WIZARD
......
......@@ -20,13 +20,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef LINPHONE_ACCOUNT_CREATOR_H_
#define LINPHONE_ACCOUNT_CREATOR_H_
#include "linphonecore.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "linphonecore.h"
/**
* @addtogroup misc
* @{
......
......@@ -997,12 +997,11 @@ typedef struct {
unsigned char node[6];
} sal_uuid_t;
int sal_create_uuid(Sal*ctx, char *uuid, size_t len){
int sal_generate_uuid(char *uuid, size_t len) {
sal_uuid_t uuid_struct;
int i;
int written;
if (len==0) return -1;
/*create an UUID as described in RFC4122, 4.4 */
belle_sip_random_bytes((unsigned char*)&uuid_struct, sizeof(sal_uuid_t));
......@@ -1021,10 +1020,17 @@ int sal_create_uuid(Sal*ctx, char *uuid, size_t len){
for (i = 0; i < 6; i++)
written+=snprintf(uuid+written,len-written,"%2.2x", uuid_struct.node[i]);
uuid[len-1]='\0';
sal_set_uuid(ctx,uuid);
return 0;
}
int sal_create_uuid(Sal*ctx, char *uuid, size_t len) {
if (sal_generate_uuid(uuid, len) == 0) {
sal_set_uuid(ctx, uuid);
return 0;
}
return -1;
}
static void make_supported_header(Sal *sal){
MSList *it;
char *alltags=NULL;
......
......@@ -349,7 +349,7 @@ static void linphone_create_table(sqlite3* db) {
}
}
void linphone_update_call_log_table(sqlite3* db) {
static void linphone_update_call_log_table(sqlite3* db) {
char* errmsg=NULL;
int ret;
......@@ -461,7 +461,7 @@ error:
return 0;
}
void linphone_sql_request_call_log(sqlite3 *db, const char *stmt, MSList **list) {
static void linphone_sql_request_call_log(sqlite3 *db, const char *stmt, MSList **list) {
char* errmsg = NULL;
int ret;
ret = sqlite3_exec(db, stmt, create_call_log, list, &errmsg);
......@@ -471,7 +471,7 @@ void linphone_sql_request_call_log(sqlite3 *db, const char *stmt, MSList **list)
}
}
int linphone_sql_request_generic(sqlite3* db, const char *stmt) {
static int linphone_sql_request_generic(sqlite3* db, const char *stmt) {
char* errmsg = NULL;
int ret;
ret = sqlite3_exec(db, stmt, NULL, NULL, &errmsg);
......
This diff is collapsed.
/*
carddav.h
Copyright (C) 2015 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef LINPHONE_CARDDAV_H
#define LINPHONE_CARDDAV_H
#include "linphonecore.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @addtogroup carddav_vcard
* @{
*/
typedef struct _LinphoneCardDavContext LinphoneCardDavContext;
typedef enum _LinphoneCardDavQueryType {
LinphoneCardDavQueryTypePropfind,
LinphoneCardDavQueryTypeAddressbookQuery,
LinphoneCardDavQueryTypeAddressbookMultiget,
LinphoneCardDavQueryTypePut,
LinphoneCardDavQueryTypeDelete
} LinphoneCardDavQueryType;
typedef struct _LinphoneCardDavQuery LinphoneCardDavQuery;
typedef struct _LinphoneCardDavResponse LinphoneCardDavResponse;
/**
* Callback used to notify a new contact has been created on the CardDAV server
**/
typedef void (*LinphoneCardDavContactCreatedCb)(LinphoneCardDavContext *cdc, LinphoneFriend *lf);
/**
* Callback used to notify a contact has been updated on the CardDAV server
**/
typedef void (*LinphoneCardDavContactUpdatedCb)(LinphoneCardDavContext *cdc, LinphoneFriend *new_friend, LinphoneFriend *old_friend);
/**
* Callback used to notify a contact has been removed on the CardDAV server
**/
typedef void (*LinphoneCardDavContactRemovedCb)(LinphoneCardDavContext *cdc, LinphoneFriend *lf);
/**
* Callback used to notify a contact has been removed on the CardDAV server
**/
typedef void (*LinphoneCardDavSynchronizationDoneCb)(LinphoneCardDavContext *cdc, bool_t success, const char *message);
/**
* Creates a CardDAV context for all related operations
* @param lfl LinphoneFriendList object
* @return LinphoneCardDavContext object if vCard support is enabled and server URL is available, NULL otherwise
*/
LINPHONE_PUBLIC LinphoneCardDavContext* linphone_carddav_context_new(LinphoneFriendList *lfl);
/**
* Deletes a LinphoneCardDavContext object
* @param cdc LinphoneCardDavContext object
*/
LINPHONE_PUBLIC void linphone_carddav_context_destroy(LinphoneCardDavContext *cdc);
/**
* Sets a user pointer to the LinphoneCardDAVContext object
* @param cdc LinphoneCardDavContext object
* @param ud The user data pointer
*/
LINPHONE_PUBLIC void linphone_carddav_set_user_data(LinphoneCardDavContext *cdc, void *ud);
/**
* Gets the user pointer set in the LinphoneCardDAVContext object
* @param cdc LinphoneCardDavContext object
* @return The user data pointer if set, NULL otherwise
*/
LINPHONE_PUBLIC void* linphone_carddav_get_user_data(LinphoneCardDavContext *cdc);
/**
* Starts a synchronization with the remote server to update local friends with server changes