forked from mirrors/linphone-iphone
Add API to know if tunnel auto detect is enabled.
This commit is contained in:
parent
9ef261f66e
commit
0933640e54
2 changed files with 14 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue