]> sjero.net Git - linphone/commitdiff
finilize tunnel api cleanup
authorJehan Monnier <jehan.monnier@linphone.org>
Thu, 22 Dec 2011 12:59:10 +0000 (13:59 +0100)
committerJehan Monnier <jehan.monnier@linphone.org>
Thu, 22 Dec 2011 12:59:10 +0000 (13:59 +0100)
coreapi/Makefile.am
coreapi/TunnelManager.cc
coreapi/TunnelManager.hh
coreapi/linphone_tunnel.cc [new file with mode: 0644]
coreapi/linphone_tunnel.h [new file with mode: 0644]
coreapi/linphone_tunnel_manager.cc [deleted file]
coreapi/linphone_tunnel_manager.h [deleted file]
coreapi/linphonecore.h
coreapi/linphonecore_jni.cc
coreapi/private.h
gtk/propertybox.c

index 20ab34878fd118dbd7deda536a340932d5de0cf9..659a9f78e58daa47b028204f46e2e8a356ebc0f8 100644 (file)
@@ -6,7 +6,11 @@ EXTRA_DIST=linphonecore_jni.cc
 ## Process this file with automake to produce Makefile.in
 linphone_includedir=$(includedir)/linphone
 
-linphone_include_HEADERS=linphonecore.h linphonefriend.h linphonecore_utils.h ../config.h lpconfig.h sipsetup.h
+linphone_include_HEADERS=linphonecore.h linphonefriend.h linphonecore_utils.h ../config.h lpconfig.h sipsetup.h 
+
+if BUILD_TUNNEL
+linphone_include_HEADERS+=linphone_tunnel.h
+endif
 
 INCLUDES = \
        -I$(top_srcdir)
@@ -36,11 +40,10 @@ liblinphone_la_SOURCES=\
        siplogin.c \
        lsd.c linphonecore_utils.h \
        ec-calibrator.c \
-       conference.c \
-       linphone_tunnel_manager.h
+       conference.c 
 
 if BUILD_TUNNEL
-liblinphone_la_SOURCES+=TunnelManager.cc TunnelManager.hh linphone_tunnel_manager.cc
+liblinphone_la_SOURCES+=TunnelManager.cc TunnelManager.hh linphone_tunnel.cc
 endif
 
 
index 9d4ab7c35c4e28c587e29d889ea4dc1b8bcee938..2243119d47ecd903bd401b0c951f870068ea5d62 100644 (file)
@@ -190,6 +190,9 @@ void TunnelManager::start() {
                        const ServerAddr &addr=*it;
                        mTunnelClient->addServer(addr.mAddr.c_str(), addr.mPort);
                }
+               if(!mHttpUserName.empty()) {
+                       mTunnelClient->setHttpProxyAuthInfo(mHttpUserName.c_str(), mHttpPasswd.c_str());
+               }
        }
        mTunnelClient->start();
 
@@ -426,7 +429,9 @@ void TunnelManager::autoDetect() {
 }
 
 void TunnelManager::setHttpProxyAuthInfo(const char* username,const char* passwd) {
-       mTunnelClient->setHttpProxyAuthInfo(username,passwd);
+       mHttpUserName=username?username:"";
+       mHttpPasswd=passwd?passwd:"";
+       if (mTunnelClient) mTunnelClient->setHttpProxyAuthInfo(username,passwd);
 }
 
 LinphoneCore *TunnelManager::getLinphoneCore(){
index b6bc46723a884b35e22f9b8ef727df4234211cd0..89044cce721ebfa4ae32f9443734c94a2423af34 100644 (file)
@@ -11,6 +11,7 @@
 #ifndef __TUNNEL_CLIENT_MANAGER_H__
 #define __TUNNEL_CLIENT_MANAGER_H__
 #include <list>
+#include <string>
 #include "linphonecore.h"
 #include "tunnel/client.hh"
 extern "C" {
@@ -156,6 +157,8 @@ class UdpMirrorClient;
                static Mutex sMutex;
                bool mAutoDetectStarted;
                LinphoneRtpTransportFactories mTransportFactories;
+               std::string mHttpUserName;
+               std::string mHttpPasswd;                
        };
 
 /**
diff --git a/coreapi/linphone_tunnel.cc b/coreapi/linphone_tunnel.cc
new file mode 100644 (file)
index 0000000..5afccff
--- /dev/null
@@ -0,0 +1,138 @@
+/***************************************************************************
+ *            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 "TunnelManager.hh"
+#include "linphonecore.h"
+#include "private.h"
+#include "lpconfig.h"
+
+static inline belledonnecomm::TunnelManager *bcTunnel(LinphoneTunnel *tunnel){
+       return (belledonnecomm::TunnelManager *)tunnel;
+}
+
+extern "C" LinphoneTunnel* linphone_core_tunnel_new(LinphoneCore *lc){
+       LinphoneTunnel* tunnel= (LinphoneTunnel*) new belledonnecomm::TunnelManager(lc);
+       return tunnel;
+}
+
+LinphoneTunnel* linphone_core_get_tunnel(LinphoneCore *lc){
+       return lc->tunnel;
+}
+
+void linphone_tunnel_destroy(LinphoneTunnel *tunnel){
+       delete bcTunnel(tunnel);
+}
+
+void linphone_tunnel_add_server(LinphoneTunnel *tunnel, const char *host, int port){
+       bcTunnel(tunnel)->addServer(host, port);
+}
+
+void linphone_tunnel_add_server_and_mirror(LinphoneTunnel *tunnel, const char *host, int port, int remote_udp_mirror, int delay){
+       bcTunnel(tunnel)->addServer(host, port, remote_udp_mirror, delay);
+}
+
+void linphone_tunnel_clean_servers(LinphoneTunnel *tunnel){
+       bcTunnel(tunnel)->cleanServers();
+}
+
+void linphone_tunnel_enable(LinphoneTunnel *tunnel, bool_t enabled){
+       bcTunnel(tunnel)->enable(enabled);
+}
+
+bool_t linphone_tunnel_enabled(LinphoneTunnel *tunnel){
+       return bcTunnel(tunnel)->isEnabled();
+}
+
+void linphone_tunnel_enable_logs(LinphoneTunnel *tunnel, bool_t enabled){
+       bcTunnel(tunnel)->enableLogs(enabled);
+}
+
+void linphone_tunnel_enable_logs_with_handler(LinphoneTunnel *tunnel, bool_t enabled, LogHandler logHandler){
+       bcTunnel(tunnel)->enableLogs(enabled, logHandler);
+}
+
+void linphone_tunnel_set_http_proxy_auth_info(LinphoneTunnel *tunnel, const char* username,const char* passwd){
+       bcTunnel(tunnel)->setHttpProxyAuthInfo(username, passwd);
+}
+
+void linphone_tunnel_reconnect(LinphoneTunnel *tunnel){
+       bcTunnel(tunnel)->reconnect();
+}
+
+void linphone_tunnel_auto_detect(LinphoneTunnel *tunnel){
+       bcTunnel(tunnel)->autoDetect();
+}
+
+
+static inline _LpConfig *config(LinphoneTunnel *tunnel){
+       return ((belledonnecomm::TunnelManager *)tunnel)->getLinphoneCore()->config;
+}
+
+/**
+ * Set tunnel server addresses. "host1:port1 host2:port2 host3:port3"
+**/
+void linphone_tunnel_set_server_addresses(LinphoneTunnel *tunnel, const char *addresses){
+       lp_config_set_string(config(tunnel),"tunnel","server_addresses",addresses);
+}
+
+/**
+ * Get tunnel server addresses. "host1:port1 host2:port2 host3:port3"
+**/
+const char *linphone_tunnel_get_server_addresses(LinphoneTunnel *tunnel){
+       return lp_config_get_string(config(tunnel),"tunnel","server_addresses", NULL);
+}
+
+/**
+ * Set tunnel state.
+**/
+void linphone_tunnel_set_state(LinphoneTunnel *tunnel, LinphoneTunnelState state){
+       switch (state) {
+               case LinphoneTunnelEnabled:
+                       lp_config_set_string(config(tunnel),"tunnel","tunnel_state","enabled");
+                       break;
+               case LinphoneTunnelDisabled:
+                       lp_config_set_string(config(tunnel),"tunnel","tunnel_state","disabled");
+                       break;
+               case LinphoneTunnelAuto:
+                       lp_config_set_string(config(tunnel),"tunnel","tunnel_state","auto");
+                       break;
+       }
+}
+
+/**
+ * Get tunnel state.
+**/
+LinphoneTunnelState linphone_tunnel_get_state(LinphoneTunnel *tunnel){
+       const char *state=lp_config_get_string(config(tunnel),"tunnel","tunnel_state","disabled");
+       if (0==strcmp("enabled", state)){
+               return LinphoneTunnelEnabled;
+       } else if (0==strcmp("auto", state)){
+               return LinphoneTunnelAuto;
+       } else {
+               return LinphoneTunnelDisabled;
+       }
+}
diff --git a/coreapi/linphone_tunnel.h b/coreapi/linphone_tunnel.h
new file mode 100644 (file)
index 0000000..6a2d521
--- /dev/null
@@ -0,0 +1,85 @@
+/***************************************************************************
+ *            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 LINPHONETUNNELMANAGER_H
+#define LINPHONETUNNELMANAGER_H
+
+#include "linphonecore.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+typedef void (*LogHandler)(int log_level, const char *str, va_list l);
+
+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);
+void linphone_tunnel_clean_servers(LinphoneTunnel *tunnel);
+void linphone_tunnel_enable(LinphoneTunnel *tunnel, bool_t enabled);
+bool_t linphone_tunnel_enabled(LinphoneTunnel *tunnel);
+void linphone_tunnel_enable_logs(LinphoneTunnel *tunnel, bool_t enabled);
+void linphone_tunnel_enable_logs_with_handler(LinphoneTunnel *tunnel, bool_t enabled, LogHandler logHandler);
+void linphone_tunnel_reconnect(LinphoneTunnel *tunnel);
+void linphone_tunnel_auto_detect(LinphoneTunnel *tunnel);
+void linphone_tunnel_set_http_proxy_auth_info(LinphoneTunnel*tunnel, const char* username,const char* passwd);
+
+
+/**
+ * LinphoneTunnelState describes the tunnel activation states.
+ */
+typedef enum _LinphoneTunnelState{
+       LinphoneTunnelDisabled, /**<The tunnel is always on */
+       LinphoneTunnelEnabled, /**<The tunnel is always off */
+       LinphoneTunnelAuto /**<The tunnel is active if needed */
+}LinphoneTunnelState;
+
+/**
+ * Set tunnel addresses.
+**/
+void linphone_tunnel_set_server_addresses(LinphoneTunnel *tunnel, const char *lists);
+
+/**
+ * Get tunnel addresses.
+**/
+const char *linphone_tunnel_get_server_addresses(LinphoneTunnel *tunnel);
+
+/**
+ * Set tunnel state.
+**/
+void linphone_tunnel_set_state(LinphoneTunnel *tunnel, LinphoneTunnelState state);
+
+/**
+ * Get tunnel state.
+**/
+LinphoneTunnelState linphone_tunnel_get_state(LinphoneTunnel *tunnel);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/coreapi/linphone_tunnel_manager.cc b/coreapi/linphone_tunnel_manager.cc
deleted file mode 100644 (file)
index 6578b74..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/***************************************************************************
- *            linphone_tunnel_manager.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_manager.h"
-#include "TunnelManager.hh"
-#include "linphonecore.h"
-#include "private.h"
-#include "lpconfig.h"
-
-static inline belledonnecomm::TunnelManager *bcTunnel(LinphoneTunnel *tunnel){
-       return (belledonnecomm::TunnelManager *)tunnel;
-}
-
-extern "C" LinphoneTunnel* linphone_core_tunnel_new(LinphoneCore *lc){
-       LinphoneTunnel* tunnel= (LinphoneTunnel*) new belledonnecomm::TunnelManager(lc);
-       return tunnel;
-}
-
-LinphoneTunnel* linphone_tunnel_get(LinphoneCore *lc){
-       return lc->tunnel;
-}
-
-void linphone_tunnel_destroy(LinphoneTunnel *tunnel){
-       delete bcTunnel(tunnel);
-}
-
-void linphone_tunnel_add_server(LinphoneTunnel *tunnel, const char *host, int port){
-       bcTunnel(tunnel)->addServer(host, port);
-}
-
-void linphone_tunnel_add_server_and_mirror(LinphoneTunnel *tunnel, const char *host, int port, int remote_udp_mirror, int delay){
-       bcTunnel(tunnel)->addServer(host, port, remote_udp_mirror, delay);
-}
-
-void linphone_tunnel_clean_servers(LinphoneTunnel *tunnel){
-       bcTunnel(tunnel)->cleanServers();
-}
-
-void linphone_tunnel_enable(LinphoneTunnel *tunnel, bool_t enabled){
-       bcTunnel(tunnel)->enable(enabled);
-}
-
-bool_t linphone_tunnel_enabled(LinphoneTunnel *tunnel){
-       return bcTunnel(tunnel)->isEnabled();
-}
-
-void linphone_tunnel_enable_logs(LinphoneTunnel *tunnel, bool_t enabled){
-       bcTunnel(tunnel)->enableLogs(enabled);
-}
-
-void linphone_tunnel_enable_logs_with_handler(LinphoneTunnel *tunnel, bool_t enabled, LogHandler logHandler){
-       bcTunnel(tunnel)->enableLogs(enabled, logHandler);
-}
-
-void linphone_tunnel_set_http_proxy_auth_info(LinphoneTunnel *tunnel, const char* username,const char* passwd){
-       bcTunnel(tunnel)->setHttpProxyAuthInfo(username, passwd);
-}
-
-void linphone_tunnel_reconnect(LinphoneTunnel *tunnel){
-       bcTunnel(tunnel)->reconnect();
-}
-
-void linphone_tunnel_auto_detect(LinphoneTunnel *tunnel){
-       bcTunnel(tunnel)->autoDetect();
-}
-
-
-static inline _LpConfig *config(LinphoneTunnel *tunnel){
-       return ((belledonnecomm::TunnelManager *)tunnel)->getLinphoneCore()->config;
-}
-
-/**
- * Set tunnel server addresses. "host1:port1 host2:port2 host3:port3"
-**/
-void linphone_tunnel_set_server_addresses(LinphoneTunnel *tunnel, const char *addresses){
-       lp_config_set_string(config(tunnel),"tunnel","server_addresses",addresses);
-}
-
-/**
- * Get tunnel server addresses. "host1:port1 host2:port2 host3:port3"
-**/
-const char *linphone_tunnel_get_server_addresses(LinphoneTunnel *tunnel){
-       return lp_config_get_string(config(tunnel),"tunnel","server_addresses", NULL);
-}
-
-/**
- * Set tunnel state.
-**/
-void linphone_tunnel_set_state(LinphoneTunnel *tunnel, LinphoneTunnelState state){
-       switch (state) {
-               case LinphoneTunnelEnabled:
-                       lp_config_set_string(config(tunnel),"tunnel","tunnel_state","enabled");
-                       break;
-               case LinphoneTunnelDisabled:
-                       lp_config_set_string(config(tunnel),"tunnel","tunnel_state","disabled");
-                       break;
-               case LinphoneTunnelAuto:
-                       lp_config_set_string(config(tunnel),"tunnel","tunnel_state","auto");
-                       break;
-       }
-}
-
-/**
- * Get tunnel state.
-**/
-LinphoneTunnelState linphone_tunnel_get_state(LinphoneTunnel *tunnel){
-       const char *state=lp_config_get_string(config(tunnel),"tunnel","tunnel_state","disabled");
-       if (0==strcmp("enabled", state)){
-               return LinphoneTunnelEnabled;
-       } else if (0==strcmp("auto", state)){
-               return LinphoneTunnelAuto;
-       } else {
-               return LinphoneTunnelDisabled;
-       }
-}
diff --git a/coreapi/linphone_tunnel_manager.h b/coreapi/linphone_tunnel_manager.h
deleted file mode 100644 (file)
index 45e0db1..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/***************************************************************************
- *            linphone_tunnel_manager.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 LINPHONETUNNELMANAGER_H
-#define LINPHONETUNNELMANAGER_H
-
-#include "linphonecore.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-typedef struct LinphoneTunnel LinphoneTunnel;
-typedef void (*LogHandler)(int log_level, const char *str, va_list l);
-
-
-LinphoneTunnel *linphone_tunnel_get(LinphoneCore *lc);
-
-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);
-void linphone_tunnel_clean_servers(LinphoneTunnel *tunnel);
-void linphone_tunnel_enable(LinphoneTunnel *tunnel, bool_t enabled);
-bool_t linphone_tunnel_enabled(LinphoneTunnel *tunnel);
-void linphone_tunnel_enable_logs(LinphoneTunnel *tunnel, bool_t enabled);
-void linphone_tunnel_enable_logs_with_handler(LinphoneTunnel *tunnel, bool_t enabled, LogHandler logHandler);
-void linphone_tunnel_reconnect(LinphoneTunnel *tunnel);
-void linphone_tunnel_auto_detect(LinphoneTunnel *tunnel);
-void linphone_tunnel_set_http_proxy_auth_info(const char* username,const char* passwd);
-
-
-/**
- * LinphoneTunnelState describes the tunnel activation states.
- */
-typedef enum _LinphoneTunnelState{
-       LinphoneTunnelDisabled, /**<The tunnel is always on */
-       LinphoneTunnelEnabled, /**<The tunnel is always off */
-       LinphoneTunnelAuto /**<The tunnel is active if needed */
-}LinphoneTunnelState;
-
-/**
- * Set tunnel addresses.
-**/
-void linphone_tunnel_set_server_addresses(LinphoneTunnel *tunnel, const char *lists);
-
-/**
- * Get tunnel addresses.
-**/
-const char *linphone_tunnel_get_server_addresses(LinphoneTunnel *tunnel);
-
-/**
- * Set tunnel state.
-**/
-void linphone_tunnel_set_state(LinphoneTunnel *tunnel, LinphoneTunnelState state);
-
-/**
- * Get tunnel state.
-**/
-LinphoneTunnelState linphone_tunnel_get_state(LinphoneTunnel *tunnel);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
index e32c4d0fa612aff42c252d35d229bbf02981f328..b9cd9cae50e8026bc4bf06b24ed884b573696b44 100644 (file)
@@ -344,16 +344,6 @@ typedef enum _LinphoneRegistrationState{
  */
 const char *linphone_registration_state_to_string(LinphoneRegistrationState cs);
 
-/**
- * True if tunnel support was compiled.
- */
-bool_t linphone_core_tunnel_available();
-
-/**
- * Update tunnel using configuration.
- */
-void linphone_core_update_tunnel(LinphoneCore *lc);
-
 LinphoneProxyConfig *linphone_proxy_config_new(void);
 int linphone_proxy_config_set_server_addr(LinphoneProxyConfig *obj, const char *server_addr);
 int linphone_proxy_config_set_identity(LinphoneProxyConfig *obj, const char *identity);
@@ -1084,6 +1074,21 @@ void linphone_core_set_media_encryption_mandatory(LinphoneCore *lc, bool_t m);
  */
 void linphone_core_init_default_params(LinphoneCore*lc, LinphoneCallParams *params);
 
+/**
+ * True if tunnel support was compiled.
+ */
+bool_t linphone_core_tunnel_available();
+
+/**
+ * Update tunnel using configuration.
+ */
+void linphone_core_update_tunnel(LinphoneCore *lc);
+typedef struct LinphoneTunnel LinphoneTunnel;
+/**
+* get tunnel instance if available
+*/
+LinphoneTunnel *linphone_core_get_tunnel(LinphoneCore *lc);
+
 #ifdef __cplusplus
 }
 #endif
index 0396fcd4850e0ea154105681ab11ed89747ac6c9..26dc0e035c9cc0e64015112e0ba48da8250c839e 100644 (file)
@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include <ortp/zrtp.h>
 
 #ifdef TUNNEL_ENABLED
-#include "linphone_tunnel_manager.h"
+#include "linphone_tunnel.h"
 #endif
 
 extern "C" {
index 987dd7951d749291f7bd1119b01ca72a3ebf7ded..a21fc8b20aec9bb17379c52530ac201f087230dd 100644 (file)
@@ -28,7 +28,7 @@
 extern "C" {
 #endif
 #include "linphonecore.h"
-#include "linphone_tunnel_manager.h"
+#include "linphone_tunnel.h"
 #include "linphonecore_utils.h"
 #include "sal.h"
 
index 0e69550cd2d09e8fc272e745bd52ab19acfb83f1..30890c7651c749aa56b01464dd451600e795c87b 100644 (file)
@@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
 
 #include "linphone.h"
-#include "linphone_tunnel_manager.h"
+#include "linphone_tunnel.h"
 
 typedef enum {
        CAP_IGNORE,
@@ -1023,7 +1023,7 @@ void linphone_gtk_edit_tunnel(GtkButton *button){
 #ifdef TUNNEL_ENABLED
        LinphoneCore *lc=linphone_gtk_get_core();
        GtkWidget *w=linphone_gtk_create_window("tunnel_config");
-       LinphoneTunnel *tunnel=linphone_tunnel_get(lc);
+       LinphoneTunnel *tunnel=linphone_core_get_tunnel(lc);
        char host[50]={'\0'};
        int port=0;
        tunnel_get_server_host_and_port(tunnel, host, sizeof(host), &port);
@@ -1050,7 +1050,7 @@ void linphone_gtk_tunnel_ok(GtkButton *button){
        LinphoneCore *lc=linphone_gtk_get_core();
        GtkWidget *w=gtk_widget_get_toplevel(GTK_WIDGET(button));
        char address[50]={'\0'};
-       LinphoneTunnel *tunnel=linphone_tunnel_get(lc);
+       LinphoneTunnel *tunnel=linphone_core_get_tunnel(lc);
 
        gint port = (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(w,"port")));
        gboolean enabled=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"radio_enable")));