git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14743 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-09-02 18:13:56 +00:00
parent ce14c6c2fa
commit 771184e850
8 changed files with 149 additions and 3 deletions

View File

@ -8,6 +8,10 @@
%ignore SwitchToMempool;
%newobject EventConsumer::pop;
%newobject Session;
%newobject CoreSession;
%newobject Event;
%newobject Stream;
// I thought we were using swig because it's easier than the alternatives :-)

View File

@ -76,6 +76,10 @@ char * SWIG_csharp_string_callback(const char * str) {
%typemap(csclassmodifiers) Event "public partial class"
%typemap(csclassmodifiers) Stream "public partial class"
%newobject EventConsumer::pop;
%newobject Session;
%newobject CoreSession;
%newobject Event;
%newobject Stream;
// Allow bitwise compare on flag fields
%typemap(csclassmodifiers) session_flag_t "[System.Flags] public enum"

View File

@ -8825,6 +8825,22 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_frame_free(void * jarg1) {
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_resolve_host(char * jarg1, char * jarg2, unsigned long jarg3) {
int jresult ;
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
size_t arg3 ;
switch_status_t result;
arg1 = (char *)jarg1;
arg2 = (char *)jarg2;
arg3 = (size_t)jarg3;
result = (switch_status_t)switch_resolve_host((char const *)arg1,arg2,arg3);
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_find_local_ip(char * jarg1, int jarg2, void * jarg3, int jarg4) {
int jresult ;
char *arg1 = (char *) 0 ;
@ -19221,6 +19237,16 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_set_flag(void * jarg1, int jar
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_set_flag_recursive(void * jarg1, int jarg2) {
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
switch_channel_flag_t arg2 ;
arg1 = (switch_channel_t *)jarg1;
arg2 = (switch_channel_flag_t)jarg2;
switch_channel_set_flag_recursive(arg1,arg2);
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_set_flag_partner(void * jarg1, int jarg2) {
int jresult ;
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
@ -19283,6 +19309,16 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_clear_flag(void * jarg1, int j
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_clear_flag_recursive(void * jarg1, int jarg2) {
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
switch_channel_flag_t arg2 ;
arg1 = (switch_channel_t *)jarg1;
arg2 = (switch_channel_flag_t)jarg2;
switch_channel_clear_flag_recursive(arg1,arg2);
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_perform_answer(void * jarg1, char * jarg2, char * jarg3, int jarg4) {
int jresult ;
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
@ -24435,6 +24471,26 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_log_str2mask(char * jarg1) {
}
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_log_node_dup(void * jarg1) {
void * jresult ;
switch_log_node_t *arg1 = (switch_log_node_t *) 0 ;
switch_log_node_t *result = 0 ;
arg1 = (switch_log_node_t *)jarg1;
result = (switch_log_node_t *)switch_log_node_dup((switch_log_node_t const *)arg1);
jresult = (void *)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_log_node_free(void * jarg1) {
switch_log_node_t **arg1 = (switch_log_node_t **) 0 ;
arg1 = (switch_log_node_t **)jarg1;
switch_log_node_free(arg1);
}
SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_XML_BUFSIZE_get() {
int jresult ;
int result;

View File

@ -2147,6 +2147,11 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_resolve_host(string host, string buf, uint buflen) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_resolve_host(host, buf, buflen);
return ret;
}
public static switch_status_t switch_find_local_ip(string buf, int len, SWIGTYPE_p_int mask, int family) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_find_local_ip(buf, len, SWIGTYPE_p_int.getCPtr(mask), family);
return ret;
@ -2571,6 +2576,10 @@ public class freeswitch {
freeswitchPINVOKE.switch_channel_set_flag(SWIGTYPE_p_switch_channel.getCPtr(channel), (int)flag);
}
public static void switch_channel_set_flag_recursive(SWIGTYPE_p_switch_channel channel, switch_channel_flag_t flag) {
freeswitchPINVOKE.switch_channel_set_flag_recursive(SWIGTYPE_p_switch_channel.getCPtr(channel), (int)flag);
}
public static switch_bool_t switch_channel_set_flag_partner(SWIGTYPE_p_switch_channel channel, switch_channel_flag_t flag) {
switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_channel_set_flag_partner(SWIGTYPE_p_switch_channel.getCPtr(channel), (int)flag);
return ret;
@ -2594,6 +2603,10 @@ public class freeswitch {
freeswitchPINVOKE.switch_channel_clear_flag(SWIGTYPE_p_switch_channel.getCPtr(channel), (int)flag);
}
public static void switch_channel_clear_flag_recursive(SWIGTYPE_p_switch_channel channel, switch_channel_flag_t flag) {
freeswitchPINVOKE.switch_channel_clear_flag_recursive(SWIGTYPE_p_switch_channel.getCPtr(channel), (int)flag);
}
public static switch_status_t switch_channel_perform_answer(SWIGTYPE_p_switch_channel channel, string file, string func, int line) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_channel_perform_answer(SWIGTYPE_p_switch_channel.getCPtr(channel), file, func, line);
return ret;
@ -3774,6 +3787,16 @@ public class freeswitch {
return ret;
}
public static switch_log_node_t switch_log_node_dup(switch_log_node_t node) {
IntPtr cPtr = freeswitchPINVOKE.switch_log_node_dup(switch_log_node_t.getCPtr(node));
switch_log_node_t ret = (cPtr == IntPtr.Zero) ? null : new switch_log_node_t(cPtr, false);
return ret;
}
public static void switch_log_node_free(SWIGTYPE_p_p_switch_log_node_t pnode) {
freeswitchPINVOKE.switch_log_node_free(SWIGTYPE_p_p_switch_log_node_t.getCPtr(pnode));
}
public static switch_xml switch_xml_parse_str_dynamic(string s, switch_bool_t dup) {
IntPtr cPtr = freeswitchPINVOKE.switch_xml_parse_str_dynamic(s, (int)dup);
switch_xml ret = (cPtr == IntPtr.Zero) ? null : new switch_xml(cPtr, false);
@ -6596,6 +6619,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_frame_free")]
public static extern int switch_frame_free(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_resolve_host")]
public static extern int switch_resolve_host(string jarg1, string jarg2, uint jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_switch_find_local_ip")]
public static extern int switch_find_local_ip(string jarg1, int jarg2, HandleRef jarg3, int jarg4);
@ -9155,6 +9181,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_set_flag")]
public static extern void switch_channel_set_flag(HandleRef jarg1, int jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_set_flag_recursive")]
public static extern void switch_channel_set_flag_recursive(HandleRef jarg1, int jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_set_flag_partner")]
public static extern int switch_channel_set_flag_partner(HandleRef jarg1, int jarg2);
@ -9170,6 +9199,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_clear_flag")]
public static extern void switch_channel_clear_flag(HandleRef jarg1, int jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_clear_flag_recursive")]
public static extern void switch_channel_clear_flag_recursive(HandleRef jarg1, int jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_perform_answer")]
public static extern int switch_channel_perform_answer(HandleRef jarg1, string jarg2, string jarg3, int jarg4);
@ -10265,6 +10297,12 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_log_str2mask")]
public static extern uint switch_log_str2mask(string jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_log_node_dup")]
public static extern IntPtr switch_log_node_dup(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_log_node_free")]
public static extern void switch_log_node_free(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_XML_BUFSIZE_get")]
public static extern int SWITCH_XML_BUFSIZE_get();
@ -14408,6 +14446,36 @@ namespace FreeSWITCH.Native {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_p_switch_log_node_t {
private HandleRef swigCPtr;
internal SWIGTYPE_p_p_switch_log_node_t(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_p_switch_log_node_t() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_p_switch_log_node_t 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_p_switch_media_bug {
private HandleRef swigCPtr;
@ -20663,6 +20731,8 @@ public enum switch_event_types_t {
SWITCH_EVENT_RECV_INFO,
SWITCH_EVENT_CALL_SECURE,
SWITCH_EVENT_NAT,
SWITCH_EVENT_RECORD_START,
SWITCH_EVENT_RECORD_STOP,
SWITCH_EVENT_ALL
}

View File

@ -29,6 +29,10 @@ typedef unsigned long in_addr_t;
%}
%newobject EventConsumer::pop;
%newobject Session;
%newobject CoreSession;
%newobject Event;
%newobject Stream;
#define SWITCH_DECLARE(type) type
#define SWITCH_DECLARE_NONSTD(type) type

View File

@ -10,6 +10,10 @@
//%cstring_bounded_mutable(char *terminator, 8);
%newobject EventConsumer::pop;
%newobject Session;
%newobject CoreSession;
%newobject Event;
%newobject Stream;
/** insert the following includes into generated code so it compiles */
%{

View File

@ -11562,17 +11562,17 @@ XS(SWIG_init) {
SWIG_TypeClientData(SWIGTYPE_p_IVRMenu, (void*) "freeswitch::IVRMenu");
SWIG_TypeClientData(SWIGTYPE_p_API, (void*) "freeswitch::API");
SWIG_TypeClientData(SWIGTYPE_p_input_callback_state, (void*) "freeswitch::input_callback_state_t");
/*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
/*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "S_HUP", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_HUP)));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
/*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
/*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "S_FREE", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_FREE)));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
/*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
/*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "S_RDLOCK", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_RDLOCK)));
SvREADONLY_on(sv);

View File

@ -10,6 +10,10 @@
%cstring_bounded_mutable(char *terminator, 8);
%newobject EventConsumer::pop;
%newobject Session;
%newobject CoreSession;
%newobject Event;
%newobject Stream;
/** insert the following includes into generated code so it compiles */
%{