Commit 33b72ce6 authored by Ghislain MARY's avatar Ghislain MARY

Move public header files in the include/linphone directory.

parent a14a8f9f
...@@ -228,7 +228,6 @@ if(MSVC) ...@@ -228,7 +228,6 @@ if(MSVC)
include_directories(${MSVC_INCLUDE_DIR}) include_directories(${MSVC_INCLUDE_DIR})
endif() endif()
add_definitions("-DIN_LINPHONE")
if(ENABLE_DEBUG_LOGS) if(ENABLE_DEBUG_LOGS)
add_definitions("-DDEBUG") add_definitions("-DDEBUG")
endif() endif()
...@@ -307,6 +306,7 @@ endif() ...@@ -307,6 +306,7 @@ endif()
add_subdirectory(java) add_subdirectory(java)
add_subdirectory(coreapi) add_subdirectory(coreapi)
add_subdirectory(include)
add_subdirectory(share) add_subdirectory(share)
if(ENABLE_CONSOLE_UI) if(ENABLE_CONSOLE_UI)
add_subdirectory(console) add_subdirectory(console)
......
...@@ -6,7 +6,6 @@ AM_CPPFLAGS=\ ...@@ -6,7 +6,6 @@ AM_CPPFLAGS=\
-I$(top_srcdir)/include -I$(top_srcdir)/include
COMMON_CFLAGS=\ COMMON_CFLAGS=\
-DIN_LINPHONE \
-D_ORTP_SOURCE \ -D_ORTP_SOURCE \
$(STRICT_OPTIONS) \ $(STRICT_OPTIONS) \
$(STRICT_OPTIONS_CC) \ $(STRICT_OPTIONS_CC) \
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
#endif /*_WIN32_WCE*/ #endif /*_WIN32_WCE*/
#include <limits.h> #include <limits.h>
#include <ctype.h> #include <ctype.h>
#include <linphonecore.h> #include <linphone/core.h>
#include "linphonec.h" #include "linphonec.h"
#include "lpconfig.h" #include <linphone/lpconfig.h>
#ifndef _WIN32 #ifndef _WIN32
#include <sys/wait.h> #include <sys/wait.h>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include <ctype.h> #include <ctype.h>
#include <stdlib.h> #include <stdlib.h>
#include <linphonecore.h> #include <linphone/core.h>
#include "linphonec.h" #include "linphonec.h"
#include <bctoolbox/vfs.h> #include <bctoolbox/vfs.h>
......
...@@ -30,31 +30,23 @@ if(NOT WIN32) ...@@ -30,31 +30,23 @@ if(NOT WIN32)
endif() endif()
set(LINPHONE_HEADER_FILES set(LINPHONE_PRIVATE_HEADER_FILES
account_creator.h bellesip_sal/sal_impl.h
buffer.h
call_log.h
call_params.h
carddav.h carddav.h
conference.h conference_private.h
content.h contactprovider.h
event.h contact_providers_priv.h
friendlist.h enum.h
linphonecore.h ldap/ldapprovider.h
linphonecore_utils.h lime.h
linphonefriend.h
linphonepresence.h
linphone_proxy_config.h
linphone_tunnel.h
lpc2xml.h lpc2xml.h
lpconfig.h offeranswer.h
nat_policy.h private.h
quality_reporting.h
ringtoneplayer.h ringtoneplayer.h
sipsetup.h
sqlite3_bctbx_vfs.h sqlite3_bctbx_vfs.h
vcard_private.h
xml2lpc.h xml2lpc.h
xmlrpc.h
vcard.h
) )
set(LINPHONE_SOURCE_FILES_C set(LINPHONE_SOURCE_FILES_C
...@@ -63,7 +55,6 @@ set(LINPHONE_SOURCE_FILES_C ...@@ -63,7 +55,6 @@ set(LINPHONE_SOURCE_FILES_C
authentication.c authentication.c
bellesip_sal/sal_address_impl.c bellesip_sal/sal_address_impl.c
bellesip_sal/sal_impl.c bellesip_sal/sal_impl.c
bellesip_sal/sal_impl.h
bellesip_sal/sal_op_call.c bellesip_sal/sal_op_call.c
bellesip_sal/sal_op_call_transfer.c bellesip_sal/sal_op_call_transfer.c
bellesip_sal/sal_op_events.c bellesip_sal/sal_op_events.c
...@@ -88,7 +79,6 @@ set(LINPHONE_SOURCE_FILES_C ...@@ -88,7 +79,6 @@ set(LINPHONE_SOURCE_FILES_C
ec-calibrator.c ec-calibrator.c
echo-tester.c echo-tester.c
enum.c enum.c
enum.h
event.c event.c
friend.c friend.c
friendlist.c friendlist.c
...@@ -101,16 +91,13 @@ set(LINPHONE_SOURCE_FILES_C ...@@ -101,16 +91,13 @@ set(LINPHONE_SOURCE_FILES_C
localplayer.c localplayer.c
lpc2xml.c lpc2xml.c
lpconfig.c lpconfig.c
lpconfig.h
lsd.c lsd.c
message_storage.c message_storage.c
misc.c misc.c
nat_policy.c nat_policy.c
offeranswer.c offeranswer.c
offeranswer.h
player.c player.c
presence.c presence.c
private.h
proxy.c proxy.c
quality_reporting.c quality_reporting.c
remote_provisioning.c remote_provisioning.c
...@@ -202,7 +189,7 @@ apply_compile_flags(LINPHONE_SOURCE_FILES_CXX "CPP" "CXX") ...@@ -202,7 +189,7 @@ apply_compile_flags(LINPHONE_SOURCE_FILES_CXX "CPP" "CXX")
apply_compile_flags(LINPHONE_SOURCE_FILES_OBJC "CPP" "OBJC") apply_compile_flags(LINPHONE_SOURCE_FILES_OBJC "CPP" "OBJC")
if(ENABLE_STATIC) 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) set_target_properties(linphone-static PROPERTIES OUTPUT_NAME linphone)
add_dependencies(linphone-static liblinphone-git-version) add_dependencies(linphone-static liblinphone-git-version)
target_link_libraries(linphone-static ${LIBS}) target_link_libraries(linphone-static ${LIBS})
...@@ -218,7 +205,7 @@ if(ENABLE_STATIC) ...@@ -218,7 +205,7 @@ if(ENABLE_STATIC)
) )
endif() endif()
if(ENABLE_SHARED) 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(BELCARD_FOUND)
if(APPLE) if(APPLE)
...@@ -273,9 +260,4 @@ if(ICONV_FOUND) ...@@ -273,9 +260,4 @@ if(ICONV_FOUND)
endif() endif()
endif() endif()
install(FILES ${LINPHONE_HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/linphone
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
add_subdirectory(help) add_subdirectory(help)
...@@ -22,34 +22,6 @@ BUILT_SOURCES=$(GITVERSION_FILE) ...@@ -22,34 +22,6 @@ BUILT_SOURCES=$(GITVERSION_FILE)
CLEANFILES=$(GITVERSION_FILE) CLEANFILES=$(GITVERSION_FILE)
## Process this file with automake to produce Makefile.in ## 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 lib_LTLIBRARIES=liblinphone.la
liblinphone_la_SOURCES=\ liblinphone_la_SOURCES=\
...@@ -58,6 +30,7 @@ liblinphone_la_SOURCES=\ ...@@ -58,6 +30,7 @@ liblinphone_la_SOURCES=\
authentication.c \ authentication.c \
buffer.c \ buffer.c \
callbacks.c \ callbacks.c \
carddav.h \
call_log.c \ call_log.c \
call_params.c \ call_params.c \
chat.c \ chat.c \
...@@ -78,7 +51,7 @@ liblinphone_la_SOURCES=\ ...@@ -78,7 +51,7 @@ liblinphone_la_SOURCES=\
linphonecall.c \ linphonecall.c \
linphonecore.c \ linphonecore.c \
localplayer.c \ localplayer.c \
lpc2xml.c \ lpc2xml.c lpc2xml.h \
lime.c lime.h\ lime.c lime.h\
lpconfig.c \ lpconfig.c \
lsd.c \ lsd.c \
...@@ -95,7 +68,8 @@ liblinphone_la_SOURCES=\ ...@@ -95,7 +68,8 @@ liblinphone_la_SOURCES=\
sal.c \ sal.c \
siplogin.c \ siplogin.c \
sipsetup.c \ sipsetup.c \
xml2lpc.c \ vcard_private.h \
xml2lpc.c xml2lpc.h \
xml.c \ xml.c \
xmlrpc.c \ xmlrpc.c \
vtables.c \ vtables.c \
...@@ -165,7 +139,6 @@ liblinphone_la_LIBADD= \ ...@@ -165,7 +139,6 @@ liblinphone_la_LIBADD= \
AM_CPPFLAGS=\ AM_CPPFLAGS=\
-DIN_LINPHONE \
-I$(top_srcdir) -I$(top_srcdir)/include -I$(builddir) \ -I$(top_srcdir) -I$(top_srcdir)/include -I$(builddir) \
$(ORTP_CFLAGS) \ $(ORTP_CFLAGS) \
$(MEDIASTREAMER_CFLAGS) \ $(MEDIASTREAMER_CFLAGS) \
...@@ -173,7 +146,6 @@ AM_CPPFLAGS=\ ...@@ -173,7 +146,6 @@ AM_CPPFLAGS=\
COMMON_CFLAGS=\ COMMON_CFLAGS=\
$(STRICT_OPTIONS) \ $(STRICT_OPTIONS) \
-DIN_LINPHONE \
$(SIPSTACK_CFLAGS) \ $(SIPSTACK_CFLAGS) \
-DENABLE_TRACE \ -DENABLE_TRACE \
-DLOG_DOMAIN=\"LinphoneCore\" \ -DLOG_DOMAIN=\"LinphoneCore\" \
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
#include "TunnelManager.hh" #include "TunnelManager.hh"
#include "ortp/rtpsession.h" #include "ortp/rtpsession.h"
#include "linphonecore.h" #include "linphone/core.h"
#include "linphonecore_utils.h" #include "linphone/core_utils.h"
#include "private.h" #include "private.h"
#ifdef ANDROID #ifdef ANDROID
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <string> #include <string>
#include <tunnel/client.hh> #include <tunnel/client.hh>
#include <tunnel/udp_mirror.hh> #include <tunnel/udp_mirror.hh>
#include "linphonecore.h" #include "linphone/core.h"
#include "linphone_tunnel.h" #include "linphone_tunnel.h"
#ifndef USE_BELLESIP #ifndef USE_BELLESIP
......
...@@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software ...@@ -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. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#include "account_creator.h" #include "linphone/account_creator.h"
#include "private.h" #include "private.h"
#if !_WIN32 #if !_WIN32
#include "regex.h" #include "regex.h"
......
...@@ -17,19 +17,10 @@ along with this program; if not, write to the Free Software ...@@ -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. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#include "linphonecore.h" #include "linphone/core.h"
#include "lpconfig.h" #include "linphone/lpconfig.h"
#include "private.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){ LinphoneAddress * linphone_address_new(const char *addr){
SalAddress *saddr=sal_address_new(addr); SalAddress *saddr=sal_address_new(addr);
if (saddr==NULL) if (saddr==NULL)
...@@ -37,167 +28,99 @@ LinphoneAddress * linphone_address_new(const char *addr){ ...@@ -37,167 +28,99 @@ LinphoneAddress * linphone_address_new(const char *addr){
return saddr; return saddr;
} }
/**
* Clones a LinphoneAddress object.
**/
LinphoneAddress * linphone_address_clone(const LinphoneAddress *addr){ LinphoneAddress * linphone_address_clone(const LinphoneAddress *addr){
return sal_address_clone(addr); return sal_address_clone(addr);
} }
/**
* Increment reference count of LinphoneAddress object.
**/
LinphoneAddress * linphone_address_ref(LinphoneAddress *addr){ LinphoneAddress * linphone_address_ref(LinphoneAddress *addr){
return sal_address_ref(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){ void linphone_address_unref(LinphoneAddress *addr){
sal_address_unref(addr); sal_address_unref(addr);
} }
/**
* Returns the address scheme, normally "sip".
**/
const char *linphone_address_get_scheme(const LinphoneAddress *u){ const char *linphone_address_get_scheme(const LinphoneAddress *u){
return sal_address_get_scheme(u); return sal_address_get_scheme(u);
} }
/**
* Returns the display name.
**/
const char *linphone_address_get_display_name(const LinphoneAddress* u){ const char *linphone_address_get_display_name(const LinphoneAddress* u){
return sal_address_get_display_name(u); return sal_address_get_display_name(u);
} }
/**
* Returns the username.
**/
const char *linphone_address_get_username(const LinphoneAddress *u){ const char *linphone_address_get_username(const LinphoneAddress *u){
return sal_address_get_username(u); return sal_address_get_username(u);
} }
/**
* Returns the domain name.
**/
const char *linphone_address_get_domain(const LinphoneAddress *u){ const char *linphone_address_get_domain(const LinphoneAddress *u){
return sal_address_get_domain(u); return sal_address_get_domain(u);
} }
/** int linphone_address_get_port(const LinphoneAddress *u) {
* Sets the display name. return sal_address_get_port(u);
**/ }
int linphone_address_set_display_name(LinphoneAddress *u, const char *display_name){ int linphone_address_set_display_name(LinphoneAddress *u, const char *display_name){
sal_address_set_display_name(u,display_name); sal_address_set_display_name(u,display_name);
return 0; return 0;
} }
/**
* Sets the username.
**/
int linphone_address_set_username(LinphoneAddress *uri, const char *username){ int linphone_address_set_username(LinphoneAddress *uri, const char *username){
sal_address_set_username(uri,username); sal_address_set_username(uri,username);
return 0; return 0;
} }
/**
* Sets the domain.
**/
int linphone_address_set_domain(LinphoneAddress *uri, const char *host){ int linphone_address_set_domain(LinphoneAddress *uri, const char *host){
sal_address_set_domain(uri,host); sal_address_set_domain(uri,host);
return 0; return 0;
} }
/**
* Sets the port number.
**/
int linphone_address_set_port(LinphoneAddress *uri, int port){ int linphone_address_set_port(LinphoneAddress *uri, int port){
sal_address_set_port(uri,port); sal_address_set_port(uri,port);
return 0; return 0;
} }
/**
* Set a transport.
**/
int linphone_address_set_transport(LinphoneAddress *uri, LinphoneTransportType tp){ int linphone_address_set_transport(LinphoneAddress *uri, LinphoneTransportType tp){
sal_address_set_transport(uri,(SalTransport)tp); sal_address_set_transport(uri,(SalTransport)tp);
return 0; return 0;
} }
/**
* Get the transport.
**/
LinphoneTransportType linphone_address_get_transport(const LinphoneAddress *uri){ LinphoneTransportType linphone_address_get_transport(const LinphoneAddress *uri){
return (LinphoneTransportType)sal_address_get_transport(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) { void linphone_address_set_method_param(LinphoneAddress *addr, const char *method) {
sal_address_set_method_param(addr, 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) { const char *linphone_address_get_method_param(const LinphoneAddress *addr) {
return sal_address_get_method_param(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){ void linphone_address_clean(LinphoneAddress *uri){
sal_address_clean(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){ char *linphone_address_as_string(const LinphoneAddress *u){
return sal_address_as_string(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){ char *linphone_address_as_string_uri_only(const LinphoneAddress *u){
return sal_address_as_string_uri_only(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){ bool_t linphone_address_is_secure(const LinphoneAddress *uri){
return sal_address_is_secure(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){ bool_t linphone_address_get_secure(const LinphoneAddress *uri){
return sal_address_is_secure(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){ void linphone_address_set_secure(LinphoneAddress *addr, bool_t enabled){
sal_address_set_secure(addr, 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){ bool_t linphone_address_is_sip(const LinphoneAddress *uri){
return sal_address_is_sip(uri); return sal_address_is_sip(uri);
} }
...@@ -208,13 +131,6 @@ static bool_t strings_equals(const char *s1, const char *s2){ ...@@ -208,13 +131,6 @@ static bool_t strings_equals(const char *s1, const char *s2){
return FALSE; 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){ bool_t linphone_address_weak_equal(const LinphoneAddress *a1, const LinphoneAddress *a2){
const char *u1,*u2; const char *u1,*u2;
const char *h1,*h2; const char *h1,*h2;
...@@ -228,13 +144,6 @@ bool_t linphone_address_weak_equal(const LinphoneAddress *a1, const LinphoneAddr ...@@ -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; 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) { bool_t linphone_address_equal(const LinphoneAddress *a1, const LinphoneAddress *a2) {
char *s1; char *s1;
char *s2; char *s2;
...@@ -249,52 +158,18 @@ bool_t linphone_address_equal(const LinphoneAddress *a1, const LinphoneAddress * ...@@ -249,52 +158,18 @@ bool_t linphone_address_equal(const LinphoneAddress *a1, const LinphoneAddress *
return res; return res;
} }
/**
* Destroys a LinphoneAddress object (actually calls linphone_address_unref()).
* @deprecated Use linphone_address_unref() instead
**/
void linphone_address_destroy(LinphoneAddress *u){ void linphone_address_destroy(LinphoneAddress *u){
sal_address_unref(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){ void linphone_address_set_password(LinphoneAddress *addr, const char *passwd){
sal_address_set_password(addr,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.