liblinphone
3.6.1
|
Typedefs | |
typedef struct _LinphoneTunnelConfig | LinphoneTunnelConfig |
typedef struct _LinphoneTunnelConfig LinphoneTunnelConfig |
This set of methods enhance LinphoneCore functionalities in order to provide an easy to use API to
It takes in charge automatically the SIP registration procedure when connecting or disconnecting to a tunnel server. No other action on LinphoneCore is required to enable full operation in tunnel mode.
LinphoneTunnelConfig* linphone_tunnel_config_new | ( | ) |
Create a new tunnel configuration
void linphone_tunnel_config_set_host | ( | LinphoneTunnelConfig * | tunnel, |
const char * | host | ||
) |
Set address of server.
tunnel | configuration object |
host | tunnel server ip address |
const char* linphone_tunnel_config_get_host | ( | const LinphoneTunnelConfig * | tunnel | ) |
Get address of server.
tunnel | configuration object |
void linphone_tunnel_config_set_port | ( | LinphoneTunnelConfig * | tunnel, |
int | port | ||
) |
Set tls port of server.
tunnel | configuration object |
port | tunnel server tls port, recommended value is 443 |
int linphone_tunnel_config_get_port | ( | const LinphoneTunnelConfig * | tunnel | ) |
Get tls port of server.
tunnel | configuration object |
void linphone_tunnel_config_set_remote_udp_mirror_port | ( | LinphoneTunnelConfig * | tunnel, |
int | remote_udp_mirror_port | ||
) |
Set the remote port on the tunnel server side used to test udp reachability.
tunnel | configuration object |
remote_udp_mirror_port | remote port on the tunnel server side used to test udp reachability, set to -1 to disable the feature |
int linphone_tunnel_config_get_remote_udp_mirror_port | ( | const LinphoneTunnelConfig * | tunnel | ) |
Get the remote port on the tunnel server side used to test udp reachability.
tunnel | configuration object |
void linphone_tunnel_config_set_delay | ( | LinphoneTunnelConfig * | tunnel, |
int | delay | ||
) |
Set the udp packet round trip delay in ms for a tunnel configuration.
tunnel | configuration object |
delay | udp packet round trip delay in ms considered as acceptable. recommended value is 1000 ms. |
int linphone_tunnel_config_get_delay | ( | const LinphoneTunnelConfig * | tunnel | ) |
Get the udp packet round trip delay in ms for a tunnel configuration.
tunnel | configuration object |
void linphone_tunnel_config_destroy | ( | LinphoneTunnelConfig * | tunnel | ) |
Destroy a tunnel configuration
tunnel | configuration object |
void linphone_tunnel_add_server | ( | LinphoneTunnel * | tunnel, |
LinphoneTunnelConfig * | tunnel_config | ||
) |
Add tunnel server configuration
tunnel | object |
tunnel_config | object |
void linphone_tunnel_remove_server | ( | LinphoneTunnel * | tunnel, |
LinphoneTunnelConfig * | tunnel_config | ||
) |
Remove tunnel server configuration
tunnel | object |
tunnel_config | object |
const MSList* linphone_tunnel_get_servers | ( | LinphoneTunnel * | tunnel | ) |
tunnel | object returns a string of space separated list of host:port of tunnel server addresses |
void linphone_tunnel_clean_servers | ( | LinphoneTunnel * | tunnel | ) |
tunnel | object Removes all tunnel server address previously entered with addServer() |
void linphone_tunnel_enable | ( | LinphoneTunnel * | tunnel, |
bool_t | enabled | ||
) |
Sets whether tunneling of SIP and RTP is required.
tunnel | object |
enabled | If true enter in tunneled mode, if false exits from tunneled mode. The TunnelManager takes care of refreshing SIP registration when switching on or off the tunneled mode. |
bool_t linphone_tunnel_enabled | ( | LinphoneTunnel * | tunnel | ) |
tunnel | object Returns a boolean indicating whether tunneled operation is enabled. |
bool_t linphone_tunnel_connected | ( | LinphoneTunnel * | tunnel | ) |
tunnel | object Returns a boolean indicating whether tunnel is connected successfully. |
void linphone_tunnel_reconnect | ( | LinphoneTunnel * | tunnel | ) |
tunnel | object Forces reconnection to the tunnel server. This method is useful when the device switches from wifi to Edge/3G or vice versa. In most cases the tunnel client socket won't be notified promptly that its connection is now zombie, so it is recommended to call this method that will cause the lost connection to be closed and new connection to be issued. |
void linphone_tunnel_auto_detect | ( | LinphoneTunnel * | tunnel | ) |
Start tunnel need detection.
tunnel | object In auto detect mode, the tunnel manager try to establish a real time rtp cummunication with the tunnel server on specified port. In case of success, the tunnel is automatically turned off. Otherwise, if no udp commmunication is feasible, tunnel mode is turned on. Call this method each time to run the auto detection algorithm |
void linphone_tunnel_set_http_proxy | ( | LinphoneTunnel * | tunnel, |
const char * | host, | ||
int | port, | ||
const char * | username, | ||
const char * | passwd | ||
) |
Set an optional http proxy to go through when connecting to tunnel server.
tunnel | LinphoneTunnel object |
host | Http proxy host. |
port | http proxy port. |
username | optional http proxy username if the proxy request authentication. Currently only basic authentication is supported. Use NULL if not needed. |
password | optional http proxy password. Use NULL if not needed. |
void linphone_tunnel_get_http_proxy | ( | LinphoneTunnel * | tunnel, |
const char ** | host, | ||
int * | port, | ||
const char ** | username, | ||
const char ** | passwd | ||
) |
Retrieve optional http proxy configuration previously set with linphone_tunnel_set_http_proxy().
tunnel | LinphoneTunnel object |
host | Http proxy host. |
port | http proxy port. |
username | optional http proxy username if the proxy request authentication. Currently only basic authentication is supported. Use NULL if not needed. |
password | optional http proxy password. Use NULL if not needed. |