]> sjero.net Git - linphone/blobdiff - coreapi/linphone_tunnel_manager.cc
rename LinphoneTunnelManager LinphoneTunnel
[linphone] / coreapi / linphone_tunnel_manager.cc
index 0bf2efa3ff500f9475d7ad584eecce4958502a48..6578b74950b52e71393d9177a27cbe8814937e7d 100644 (file)
 #include "private.h"
 #include "lpconfig.h"
 
-static inline belledonnecomm::TunnelManager *bcTunnel(LinphoneTunnelManager *tunnel){
+static inline belledonnecomm::TunnelManager *bcTunnel(LinphoneTunnel *tunnel){
        return (belledonnecomm::TunnelManager *)tunnel;
 }
 
-extern "C" LinphoneTunnelManager* linphone_core_tunnel_new(LinphoneCore *lc){
-       LinphoneTunnelManager* tunnel= (LinphoneTunnelManager*) new belledonnecomm::TunnelManager(lc);
+extern "C" LinphoneTunnel* linphone_core_tunnel_new(LinphoneCore *lc){
+       LinphoneTunnel* tunnel= (LinphoneTunnel*) new belledonnecomm::TunnelManager(lc);
        return tunnel;
 }
 
-LinphoneTunnelManager* linphone_tunnel_get(LinphoneCore *lc){
+LinphoneTunnel* linphone_tunnel_get(LinphoneCore *lc){
        return lc->tunnel;
 }
 
-void linphone_tunnel_destroy(LinphoneTunnelManager *tunnel){
+void linphone_tunnel_destroy(LinphoneTunnel *tunnel){
        delete bcTunnel(tunnel);
 }
 
-void linphone_tunnel_add_server(LinphoneTunnelManager *tunnel, const char *host, int port){
+void linphone_tunnel_add_server(LinphoneTunnel *tunnel, const char *host, int port){
        bcTunnel(tunnel)->addServer(host, port);
 }
 
-void linphone_tunnel_add_server_and_mirror(LinphoneTunnelManager *tunnel, const char *host, int port, int remote_udp_mirror, int delay){
+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(LinphoneTunnelManager *tunnel){
+void linphone_tunnel_clean_servers(LinphoneTunnel *tunnel){
        bcTunnel(tunnel)->cleanServers();
 }
 
-void linphone_tunnel_enable(LinphoneTunnelManager *tunnel, bool_t enabled){
+void linphone_tunnel_enable(LinphoneTunnel *tunnel, bool_t enabled){
        bcTunnel(tunnel)->enable(enabled);
 }
 
-bool_t linphone_tunnel_enabled(LinphoneTunnelManager *tunnel){
+bool_t linphone_tunnel_enabled(LinphoneTunnel *tunnel){
        return bcTunnel(tunnel)->isEnabled();
 }
 
-void linphone_tunnel_enable_logs(LinphoneTunnelManager *tunnel, bool_t enabled){
+void linphone_tunnel_enable_logs(LinphoneTunnel *tunnel, bool_t enabled){
        bcTunnel(tunnel)->enableLogs(enabled);
 }
 
-void linphone_tunnel_enable_logs_with_handler(LinphoneTunnelManager *tunnel, bool_t enabled, LogHandler logHandler){
+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(LinphoneTunnelManager *tunnel, const char* username,const char* passwd){
+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(LinphoneTunnelManager *tunnel){
+void linphone_tunnel_reconnect(LinphoneTunnel *tunnel){
        bcTunnel(tunnel)->reconnect();
 }
 
-void linphone_tunnel_auto_detect(LinphoneTunnelManager *tunnel){
+void linphone_tunnel_auto_detect(LinphoneTunnel *tunnel){
        bcTunnel(tunnel)->autoDetect();
 }
 
 
-static inline _LpConfig *config(LinphoneTunnelManager *tunnel){
+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(LinphoneTunnelManager *tunnel, const char *addresses){
+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(LinphoneTunnelManager *tunnel){
+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(LinphoneTunnelManager *tunnel, LinphoneTunnelState state){
+void linphone_tunnel_set_state(LinphoneTunnel *tunnel, LinphoneTunnelState state){
        switch (state) {
                case LinphoneTunnelEnabled:
                        lp_config_set_string(config(tunnel),"tunnel","tunnel_state","enabled");
@@ -126,7 +126,7 @@ void linphone_tunnel_set_state(LinphoneTunnelManager *tunnel, LinphoneTunnelStat
 /**
  * Get tunnel state.
 **/
-LinphoneTunnelState linphone_tunnel_get_state(LinphoneTunnelManager *tunnel){
+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;