]> sjero.net Git - linphone/commitdiff
Fix static build split tunnel stubs
authorYann Diorcet <yann.diorcet@belledonne-communications.com>
Thu, 20 Dec 2012 16:34:36 +0000 (17:34 +0100)
committerYann Diorcet <yann.diorcet@belledonne-communications.com>
Thu, 20 Dec 2012 16:34:36 +0000 (17:34 +0100)
coreapi/Makefile.am
coreapi/linphone_tunnel.cc
coreapi/linphone_tunnel_stubs.c [new file with mode: 0644]

index 6d55a731f6a8c02535f5e25738023e240348ae80..822c0b8367ee173016bf74f8964d58986cca75a8 100644 (file)
@@ -47,7 +47,6 @@ liblinphone_la_SOURCES=\
        lsd.c linphonecore_utils.h \
        ec-calibrator.c \
        conference.c \
-       linphone_tunnel.cc \
        $(GITVERSION_FILE)
 
 if BUILD_UPNP
@@ -59,7 +58,9 @@ liblinphone_la_SOURCES+=sipwizard.c
 endif
 
 if BUILD_TUNNEL
-liblinphone_la_SOURCES+=TunnelManager.cc TunnelManager.hh 
+liblinphone_la_SOURCES+=linphone_tunnel.cc TunnelManager.cc TunnelManager.hh 
+else
+liblinphone_la_SOURCES+=linphone_tunnel_stubs.c
 endif
 
 
index f5a5d361f92286ecb78c136a6f99f0afa3497920..18fabbbe95eb7d7654ac3622bf80ccc0eaea0b91 100644 (file)
@@ -23,9 +23,7 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-#ifdef TUNNEL_ENABLED
 #include "TunnelManager.hh"
-#endif
 #include "linphone_tunnel.h"
 #include "linphonecore.h"
 #include "private.h"
@@ -36,8 +34,6 @@ LinphoneTunnel* linphone_core_get_tunnel(LinphoneCore *lc){
        return lc->tunnel;
 }
 
-#ifdef TUNNEL_ENABLED
-
 static inline belledonnecomm::TunnelManager *bcTunnel(LinphoneTunnel *tunnel){
        return (belledonnecomm::TunnelManager *)tunnel;
 }
@@ -212,60 +208,3 @@ void linphone_tunnel_configure(LinphoneTunnel *tunnel){
        linphone_tunnel_enable(tunnel, enabled);
 }
 
-#else
-
-/*stubs to avoid to have #ifdef TUNNEL_ENABLED in upper layers*/
-
-void linphone_tunnel_destroy(LinphoneTunnel *tunnel){
-}
-
-
-void linphone_tunnel_add_server(LinphoneTunnel *tunnel, const char *host, int port){
-}
-
-void linphone_tunnel_add_server_and_mirror(LinphoneTunnel *tunnel, const char *host, int port, int remote_udp_mirror, int delay){
-}
-
-char *linphone_tunnel_get_servers(LinphoneTunnel *tunnel){
-       return NULL;
-}
-
-void linphone_tunnel_clean_servers(LinphoneTunnel *tunnel){
-}
-
-void linphone_tunnel_enable(LinphoneTunnel *tunnel, bool_t enabled){
-}
-
-bool_t linphone_tunnel_enabled(LinphoneTunnel *tunnel){
-       return FALSE;
-}
-
-
-void linphone_tunnel_enable_logs_with_handler(LinphoneTunnel *tunnel, bool_t enabled, OrtpLogFunc logHandler){
-}
-
-void linphone_tunnel_set_http_proxy_auth_info(LinphoneTunnel *tunnel, const char* username,const char* passwd){
-}
-
-void linphone_tunnel_set_http_proxy(LinphoneTunnel*tunnel, const char *host, int port, const char* username,const char* passwd){
-}
-
-void linphone_tunnel_get_http_proxy(LinphoneTunnel*tunnel,const char **host, int *port, const char **username, const char **passwd){
-}
-
-void linphone_tunnel_reconnect(LinphoneTunnel *tunnel){
-}
-
-void linphone_tunnel_auto_detect(LinphoneTunnel *tunnel){
-}
-
-void linphone_tunnel_configure(LinphoneTunnel *tunnel){
-}
-
-
-#endif
-
-
-
-
-
diff --git a/coreapi/linphone_tunnel_stubs.c b/coreapi/linphone_tunnel_stubs.c
new file mode 100644 (file)
index 0000000..d7fb277
--- /dev/null
@@ -0,0 +1,81 @@
+/***************************************************************************
+ *            linphone_tunnel.cc
+ *
+ *  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.
+ */
+
+#include "linphone_tunnel.h"
+#include "linphonecore.h"
+#include "private.h"
+#include "lpconfig.h"
+
+
+LinphoneTunnel* linphone_core_get_tunnel(LinphoneCore *lc){
+       return lc->tunnel;
+}
+
+/*stubs to avoid to have #ifdef TUNNEL_ENABLED in upper layers*/
+
+void linphone_tunnel_destroy(LinphoneTunnel *tunnel){
+}
+
+void linphone_tunnel_add_server(LinphoneTunnel *tunnel, const char *host, int port){
+}
+
+void linphone_tunnel_add_server_and_mirror(LinphoneTunnel *tunnel, const char *host, int port, int remote_udp_mirror, int delay){
+}
+
+char *linphone_tunnel_get_servers(LinphoneTunnel *tunnel){
+       return NULL;
+}
+
+void linphone_tunnel_clean_servers(LinphoneTunnel *tunnel){
+}
+
+void linphone_tunnel_enable(LinphoneTunnel *tunnel, bool_t enabled){
+}
+
+bool_t linphone_tunnel_enabled(LinphoneTunnel *tunnel){
+       return FALSE;
+}
+
+void linphone_tunnel_enable_logs_with_handler(LinphoneTunnel *tunnel, bool_t enabled, OrtpLogFunc logHandler){
+}
+
+void linphone_tunnel_set_http_proxy_auth_info(LinphoneTunnel *tunnel, const char* username,const char* passwd){
+}
+
+void linphone_tunnel_set_http_proxy(LinphoneTunnel*tunnel, const char *host, int port, const char* username,const char* passwd){
+}
+
+void linphone_tunnel_get_http_proxy(LinphoneTunnel*tunnel,const char **host, int *port, const char **username, const char **passwd){
+}
+
+void linphone_tunnel_reconnect(LinphoneTunnel *tunnel){
+}
+
+void linphone_tunnel_auto_detect(LinphoneTunnel *tunnel){
+}
+
+void linphone_tunnel_configure(LinphoneTunnel *tunnel){
+}
+