Commit 0933640e authored by Ghislain MARY's avatar Ghislain MARY

Add API to know if tunnel auto detect is enabled.

parent 9ef261f6
......@@ -36,6 +36,7 @@ LinphoneTunnel* linphone_core_get_tunnel(LinphoneCore *lc){
struct _LinphoneTunnel {
belledonnecomm::TunnelManager *manager;
MSList *config_list;
bool_t auto_detect_enabled;
};
extern "C" LinphoneTunnel* linphone_core_tunnel_new(LinphoneCore *lc){
......@@ -225,6 +226,7 @@ void linphone_tunnel_clean_servers(LinphoneTunnel *tunnel){
}
void linphone_tunnel_enable(LinphoneTunnel *tunnel, bool_t enabled){
tunnel->auto_detect_enabled = FALSE;
lp_config_set_int(config(tunnel),"tunnel","enabled",(int)enabled);
bcTunnel(tunnel)->enable(enabled);
}
......@@ -311,9 +313,14 @@ void linphone_tunnel_reconnect(LinphoneTunnel *tunnel){
}
void linphone_tunnel_auto_detect(LinphoneTunnel *tunnel){
tunnel->auto_detect_enabled = TRUE;
bcTunnel(tunnel)->autoDetect();
}
bool_t linphone_tunnel_auto_detect_enabled(LinphoneTunnel *tunnel) {
return tunnel->auto_detect_enabled;
}
static void my_ortp_logv(OrtpLogLevel level, const char *fmt, va_list args){
ortp_logv(level,fmt,args);
}
......
......@@ -195,6 +195,13 @@ LINPHONE_PUBLIC void linphone_tunnel_reconnect(LinphoneTunnel *tunnel);
*/
LINPHONE_PUBLIC void linphone_tunnel_auto_detect(LinphoneTunnel *tunnel);
/**
* Tells whether tunnel auto detection is enabled.
* @param[in] tunnel LinphoneTunnel object.
* @return TRUE if auto detection is enabled, FALSE otherwise.
*/
LINPHONE_PUBLIC bool_t linphone_tunnel_auto_detect_enabled(LinphoneTunnel *tunnel);
/**
* Set an optional http proxy to go through when connecting to tunnel server.
* @param tunnel LinphoneTunnel object
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment