From abebcb13f9315548dcab3ee1e89611daa95baa3d Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 7 Dec 2009 00:46:54 +0000 Subject: [PATCH] swigall git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15807 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- .../languages/mod_managed/freeswitch_wrap.cxx | 81 ++++++++++++++++++- src/mod/languages/mod_managed/managed/swig.cs | 54 +++++++++++-- 2 files changed, 127 insertions(+), 8 deletions(-) diff --git a/src/mod/languages/mod_managed/freeswitch_wrap.cxx b/src/mod/languages/mod_managed/freeswitch_wrap.cxx index 13bc3115dd..a8befde7a8 100644 --- a/src/mod/languages/mod_managed/freeswitch_wrap.cxx +++ b/src/mod/languages/mod_managed/freeswitch_wrap.cxx @@ -6606,17 +6606,33 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_exec(void * jarg1, void * } -SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_execute_application(void * jarg1, char * jarg2, char * jarg3) { +SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_execute_application_get_flags(void * jarg1, char * jarg2, char * jarg3, void * jarg4) { int jresult ; switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; + int32_t *arg4 = (int32_t *) 0 ; switch_status_t result; arg1 = (switch_core_session_t *)jarg1; arg2 = (char *)jarg2; arg3 = (char *)jarg3; - result = (switch_status_t)switch_core_session_execute_application(arg1,(char const *)arg2,(char const *)arg3); + arg4 = (int32_t *)jarg4; + result = (switch_status_t)switch_core_session_execute_application_get_flags(arg1,(char const *)arg2,(char const *)arg3,arg4); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_get_app_flags(char * jarg1, void * jarg2) { + int jresult ; + char *arg1 = (char *) 0 ; + int32_t *arg2 = (int32_t *) 0 ; + switch_status_t result; + + arg1 = (char *)jarg1; + arg2 = (int32_t *)jarg2; + result = (switch_status_t)switch_core_session_get_app_flags((char const *)arg1,arg2); jresult = result; return jresult; } @@ -9206,6 +9222,29 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_cache_db_handle_t_mutex_get(void * j } +SWIGEXPORT void SWIGSTDCALL CSharp_switch_cache_db_handle_t_io_mutex_set(void * jarg1, void * jarg2) { + switch_cache_db_handle_t *arg1 = (switch_cache_db_handle_t *) 0 ; + switch_mutex_t *arg2 = (switch_mutex_t *) 0 ; + + arg1 = (switch_cache_db_handle_t *)jarg1; + arg2 = (switch_mutex_t *)jarg2; + if (arg1) (arg1)->io_mutex = arg2; + +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_switch_cache_db_handle_t_io_mutex_get(void * jarg1) { + void * jresult ; + switch_cache_db_handle_t *arg1 = (switch_cache_db_handle_t *) 0 ; + switch_mutex_t *result = 0 ; + + arg1 = (switch_cache_db_handle_t *)jarg1; + result = (switch_mutex_t *) ((arg1)->io_mutex); + jresult = (void *)result; + return jresult; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_switch_cache_db_handle_t_pool_set(void * jarg1, void * jarg2) { switch_cache_db_handle_t *arg1 = (switch_cache_db_handle_t *) 0 ; switch_memory_pool_t *arg2 = (switch_memory_pool_t *) 0 ; @@ -10397,6 +10436,42 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_escape_char(void * jarg1, char * jar } +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_escape_string(char * jarg1, char * jarg2, void * jarg3) { + char * jresult ; + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + switch_size_t arg3 ; + char *result = 0 ; + switch_size_t *argp3 ; + + arg1 = (char *)jarg1; + arg2 = (char *)jarg2; + argp3 = (switch_size_t *)jarg3; + if (!argp3) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_size_t", 0); + return 0; + } + arg3 = *argp3; + result = (char *)switch_escape_string((char const *)arg1,arg2,arg3); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_escape_string_pool(char * jarg1, void * jarg2) { + char * jresult ; + char *arg1 = (char *) 0 ; + switch_memory_pool_t *arg2 = (switch_memory_pool_t *) 0 ; + char *result = 0 ; + + arg1 = (char *)jarg1; + arg2 = (switch_memory_pool_t *)jarg2; + result = (char *)switch_escape_string_pool((char const *)arg1,arg2); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + SWIGEXPORT int SWIGSTDCALL CSharp_switch_socket_waitfor(void * jarg1, int jarg2) { int jresult ; switch_pollfd_t *arg1 = (switch_pollfd_t *) 0 ; @@ -29493,7 +29568,7 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_Event_GetHeader(void * jarg1, char * jarg2) arg1 = (Event *)jarg1; arg2 = (char *)jarg2; - result = (char *)(arg1)->getHeader(arg2); + result = (char *)(arg1)->getHeader((char const *)arg2); jresult = SWIG_csharp_string_callback((const char *)result); return jresult; } diff --git a/src/mod/languages/mod_managed/managed/swig.cs b/src/mod/languages/mod_managed/managed/swig.cs index 5b0a799e05..0695a9ca20 100644 --- a/src/mod/languages/mod_managed/managed/swig.cs +++ b/src/mod/languages/mod_managed/managed/swig.cs @@ -1345,8 +1345,13 @@ public class freeswitch { return ret; } - public static switch_status_t switch_core_session_execute_application(SWIGTYPE_p_switch_core_session session, string app, string arg) { - switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_session_execute_application(SWIGTYPE_p_switch_core_session.getCPtr(session), app, arg); + public static switch_status_t switch_core_session_execute_application_get_flags(SWIGTYPE_p_switch_core_session session, string app, string arg, SWIGTYPE_p_int flags) { + switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_session_execute_application_get_flags(SWIGTYPE_p_switch_core_session.getCPtr(session), app, arg, SWIGTYPE_p_int.getCPtr(flags)); + return ret; + } + + public static switch_status_t switch_core_session_get_app_flags(string app, SWIGTYPE_p_int flags) { + switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_session_get_app_flags(app, SWIGTYPE_p_int.getCPtr(flags)); return ret; } @@ -2478,6 +2483,17 @@ public class freeswitch { return ret; } + public static string switch_escape_string(string arg0, string arg1, SWIGTYPE_p_switch_size_t outlen) { + string ret = freeswitchPINVOKE.switch_escape_string(arg0, arg1, SWIGTYPE_p_switch_size_t.getCPtr(outlen)); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static string switch_escape_string_pool(string arg0, SWIGTYPE_p_apr_pool_t pool) { + string ret = freeswitchPINVOKE.switch_escape_string_pool(arg0, SWIGTYPE_p_apr_pool_t.getCPtr(pool)); + return ret; + } + public static int switch_socket_waitfor(SWIGTYPE_p_switch_pollfd_t poll, int ms) { int ret = freeswitchPINVOKE.switch_socket_waitfor(SWIGTYPE_p_switch_pollfd_t.getCPtr(poll), ms); return ret; @@ -6426,8 +6442,11 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_exec")] public static extern int switch_core_session_exec(HandleRef jarg1, HandleRef jarg2, string jarg3); - [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_execute_application")] - public static extern int switch_core_session_execute_application(HandleRef jarg1, string jarg2, string jarg3); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_execute_application_get_flags")] + public static extern int switch_core_session_execute_application_get_flags(HandleRef jarg1, string jarg2, string jarg3, HandleRef jarg4); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_get_app_flags")] + public static extern int switch_core_session_get_app_flags(string jarg1, HandleRef jarg2); [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_execute_exten")] public static extern int switch_core_session_execute_exten(HandleRef jarg1, string jarg2, string jarg3, string jarg4); @@ -7002,6 +7021,12 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_cache_db_handle_t_mutex_get")] public static extern IntPtr switch_cache_db_handle_t_mutex_get(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_cache_db_handle_t_io_mutex_set")] + public static extern void switch_cache_db_handle_t_io_mutex_set(HandleRef jarg1, HandleRef jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_cache_db_handle_t_io_mutex_get")] + public static extern IntPtr switch_cache_db_handle_t_io_mutex_get(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_cache_db_handle_t_pool_set")] public static extern void switch_cache_db_handle_t_pool_set(HandleRef jarg1, HandleRef jarg2); @@ -7260,6 +7285,12 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_escape_char")] public static extern string switch_escape_char(HandleRef jarg1, string jarg2, string jarg3, char jarg4); + [DllImport("mod_managed", EntryPoint="CSharp_switch_escape_string")] + public static extern string switch_escape_string(string jarg1, string jarg2, HandleRef jarg3); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_escape_string_pool")] + public static extern string switch_escape_string_pool(string jarg1, HandleRef jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_switch_socket_waitfor")] public static extern int switch_socket_waitfor(HandleRef jarg1, int jarg2); @@ -16894,7 +16925,8 @@ namespace FreeSWITCH.Native { [System.Flags] public enum switch_application_flag_enum_t { SAF_NONE = 0, SAF_SUPPORT_NOMEDIA = (1 << 0), - SAF_ROUTING_EXEC = (1 << 1) + SAF_ROUTING_EXEC = (1 << 1), + SAF_MEDIA_TAP = (1 << 2) } } @@ -18155,6 +18187,17 @@ public class switch_cache_db_handle_t : IDisposable { } } + public SWIGTYPE_p_switch_mutex_t io_mutex { + set { + freeswitchPINVOKE.switch_cache_db_handle_t_io_mutex_set(swigCPtr, SWIGTYPE_p_switch_mutex_t.getCPtr(value)); + } + get { + IntPtr cPtr = freeswitchPINVOKE.switch_cache_db_handle_t_io_mutex_get(swigCPtr); + SWIGTYPE_p_switch_mutex_t ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_switch_mutex_t(cPtr, false); + return ret; + } + } + public SWIGTYPE_p_apr_pool_t pool { set { freeswitchPINVOKE.switch_cache_db_handle_t_pool_set(swigCPtr, SWIGTYPE_p_apr_pool_t.getCPtr(value)); @@ -19162,6 +19205,7 @@ public enum switch_channel_flag_t { CF_MEDIA_BRIDGE_TTL, CF_BYPASS_MEDIA_AFTER_BRIDGE, CF_LEG_HOLDING, + CF_BROADCAST_DROP_MEDIA, CF_FLAG_MAX }