linphone_tunnel_stubs.c 4.39 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
/***************************************************************************
 *            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.
 */

26 27
#include "linphone/tunnel.h"
#include "linphone/core.h"
28
#include "private.h"
29
#include "linphone/lpconfig.h"
30 31


32
LinphoneTunnel* linphone_core_get_tunnel(const LinphoneCore *lc){
33 34 35 36 37 38 39 40
	return lc->tunnel;
}

/*stubs to avoid to have #ifdef TUNNEL_ENABLED in upper layers*/

void linphone_tunnel_destroy(LinphoneTunnel *tunnel){
}

41 42 43 44 45 46 47 48
LinphoneTunnel *linphone_tunnel_ref(LinphoneTunnel *tunnel) {
	ms_warning("linphone_tunnel_ref() - stubbed, no implementation");
	return tunnel;
}

void linphone_tunnel_unref(LinphoneTunnel *tunnel) {
	ms_warning("linphone_tunnel_unref() - stubbed, no implementation");
}
49 50

void linphone_tunnel_add_server(LinphoneTunnel *tunnel, LinphoneTunnelConfig *tunnel_config){
51
	ms_warning("linphone_tunnel_add_server() - stubbed, no implementation");
52 53
}

54
void linphone_tunnel_remove_server(LinphoneTunnel *tunnel, LinphoneTunnelConfig *tunnel_config){
55
	ms_warning("linphone_tunnel_remove_server() - stubbed, no implementation");
56 57
}

58
const MSList *linphone_tunnel_get_servers(const LinphoneTunnel *tunnel){
59
	ms_warning("linphone_tunnel_get_servers() - stubbed, no implementation");
60
	return NULL;
61 62 63
}

void linphone_tunnel_clean_servers(LinphoneTunnel *tunnel){
64
	ms_warning("linphone_tunnel_clean_servers() - stubbed, no implementation");
65 66
}

67
void linphone_tunnel_set_mode(LinphoneTunnel *tunnel, LinphoneTunnelMode mode) {
68
	ms_warning("linphone_tunnel_set_mode() - stubbed, no implementation");
69 70
}

71
LinphoneTunnelMode linphone_tunnel_get_mode(const LinphoneTunnel *tunnel){
72
	ms_warning("linphone_tunnel_get_mode() - stubbed, no implementation");
73
	return LinphoneTunnelModeDisable;
74 75
}

76
void linphone_tunnel_enable_dual_mode(LinphoneTunnel *tunnel, bool_t dual_mode_enabled) {
77 78 79
	ms_warning("linphone_tunnel_set_dual_mode() - stubbed, no implementation");
}

80
bool_t linphone_tunnel_dual_mode_enabled(const LinphoneTunnel *tunnel) {
81
	ms_warning("linphone_tunnel_get_dual_mode() - stubbed, no implementation");
Ghislain MARY's avatar
Ghislain MARY committed
82
	return FALSE;
83 84
}

85
bool_t linphone_tunnel_connected(const LinphoneTunnel *tunnel){
86 87 88
	return FALSE;
}

89 90 91
bool_t linphone_tunnel_get_activated(const LinphoneTunnel *tunnel){
	return FALSE;
}
92

93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
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_configure(LinphoneTunnel *tunnel){
109
	ms_warning("linphone_tunnel_configure() - stubbed, no implementation");
110 111
}

112 113 114
void linphone_tunnel_enable_sip(LinphoneTunnel *tunnel, bool_t enable) {
	ms_warning("linphone_tunnel_enable_sip() - stubbed, no implementation");
}
115
bool_t linphone_tunnel_sip_enabled(const LinphoneTunnel *tunnel) { return FALSE; }
116 117 118 119 120 121

/* Deprecated functions */
void linphone_tunnel_enable(LinphoneTunnel *tunnel, bool_t enabled) {}
bool_t linphone_tunnel_enabled(const LinphoneTunnel *tunnel) { return FALSE; }
void linphone_tunnel_auto_detect(LinphoneTunnel *tunnel) {}
bool_t linphone_tunnel_auto_detect_enabled(LinphoneTunnel *tunnel) { return FALSE; }
122
void linphone_tunnel_simulate_udp_loss(LinphoneTunnel *tunnel, bool_t enabled) {}