From 454852bde0eb913a0f79f4f2ba13de7798418caf Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Wed, 2 Dec 2009 14:24:10 +0000 Subject: [PATCH] swigall git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15752 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- .../languages/mod_managed/freeswitch_wrap.cxx | 140 ++++++++++++++++++ src/mod/languages/mod_managed/managed/swig.cs | 111 ++++++++++++++ 2 files changed, 251 insertions(+) diff --git a/src/mod/languages/mod_managed/freeswitch_wrap.cxx b/src/mod/languages/mod_managed/freeswitch_wrap.cxx index f99d284b03..13bc3115dd 100644 --- a/src/mod/languages/mod_managed/freeswitch_wrap.cxx +++ b/src/mod/languages/mod_managed/freeswitch_wrap.cxx @@ -6125,6 +6125,28 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_core_session_sprintf(void * jarg1, c } +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_core_session_vsprintf(void * jarg1, char * jarg2, void * jarg3) { + char * jresult ; + switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; + char *arg2 = (char *) 0 ; + va_list arg3 ; + char *result = 0 ; + va_list *argp3 ; + + arg1 = (switch_core_session_t *)jarg1; + arg2 = (char *)jarg2; + argp3 = (va_list *)jarg3; + if (!argp3) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null va_list", 0); + return 0; + } + arg3 = *argp3; + result = (char *)switch_core_session_vsprintf(arg1,(char const *)arg2,arg3); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + SWIGEXPORT char * SWIGSTDCALL CSharp_switch_core_sprintf(void * jarg1, char * jarg2) { char * jresult ; switch_memory_pool_t *arg1 = (switch_memory_pool_t *) 0 ; @@ -6140,6 +6162,28 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_core_sprintf(void * jarg1, char * ja } +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_core_vsprintf(void * jarg1, char * jarg2, void * jarg3) { + char * jresult ; + switch_memory_pool_t *arg1 = (switch_memory_pool_t *) 0 ; + char *arg2 = (char *) 0 ; + va_list arg3 ; + char *result = 0 ; + va_list *argp3 ; + + arg1 = (switch_memory_pool_t *)jarg1; + arg2 = (char *)jarg2; + argp3 = (va_list *)jarg3; + if (!argp3) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null va_list", 0); + return 0; + } + arg3 = *argp3; + result = (char *)switch_core_vsprintf(arg1,(char const *)arg2,arg3); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_session_get_pool(void * jarg1) { void * jresult ; switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; @@ -9208,6 +9252,79 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_cache_db_handle_t_flags_get(void * jarg } +SWIGEXPORT void SWIGSTDCALL CSharp_switch_cache_db_handle_t_hash_set(void * jarg1, unsigned long jarg2) { + switch_cache_db_handle_t *arg1 = (switch_cache_db_handle_t *) 0 ; + unsigned long arg2 ; + + arg1 = (switch_cache_db_handle_t *)jarg1; + arg2 = (unsigned long)jarg2; + if (arg1) (arg1)->hash = arg2; + +} + + +SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_cache_db_handle_t_hash_get(void * jarg1) { + unsigned long jresult ; + switch_cache_db_handle_t *arg1 = (switch_cache_db_handle_t *) 0 ; + unsigned long result; + + arg1 = (switch_cache_db_handle_t *)jarg1; + result = (unsigned long) ((arg1)->hash); + jresult = (unsigned long)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_cache_db_handle_t_creator_set(void * jarg1, char * jarg2) { + switch_cache_db_handle_t *arg1 = (switch_cache_db_handle_t *) 0 ; + char *arg2 ; + + arg1 = (switch_cache_db_handle_t *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) strncpy((char *)arg1->creator, (const char *)arg2, 256); + else arg1->creator[0] = 0; + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_cache_db_handle_t_creator_get(void * jarg1) { + char * jresult ; + switch_cache_db_handle_t *arg1 = (switch_cache_db_handle_t *) 0 ; + char *result = 0 ; + + arg1 = (switch_cache_db_handle_t *)jarg1; + result = (char *)(char *) ((arg1)->creator); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_cache_db_handle_t_last_user_set(void * jarg1, char * jarg2) { + switch_cache_db_handle_t *arg1 = (switch_cache_db_handle_t *) 0 ; + char *arg2 ; + + arg1 = (switch_cache_db_handle_t *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) strncpy((char *)arg1->last_user, (const char *)arg2, 256); + else arg1->last_user[0] = 0; + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_cache_db_handle_t_last_user_get(void * jarg1) { + char * jresult ; + switch_cache_db_handle_t *arg1 = (switch_cache_db_handle_t *) 0 ; + char *result = 0 ; + + arg1 = (switch_cache_db_handle_t *)jarg1; + result = (char *)(char *) ((arg1)->last_user); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_cache_db_handle_t() { void * jresult ; switch_cache_db_handle_t *result = 0 ; @@ -9333,6 +9450,14 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_cache_db_execute_sql_callback(void * ja } +SWIGEXPORT void SWIGSTDCALL CSharp_switch_cache_db_status(void * jarg1) { + switch_stream_handle_t *arg1 = (switch_stream_handle_t *) 0 ; + + arg1 = (switch_stream_handle_t *)jarg1; + switch_cache_db_status(arg1); +} + + SWIGEXPORT int SWIGSTDCALL CSharp__switch_core_db_handle(void * jarg1, char * jarg2, char * jarg3, int jarg4) { int jresult ; switch_cache_db_handle_t **arg1 = (switch_cache_db_handle_t **) 0 ; @@ -11745,6 +11870,21 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_caller_extension_add_application(void } +SWIGEXPORT void SWIGSTDCALL CSharp_switch_caller_extension_add_application_printf(void * jarg1, void * jarg2, char * jarg3, char * jarg4) { + switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; + switch_caller_extension_t *arg2 = (switch_caller_extension_t *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + void *arg5 = 0 ; + + arg1 = (switch_core_session_t *)jarg1; + arg2 = (switch_caller_extension_t *)jarg2; + arg3 = (char *)jarg3; + arg4 = (char *)jarg4; + switch_caller_extension_add_application_printf(arg1,arg2,(char const *)arg3,(char const *)arg4,arg5); +} + + SWIGEXPORT char * SWIGSTDCALL CSharp_switch_caller_get_field_by_name(void * jarg1, char * jarg2) { char * jresult ; switch_caller_profile_t *arg1 = (switch_caller_profile_t *) 0 ; diff --git a/src/mod/languages/mod_managed/managed/swig.cs b/src/mod/languages/mod_managed/managed/swig.cs index 01f32d5956..5b0a799e05 100644 --- a/src/mod/languages/mod_managed/managed/swig.cs +++ b/src/mod/languages/mod_managed/managed/swig.cs @@ -1153,11 +1153,23 @@ public class freeswitch { return ret; } + public static string switch_core_session_vsprintf(SWIGTYPE_p_switch_core_session session, string fmt, SWIGTYPE_p_va_list ap) { + string ret = freeswitchPINVOKE.switch_core_session_vsprintf(SWIGTYPE_p_switch_core_session.getCPtr(session), fmt, SWIGTYPE_p_va_list.getCPtr(ap)); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + public static string switch_core_sprintf(SWIGTYPE_p_apr_pool_t pool, string fmt) { string ret = freeswitchPINVOKE.switch_core_sprintf(SWIGTYPE_p_apr_pool_t.getCPtr(pool), fmt); return ret; } + public static string switch_core_vsprintf(SWIGTYPE_p_apr_pool_t pool, string fmt, SWIGTYPE_p_va_list ap) { + string ret = freeswitchPINVOKE.switch_core_vsprintf(SWIGTYPE_p_apr_pool_t.getCPtr(pool), fmt, SWIGTYPE_p_va_list.getCPtr(ap)); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + public static SWIGTYPE_p_apr_pool_t switch_core_session_get_pool(SWIGTYPE_p_switch_core_session session) { IntPtr cPtr = freeswitchPINVOKE.switch_core_session_get_pool(SWIGTYPE_p_switch_core_session.getCPtr(session)); SWIGTYPE_p_apr_pool_t ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_apr_pool_t(cPtr, false); @@ -2142,6 +2154,10 @@ public class freeswitch { return ret; } + public static void switch_cache_db_status(switch_stream_handle stream) { + freeswitchPINVOKE.switch_cache_db_status(switch_stream_handle.getCPtr(stream)); + } + public static switch_status_t _switch_core_db_handle(SWIGTYPE_p_p_switch_cache_db_handle_t dbh, string file, string func, int line) { switch_status_t ret = (switch_status_t)freeswitchPINVOKE._switch_core_db_handle(SWIGTYPE_p_p_switch_cache_db_handle_t.getCPtr(dbh), file, func, line); return ret; @@ -2557,6 +2573,10 @@ public class freeswitch { freeswitchPINVOKE.switch_caller_extension_add_application(SWIGTYPE_p_switch_core_session.getCPtr(session), switch_caller_extension.getCPtr(caller_extension), application_name, extra_data); } + public static void switch_caller_extension_add_application_printf(SWIGTYPE_p_switch_core_session session, switch_caller_extension caller_extension, string application_name, string fmt) { + freeswitchPINVOKE.switch_caller_extension_add_application_printf(SWIGTYPE_p_switch_core_session.getCPtr(session), switch_caller_extension.getCPtr(caller_extension), application_name, fmt); + } + public static string switch_caller_get_field_by_name(switch_caller_profile caller_profile, string name) { string ret = freeswitchPINVOKE.switch_caller_get_field_by_name(switch_caller_profile.getCPtr(caller_profile), name); return ret; @@ -6289,9 +6309,15 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_sprintf")] public static extern string switch_core_session_sprintf(HandleRef jarg1, string jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_vsprintf")] + public static extern string switch_core_session_vsprintf(HandleRef jarg1, string jarg2, HandleRef jarg3); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_sprintf")] public static extern string switch_core_sprintf(HandleRef jarg1, string jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_vsprintf")] + public static extern string switch_core_vsprintf(HandleRef jarg1, string jarg2, HandleRef jarg3); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_get_pool")] public static extern IntPtr switch_core_session_get_pool(HandleRef jarg1); @@ -6988,6 +7014,24 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_cache_db_handle_t_flags_get")] public static extern int switch_cache_db_handle_t_flags_get(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_cache_db_handle_t_hash_set")] + public static extern void switch_cache_db_handle_t_hash_set(HandleRef jarg1, uint jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_cache_db_handle_t_hash_get")] + public static extern uint switch_cache_db_handle_t_hash_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_cache_db_handle_t_creator_set")] + public static extern void switch_cache_db_handle_t_creator_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_cache_db_handle_t_creator_get")] + public static extern string switch_cache_db_handle_t_creator_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_cache_db_handle_t_last_user_set")] + public static extern void switch_cache_db_handle_t_last_user_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_cache_db_handle_t_last_user_get")] + public static extern string switch_cache_db_handle_t_last_user_get(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_new_switch_cache_db_handle_t")] public static extern IntPtr new_switch_cache_db_handle_t(); @@ -7015,6 +7059,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_cache_db_execute_sql_callback")] public static extern int switch_cache_db_execute_sql_callback(HandleRef jarg1, string jarg2, HandleRef jarg3, HandleRef jarg4, ref string jarg5); + [DllImport("mod_managed", EntryPoint="CSharp_switch_cache_db_status")] + public static extern void switch_cache_db_status(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp__switch_core_db_handle")] public static extern int _switch_core_db_handle(HandleRef jarg1, string jarg2, string jarg3, int jarg4); @@ -7546,6 +7593,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_caller_extension_add_application")] public static extern void switch_caller_extension_add_application(HandleRef jarg1, HandleRef jarg2, string jarg3, string jarg4); + [DllImport("mod_managed", EntryPoint="CSharp_switch_caller_extension_add_application_printf")] + public static extern void switch_caller_extension_add_application_printf(HandleRef jarg1, HandleRef jarg2, string jarg3, string jarg4); + [DllImport("mod_managed", EntryPoint="CSharp_switch_caller_get_field_by_name")] public static extern string switch_caller_get_field_by_name(HandleRef jarg1, string jarg2); @@ -16621,6 +16671,36 @@ namespace FreeSWITCH.Native { using System; using System.Runtime.InteropServices; +public class SWIGTYPE_p_va_list { + private HandleRef swigCPtr; + + internal SWIGTYPE_p_va_list(IntPtr cPtr, bool futureUse) { + swigCPtr = new HandleRef(this, cPtr); + } + + protected SWIGTYPE_p_va_list() { + swigCPtr = new HandleRef(null, IntPtr.Zero); + } + + internal static HandleRef getCPtr(SWIGTYPE_p_va_list obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } +} + +} +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.35 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +namespace FreeSWITCH.Native { + +using System; +using System.Runtime.InteropServices; + public class SWIGTYPE_p_void { private HandleRef swigCPtr; @@ -18096,6 +18176,36 @@ public class switch_cache_db_handle_t : IDisposable { } } + public uint hash { + set { + freeswitchPINVOKE.switch_cache_db_handle_t_hash_set(swigCPtr, value); + } + get { + uint ret = freeswitchPINVOKE.switch_cache_db_handle_t_hash_get(swigCPtr); + return ret; + } + } + + public string creator { + set { + freeswitchPINVOKE.switch_cache_db_handle_t_creator_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_cache_db_handle_t_creator_get(swigCPtr); + return ret; + } + } + + public string last_user { + set { + freeswitchPINVOKE.switch_cache_db_handle_t_last_user_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_cache_db_handle_t_last_user_get(swigCPtr); + return ret; + } + } + public switch_cache_db_handle_t() : this(freeswitchPINVOKE.new_switch_cache_db_handle_t(), true) { } @@ -19051,6 +19161,7 @@ public enum switch_channel_flag_t { CF_SIGNAL_BRIDGE_TTL, CF_MEDIA_BRIDGE_TTL, CF_BYPASS_MEDIA_AFTER_BRIDGE, + CF_LEG_HOLDING, CF_FLAG_MAX }