From: Anthony Minessale Date: Fri, 14 Nov 2008 16:54:54 +0000 (+0000) Subject: expose funcs X-Git-Tag: v1.0.2~515 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc6a7ced55e620648b14cc1e84a155ff8b5692b2;p=thirdparty%2Ffreeswitch.git expose funcs git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10400 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/include/switch_xml.h b/src/include/switch_xml.h index 7d529c78fa..75531f91b8 100644 --- a/src/include/switch_xml.h +++ b/src/include/switch_xml.h @@ -354,6 +354,9 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_open_cfg(const char *file_path, switch_x ///\return SWITCH_STATUS_SUCCESS if successful ///\note gateway functions will be executed in the order they were binded until a success is found else the root registry will be used +SWITCH_DECLARE(void) switch_xml_set_binding_sections(switch_xml_binding_t *binding, switch_xml_section_t sections); +SWITCH_DECLARE(void) switch_xml_set_binding_user_data(switch_xml_binding_t *binding, void *user_data); + SWITCH_DECLARE(switch_status_t) switch_xml_bind_search_function_ret(switch_xml_search_function_t function, switch_xml_section_t sections, void *user_data, switch_xml_binding_t **ret); #define switch_xml_bind_search_function(_f, _s, _u) switch_xml_bind_search_function_ret(_f, _s, _u, NULL) diff --git a/src/switch_xml.c b/src/switch_xml.c index bf7e60230a..41f3232f64 100644 --- a/src/switch_xml.c +++ b/src/switch_xml.c @@ -228,6 +228,18 @@ SWITCH_DECLARE(switch_status_t) switch_xml_unbind_search_function_ptr(switch_xml return status; } +SWITCH_DECLARE(void) switch_xml_set_binding_sections(switch_xml_binding_t *binding, switch_xml_section_t sections) +{ + switch_assert(binding); + binding->sections = sections; +} + +SWITCH_DECLARE(void) switch_xml_set_binding_user_data(switch_xml_binding_t *binding, void *user_data) +{ + switch_assert(binding); + binding->user_data = user_data; +} + SWITCH_DECLARE(switch_status_t) switch_xml_bind_search_function_ret(switch_xml_search_function_t function, switch_xml_section_t sections, void *user_data, switch_xml_binding_t **ret) { switch_xml_binding_t *binding = NULL, *ptr = NULL;