From aecda5f2c1f9aadbf0320f67799016284f5a277c Mon Sep 17 00:00:00 2001 From: smorlat <smorlat@3f6dc0c8-ddfe-455d-9043-3cd528dc4637> Date: Mon, 4 Jan 2010 11:20:22 +0000 Subject: [PATCH] add linphone_core_clear_proxy_config git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@799 3f6dc0c8-ddfe-455d-9043-3cd528dc4637 --- linphone/coreapi/linphonecore.h | 3 ++- linphone/coreapi/proxy.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/linphone/coreapi/linphonecore.h b/linphone/coreapi/linphonecore.h index cc070cb911..a86abe12d0 100644 --- a/linphone/coreapi/linphonecore.h +++ b/linphone/coreapi/linphonecore.h @@ -352,7 +352,6 @@ int linphone_proxy_config_done(LinphoneProxyConfig *obj); void linphone_proxy_config_enable_publish(LinphoneProxyConfig *obj, bool_t val); bool_t linphone_proxy_config_is_registered(const LinphoneProxyConfig *obj); const char *linphone_proxy_config_get_domain(const LinphoneProxyConfig *cfg); - /** Returns the proxy configured identity as a const char * */ #define linphone_proxy_config_get_route(obj) ((obj)->reg_route) /** Returns the proxy configured identity as a const char * */ @@ -723,6 +722,8 @@ bool_t linphone_core_check_payload_type_usability(LinphoneCore *lc, PayloadType int linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *config); +void linphone_core_clear_proxy_config(LinphoneCore *lc); + void linphone_core_remove_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *config); const MSList *linphone_core_get_proxy_config_list(const LinphoneCore *lc); diff --git a/linphone/coreapi/proxy.c b/linphone/coreapi/proxy.c index 75e918f62c..9278279e9e 100644 --- a/linphone/coreapi/proxy.c +++ b/linphone/coreapi/proxy.c @@ -557,7 +557,17 @@ void linphone_core_remove_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *cf } } - +/** + * Erase all proxies from config. + * + * @ingroup proxy +**/ +void linphone_core_clear_proxy_config(LinphoneCore *lc){ + const MSList* list=linphone_core_get_proxy_config_list((const LinphoneCore*)lc); + for(;list!=NULL;list=list->next){ + linphone_core_remove_proxy_config(lc,(LinphoneProxyConfig *)list->data); + } +} /** * Sets the default proxy. * -- GitLab