예제 #1
0
 public static switch_status_t switch_xml_unbind_search_function_ptr(SWIGTYPE_p_f_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char_p_switch_event_t_p_void__p_switch_xml function)
 {
     switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_xml_unbind_search_function_ptr(SWIGTYPE_p_f_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char_p_switch_event_t_p_void__p_switch_xml.getCPtr(function));
     return ret;
 }
예제 #2
0
 public static switch_status_t switch_xml_bind_search_function_ret(SWIGTYPE_p_f_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char_p_switch_event_t_p_void__p_switch_xml function, uint sections, SWIGTYPE_p_void user_data, SWIGTYPE_p_p_switch_xml_binding ret_binding)
 {
     switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_xml_bind_search_function_ret(SWIGTYPE_p_f_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char_p_switch_event_t_p_void__p_switch_xml.getCPtr(function), sections, SWIGTYPE_p_void.getCPtr(user_data), SWIGTYPE_p_p_switch_xml_binding.getCPtr(ret_binding));
     return ret;
 }
 public static IDisposable Bind(Func<XmlBindingArgs, string> f, switch_xml_section_enum_t sections) {
     switch_xml_search_function_delegate boundFunc = (section, tag, key, keyval, param, userData) => {
         var args = new XmlBindingArgs { Section = section, TagName = tag, KeyName = key, KeyValue = keyval, Parameters = new switch_event(param, false) };
         var xmlStr = f(args);
         var fsxml = string.IsNullOrEmpty(xmlStr) ? null : freeswitch.switch_xml_parse_str_dynamic(xmlStr, switch_bool_t.SWITCH_TRUE);
         return switch_xml.getCPtr(fsxml).Handle;
     };
     var fp = Marshal.GetFunctionPointerForDelegate(boundFunc);
     var swigFp = new SWIGTYPE_p_f_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char_p_switch_event_t_p_void__p_switch_xml(fp, false);
     var res = freeswitch.switch_xml_bind_search_function_ret(swigFp, (uint)sections, null, null);
     if (res != switch_status_t.SWITCH_STATUS_SUCCESS) {
         throw new InvalidOperationException("Call to switch_xml_bind_search_function_ret failed, result: " + res + ".");
     }
     return new SwitchXmlSearchBinding(swigFp, boundFunc);
 }
예제 #4
0
 internal static HandleRef getCPtr(SWIGTYPE_p_f_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char_p_switch_event_t_p_void__p_switch_xml obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
 private SwitchXmlSearchBinding(SWIGTYPE_p_f_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char_p_switch_event_t_p_void__p_switch_xml function,
     switch_xml_search_function_delegate origDelegate) {
     this.function = function;
     this.del = origDelegate;
 }