diff --git a/CMakeLists.txt b/CMakeLists.txt index be0eb299f..afc499fe9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -228,7 +228,6 @@ if(MSVC) include_directories(${MSVC_INCLUDE_DIR}) endif() -add_definitions("-DIN_LINPHONE") if(ENABLE_DEBUG_LOGS) add_definitions("-DDEBUG") endif() @@ -307,6 +306,7 @@ endif() add_subdirectory(java) add_subdirectory(coreapi) +add_subdirectory(include) add_subdirectory(share) if(ENABLE_CONSOLE_UI) add_subdirectory(console) diff --git a/console/Makefile.am b/console/Makefile.am index c43570e6f..8ac0f04fe 100644 --- a/console/Makefile.am +++ b/console/Makefile.am @@ -6,7 +6,6 @@ AM_CPPFLAGS=\ -I$(top_srcdir)/include COMMON_CFLAGS=\ - -DIN_LINPHONE \ -D_ORTP_SOURCE \ $(STRICT_OPTIONS) \ $(STRICT_OPTIONS_CC) \ diff --git a/console/commands.c b/console/commands.c index 449af0695..0d51207da 100644 --- a/console/commands.c +++ b/console/commands.c @@ -31,9 +31,9 @@ #endif /*_WIN32_WCE*/ #include #include -#include +#include #include "linphonec.h" -#include "lpconfig.h" +#include #ifndef _WIN32 #include diff --git a/console/linphonec.c b/console/linphonec.c index 248f419dd..9e70c1d90 100644 --- a/console/linphonec.c +++ b/console/linphonec.c @@ -34,7 +34,7 @@ #include #include -#include +#include #include "linphonec.h" #include diff --git a/coreapi/CMakeLists.txt b/coreapi/CMakeLists.txt index c3279b34b..16b55236b 100644 --- a/coreapi/CMakeLists.txt +++ b/coreapi/CMakeLists.txt @@ -30,31 +30,23 @@ if(NOT WIN32) endif() -set(LINPHONE_HEADER_FILES - account_creator.h - buffer.h - call_log.h - call_params.h +set(LINPHONE_PRIVATE_HEADER_FILES + bellesip_sal/sal_impl.h carddav.h - conference.h - content.h - event.h - friendlist.h - linphonecore.h - linphonecore_utils.h - linphonefriend.h - linphonepresence.h - linphone_proxy_config.h - linphone_tunnel.h + conference_private.h + contactprovider.h + contact_providers_priv.h + enum.h + ldap/ldapprovider.h + lime.h lpc2xml.h - lpconfig.h - nat_policy.h + offeranswer.h + private.h + quality_reporting.h ringtoneplayer.h - sipsetup.h sqlite3_bctbx_vfs.h + vcard_private.h xml2lpc.h - xmlrpc.h - vcard.h ) set(LINPHONE_SOURCE_FILES_C @@ -63,7 +55,6 @@ set(LINPHONE_SOURCE_FILES_C authentication.c bellesip_sal/sal_address_impl.c bellesip_sal/sal_impl.c - bellesip_sal/sal_impl.h bellesip_sal/sal_op_call.c bellesip_sal/sal_op_call_transfer.c bellesip_sal/sal_op_events.c @@ -88,7 +79,6 @@ set(LINPHONE_SOURCE_FILES_C ec-calibrator.c echo-tester.c enum.c - enum.h event.c friend.c friendlist.c @@ -101,16 +91,13 @@ set(LINPHONE_SOURCE_FILES_C localplayer.c lpc2xml.c lpconfig.c - lpconfig.h lsd.c message_storage.c misc.c nat_policy.c offeranswer.c - offeranswer.h player.c presence.c - private.h proxy.c quality_reporting.c remote_provisioning.c @@ -202,7 +189,7 @@ 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}) + add_library(linphone-static STATIC ${LINPHONE_HEADER_FILES} ${LINPHONE_PRIVATE_HEADER_FILES} ${LINPHONE_SOURCE_FILES_C} ${LINPHONE_SOURCE_FILES_CXX} ${LINPHONE_SOURCE_FILES_OBJC}) set_target_properties(linphone-static PROPERTIES OUTPUT_NAME linphone) add_dependencies(linphone-static liblinphone-git-version) target_link_libraries(linphone-static ${LIBS}) @@ -218,7 +205,7 @@ if(ENABLE_STATIC) ) endif() if(ENABLE_SHARED) - add_library(linphone SHARED ${LINPHONE_HEADER_FILES} ${LINPHONE_SOURCE_FILES_C} ${LINPHONE_SOURCE_FILES_CXX} ${LINPHONE_SOURCE_FILES_OBJC}) + add_library(linphone SHARED ${LINPHONE_HEADER_FILES} ${LINPHONE_PRIVATE_HEADER_FILES} ${LINPHONE_SOURCE_FILES_C} ${LINPHONE_SOURCE_FILES_CXX} ${LINPHONE_SOURCE_FILES_OBJC}) if(BELCARD_FOUND) if(APPLE) @@ -273,9 +260,4 @@ if(ICONV_FOUND) endif() endif() -install(FILES ${LINPHONE_HEADER_FILES} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/linphone - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ -) - add_subdirectory(help) diff --git a/coreapi/Makefile.am b/coreapi/Makefile.am index a35031e3c..ec52306ca 100644 --- a/coreapi/Makefile.am +++ b/coreapi/Makefile.am @@ -22,34 +22,6 @@ BUILT_SOURCES=$(GITVERSION_FILE) CLEANFILES=$(GITVERSION_FILE) ## Process this file with automake to produce Makefile.in -linphone_includedir=$(includedir)/linphone - -linphone_include_HEADERS=\ - account_creator.h \ - buffer.h \ - call_log.h \ - call_params.h \ - conference.h \ - content.h \ - event.h \ - friendlist.h \ - linphonecore.h \ - linphonecore_utils.h \ - ringtoneplayer.h \ - linphonefriend.h \ - linphonepresence.h \ - linphone_proxy_config.h \ - linphone_tunnel.h \ - lpc2xml.h \ - lpconfig.h \ - nat_policy.h \ - sipsetup.h \ - sqlite3_bctbx_vfs.h \ - xml2lpc.h \ - xmlrpc.h \ - vcard.h \ - carddav.h - lib_LTLIBRARIES=liblinphone.la liblinphone_la_SOURCES=\ @@ -58,6 +30,7 @@ liblinphone_la_SOURCES=\ authentication.c \ buffer.c \ callbacks.c \ + carddav.h \ call_log.c \ call_params.c \ chat.c \ @@ -78,7 +51,7 @@ liblinphone_la_SOURCES=\ linphonecall.c \ linphonecore.c \ localplayer.c \ - lpc2xml.c \ + lpc2xml.c lpc2xml.h \ lime.c lime.h\ lpconfig.c \ lsd.c \ @@ -95,7 +68,8 @@ liblinphone_la_SOURCES=\ sal.c \ siplogin.c \ sipsetup.c \ - xml2lpc.c \ + vcard_private.h \ + xml2lpc.c xml2lpc.h \ xml.c \ xmlrpc.c \ vtables.c \ @@ -165,7 +139,6 @@ liblinphone_la_LIBADD= \ AM_CPPFLAGS=\ - -DIN_LINPHONE \ -I$(top_srcdir) -I$(top_srcdir)/include -I$(builddir) \ $(ORTP_CFLAGS) \ $(MEDIASTREAMER_CFLAGS) \ @@ -173,7 +146,6 @@ AM_CPPFLAGS=\ COMMON_CFLAGS=\ $(STRICT_OPTIONS) \ - -DIN_LINPHONE \ $(SIPSTACK_CFLAGS) \ -DENABLE_TRACE \ -DLOG_DOMAIN=\"LinphoneCore\" \ diff --git a/coreapi/TunnelManager.cc b/coreapi/TunnelManager.cc index acd4d3bd9..eeb24cb7f 100644 --- a/coreapi/TunnelManager.cc +++ b/coreapi/TunnelManager.cc @@ -14,8 +14,8 @@ #include "TunnelManager.hh" #include "ortp/rtpsession.h" -#include "linphonecore.h" -#include "linphonecore_utils.h" +#include "linphone/core.h" +#include "linphone/core_utils.h" #include "private.h" #ifdef ANDROID diff --git a/coreapi/TunnelManager.hh b/coreapi/TunnelManager.hh index 48fb2ec23..d9ca4dcec 100644 --- a/coreapi/TunnelManager.hh +++ b/coreapi/TunnelManager.hh @@ -14,7 +14,7 @@ #include #include #include -#include "linphonecore.h" +#include "linphone/core.h" #include "linphone_tunnel.h" #ifndef USE_BELLESIP diff --git a/coreapi/account_creator.c b/coreapi/account_creator.c index 9b47f4206..66b51da24 100644 --- a/coreapi/account_creator.c +++ b/coreapi/account_creator.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "account_creator.h" +#include "linphone/account_creator.h" #include "private.h" #if !_WIN32 #include "regex.h" diff --git a/coreapi/address.c b/coreapi/address.c index 2b684b5d9..956f89cee 100644 --- a/coreapi/address.c +++ b/coreapi/address.c @@ -17,19 +17,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "linphonecore.h" -#include "lpconfig.h" +#include "linphone/core.h" +#include "linphone/lpconfig.h" #include "private.h" -/** - * @addtogroup linphone_address - * @{ -**/ - -/** - * Constructs a LinphoneAddress object by parsing the user supplied address, - * given as a string. -**/ LinphoneAddress * linphone_address_new(const char *addr){ SalAddress *saddr=sal_address_new(addr); if (saddr==NULL) @@ -37,167 +28,99 @@ LinphoneAddress * linphone_address_new(const char *addr){ return saddr; } -/** - * Clones a LinphoneAddress object. -**/ LinphoneAddress * linphone_address_clone(const LinphoneAddress *addr){ return sal_address_clone(addr); } -/** - * Increment reference count of LinphoneAddress object. -**/ LinphoneAddress * linphone_address_ref(LinphoneAddress *addr){ return sal_address_ref(addr); } -/** - * Decrement reference count of LinphoneAddress object. When dropped to zero, memory is freed. -**/ void linphone_address_unref(LinphoneAddress *addr){ sal_address_unref(addr); } -/** - * Returns the address scheme, normally "sip". -**/ const char *linphone_address_get_scheme(const LinphoneAddress *u){ return sal_address_get_scheme(u); } -/** - * Returns the display name. -**/ const char *linphone_address_get_display_name(const LinphoneAddress* u){ return sal_address_get_display_name(u); } -/** - * Returns the username. -**/ const char *linphone_address_get_username(const LinphoneAddress *u){ return sal_address_get_username(u); } -/** - * Returns the domain name. -**/ const char *linphone_address_get_domain(const LinphoneAddress *u){ return sal_address_get_domain(u); } -/** - * Sets the display name. -**/ +int linphone_address_get_port(const LinphoneAddress *u) { + return sal_address_get_port(u); +} + int linphone_address_set_display_name(LinphoneAddress *u, const char *display_name){ sal_address_set_display_name(u,display_name); return 0; } -/** - * Sets the username. -**/ int linphone_address_set_username(LinphoneAddress *uri, const char *username){ sal_address_set_username(uri,username); return 0; } -/** - * Sets the domain. -**/ int linphone_address_set_domain(LinphoneAddress *uri, const char *host){ sal_address_set_domain(uri,host); return 0; } - -/** - * Sets the port number. -**/ int linphone_address_set_port(LinphoneAddress *uri, int port){ sal_address_set_port(uri,port); return 0; } -/** - * Set a transport. -**/ int linphone_address_set_transport(LinphoneAddress *uri, LinphoneTransportType tp){ sal_address_set_transport(uri,(SalTransport)tp); return 0; } -/** - * Get the transport. -**/ LinphoneTransportType linphone_address_get_transport(const LinphoneAddress *uri){ return (LinphoneTransportType)sal_address_get_transport(uri); } -/** - * Set the value of the method parameter -**/ void linphone_address_set_method_param(LinphoneAddress *addr, const char *method) { sal_address_set_method_param(addr, method); } -/** - * Get the value of the method parameter -**/ const char *linphone_address_get_method_param(const LinphoneAddress *addr) { return sal_address_get_method_param(addr); } -/** - * Removes address's tags and uri headers so that it is displayable to the user. -**/ void linphone_address_clean(LinphoneAddress *uri){ sal_address_clean(uri); } -/** - * Returns the address as a string. - * The returned char * must be freed by the application. Use ms_free(). -**/ char *linphone_address_as_string(const LinphoneAddress *u){ return sal_address_as_string(u); } -/** - * Returns the SIP uri only as a string, that is display name is removed. - * The returned char * must be freed by the application. Use ms_free(). -**/ char *linphone_address_as_string_uri_only(const LinphoneAddress *u){ return sal_address_as_string_uri_only(u); } -/** - * Returns true if address refers to a secure location (sips) - * @deprecated use linphone_address_get_secure() -**/ bool_t linphone_address_is_secure(const LinphoneAddress *uri){ return sal_address_is_secure(uri); } -/** - * Returns true if address refers to a secure location (sips) -**/ bool_t linphone_address_get_secure(const LinphoneAddress *uri){ return sal_address_is_secure(uri); } -/** - * Make the address refer to a secure location (sips scheme) - * @param[in] addr A #LinphoneAddress object - * @param[in] enabled TRUE if address is requested to be secure. -**/ void linphone_address_set_secure(LinphoneAddress *addr, bool_t enabled){ sal_address_set_secure(addr, enabled); } -/** - * returns true if address is a routable sip address - */ bool_t linphone_address_is_sip(const LinphoneAddress *uri){ return sal_address_is_sip(uri); } @@ -208,13 +131,6 @@ static bool_t strings_equals(const char *s1, const char *s2){ return FALSE; } -/** - * Compare two LinphoneAddress ignoring tags and headers, basically just domain, username, and port. - * @param[in] a1 LinphoneAddress object - * @param[in] a2 LinphoneAddress object - * @return Boolean value telling if the LinphoneAddress objects are equal. - * @see linphone_address_equal() -**/ bool_t linphone_address_weak_equal(const LinphoneAddress *a1, const LinphoneAddress *a2){ const char *u1,*u2; const char *h1,*h2; @@ -228,13 +144,6 @@ bool_t linphone_address_weak_equal(const LinphoneAddress *a1, const LinphoneAddr return strings_equals(u1,u2) && strings_equals(h1,h2) && p1==p2; } -/** - * Compare two LinphoneAddress taking the tags and headers into account. - * @param[in] a1 LinphoneAddress object - * @param[in] a2 LinphoneAddress object - * @return Boolean value telling if the LinphoneAddress objects are equal. - * @see linphone_address_weak_equal() - */ bool_t linphone_address_equal(const LinphoneAddress *a1, const LinphoneAddress *a2) { char *s1; char *s2; @@ -249,52 +158,18 @@ bool_t linphone_address_equal(const LinphoneAddress *a1, const LinphoneAddress * return res; } -/** - * Destroys a LinphoneAddress object (actually calls linphone_address_unref()). - * @deprecated Use linphone_address_unref() instead -**/ void linphone_address_destroy(LinphoneAddress *u){ sal_address_unref(u); } -/** - * Get port number as an integer value. - */ - -/** - * Get port number, 0 if not present. - */ -int linphone_address_get_port(const LinphoneAddress *u) { - return sal_address_get_port(u); -} - -/** - * Set the password encoded in the address. - * It is used for basic authentication (not recommended). - * @param addr the LinphoneAddress - * @param passwd the password to set. -**/ void linphone_address_set_password(LinphoneAddress *addr, const char *passwd){ sal_address_set_password(addr,passwd); } -/** - * Get the password encoded in the address. - * It is used for basic authentication (not recommended). - * @param addr the address - * @return the password, if any, NULL otherwise. -**/ const char *linphone_address_get_password(const LinphoneAddress *addr){ return sal_address_get_password(addr); } -/** - * Set a header into the address. - * Headers appear in the URI with '?', such as . - * @param addr the address - * @param header_name the header name - * @param header_value the header value -**/ void linphone_address_set_header(LinphoneAddress *addr, const char *header_name, const char *header_value){ sal_address_set_header(addr,header_name,header_value); } diff --git a/coreapi/authentication.c b/coreapi/authentication.c index 773e31fc0..b998c941c 100644 --- a/coreapi/authentication.c +++ b/coreapi/authentication.c @@ -22,9 +22,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" /** * @addtogroup authentication diff --git a/coreapi/bellesip_sal/sal_op_message.c b/coreapi/bellesip_sal/sal_op_message.c index 533453da4..a17a65194 100644 --- a/coreapi/bellesip_sal/sal_op_message.c +++ b/coreapi/bellesip_sal/sal_op_message.c @@ -18,7 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "sal_impl.h" -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #include "lime.h" #include diff --git a/coreapi/buffer.c b/coreapi/buffer.c index fc1aa47bd..d5ed3afa0 100644 --- a/coreapi/buffer.c +++ b/coreapi/buffer.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index 9e6e359fb..c7f01119e 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -20,10 +20,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "sal/sal.h" -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #include "mediastreamer2/mediastream.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" // stat #ifndef _WIN32 diff --git a/coreapi/carddav.c b/coreapi/carddav.c index b07bb60ba..abc038d3d 100644 --- a/coreapi/carddav.c +++ b/coreapi/carddav.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" LinphoneCardDavContext* linphone_carddav_context_new(LinphoneFriendList *lfl) { @@ -764,4 +764,4 @@ static LinphoneCardDavQuery* linphone_carddav_create_addressbook_multiget_query( void linphone_carddav_pull_vcards(LinphoneCardDavContext *cdc, bctbx_list_t *vcards_to_pull) { LinphoneCardDavQuery *query = linphone_carddav_create_addressbook_multiget_query(cdc, vcards_to_pull); linphone_carddav_send_query(query); -} \ No newline at end of file +} diff --git a/coreapi/carddav.h b/coreapi/carddav.h index 79237632c..508bbb083 100644 --- a/coreapi/carddav.h +++ b/coreapi/carddav.h @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef LINPHONE_CARDDAV_H #define LINPHONE_CARDDAV_H -#include "linphonecore.h" +#include "linphone/core.h" #ifdef __cplusplus extern "C" { @@ -167,4 +167,4 @@ void linphone_carddav_pull_vcards(LinphoneCardDavContext *cdc, MSList *vcards_to } #endif -#endif \ No newline at end of file +#endif diff --git a/coreapi/chat.c b/coreapi/chat.c index 933909121..2123a7cae 100644 --- a/coreapi/chat.c +++ b/coreapi/chat.c @@ -22,9 +22,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" #include "belle-sip/belle-sip.h" #include "ortp/b64.h" #include "lime.h" diff --git a/coreapi/chat_file_transfer.c b/coreapi/chat_file_transfer.c index 6669257d4..0fc974085 100644 --- a/coreapi/chat_file_transfer.c +++ b/coreapi/chat_file_transfer.c @@ -22,7 +22,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #include "lime.h" #include "ortp/b64.h" diff --git a/coreapi/conference_private.h b/coreapi/conference_private.h index eaa649cd1..3f8f836be 100644 --- a/coreapi/conference_private.h +++ b/coreapi/conference_private.h @@ -25,8 +25,8 @@ #ifndef CONFERENCE_PRIVATE_H #define CONFERENCE_PRIVATE_H -#include "linphonecore.h" -#include "conference.h" +#include "linphone/core.h" +#include "linphone/conference.h" #ifdef __cplusplus extern "C" { diff --git a/coreapi/contact_providers_priv.h b/coreapi/contact_providers_priv.h index b3d667df6..9bff75589 100644 --- a/coreapi/contact_providers_priv.h +++ b/coreapi/contact_providers_priv.h @@ -18,7 +18,7 @@ #define CONTACT_PROVIDERS_PRIV_H #include "private.h" -#include "linphonecore.h" +#include "linphone/core.h" /* Base for contact search and contact provider */ diff --git a/coreapi/contactprovider.c b/coreapi/contactprovider.c index ce7991a3e..3ddbab08b 100644 --- a/coreapi/contactprovider.c +++ b/coreapi/contactprovider.c @@ -16,7 +16,7 @@ #include "contact_providers_priv.h" #include "contactprovider.h" -#include +#include /* ############################ * * LinphoneContactSearchRequest * diff --git a/coreapi/contactprovider.h b/coreapi/contactprovider.h index d5c016562..89980616d 100644 --- a/coreapi/contactprovider.h +++ b/coreapi/contactprovider.h @@ -14,7 +14,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "linphonecore.h" +#include "linphone/core.h" /* LinphoneContactSearchRequest */ diff --git a/coreapi/content.c b/coreapi/content.c index a158d2b9f..06645e80b 100644 --- a/coreapi/content.c +++ b/coreapi/content.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" diff --git a/coreapi/dial_plan.c b/coreapi/dial_plan.c index 2c36723d7..6ca2fc0f1 100644 --- a/coreapi/dial_plan.c +++ b/coreapi/dial_plan.c @@ -18,7 +18,7 @@ Copyright (C) 2000 Simon MORLAT (simon.morlat@linphone.org) * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "linphonecore_utils.h" +#include "linphone/core_utils.h" /* * http://en.wikipedia.org/wiki/Telephone_numbering_plan diff --git a/coreapi/dict.c b/coreapi/dict.c index 6909ed9cb..18a23345c 100644 --- a/coreapi/dict.c +++ b/coreapi/dict.c @@ -17,8 +17,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "linphonecore.h" -#include "lpconfig.h" +#include "linphone/core.h" +#include "linphone/lpconfig.h" #include "private.h" #include diff --git a/coreapi/ec-calibrator.c b/coreapi/ec-calibrator.c index 098fb8b4f..c9101745b 100644 --- a/coreapi/ec-calibrator.c +++ b/coreapi/ec-calibrator.c @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "mediastreamer2/mstonedetector.h" #include "mediastreamer2/dtmfgen.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" diff --git a/coreapi/event.c b/coreapi/event.c index 9eae159b8..b1bf58685 100644 --- a/coreapi/event.c +++ b/coreapi/event.c @@ -18,7 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "private.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" const char * linphone_subscription_dir_to_string(LinphoneSubscriptionDir dir){ switch(dir){ diff --git a/coreapi/friend.c b/coreapi/friend.c index b5f93e795..46c966325 100644 --- a/coreapi/friend.c +++ b/coreapi/friend.c @@ -22,9 +22,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" #ifdef SQLITE_STORAGE_ENABLED #ifndef _WIN32 diff --git a/coreapi/friendlist.c b/coreapi/friendlist.c index b51afb345..0a70a22c1 100644 --- a/coreapi/friendlist.c +++ b/coreapi/friendlist.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #include diff --git a/coreapi/help/CMakeLists.txt b/coreapi/help/CMakeLists.txt index 64a18c024..3eb2bece7 100644 --- a/coreapi/help/CMakeLists.txt +++ b/coreapi/help/CMakeLists.txt @@ -69,7 +69,6 @@ if (ENABLE_TOOLS) if (IOS) set(USE_BUNDLE MACOSX_BUNDLE) endif() - add_definitions(-DIN_LINPHONE) file(GLOB EXECUTABLES_SOURCE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c") foreach(EXECUTABLE ${EXECUTABLES_SOURCE}) string(REPLACE ".c" "" EXECUTABLE_NAME ${EXECUTABLE}) diff --git a/coreapi/help/Doxyfile.in b/coreapi/help/Doxyfile.in index f3b62161a..f01cbd771 100644 --- a/coreapi/help/Doxyfile.in +++ b/coreapi/help/Doxyfile.in @@ -771,7 +771,7 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = @top_srcdir@/coreapi \ +INPUT = @top_srcdir@/include/linphone \ @top_srcdir@/coreapi/help # This tag can be used to specify the character encoding of the source files diff --git a/coreapi/help/Makefile.am b/coreapi/help/Makefile.am index 895b1e99b..432415927 100644 --- a/coreapi/help/Makefile.am +++ b/coreapi/help/Makefile.am @@ -95,7 +95,6 @@ AM_CFLAGS=\ -I$(top_srcdir)/coreapi \ $(STRICT_OPTIONS) \ $(STRICT_OPTIONS_CC) \ - -DIN_LINPHONE \ $(ORTP_CFLAGS) \ $(MEDIASTREAMER_CFLAGS) \ -DENABLE_TRACE \ diff --git a/coreapi/help/buddy_status.c b/coreapi/help/buddy_status.c index 002af3770..be2351f75 100644 --- a/coreapi/help/buddy_status.c +++ b/coreapi/help/buddy_status.c @@ -33,11 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ -#ifdef IN_LINPHONE -#include "linphonecore.h" -#else -#include "linphone/linphonecore.h" -#endif +#include "linphone/core.h" #include diff --git a/coreapi/help/chatroom.c b/coreapi/help/chatroom.c index df1794664..52a71faab 100644 --- a/coreapi/help/chatroom.c +++ b/coreapi/help/chatroom.c @@ -32,11 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ -#ifdef IN_LINPHONE -#include "linphonecore.h" -#else -#include "linphone/linphonecore.h" -#endif +#include "linphone/core.h" #include diff --git a/coreapi/help/filetransfer.c b/coreapi/help/filetransfer.c index a6bfbd346..6dc9effdf 100644 --- a/coreapi/help/filetransfer.c +++ b/coreapi/help/filetransfer.c @@ -32,11 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ -#ifdef IN_LINPHONE -#include "linphonecore.h" -#else -#include "linphone/linphonecore.h" -#endif +#include "linphone/core.h" #include diff --git a/coreapi/help/helloworld.c b/coreapi/help/helloworld.c index bb11176dc..19f433eab 100644 --- a/coreapi/help/helloworld.c +++ b/coreapi/help/helloworld.c @@ -27,11 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @include helloworld.c */ -#ifdef IN_LINPHONE -#include "linphonecore.h" -#else -#include "linphone/linphonecore.h" -#endif + +#include "linphone/core.h" #include diff --git a/coreapi/help/notify.c b/coreapi/help/notify.c index f909d439f..ebde5fd53 100644 --- a/coreapi/help/notify.c +++ b/coreapi/help/notify.c @@ -36,11 +36,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #define DEBUG 1 -#ifdef IN_LINPHONE -#include "linphonecore.h" -#else -#include "linphone/linphonecore.h" -#endif +#include "linphone/core.h" #include diff --git a/coreapi/help/realtimetext_receiver.c b/coreapi/help/realtimetext_receiver.c index 69f16ef9d..9d8acf5dc 100644 --- a/coreapi/help/realtimetext_receiver.c +++ b/coreapi/help/realtimetext_receiver.c @@ -26,11 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @include realtimetext_sender.c */ -#ifdef IN_LINPHONE -#include "linphonecore.h" -#else -#include "linphone/linphonecore.h" -#endif + +#include "linphone/core.h" #include diff --git a/coreapi/help/realtimetext_sender.c b/coreapi/help/realtimetext_sender.c index 64493008d..74de5a320 100644 --- a/coreapi/help/realtimetext_sender.c +++ b/coreapi/help/realtimetext_sender.c @@ -27,11 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @include realtimetext_sender.c */ -#ifdef IN_LINPHONE -#include "linphonecore.h" -#else -#include "linphone/linphonecore.h" -#endif + +#include "linphone/core.h" #include diff --git a/coreapi/help/registration.c b/coreapi/help/registration.c index 6567f2c49..5f9973b7a 100644 --- a/coreapi/help/registration.c +++ b/coreapi/help/registration.c @@ -33,11 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ -#ifdef IN_LINPHONE -#include "linphonecore.h" -#else -#include "linphone/linphonecore.h" -#endif +#include "linphone/core.h" #include diff --git a/coreapi/info.c b/coreapi/info.c index 87f1bd199..0e60f45ef 100644 --- a/coreapi/info.c +++ b/coreapi/info.c @@ -23,9 +23,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" struct _LinphoneInfoMessage{ diff --git a/coreapi/ldap/ldapprovider.c b/coreapi/ldap/ldapprovider.c index 4cd031a88..b098f88ad 100644 --- a/coreapi/ldap/ldapprovider.c +++ b/coreapi/ldap/ldapprovider.c @@ -16,7 +16,7 @@ #include "ldapprovider.h" #include "private.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" #include "contact_providers_priv.h" #include "mediastreamer2/mscommon.h" #include diff --git a/coreapi/lime.c b/coreapi/lime.c index 063331bd3..3f25951ee 100644 --- a/coreapi/lime.c +++ b/coreapi/lime.c @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #endif #ifdef HAVE_LIME -#include "linphonecore.h" +#include "linphone/core.h" #include "bctoolbox/crypto.h" /** diff --git a/coreapi/linphone_tunnel.cc b/coreapi/linphone_tunnel.cc index 699de87b5..83ca6c60d 100644 --- a/coreapi/linphone_tunnel.cc +++ b/coreapi/linphone_tunnel.cc @@ -25,9 +25,9 @@ #include "TunnelManager.hh" #include "linphone_tunnel.h" -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" LinphoneTunnel* linphone_core_get_tunnel(const LinphoneCore *lc){ return lc->tunnel; diff --git a/coreapi/linphone_tunnel_config.c b/coreapi/linphone_tunnel_config.c index 988b114a1..1c0ee4b8b 100644 --- a/coreapi/linphone_tunnel_config.c +++ b/coreapi/linphone_tunnel_config.c @@ -20,7 +20,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "linphone_tunnel.h" +#include "linphone/tunnel.h" #include "private.h" diff --git a/coreapi/linphone_tunnel_stubs.c b/coreapi/linphone_tunnel_stubs.c index 02d2ac1c2..8c58e0d48 100644 --- a/coreapi/linphone_tunnel_stubs.c +++ b/coreapi/linphone_tunnel_stubs.c @@ -23,10 +23,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "linphone_tunnel.h" -#include "linphonecore.h" +#include "linphone/tunnel.h" +#include "linphone/core.h" #include "private.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" LinphoneTunnel* linphone_core_get_tunnel(const LinphoneCore *lc){ diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index bbf1b27ff..bcbba4d86 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -21,9 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifdef _WIN32 #include #endif -#include "linphonecore.h" -#include "sipsetup.h" -#include "lpconfig.h" +#include "linphone/core.h" +#include "linphone/sipsetup.h" +#include "linphone/lpconfig.h" #include "private.h" #include "conference_private.h" @@ -4192,10 +4192,6 @@ bool_t linphone_call_media_in_progress(LinphoneCall *call){ return ret; } -/** - * Get the local loss rate since last report - * @return The sender loss rate -**/ float linphone_call_stats_get_sender_loss_rate(const LinphoneCallStats *stats) { const report_block_t *srb = NULL; @@ -4213,10 +4209,6 @@ float linphone_call_stats_get_sender_loss_rate(const LinphoneCallStats *stats) { return 100.0f * report_block_get_fraction_lost(srb) / 256.0f; } -/** - * Gets the remote reported loss rate since last report - * @return The receiver loss rate -**/ float linphone_call_stats_get_receiver_loss_rate(const LinphoneCallStats *stats) { const report_block_t *rrb = NULL; @@ -4234,10 +4226,6 @@ float linphone_call_stats_get_receiver_loss_rate(const LinphoneCallStats *stats) return 100.0f * report_block_get_fraction_lost(rrb) / 256.0f; } -/** - * Gets the local interarrival jitter - * @return The interarrival jitter at last emitted sender report -**/ float linphone_call_stats_get_sender_interarrival_jitter(const LinphoneCallStats *stats, LinphoneCall *call) { const LinphoneCallParams *params; const PayloadType *pt; @@ -4266,10 +4254,6 @@ float linphone_call_stats_get_sender_interarrival_jitter(const LinphoneCallStats return (float)report_block_get_interarrival_jitter(srb) / (float)pt->clock_rate; } -/** - * Gets the remote reported interarrival jitter - * @return The interarrival jitter at last received receiver report -**/ float linphone_call_stats_get_receiver_interarrival_jitter(const LinphoneCallStats *stats, LinphoneCall *call) { const LinphoneCallParams *params; const PayloadType *pt; @@ -4309,46 +4293,22 @@ rtp_stats_t linphone_call_stats_get_rtp_stats(const LinphoneCallStats *stats) { return rtp_stats; } -/** - * Gets the cumulative number of late packets - * @return The cumulative number of late packets -**/ uint64_t linphone_call_stats_get_late_packets_cumulative_number(const LinphoneCallStats *stats, LinphoneCall *call) { return linphone_call_stats_get_rtp_stats(stats).outoftime; } -/** - * Get the bandwidth measurement of the received stream, expressed in kbit/s, including IP/UDP/RTP headers. - * @param[in] stats LinphoneCallStats object - * @return The bandwidth measurement of the received stream in kbit/s. - */ float linphone_call_stats_get_download_bandwidth(const LinphoneCallStats *stats) { return stats->download_bandwidth; } -/** - * Get the bandwidth measurement of the sent stream, expressed in kbit/s, including IP/UDP/RTP headers. - * @param[in] stats LinphoneCallStats object - * @return The bandwidth measurement of the sent stream in kbit/s. - */ float linphone_call_stats_get_upload_bandwidth(const LinphoneCallStats *stats) { return stats->upload_bandwidth; } -/** - * Get the state of ICE processing. - * @param[in] stats LinphoneCallStats object - * @return The state of ICE processing. - */ LinphoneIceState linphone_call_stats_get_ice_state(const LinphoneCallStats *stats) { return stats->ice_state; } -/** - * Get the state of uPnP processing. - * @param[in] stats LinphoneCallStats object - * @return The state of uPnP processing. - */ LinphoneUpnpState linphone_call_stats_get_upnp_state(const LinphoneCallStats *stats) { return stats->upnp_state; } diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index d560bc8fc..340c6d37f 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -18,9 +18,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "linphonecore.h" -#include "sipsetup.h" -#include "lpconfig.h" +#include "linphone/core.h" +#include "linphone/sipsetup.h" +#include "linphone/lpconfig.h" #include "private.h" #include "quality_reporting.h" #include "lime.h" diff --git a/coreapi/lpc2xml.h b/coreapi/lpc2xml.h index 067833160..60380cece 100644 --- a/coreapi/lpc2xml.h +++ b/coreapi/lpc2xml.h @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef LPC2XML_H_ #define LPC2XML_H_ -#include "lpconfig.h" +#include "linphone/lpconfig.h" typedef struct _lpc2xml_context lpc2xml_context; diff --git a/coreapi/lpconfig.c b/coreapi/lpconfig.c index 38bd74125..9c69b932e 100644 --- a/coreapi/lpconfig.c +++ b/coreapi/lpconfig.c @@ -24,7 +24,7 @@ #define MAX_LEN 16384 -#include "linphonecore.h" +#include "linphone/core.h" #include "bctoolbox/vfs.h" #include @@ -56,7 +56,7 @@ #define lp_new0(type,n) (type*)calloc(sizeof(type),n) -#include "lpconfig.h" +#include "linphone/lpconfig.h" #include "lpc2xml.h" typedef struct _LpItem{ diff --git a/coreapi/lsd.c b/coreapi/lsd.c index b88b21bf0..5bd11026c 100644 --- a/coreapi/lsd.c +++ b/coreapi/lsd.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. simultaneous sound access. */ -#include "linphonecore_utils.h" +#include "linphone/core_utils.h" #include "private.h" #include "mediastreamer2/msticker.h" #include "mediastreamer2/mssndcard.h" diff --git a/coreapi/message_storage.c b/coreapi/message_storage.c index c85402c26..608b28654 100644 --- a/coreapi/message_storage.c +++ b/coreapi/message_storage.c @@ -18,7 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "private.h" -#include "linphonecore.h" +#include "linphone/core.h" #ifdef SQLITE_STORAGE_ENABLED diff --git a/coreapi/misc.c b/coreapi/misc.c index 7f586108c..b978e0f18 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "private.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" #include "mediastreamer2/mediastream.h" #include #include diff --git a/coreapi/nat_policy.c b/coreapi/nat_policy.c index d7f176beb..e5c234275 100644 --- a/coreapi/nat_policy.c +++ b/coreapi/nat_policy.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" diff --git a/coreapi/plugins/buddylookup/src/lookup.c b/coreapi/plugins/buddylookup/src/lookup.c index 094da0dce..7841bea22 100644 --- a/coreapi/plugins/buddylookup/src/lookup.c +++ b/coreapi/plugins/buddylookup/src/lookup.c @@ -1,10 +1,5 @@ -#ifdef IN_LINPHONE -#include "linphonecore.h" -#include "lpconfig.h" -#else -#include +#include #include -#endif #include #define SERIALIZE_HTTPS 0 diff --git a/coreapi/presence.c b/coreapi/presence.c index 7d3a11336..4b34cb2d8 100644 --- a/coreapi/presence.c +++ b/coreapi/presence.c @@ -17,10 +17,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" -#include "lpconfig.h" -#include "linphonepresence.h" +#include "linphone/lpconfig.h" +#include "linphone/presence.h" diff --git a/coreapi/private.h b/coreapi/private.h index 432b63fc8..1bbf7b8d9 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -25,17 +25,18 @@ #ifndef _PRIVATE_H #define _PRIVATE_H -#include "linphonecore.h" -#include "linphonefriend.h" -#include "friendlist.h" -#include "linphone_tunnel.h" -#include "linphonecore_utils.h" -#include "conference.h" +#include "linphone/core.h" +#include "linphone/friend.h" +#include "linphone/friendlist.h" +#include "linphone/tunnel.h" +#include "linphone/core_utils.h" +#include "linphone/conference.h" #include "sal/sal.h" -#include "sipsetup.h" +#include "linphone/sipsetup.h" #include "quality_reporting.h" #include "ringtoneplayer.h" -#include "vcard.h" +#include "vcard_private.h" +#include "carddav.h" #include "bctoolbox/port.h" #include "bctoolbox/vfs.h" diff --git a/coreapi/proxy.c b/coreapi/proxy.c index 6203f1f19..c4daca873 100644 --- a/coreapi/proxy.c +++ b/coreapi/proxy.c @@ -18,10 +18,10 @@ Copyright (C) 2000 Simon MORLAT (simon.morlat@linphone.org) * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "linphonecore.h" -#include "linphonecore_utils.h" -#include "sipsetup.h" -#include "lpconfig.h" +#include "linphone/core.h" +#include "linphone/core_utils.h" +#include "linphone/sipsetup.h" +#include "linphone/lpconfig.h" #include "private.h" #include "mediastreamer2/mediastream.h" #include "enum.h" diff --git a/coreapi/quality_reporting.c b/coreapi/quality_reporting.c index ecf301ca7..33a9121df 100644 --- a/coreapi/quality_reporting.c +++ b/coreapi/quality_reporting.c @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "config.h" #endif -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #include "sal/sal.h" #include "ortp/rtpsession.h" diff --git a/coreapi/quality_reporting.h b/coreapi/quality_reporting.h index a707a298b..155dec2ee 100644 --- a/coreapi/quality_reporting.h +++ b/coreapi/quality_reporting.h @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef quality_reporting_h #define quality_reporting_h -#include "linphonecore.h" +#include "linphone/core.h" #include "sal/sal.h" #ifdef __cplusplus diff --git a/coreapi/siplogin.c b/coreapi/siplogin.c index 57c97e7f3..d004eac23 100644 --- a/coreapi/siplogin.c +++ b/coreapi/siplogin.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #include diff --git a/coreapi/sipsetup.c b/coreapi/sipsetup.c index c36ae3713..58f3bb124 100644 --- a/coreapi/sipsetup.c +++ b/coreapi/sipsetup.c @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "config.h" #endif -#include "linphonecore.h" +#include "linphone/core.h" extern SipSetup linphone_sip_login; static SipSetup *all_sip_setups[]={ diff --git a/coreapi/vcard.cc b/coreapi/vcard.cc index 9d99efa78..777378a3f 100644 --- a/coreapi/vcard.cc +++ b/coreapi/vcard.cc @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "belcard/belcard_parser.hpp" #include "sal/sal.h" #include -#include "linphonecore.h" +#include "linphone/core.h" #define VCARD_MD5_HASH_SIZE 16 @@ -399,4 +399,4 @@ void linphone_vcard_clean_cache(LinphoneVcard *vCard) { #ifdef __cplusplus } -#endif \ No newline at end of file +#endif diff --git a/coreapi/vcard_private.h b/coreapi/vcard_private.h new file mode 100644 index 000000000..c76575dca --- /dev/null +++ b/coreapi/vcard_private.h @@ -0,0 +1,97 @@ +/* +vcard_private.h +Copyright (C) 2010-2016 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + + +#ifndef LINPHONE_VCARD_PRIVATE_H +#define LINPHONE_VCARD_PRIVATE_H + +#include "linphone/vcard.h" + +/** + * The LinphoneVcardContext object. + */ +typedef struct _LinphoneVcardContext LinphoneVcardContext; + +/** + * Creates a vCard context to reuse the same BelCardParser object + * @return a new LinphoneVcardContext object + */ +LINPHONE_PUBLIC LinphoneVcardContext* linphone_vcard_context_new(void); + +/** + * Destroys the vCard context + * @param[in] context a LinphoneVcardContext object + */ +LINPHONE_PUBLIC void linphone_vcard_context_destroy(LinphoneVcardContext *context); + +/** + * Gets the user data set in the LinphoneVcardContext + * @param[in] context a LinphoneVcardContext object + * @return the user data pointer + */ +LINPHONE_PUBLIC void* linphone_vcard_context_get_user_data(const LinphoneVcardContext *context); + +/** + * Sets the user data in the LinphoneVcardContext + * @param[in] context a LinphoneVcardContext object + * @param[in] data the user data pointer + */ +LINPHONE_PUBLIC void linphone_vcard_context_set_user_data(LinphoneVcardContext *context, void *data); + +/** + * Uses belcard to parse the content of a file and returns all the vcards it contains as LinphoneVcards, or NULL if it contains none. + * @param[in] context the vCard context to use (speed up the process by not creating a Belcard parser each time) + * @param[in] file the path to the file to parse + * @return \bctbx_list{LinphoneVcard} + */ +LINPHONE_PUBLIC bctbx_list_t* linphone_vcard_context_get_vcard_list_from_file(LinphoneVcardContext *context, const char *file); + +/** + * Uses belcard to parse the content of a buffer and returns all the vcards it contains as LinphoneVcards, or NULL if it contains none. + * @param[in] context the vCard context to use (speed up the process by not creating a Belcard parser each time) + * @param[in] buffer the buffer to parse + * @return \bctbx_list{LinphoneVcard} + */ +LINPHONE_PUBLIC bctbx_list_t* linphone_vcard_context_get_vcard_list_from_buffer(LinphoneVcardContext *context, const char *buffer); + +/** + * Uses belcard to parse the content of a buffer and returns one vCard if possible, or NULL otherwise. + * @param[in] context the vCard context to use (speed up the process by not creating a Belcard parser each time) + * @param[in] buffer the buffer to parse + * @return a LinphoneVcard if one could be parsed, or NULL otherwise + */ +LINPHONE_PUBLIC LinphoneVcard* linphone_vcard_context_get_vcard_from_buffer(LinphoneVcardContext *context, const char *buffer); + + +/** + * Computes the md5 hash for the vCard + * @param[in] vCard the LinphoneVcard + */ +void linphone_vcard_compute_md5_hash(LinphoneVcard *vCard); + +/** + * Compares the previously computed md5 hash (using linphone_vcard_compute_md5_hash) with the current one + * @param[in] vCard the LinphoneVcard + * @return 0 if the md5 hasn't changed, 1 otherwise + */ +bool_t linphone_vcard_compare_md5_hash(LinphoneVcard *vCard); + +void linphone_vcard_clean_cache(LinphoneVcard *vCard); + +#endif /* LINPHONE_VCARD_PRIVATE_H */ diff --git a/coreapi/vcard_stubs.c b/coreapi/vcard_stubs.c index 70920e5ae..68c6bd9f2 100644 --- a/coreapi/vcard_stubs.c +++ b/coreapi/vcard_stubs.c @@ -17,8 +17,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "vcard.h" -#include "linphonecore.h" +#include "linphone/core.h" +#include "vcard_private.h" struct _LinphoneVcardContext { void *user_data; diff --git a/coreapi/xml2lpc.h b/coreapi/xml2lpc.h index 3a2406671..5042511c7 100644 --- a/coreapi/xml2lpc.h +++ b/coreapi/xml2lpc.h @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef XML2LPC_H_ #define XML2LPC_H_ -#include "lpconfig.h" +#include "linphone/lpconfig.h" typedef struct _xml2lpc_context xml2lpc_context; diff --git a/coreapi/xmlrpc.c b/coreapi/xmlrpc.c index bd74447ad..e65587d91 100644 --- a/coreapi/xmlrpc.c +++ b/coreapi/xmlrpc.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #include diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 6672779ed..e68d32fb9 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -93,8 +93,8 @@ linphone_daemon_LDADD=$(top_builddir)/coreapi/liblinphone.la $(READLINE_LIBS) \ $(LIBXML2_LIBS) \ $(BCTOOLBOX_LIBS) -AM_CFLAGS=$(READLINE_CFLAGS) -DIN_LINPHONE $(STRICT_OPTIONS) -AM_CXXFLAGS=$(READLINE_CXXFLAGS) -DIN_LINPHONE $(STRICT_OPTIONS) +AM_CFLAGS=$(READLINE_CFLAGS) $(STRICT_OPTIONS) +AM_CXXFLAGS=$(READLINE_CXXFLAGS) $(STRICT_OPTIONS) INCLUDES = \ -I$(top_srcdir) \ diff --git a/daemon/commands/register.cc b/daemon/commands/register.cc index 5ef151d73..09c5d41a0 100644 --- a/daemon/commands/register.cc +++ b/daemon/commands/register.cc @@ -18,9 +18,9 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "register.h" -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" #include diff --git a/daemon/daemon.h b/daemon/daemon.h index 153c33c03..40813adf9 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -20,8 +20,8 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #ifndef DAEMON_H_ #define DAEMON_H_ -#include -#include +#include +#include #include #include #include diff --git a/gtk/Makefile.am b/gtk/Makefile.am index cbc6ede87..4f49da8d7 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -100,7 +100,7 @@ endif endif -AM_CPPFLAGS= -DIN_LINPHONE -I$(top_srcdir)/coreapi/ -I$(top_builddir)/coreapi/ \ +AM_CPPFLAGS= -I$(top_srcdir)/coreapi/ -I$(top_builddir)/coreapi/ \ $(MEDIASTREAMER_CFLAGS) \ $(ORTP_CFLAGS) $(BELLESIP_CFLAGS) \ $(STRICT_OPTIONS) $(STRICT_OPTIONS_CC) $(LIBGTK_CFLAGS) $(LIBGTKMAC_CFLAGS) $(IPV6_CFLAGS) \ diff --git a/gtk/audio_assistant.c b/gtk/audio_assistant.c index 418931bc9..b9f6d7241 100644 --- a/gtk/audio_assistant.c +++ b/gtk/audio_assistant.c @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include #include "linphone.h" -#include "linphonecore_utils.h" +#include "linphone/core_utils.h" #include "mediastreamer2/mediastream.h" #include "mediastreamer2/msvolume.h" diff --git a/gtk/buddylookup.c b/gtk/buddylookup.c index 1831acb04..73d8780db 100644 --- a/gtk/buddylookup.c +++ b/gtk/buddylookup.c @@ -18,7 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "linphone.h" -#include "sipsetup.h" +#include "linphone/sipsetup.h" static void linphone_gtk_display_lookup_results(GtkWidget *w, const bctbx_list_t *results); diff --git a/gtk/config-fetching.c b/gtk/config-fetching.c index 6e3dbef91..59a40a0ca 100644 --- a/gtk/config-fetching.c +++ b/gtk/config-fetching.c @@ -18,7 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "linphone.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" void linphone_gtk_set_configuration_uri(void){ diff --git a/gtk/linphone.h b/gtk/linphone.h index 141a3dab7..cbc4fe839 100644 --- a/gtk/linphone.h +++ b/gtk/linphone.h @@ -38,7 +38,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // alloca is already defined by gtk #undef alloca #endif -#include "linphonecore.h" +#include "linphone/core.h" #include "ldap/ldapprovider.h" @@ -376,4 +376,4 @@ LINPHONE_PUBLIC void linphone_gtk_mark_chat_read(LinphoneChatRoom *cr); LINPHONE_PUBLIC void linphone_gtk_update_badge_count(); #endif -LINPHONE_PUBLIC gboolean linphone_gtk_on_key_press(GtkWidget *widget, GdkEvent *event, gpointer user_data); \ No newline at end of file +LINPHONE_PUBLIC gboolean linphone_gtk_on_key_press(GtkWidget *widget, GdkEvent *event, gpointer user_data); diff --git a/gtk/main.c b/gtk/main.c index 5e37d16e0..533e27aeb 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #define VIDEOSELFVIEW_DEFAULT 0 #include "linphone.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" #include "liblinphone_gitversion.h" #include diff --git a/gtk/propertybox.c b/gtk/propertybox.c index 470196d0f..ddd8d33b5 100644 --- a/gtk/propertybox.c +++ b/gtk/propertybox.c @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "linphone.h" #include "linphone_tunnel.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" #include "config.h" void linphone_gtk_fill_combo_box(GtkWidget *combo, const char **devices, const char *selected, DeviceCap cap){ diff --git a/gtk/setupwizard.h b/gtk/setupwizard.h index 8b3493c4e..ac833f20e 100644 --- a/gtk/setupwizard.h +++ b/gtk/setupwizard.h @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef SETUP_WIZARD_H #define SETUP_WIZARD_H -#include "sipsetup.h" +#include "linphone/sipsetup.h" LINPHONE_PUBLIC void linphone_gtk_show_assistant(void); LINPHONE_PUBLIC void linphone_gtk_assistant_prepare(GtkWidget *assistant); @@ -32,4 +32,4 @@ LINPHONE_PUBLIC void linphone_gtk_account_creation_username_changed(GtkEntry *en LINPHONE_PUBLIC void linphone_gtk_account_creation_password_changed(GtkEntry *entry); LINPHONE_PUBLIC void linphone_gtk_account_creation_email_changed(GtkEntry *entry); -#endif \ No newline at end of file +#endif diff --git a/gtk/support.c b/gtk/support.c index 0321c196f..54c7c4075 100644 --- a/gtk/support.c +++ b/gtk/support.c @@ -1,6 +1,6 @@ #include "linphone.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" static GList *pixmaps_directories = NULL; diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt new file mode 100644 index 000000000..1d74a52c4 --- /dev/null +++ b/include/CMakeLists.txt @@ -0,0 +1,64 @@ +############################################################################ +# CMakeLists.txt +# Copyright (C) 2010-2016 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. +# +############################################################################ + +set(HEADER_FILES + account_creator.h + address.h + buffer.h + call_log.h + call_params.h + call_stats.h + conference.h + content.h + core.h + core_utils.h + event.h + friend.h + friendlist.h + lpconfig.h + nat_policy.h + presence.h + proxy_config.h + sipsetup.h + tunnel.h + vcard.h + xmlrpc.h + + # Deprecated header files + linphonecore.h + linphonecore_utils.h + linphonefriend.h + linphonepresence.h + linphone_proxy_config.h + linphone_tunnel.h +) + +set(LINPHONE_HEADER_FILES ) +foreach(HEADER_FILE ${HEADER_FILES}) + list(APPEND LINPHONE_HEADER_FILES "${CMAKE_CURRENT_LIST_DIR}/linphone/${HEADER_FILE}") +endforeach() +set(LINPHONE_HEADER_FILES ${LINPHONE_HEADER_FILES} PARENT_SCOPE) + +install(FILES ${LINPHONE_HEADER_FILES} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/linphone + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/include/Makefile.am b/include/Makefile.am index 0c6cc77b0..2904eeed4 100755 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1 +1,2 @@ EXTRA_DIST=sal/sal.h +SUBDIRS=linphone diff --git a/include/linphone/Makefile.am b/include/linphone/Makefile.am new file mode 100644 index 000000000..e54065de6 --- /dev/null +++ b/include/linphone/Makefile.am @@ -0,0 +1,33 @@ +linphone_includedir=$(includedir)/linphone + +linphone_include_HEADERS=\ + account_creator.h \ + address.h \ + buffer.h \ + call_log.h \ + call_params.h \ + call_stats.h \ + conference.h \ + content.h \ + core.h \ + core_utils.h \ + event.h \ + friend.h \ + friendlist.h \ + lpconfig.h \ + nat_policy.h \ + presence.h \ + proxy_config.h \ + sipsetup.h \ + tunnel.h \ + vcard.h \ + xmlrpc.h \ + \ + linphonecore.h \ + linphonecore_utils.h \ + linphonefriend.h \ + linphonepresence.h \ + linphone_proxy_config.h \ + linphone_tunnel.h + +EXTRA_DIST=$(linphone_include_HEADERS) diff --git a/coreapi/account_creator.h b/include/linphone/account_creator.h similarity index 100% rename from coreapi/account_creator.h rename to include/linphone/account_creator.h diff --git a/include/linphone/address.h b/include/linphone/address.h new file mode 100644 index 000000000..b717741bd --- /dev/null +++ b/include/linphone/address.h @@ -0,0 +1,244 @@ +/* +address.h +Copyright (C) 2010-2016 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#ifndef LINPHONE_ADDRESS_H +#define LINPHONE_ADDRESS_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @addtogroup linphone_address + * @{ + */ + +/** + * Object that represents a SIP address. + * + * The LinphoneAddress is an opaque object to represents SIP addresses, ie + * the content of SIP's 'from' and 'to' headers. + * A SIP address is made of display name, username, domain name, port, and various + * uri headers (such as tags). It looks like 'Alice '. + * The LinphoneAddress has methods to extract and manipulate all parts of the address. + * When some part of the address (for example the username) is empty, the accessor methods + * return NULL. + */ +typedef struct SalAddress LinphoneAddress; + +/** + * Constructs a LinphoneAddress object by parsing the user supplied address, + * given as a string. +**/ +LINPHONE_PUBLIC LinphoneAddress * linphone_address_new(const char *addr); + +/** + * Clones a LinphoneAddress object. +**/ +LINPHONE_PUBLIC LinphoneAddress * linphone_address_clone(const LinphoneAddress *addr); + +/** + * Increment reference count of LinphoneAddress object. +**/ +LINPHONE_PUBLIC LinphoneAddress * linphone_address_ref(LinphoneAddress *addr); + +/** + * Decrement reference count of LinphoneAddress object. When dropped to zero, memory is freed. +**/ +LINPHONE_PUBLIC void linphone_address_unref(LinphoneAddress *addr); + +/** + * Returns the address scheme, normally "sip". +**/ +LINPHONE_PUBLIC const char *linphone_address_get_scheme(const LinphoneAddress *u); + +/** + * Returns the display name. +**/ +LINPHONE_PUBLIC const char *linphone_address_get_display_name(const LinphoneAddress* u); + +/** + * Returns the username. +**/ +LINPHONE_PUBLIC const char *linphone_address_get_username(const LinphoneAddress *u); + +/** + * Returns the domain name. +**/ +LINPHONE_PUBLIC const char *linphone_address_get_domain(const LinphoneAddress *u); + +/** + * Get port number as an integer value, 0 if not present. + */ +LINPHONE_PUBLIC int linphone_address_get_port(const LinphoneAddress *u); + +/** + * Sets the display name. +**/ +LINPHONE_PUBLIC int linphone_address_set_display_name(LinphoneAddress *u, const char *display_name); + +/** + * Sets the username. +**/ +LINPHONE_PUBLIC int linphone_address_set_username(LinphoneAddress *uri, const char *username); + +/** + * Sets the domain. +**/ +LINPHONE_PUBLIC int linphone_address_set_domain(LinphoneAddress *uri, const char *host); + +/** + * Sets the port number. +**/ +LINPHONE_PUBLIC int linphone_address_set_port(LinphoneAddress *uri, int port); + +/** + * Set a transport. +**/ +LINPHONE_PUBLIC int linphone_address_set_transport(LinphoneAddress *uri,LinphoneTransportType type); + +/** + * Removes address's tags and uri headers so that it is displayable to the user. +**/ +LINPHONE_PUBLIC void linphone_address_clean(LinphoneAddress *uri); + +/** + * Returns true if address refers to a secure location (sips) + * @deprecated use linphone_address_get_secure() +**/ +LINPHONE_PUBLIC bool_t linphone_address_is_secure(const LinphoneAddress *addr); + +/** + * Returns true if address refers to a secure location (sips) +**/ +LINPHONE_PUBLIC bool_t linphone_address_get_secure(const LinphoneAddress *addr); + +/** + * Make the address refer to a secure location (sips scheme) + * @param[in] addr A #LinphoneAddress object + * @param[in] enabled TRUE if address is requested to be secure. +**/ +LINPHONE_PUBLIC void linphone_address_set_secure(LinphoneAddress *addr, bool_t enabled); + +/** + * returns true if address is a routable sip address + */ +LINPHONE_PUBLIC bool_t linphone_address_is_sip(const LinphoneAddress *uri); + +/** + * Get the transport. +**/ +LINPHONE_PUBLIC LinphoneTransportType linphone_address_get_transport(const LinphoneAddress *uri); + +/** + * Get the value of the method parameter +**/ +LINPHONE_PUBLIC const char *linphone_address_get_method_param(const LinphoneAddress *addr); + +/** + * Set the value of the method parameter +**/ +LINPHONE_PUBLIC void linphone_address_set_method_param(LinphoneAddress *addr, const char *method); + +/** + * Returns the address as a string. + * The returned char * must be freed by the application. Use ms_free(). +**/ +LINPHONE_PUBLIC char *linphone_address_as_string(const LinphoneAddress *u); + +/** + * Returns the SIP uri only as a string, that is display name is removed. + * The returned char * must be freed by the application. Use ms_free(). +**/ +LINPHONE_PUBLIC char *linphone_address_as_string_uri_only(const LinphoneAddress *u); + +/** + * Compare two LinphoneAddress ignoring tags and headers, basically just domain, username, and port. + * @param[in] a1 LinphoneAddress object + * @param[in] a2 LinphoneAddress object + * @return Boolean value telling if the LinphoneAddress objects are equal. + * @see linphone_address_equal() +**/ +LINPHONE_PUBLIC bool_t linphone_address_weak_equal(const LinphoneAddress *a1, const LinphoneAddress *a2); + +/** + * Compare two LinphoneAddress taking the tags and headers into account. + * @param[in] a1 LinphoneAddress object + * @param[in] a2 LinphoneAddress object + * @return Boolean value telling if the LinphoneAddress objects are equal. + * @see linphone_address_weak_equal() + */ +LINPHONE_PUBLIC bool_t linphone_address_equal(const LinphoneAddress *a1, const LinphoneAddress *a2); + +/** + * Set the password encoded in the address. + * It is used for basic authentication (not recommended). + * @param addr the LinphoneAddress + * @param passwd the password to set. +**/ +LINPHONE_PUBLIC void linphone_address_set_password(LinphoneAddress *addr, const char *passwd); + +/** + * Get the password encoded in the address. + * It is used for basic authentication (not recommended). + * @param addr the address + * @return the password, if any, NULL otherwise. +**/ +LINPHONE_PUBLIC const char *linphone_address_get_password(const LinphoneAddress *addr); + +/** + * Set a header into the address. + * Headers appear in the URI with '?', such as \. + * @param addr the address + * @param header_name the header name + * @param header_value the header value +**/ +LINPHONE_PUBLIC void linphone_address_set_header(LinphoneAddress *addr, const char *header_name, const char *header_value); + +LINPHONE_PUBLIC bool_t linphone_address_has_param(const LinphoneAddress *addr, const char *name); + +LINPHONE_PUBLIC const char * linphone_address_get_param(const LinphoneAddress *addr, const char *name); + +LINPHONE_PUBLIC void linphone_address_set_param(LinphoneAddress *addr, const char *name, const char *value); + +LINPHONE_PUBLIC void linphone_address_set_params(LinphoneAddress *addr, const char *params); + +LINPHONE_PUBLIC void linphone_address_set_uri_param(LinphoneAddress *addr, const char *name, const char *value); + +LINPHONE_PUBLIC void linphone_address_set_uri_params(LinphoneAddress *addr, const char *params); + +LINPHONE_PUBLIC bool_t linphone_address_has_uri_param(const LinphoneAddress *addr, const char *name); + +LINPHONE_PUBLIC const char * linphone_address_get_uri_param(const LinphoneAddress *addr, const char *name); + +/** + * Destroys a LinphoneAddress object (actually calls linphone_address_unref()). + * @deprecated Use linphone_address_unref() instead +**/ +LINPHONE_PUBLIC void linphone_address_destroy(LinphoneAddress *u); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* LINPHONE_ADDRESS_H */ diff --git a/coreapi/buffer.h b/include/linphone/buffer.h similarity index 100% rename from coreapi/buffer.h rename to include/linphone/buffer.h diff --git a/coreapi/call_log.h b/include/linphone/call_log.h similarity index 100% rename from coreapi/call_log.h rename to include/linphone/call_log.h diff --git a/coreapi/call_params.h b/include/linphone/call_params.h similarity index 100% rename from coreapi/call_params.h rename to include/linphone/call_params.h diff --git a/include/linphone/call_stats.h b/include/linphone/call_stats.h new file mode 100644 index 000000000..23ae7350f --- /dev/null +++ b/include/linphone/call_stats.h @@ -0,0 +1,142 @@ +/* +call_stats.h +Copyright (C) 2010-2016 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#ifndef LINPHONE_CALL_STATS_H +#define LINPHONE_CALL_STATS_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @addtogroup call_misc + * @{ + */ + +#define LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE (1 << 0) /**< received_rtcp field of LinphoneCallStats object has been updated */ +#define LINPHONE_CALL_STATS_SENT_RTCP_UPDATE (1 << 1) /**< sent_rtcp field of LinphoneCallStats object has been updated */ +#define LINPHONE_CALL_STATS_PERIODICAL_UPDATE (1 << 2) /**< Every seconds LinphoneCallStats object has been updated */ + +/** + * The LinphoneCallStats objects carries various statistic informations regarding quality of audio or video streams. + * + * To receive these informations periodically and as soon as they are computed, the application is invited to place a #LinphoneCoreCallStatsUpdatedCb callback in the LinphoneCoreVTable structure + * it passes for instanciating the LinphoneCore object (see linphone_core_new() ). + * + * At any time, the application can access last computed statistics using linphone_call_get_audio_stats() or linphone_call_get_video_stats(). +**/ +typedef struct _LinphoneCallStats LinphoneCallStats; + +/** + * The LinphoneCallStats objects carries various statistic informations regarding quality of audio or video streams. + * + * To receive these informations periodically and as soon as they are computed, the application is invited to place a #LinphoneCoreCallStatsUpdatedCb callback in the LinphoneCoreVTable structure + * it passes for instantiating the LinphoneCore object (see linphone_core_new() ). + * + * At any time, the application can access last computed statistics using linphone_call_get_audio_stats() or linphone_call_get_video_stats(). +**/ +struct _LinphoneCallStats { + int type; /**< Can be either LINPHONE_CALL_STATS_AUDIO or LINPHONE_CALL_STATS_VIDEO*/ + jitter_stats_t jitter_stats; /**'. - * The LinphoneAddress has methods to extract and manipulate all parts of the address. - * When some part of the address (for example the username) is empty, the accessor methods - * return NULL. - * - * @ingroup linphone_address - */ -typedef struct SalAddress LinphoneAddress; typedef struct belle_sip_dict LinphoneDictionary; @@ -422,17 +402,7 @@ typedef unsigned int LinphonePrivacyMask; LINPHONE_PUBLIC const char* linphone_privacy_to_string(LinphonePrivacy privacy); -#ifdef IN_LINPHONE -#include "buffer.h" -#include "call_log.h" -#include "call_params.h" -#include "content.h" -#include "event.h" -#include "linphonefriend.h" -#include "nat_policy.h" -#include "xmlrpc.h" -#include "conference.h" -#else +#include "linphone/address.h" #include "linphone/buffer.h" #include "linphone/call_log.h" #include "linphone/call_params.h" @@ -442,47 +412,6 @@ LINPHONE_PUBLIC const char* linphone_privacy_to_string(LinphonePrivacy privacy); #include "linphone/nat_policy.h" #include "linphone/xmlrpc.h" #include "linphone/conference.h" -#endif - -LINPHONE_PUBLIC LinphoneAddress * linphone_address_new(const char *addr); -LINPHONE_PUBLIC LinphoneAddress * linphone_address_clone(const LinphoneAddress *addr); -LINPHONE_PUBLIC LinphoneAddress * linphone_address_ref(LinphoneAddress *addr); -LINPHONE_PUBLIC void linphone_address_unref(LinphoneAddress *addr); -LINPHONE_PUBLIC const char *linphone_address_get_scheme(const LinphoneAddress *u); -LINPHONE_PUBLIC const char *linphone_address_get_display_name(const LinphoneAddress* u); -LINPHONE_PUBLIC const char *linphone_address_get_username(const LinphoneAddress *u); -LINPHONE_PUBLIC const char *linphone_address_get_domain(const LinphoneAddress *u); -LINPHONE_PUBLIC int linphone_address_get_port(const LinphoneAddress *u); -LINPHONE_PUBLIC int linphone_address_set_display_name(LinphoneAddress *u, const char *display_name); -LINPHONE_PUBLIC int linphone_address_set_username(LinphoneAddress *uri, const char *username); -LINPHONE_PUBLIC int linphone_address_set_domain(LinphoneAddress *uri, const char *host); -LINPHONE_PUBLIC int linphone_address_set_port(LinphoneAddress *uri, int port); -LINPHONE_PUBLIC int linphone_address_set_transport(LinphoneAddress *uri,LinphoneTransportType type); -/*remove tags, params etc... so that it is displayable to the user*/ -LINPHONE_PUBLIC void linphone_address_clean(LinphoneAddress *uri); -LINPHONE_PUBLIC bool_t linphone_address_is_secure(const LinphoneAddress *addr); -LINPHONE_PUBLIC bool_t linphone_address_get_secure(const LinphoneAddress *addr); -LINPHONE_PUBLIC void linphone_address_set_secure(LinphoneAddress *addr, bool_t enabled); -LINPHONE_PUBLIC bool_t linphone_address_is_sip(const LinphoneAddress *uri); -LINPHONE_PUBLIC LinphoneTransportType linphone_address_get_transport(const LinphoneAddress *uri); -LINPHONE_PUBLIC const char *linphone_address_get_method_param(const LinphoneAddress *addr); -LINPHONE_PUBLIC void linphone_address_set_method_param(LinphoneAddress *addr, const char *method); -LINPHONE_PUBLIC char *linphone_address_as_string(const LinphoneAddress *u); -LINPHONE_PUBLIC char *linphone_address_as_string_uri_only(const LinphoneAddress *u); -LINPHONE_PUBLIC bool_t linphone_address_weak_equal(const LinphoneAddress *a1, const LinphoneAddress *a2); -LINPHONE_PUBLIC bool_t linphone_address_equal(const LinphoneAddress *a1, const LinphoneAddress *a2); -LINPHONE_PUBLIC void linphone_address_set_password(LinphoneAddress *addr, const char *passwd); -LINPHONE_PUBLIC const char *linphone_address_get_password(const LinphoneAddress *addr); -LINPHONE_PUBLIC void linphone_address_set_header(LinphoneAddress *addr, const char *header_name, const char *header_value); -LINPHONE_PUBLIC bool_t linphone_address_has_param(const LinphoneAddress *addr, const char *name); -LINPHONE_PUBLIC const char * linphone_address_get_param(const LinphoneAddress *addr, const char *name); -LINPHONE_PUBLIC void linphone_address_set_param(LinphoneAddress *addr, const char *name, const char *value); -LINPHONE_PUBLIC void linphone_address_set_params(LinphoneAddress *addr, const char *params); -LINPHONE_PUBLIC void linphone_address_set_uri_param(LinphoneAddress *addr, const char *name, const char *value); -LINPHONE_PUBLIC void linphone_address_set_uri_params(LinphoneAddress *addr, const char *params); -LINPHONE_PUBLIC bool_t linphone_address_has_uri_param(const LinphoneAddress *addr, const char *name); -LINPHONE_PUBLIC const char * linphone_address_get_uri_param(const LinphoneAddress *addr, const char *name); -LINPHONE_PUBLIC void linphone_address_destroy(LinphoneAddress *u); /** * Create a #LinphoneAddress object by parsing the user supplied address, given as a string. @@ -580,10 +509,6 @@ enum _LinphoneUpnpState{ typedef enum _LinphoneUpnpState LinphoneUpnpState; -#define LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE (1 << 0) /**< received_rtcp field of LinphoneCallStats object has been updated */ -#define LINPHONE_CALL_STATS_SENT_RTCP_UPDATE (1 << 1) /**< sent_rtcp field of LinphoneCallStats object has been updated */ -#define LINPHONE_CALL_STATS_PERIODICAL_UPDATE (1 << 2) /**< Every seconds LinphoneCallStats object has been updated */ - /** * Enum describing Ip family. * @ingroup initializing @@ -600,61 +525,15 @@ enum _LinphoneAddressFamily { **/ typedef enum _LinphoneAddressFamily LinphoneAddressFamily; -/** - * The LinphoneCallStats objects carries various statistic informations regarding quality of audio or video streams. - * - * To receive these informations periodically and as soon as they are computed, the application is invited to place a #LinphoneCoreCallStatsUpdatedCb callback in the LinphoneCoreVTable structure - * it passes for instanciating the LinphoneCore object (see linphone_core_new() ). - * - * At any time, the application can access last computed statistics using linphone_call_get_audio_stats() or linphone_call_get_video_stats(). -**/ -typedef struct _LinphoneCallStats LinphoneCallStats; - -/** - * The LinphoneCallStats objects carries various statistic informations regarding quality of audio or video streams. - * - * To receive these informations periodically and as soon as they are computed, the application is invited to place a #LinphoneCoreCallStatsUpdatedCb callback in the LinphoneCoreVTable structure - * it passes for instantiating the LinphoneCore object (see linphone_core_new() ). - * - * At any time, the application can access last computed statistics using linphone_call_get_audio_stats() or linphone_call_get_video_stats(). -**/ -struct _LinphoneCallStats { - int type; /**< Can be either LINPHONE_CALL_STATS_AUDIO or LINPHONE_CALL_STATS_VIDEO*/ - jitter_stats_t jitter_stats; /** + +#endif + diff --git a/include/linphone/linphone_tunnel.h b/include/linphone/linphone_tunnel.h new file mode 100644 index 000000000..baea8bb5e --- /dev/null +++ b/include/linphone/linphone_tunnel.h @@ -0,0 +1,32 @@ +/*************************************************************************** + * linphone_tunnel.h + * + * Fri Dec 9, 2011 + * Copyright 2011 Belledonne Communications + * Author: Guillaume Beraudo + * Email: guillaume dot beraudo at linphone dot 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 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_LINPHONETUNNEL_H +#define LINPHONE_LINPHONETUNNEL_H + +#include "linphone/tunnel.h" + +#endif /* LINPHONE_LINPHONETUNNEL_H */ + diff --git a/include/linphone/linphonecore.h b/include/linphone/linphonecore.h new file mode 100644 index 000000000..045c7e8fa --- /dev/null +++ b/include/linphone/linphonecore.h @@ -0,0 +1,26 @@ +/* +linphone +Copyright (C) 2000 - 2016 Simon MORLAT (simon.morlat@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 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. +*/ + +#ifndef LINPHONE_LINPHONECORE_H +#define LINPHONE_LINPHONECORE_H + +#include + +#endif + diff --git a/include/linphone/linphonecore_utils.h b/include/linphone/linphonecore_utils.h new file mode 100644 index 000000000..f96b57a95 --- /dev/null +++ b/include/linphone/linphonecore_utils.h @@ -0,0 +1,26 @@ +/* +linphone +Copyright (C) 2010 Simon MORLAT (simon.morlat@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 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. +*/ + +#ifndef LINPHONE_LINPHONECORE_UTILS_H +#define LINPHONE_LINPHONECORE_UTILS_H + +#include "linphone/core_utils.h" + +#endif + diff --git a/include/linphone/linphonefriend.h b/include/linphone/linphonefriend.h new file mode 100644 index 000000000..38116abb8 --- /dev/null +++ b/include/linphone/linphonefriend.h @@ -0,0 +1,25 @@ +/* +linphonefriend.h +Copyright (C) 2010-2016 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#ifndef LINPHONE_LINPHONEFRIEND_H_ +#define LINPHONE_LINPHONEFRIEND_H_ + +#include + +#endif /* LINPHONE_LINPHONEFRIEND_H_ */ diff --git a/include/linphone/linphonepresence.h b/include/linphone/linphonepresence.h new file mode 100644 index 000000000..d8dce63ab --- /dev/null +++ b/include/linphone/linphonepresence.h @@ -0,0 +1,25 @@ +/* +linphonepresence.h +Copyright (C) 2010-2013 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#ifndef LINPHONE_LINPHONEPRESENCE_H_ +#define LINPHONE_LINPHONEPRESENCE_H_ + +#include + +#endif /* LINPHONE_LINPHONEPRESENCE_H_ */ diff --git a/coreapi/lpconfig.h b/include/linphone/lpconfig.h similarity index 100% rename from coreapi/lpconfig.h rename to include/linphone/lpconfig.h diff --git a/coreapi/nat_policy.h b/include/linphone/nat_policy.h similarity index 100% rename from coreapi/nat_policy.h rename to include/linphone/nat_policy.h diff --git a/coreapi/linphonepresence.h b/include/linphone/presence.h similarity index 100% rename from coreapi/linphonepresence.h rename to include/linphone/presence.h diff --git a/coreapi/linphone_proxy_config.h b/include/linphone/proxy_config.h similarity index 100% rename from coreapi/linphone_proxy_config.h rename to include/linphone/proxy_config.h diff --git a/coreapi/sipsetup.h b/include/linphone/sipsetup.h similarity index 100% rename from coreapi/sipsetup.h rename to include/linphone/sipsetup.h diff --git a/coreapi/linphone_tunnel.h b/include/linphone/tunnel.h similarity index 99% rename from coreapi/linphone_tunnel.h rename to include/linphone/tunnel.h index 5716b4fc3..409ac74dc 100644 --- a/coreapi/linphone_tunnel.h +++ b/include/linphone/tunnel.h @@ -26,7 +26,7 @@ #ifndef LINPHONETUNNEL_H #define LINPHONETUNNEL_H -#include "linphonecore.h" +#include "linphone/core.h" /** diff --git a/coreapi/vcard.h b/include/linphone/vcard.h similarity index 65% rename from coreapi/vcard.h rename to include/linphone/vcard.h index 709aff046..e87a38bb4 100644 --- a/coreapi/vcard.h +++ b/include/linphone/vcard.h @@ -36,37 +36,6 @@ extern "C" * @{ */ -/** - * The LinphoneVcardContext object. - */ -typedef struct _LinphoneVcardContext LinphoneVcardContext; - -/** - * Creates a vCard context to reuse the same BelCardParser object - * @return a new LinphoneVcardContext object - */ -LINPHONE_PUBLIC LinphoneVcardContext* linphone_vcard_context_new(void); - -/** - * Destroys the vCard context - * @param[in] context a LinphoneVcardContext object - */ -LINPHONE_PUBLIC void linphone_vcard_context_destroy(LinphoneVcardContext *context); - -/** - * Gets the user data set in the LinphoneVcardContext - * @param[in] context a LinphoneVcardContext object - * @return the user data pointer - */ -LINPHONE_PUBLIC void* linphone_vcard_context_get_user_data(const LinphoneVcardContext *context); - -/** - * Sets the user data in the LinphoneVcardContext - * @param[in] context a LinphoneVcardContext object - * @param[in] data the user data pointer - */ -LINPHONE_PUBLIC void linphone_vcard_context_set_user_data(LinphoneVcardContext *context, void *data); - /** * The LinphoneVcard object. */ @@ -84,30 +53,6 @@ LINPHONE_PUBLIC LinphoneVcard* linphone_vcard_new(void); */ LINPHONE_PUBLIC void linphone_vcard_free(LinphoneVcard *vCard); -/** - * Uses belcard to parse the content of a file and returns all the vcards it contains as LinphoneVcards, or NULL if it contains none. - * @param[in] context the vCard context to use (speed up the process by not creating a Belcard parser each time) - * @param[in] file the path to the file to parse - * @return \bctbx_list{LinphoneVcard} - */ -LINPHONE_PUBLIC bctbx_list_t* linphone_vcard_context_get_vcard_list_from_file(LinphoneVcardContext *context, const char *file); - -/** - * Uses belcard to parse the content of a buffer and returns all the vcards it contains as LinphoneVcards, or NULL if it contains none. - * @param[in] context the vCard context to use (speed up the process by not creating a Belcard parser each time) - * @param[in] buffer the buffer to parse - * @return \bctbx_list{LinphoneVcard} - */ -LINPHONE_PUBLIC bctbx_list_t* linphone_vcard_context_get_vcard_list_from_buffer(LinphoneVcardContext *context, const char *buffer); - -/** - * Uses belcard to parse the content of a buffer and returns one vCard if possible, or NULL otherwise. - * @param[in] context the vCard context to use (speed up the process by not creating a Belcard parser each time) - * @param[in] buffer the buffer to parse - * @return a LinphoneVcard if one could be parsed, or NULL otherwise - */ -LINPHONE_PUBLIC LinphoneVcard* linphone_vcard_context_get_vcard_from_buffer(LinphoneVcardContext *context, const char *buffer); - /** * Returns the vCard4 representation of the LinphoneVcard. * @param[in] vCard the LinphoneVcard @@ -162,21 +107,21 @@ LINPHONE_PUBLIC const char* linphone_vcard_get_given_name(const LinphoneVcard *v * @param[in] vCard the LinphoneVcard * @param[in] sip_address the SIP address to add */ -void linphone_vcard_add_sip_address(LinphoneVcard *vCard, const char *sip_address); +LINPHONE_PUBLIC void linphone_vcard_add_sip_address(LinphoneVcard *vCard, const char *sip_address); /** * Removes a SIP address in the vCard (if it exists), using the IMPP property * @param[in] vCard the LinphoneVcard * @param[in] sip_address the SIP address to remove */ -void linphone_vcard_remove_sip_address(LinphoneVcard *vCard, const char *sip_address); +LINPHONE_PUBLIC void linphone_vcard_remove_sip_address(LinphoneVcard *vCard, const char *sip_address); /** * Edits the preferred SIP address in the vCard (or the first one), using the IMPP property * @param[in] vCard the LinphoneVcard * @param[in] sip_address the new SIP address */ -void linphone_vcard_edit_main_sip_address(LinphoneVcard *vCard, const char *sip_address); +LINPHONE_PUBLIC void linphone_vcard_edit_main_sip_address(LinphoneVcard *vCard, const char *sip_address); /** * Returns the list of SIP addresses (as LinphoneAddress) in the vCard (all the IMPP attributes that has an URI value starting by "sip:") or NULL @@ -190,14 +135,14 @@ LINPHONE_PUBLIC const bctbx_list_t* linphone_vcard_get_sip_addresses(LinphoneVca * @param[in] vCard the LinphoneVcard * @param[in] phone the phone number to add */ -void linphone_vcard_add_phone_number(LinphoneVcard *vCard, const char *phone); +LINPHONE_PUBLIC void linphone_vcard_add_phone_number(LinphoneVcard *vCard, const char *phone); /** * Removes a phone number in the vCard (if it exists), using the TEL property * @param[in] vCard the LinphoneVcard * @param[in] phone the phone number to remove */ -void linphone_vcard_remove_phone_number(LinphoneVcard *vCard, const char *phone); +LINPHONE_PUBLIC void linphone_vcard_remove_phone_number(LinphoneVcard *vCard, const char *phone); /** * Returns the list of phone numbers (as string) in the vCard (all the TEL attributes) or NULL @@ -226,14 +171,14 @@ LINPHONE_PUBLIC const char* linphone_vcard_get_organization(const LinphoneVcard * @param[in] vCard the LinphoneVcard * @return TRUE if operation is successful, otherwise FALSE (for example if it already has an unique ID) */ -bool_t linphone_vcard_generate_unique_id(LinphoneVcard *vCard); +LINPHONE_PUBLIC bool_t linphone_vcard_generate_unique_id(LinphoneVcard *vCard); /** * Sets the unique ID of the vCard * @param[in] vCard the LinphoneVcard * @param[in] uid the unique id */ -void linphone_vcard_set_uid(LinphoneVcard *vCard, const char *uid); +LINPHONE_PUBLIC void linphone_vcard_set_uid(LinphoneVcard *vCard, const char *uid); /** * Gets the UID of the vCard @@ -270,21 +215,6 @@ LINPHONE_PUBLIC void linphone_vcard_set_url(LinphoneVcard *vCard, const char *ur */ LINPHONE_PUBLIC const char* linphone_vcard_get_url(const LinphoneVcard *vCard); -/** - * Computes the md5 hash for the vCard - * @param[in] vCard the LinphoneVcard - */ -void linphone_vcard_compute_md5_hash(LinphoneVcard *vCard); - -/** - * Compares the previously computed md5 hash (using linphone_vcard_compute_md5_hash) with the current one - * @param[in] vCard the LinphoneVcard - * @return 0 if the md5 hasn't changed, 1 otherwise - */ -bool_t linphone_vcard_compare_md5_hash(LinphoneVcard *vCard); - -void linphone_vcard_clean_cache(LinphoneVcard *vCard); - /** * @} */ diff --git a/coreapi/xmlrpc.h b/include/linphone/xmlrpc.h similarity index 100% rename from coreapi/xmlrpc.h rename to include/linphone/xmlrpc.h diff --git a/tester/Makefile.am b/tester/Makefile.am index c965a7614..d6969b303 100644 --- a/tester/Makefile.am +++ b/tester/Makefile.am @@ -162,7 +162,7 @@ dist_liblinphone_tester_DATA = tester_hosts messages.db AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/coreapi AM_CFLAGS = -DBC_CONFIG_FILE=\"config.h\" $(STRICT_OPTIONS) $(STRICT_OPTIONS_CC) \ - -DIN_LINPHONE $(ORTP_CFLAGS) $(MEDIASTREAMER_CFLAGS) $(BCTOOLBOXTESTER_CFLAGS) \ + $(ORTP_CFLAGS) $(MEDIASTREAMER_CFLAGS) $(BCTOOLBOXTESTER_CFLAGS) \ $(BELLESIP_CFLAGS) $(LIBXML2_CFLAGS) $(SQLITE3_CFLAGS) $(BELCARD_CFLAGS) if BUILD_GTK_UI diff --git a/tester/call_multi_tester.c b/tester/call_multi_tester.c index 7a310ea24..2b5fd4732 100644 --- a/tester/call_multi_tester.c +++ b/tester/call_multi_tester.c @@ -19,8 +19,8 @@ #include #include -#include "linphonecore.h" -#include "lpconfig.h" +#include "linphone/core.h" +#include "linphone/lpconfig.h" #include "private.h" #include "liblinphone_tester.h" #include "mediastreamer2/msutils.h" diff --git a/tester/call_multicast_tester.c b/tester/call_multicast_tester.c index 252de1256..231a40e24 100644 --- a/tester/call_multicast_tester.c +++ b/tester/call_multicast_tester.c @@ -18,7 +18,7 @@ #include "liblinphone_tester.h" -#include "linphonecore.h" +#include "linphone/core.h" #include "belle-sip/belle-sip.h" diff --git a/tester/call_single_tester.c b/tester/call_single_tester.c index cff0219c2..79ac53b31 100644 --- a/tester/call_single_tester.c +++ b/tester/call_single_tester.c @@ -19,8 +19,8 @@ #include #include -#include "linphonecore.h" -#include "lpconfig.h" +#include "linphone/core.h" +#include "linphone/lpconfig.h" #include "private.h" #include "liblinphone_tester.h" #include "mediastreamer2/msutils.h" diff --git a/tester/call_video_tester.c b/tester/call_video_tester.c index 354a9b325..8c61f7396 100644 --- a/tester/call_video_tester.c +++ b/tester/call_video_tester.c @@ -16,7 +16,7 @@ along with this program. If not, see . */ -#include "linphonecore.h" +#include "linphone/core.h" #include "liblinphone_tester.h" #include "private.h" diff --git a/tester/complex_sip_case_tester.c b/tester/complex_sip_case_tester.c index 6e9aa8dc4..3b1276f3b 100644 --- a/tester/complex_sip_case_tester.c +++ b/tester/complex_sip_case_tester.c @@ -17,9 +17,9 @@ */ -#include "linphonecore.h" +#include "linphone/core.h" #include "liblinphone_tester.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" #include "private.h" diff --git a/tester/eventapi_tester.c b/tester/eventapi_tester.c index a4cbb1d87..d3a3890a0 100644 --- a/tester/eventapi_tester.c +++ b/tester/eventapi_tester.c @@ -18,9 +18,9 @@ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" #include #include "liblinphone_tester.h" diff --git a/tester/flexisip_tester.c b/tester/flexisip_tester.c index 919f181bf..0b8869646 100644 --- a/tester/flexisip_tester.c +++ b/tester/flexisip_tester.c @@ -17,8 +17,8 @@ */ -#include "linphonecore.h" -#include "lpconfig.h" +#include "linphone/core.h" +#include "linphone/lpconfig.h" #include "private.h" #include "liblinphone_tester.h" diff --git a/tester/liblinphone_tester.c b/tester/liblinphone_tester.c index 1e33d6c78..b77c2ff43 100644 --- a/tester/liblinphone_tester.c +++ b/tester/liblinphone_tester.c @@ -17,7 +17,7 @@ */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #include "liblinphone_tester.h" diff --git a/tester/liblinphone_tester.h b/tester/liblinphone_tester.h index 77ffd4041..1a3f74af7 100644 --- a/tester/liblinphone_tester.h +++ b/tester/liblinphone_tester.h @@ -23,7 +23,7 @@ #include -#include "linphonecore.h" +#include "linphone/core.h" #include #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/tester/log_collection_tester.c b/tester/log_collection_tester.c index 085213147..491f67feb 100644 --- a/tester/log_collection_tester.c +++ b/tester/log_collection_tester.c @@ -20,7 +20,7 @@ #define _XOPEN_SOURCE 700 // To have definition of strptime, snprintf and getline #endif #include -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #include "liblinphone_tester.h" diff --git a/tester/message_tester.c b/tester/message_tester.c index 6abfe697f..98386a987 100644 --- a/tester/message_tester.c +++ b/tester/message_tester.c @@ -18,7 +18,7 @@ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #include "liblinphone_tester.h" #include "lime.h" diff --git a/tester/offeranswer_tester.c b/tester/offeranswer_tester.c index 901c65120..fd0d98a92 100644 --- a/tester/offeranswer_tester.c +++ b/tester/offeranswer_tester.c @@ -18,8 +18,8 @@ #include #include -#include "linphonecore.h" -#include "lpconfig.h" +#include "linphone/core.h" +#include "linphone/lpconfig.h" #include "private.h" #include "liblinphone_tester.h" diff --git a/tester/presence_server_tester.c b/tester/presence_server_tester.c index 18305bdb9..09d2d84f9 100644 --- a/tester/presence_server_tester.c +++ b/tester/presence_server_tester.c @@ -17,7 +17,7 @@ */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #include "liblinphone_tester.h" diff --git a/tester/presence_tester.c b/tester/presence_tester.c index b27a64d06..092da7510 100644 --- a/tester/presence_tester.c +++ b/tester/presence_tester.c @@ -17,7 +17,7 @@ */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #include "liblinphone_tester.h" diff --git a/tester/quality_reporting_tester.c b/tester/quality_reporting_tester.c index 67f707eb8..557b14d6b 100644 --- a/tester/quality_reporting_tester.c +++ b/tester/quality_reporting_tester.c @@ -17,7 +17,7 @@ */ #include -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #include "liblinphone_tester.h" diff --git a/tester/register_tester.c b/tester/register_tester.c index 557c680cf..714314ae2 100644 --- a/tester/register_tester.c +++ b/tester/register_tester.c @@ -17,7 +17,7 @@ */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #include "liblinphone_tester.h" diff --git a/tester/remote_provisioning_tester.c b/tester/remote_provisioning_tester.c index 654fd9c82..98d6b02b9 100644 --- a/tester/remote_provisioning_tester.c +++ b/tester/remote_provisioning_tester.c @@ -17,7 +17,7 @@ */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #include "liblinphone_tester.h" diff --git a/tester/setup_tester.c b/tester/setup_tester.c index a9225ae52..b48f9f31e 100644 --- a/tester/setup_tester.c +++ b/tester/setup_tester.c @@ -17,9 +17,9 @@ */ -#include "linphonecore.h" +#include "linphone/core.h" #include "liblinphone_tester.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" #include "private.h" static void linphone_version_test(void){ diff --git a/tester/stun_tester.c b/tester/stun_tester.c index 0a2b1b608..83741ea52 100644 --- a/tester/stun_tester.c +++ b/tester/stun_tester.c @@ -16,7 +16,7 @@ along with this program. If not, see . */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #include "liblinphone_tester.h" #include "mediastreamer2/stun.h" diff --git a/tester/tester.c b/tester/tester.c index 6ea047c8c..240958c47 100644 --- a/tester/tester.c +++ b/tester/tester.c @@ -18,7 +18,7 @@ #include #include -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #include "liblinphone_tester.h" #include diff --git a/tester/tunnel_tester.c b/tester/tunnel_tester.c index 7b86b0a6d..64b46c61c 100644 --- a/tester/tunnel_tester.c +++ b/tester/tunnel_tester.c @@ -18,8 +18,8 @@ #include #include -#include "linphonecore.h" -#include "lpconfig.h" +#include "linphone/core.h" +#include "linphone/lpconfig.h" #include "private.h" #include "liblinphone_tester.h" diff --git a/tester/upnp_tester.c b/tester/upnp_tester.c index b915606bb..afae29acf 100644 --- a/tester/upnp_tester.c +++ b/tester/upnp_tester.c @@ -17,8 +17,8 @@ */ -#include "linphonecore.h" -#include "lpconfig.h" +#include "linphone/core.h" +#include "linphone/lpconfig.h" #include "private.h" #include "liblinphone_tester.h" diff --git a/tester/vcard_tester.c b/tester/vcard_tester.c index 31d243955..83af0a889 100644 --- a/tester/vcard_tester.c +++ b/tester/vcard_tester.c @@ -16,7 +16,7 @@ along with this program. If not, see . */ -#include "linphonecore.h" +#include "linphone/core.h" #include "private.h" #ifdef VCARD_ENABLED diff --git a/tester/video_tester.c b/tester/video_tester.c index 6d2e4cce9..bb82aa254 100644 --- a/tester/video_tester.c +++ b/tester/video_tester.c @@ -20,9 +20,9 @@ #if defined(VIDEO_ENABLED) -#include "linphonecore.h" +#include "linphone/core.h" #include "liblinphone_tester.h" -#include "lpconfig.h" +#include "linphone/lpconfig.h" #if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) #pragma GCC diagnostic push diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index d73d892d9..ef941595d 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -38,7 +38,6 @@ set(LP_GEN_WRAPPERS_SOURCE_FILES software-desc.hh ) -add_definitions(-DIN_LINPHONE) set(LP_GEN_WRAPPERS_LIBS ${LIBGCC} ${LIBMINGWEX} diff --git a/tools/Makefile.am b/tools/Makefile.am index 9b9226483..a5a1da287 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -5,7 +5,6 @@ AM_CPPFLAGS=\ -I$(top_srcdir)/coreapi COMMON_CFLAGS=\ - -DIN_LINPHONE \ $(ORTP_CFLAGS) \ $(MEDIASTREAMER_CFLAGS) \ $(STRICT_OPTIONS) \ diff --git a/tools/auto_answer.c b/tools/auto_answer.c index 25649c429..df81e5f87 100644 --- a/tools/auto_answer.c +++ b/tools/auto_answer.c @@ -19,11 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef IN_LINPHONE -#include "linphonecore.h" -#else -#include "linphone/linphonecore.h" -#endif +#include "linphone/core.h" #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/tools/lpsendmsg.c b/tools/lpsendmsg.c index a1ae45bdc..7ba08e402 100644 --- a/tools/lpsendmsg.c +++ b/tools/lpsendmsg.c @@ -19,11 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef IN_LINPHONE -#include "linphonecore.h" -#else -#include "linphone/linphonecore.h" -#endif +#include "linphone/core.h" #ifdef HAVE_CONFIG_H #include "config.h" #endif