mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
Started carddav code
This commit is contained in:
parent
0f54b50e76
commit
f85edbaa9e
6 changed files with 88 additions and 5 deletions
|
|
@ -42,7 +42,8 @@ linphone_include_HEADERS=\
|
|||
lpconfig.h \
|
||||
sipsetup.h \
|
||||
xml2lpc.h \
|
||||
xmlrpc.h
|
||||
xmlrpc.h \
|
||||
carddav.h
|
||||
|
||||
lib_LTLIBRARIES=liblinphone.la
|
||||
|
||||
|
|
@ -90,8 +91,10 @@ liblinphone_la_SOURCES=\
|
|||
xml.c \
|
||||
xmlrpc.c \
|
||||
vtables.c \
|
||||
carddav.cc \
|
||||
$(GITVERSION_FILE)
|
||||
|
||||
liblinphone_la_CXXFLAGS=-std=c++11
|
||||
if BUILD_UPNP
|
||||
liblinphone_la_SOURCES+=upnp.c upnp.h
|
||||
endif
|
||||
|
|
@ -118,7 +121,6 @@ endif
|
|||
|
||||
if BUILD_VCARD
|
||||
liblinphone_la_SOURCES+=vcard.cc vcard.h
|
||||
liblinphone_la_CXXFLAGS=-std=c++11
|
||||
else
|
||||
liblinphone_la_SOURCES+=vcard_stubs.c vcard.h
|
||||
endif
|
||||
|
|
@ -155,14 +157,14 @@ liblinphone_la_LIBADD= \
|
|||
|
||||
AM_CPPFLAGS=\
|
||||
-I$(top_srcdir) -I$(top_srcdir)/include -I$(builddir) \
|
||||
$(ORTP_CFLAGS) \
|
||||
$(MEDIASTREAMER_CFLAGS)
|
||||
$(ORTP_CFLAGS) \
|
||||
$(MEDIASTREAMER_CFLAGS)
|
||||
|
||||
COMMON_CFLAGS=\
|
||||
$(STRICT_OPTIONS) \
|
||||
-DIN_LINPHONE \
|
||||
$(SIPSTACK_CFLAGS) \
|
||||
-DENABLE_TRACE \
|
||||
-DENABLE_TRACE \
|
||||
-DLOG_DOMAIN=\"LinphoneCore\" \
|
||||
$(IPV6_CFLAGS) \
|
||||
-DORTP_INET6 \
|
||||
|
|
|
|||
28
coreapi/carddav.cc
Normal file
28
coreapi/carddav.cc
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
carddav.cc
|
||||
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.
|
||||
*/
|
||||
|
||||
#include "carddav.h"
|
||||
|
||||
extern "C" void linphone_core_start_carddav_sync(LinphoneCore *lc) {
|
||||
#ifdef VCARD_ENABLED
|
||||
|
||||
#else
|
||||
ms_error("vCard isn't available (maybe it wasn't compiled), can't do CardDAV sync");
|
||||
#endif
|
||||
}
|
||||
35
coreapi/carddav.h
Normal file
35
coreapi/carddav.h
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
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
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "linphonecore.h"
|
||||
|
||||
LINPHONE_PUBLIC void linphone_core_start_carddav_sync(LinphoneCore *lc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -7436,3 +7436,13 @@ const char *linphone_stream_type_to_string(const LinphoneStreamType type) {
|
|||
}
|
||||
return "INVALID";
|
||||
}
|
||||
|
||||
void linphone_core_set_carddav_server_url(LinphoneCore *lc, const char *carddav_server_url) {
|
||||
if (lc->carddav_server_url) {
|
||||
ms_free(lc->carddav_server_url);
|
||||
lc->carddav_server_url = NULL;
|
||||
}
|
||||
if (carddav_server_url) {
|
||||
lc->carddav_server_url = ms_strdup(carddav_server_url);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4252,6 +4252,13 @@ LINPHONE_PUBLIC LinphoneTransportType linphone_transport_parse(const char* trans
|
|||
*/
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneCallParams *linphone_core_create_default_call_parameters(LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Sets the CardDAV server URL
|
||||
* @param lc LinphoneCore object
|
||||
* @param carddav_server_url the URL to the CardDAV server
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_set_carddav_server_url(LinphoneCore *lc, const char *carddav_server_url);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -972,6 +972,7 @@ struct _LinphoneCore
|
|||
jmethodID multicast_lock_acquire_id;
|
||||
jmethodID multicast_lock_release_id;
|
||||
#endif
|
||||
char *carddav_server_url;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue