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)
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)
......
......@@ -6,7 +6,6 @@ AM_CPPFLAGS=\
-I$(top_srcdir)/include
COMMON_CFLAGS=\
-DIN_LINPHONE \
-D_ORTP_SOURCE \
$(STRICT_OPTIONS) \
$(STRICT_OPTIONS_CC) \
......
......@@ -31,9 +31,9 @@
#endif /*_WIN32_WCE*/
#include <limits.h>
#include <ctype.h>
#include <linphonecore.h>
#include <linphone/core.h>
#include "linphonec.h"
#include "lpconfig.h"
#include <linphone/lpconfig.h>
#ifndef _WIN32
#include <sys/wait.h>
......
......@@ -34,7 +34,7 @@
#include <ctype.h>
#include <stdlib.h>
#include <linphonecore.h>
#include <linphone/core.h>
#include "linphonec.h"
#include <bctoolbox/vfs.h>
......
......@@ -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)
......@@ -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\" \
......
......@@ -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
......
......@@ -14,7 +14,7 @@
#include <string>
#include <tunnel/client.hh>
#include <tunnel/udp_mirror.hh>
#include "linphonecore.h"
#include "linphone/core.h"
#include "linphone_tunnel.h"
#ifndef USE_BELLESIP
......
......@@ -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"
......
......@@ -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 <sip:test@linphone.org?SomeHeader=SomeValue>.
* @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);
}
......
......@@ -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
......
......@@ -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 <libxml/xmlwriter.h>
......
......@@ -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"
......
......@@ -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
......
......@@ -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
}
......@@ -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
......@@ -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"
......
......@@ -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"
......
......@@ -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" {
......
......@@ -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 */
......
......@@ -16,7 +16,7 @@
#include "contact_providers_priv.h"
#include "contactprovider.h"
#include <linphonecore.h>
#include <linphone/core.h>
/* ############################ *
* LinphoneContactSearchRequest *
......
......@@ -14,7 +14,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "linphonecore.h"
#include "linphone/core.h"
/* LinphoneContactSearchRequest */
......
......@@ -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"
......
......@@ -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
......
......@@ -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 <belle-sip/belle-sip.h>
......
......@@ -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"
......
......@@ -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){
......