mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-29 14:44:17 +00:00
add bind method to EventConsumer takes same args as constructor to bind more events to an existing consumer
This commit is contained in:
1 parent
cf7af1f99b
commit
a7f74af7d0
25 files changed
+13598
-8051
No files matched your search
@@ -7975,6 +7975,18 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_codec_copy(void * jarg1, void * ja
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_codec_reset(void * jarg1) {
|
||||
int jresult ;
|
||||
switch_codec_t *arg1 = (switch_codec_t *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_codec_t *)jarg1;
|
||||
result = (switch_status_t)switch_core_codec_reset(arg1);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_codec_encode(void * jarg1, void * jarg2, void * jarg3, unsigned long jarg4, unsigned long jarg5, void * jarg6, void * jarg7, void * jarg8, void * jarg9) {
|
||||
int jresult ;
|
||||
switch_codec_t *arg1 = (switch_codec_t *) 0 ;
|
||||
@@ -31030,29 +31042,6 @@ SWIGEXPORT int SWIGSTDCALL CSharp_EventConsumer_e_event_id_get(void * jarg1) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_EventConsumer_node_set(void * jarg1, void * jarg2) {
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
switch_event_node_t *arg2 = (switch_event_node_t *) 0 ;
|
||||
|
||||
arg1 = (EventConsumer *)jarg1;
|
||||
arg2 = (switch_event_node_t *)jarg2;
|
||||
if (arg1) (arg1)->node = arg2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_EventConsumer_node_get(void * jarg1) {
|
||||
void * jresult ;
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
switch_event_node_t *result = 0 ;
|
||||
|
||||
arg1 = (EventConsumer *)jarg1;
|
||||
result = (switch_event_node_t *) ((arg1)->node);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_EventConsumer_e_callback_set(void * jarg1, char * jarg2) {
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
@@ -31145,7 +31134,7 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_EventConsumer_e_cb_arg_get(void * jarg1) {
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_new_EventConsumer(char * jarg1, char * jarg2) {
|
||||
void * jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
char *arg1 = (char *) NULL ;
|
||||
char *arg2 = (char *) "" ;
|
||||
EventConsumer *result = 0 ;
|
||||
|
||||
@@ -31166,6 +31155,22 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_EventConsumer(void * jarg1) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_EventConsumer_bind(void * jarg1, char * jarg2, char * jarg3) {
|
||||
int jresult ;
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) "" ;
|
||||
int result;
|
||||
|
||||
arg1 = (EventConsumer *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
result = (int)(arg1)->bind((char const *)arg2,(char const *)arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_EventConsumer_pop(void * jarg1, int jarg2) {
|
||||
void * jresult ;
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
|
||||
@@ -554,17 +554,6 @@ public class EventConsumer : IDisposable {
|
||||
}
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_switch_event_node node {
|
||||
set {
|
||||
freeswitchPINVOKE.EventConsumer_node_set(swigCPtr, SWIGTYPE_p_switch_event_node.getCPtr(value));
|
||||
}
|
||||
get {
|
||||
IntPtr cPtr = freeswitchPINVOKE.EventConsumer_node_get(swigCPtr);
|
||||
SWIGTYPE_p_switch_event_node ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_switch_event_node(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public string e_callback {
|
||||
set {
|
||||
freeswitchPINVOKE.EventConsumer_e_callback_set(swigCPtr, value);
|
||||
@@ -598,6 +587,11 @@ public class EventConsumer : IDisposable {
|
||||
public EventConsumer(string event_name, string subclass_name) : this(freeswitchPINVOKE.new_EventConsumer(event_name, subclass_name), true) {
|
||||
}
|
||||
|
||||
public int bind(string event_name, string subclass_name) {
|
||||
int ret = freeswitchPINVOKE.EventConsumer_bind(swigCPtr, event_name, subclass_name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public Event pop(int block) {
|
||||
IntPtr cPtr = freeswitchPINVOKE.EventConsumer_pop(swigCPtr, block);
|
||||
Event ret = (cPtr == IntPtr.Zero) ? null : new Event(cPtr, true);
|
||||
@@ -1644,6 +1638,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_codec_reset(switch_codec codec) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_codec_reset(switch_codec.getCPtr(codec));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_codec_encode(switch_codec codec, switch_codec other_codec, SWIGTYPE_p_void decoded_data, uint decoded_data_len, uint decoded_rate, SWIGTYPE_p_void encoded_data, SWIGTYPE_p_unsigned_long encoded_data_len, SWIGTYPE_p_unsigned_long encoded_rate, SWIGTYPE_p_unsigned_int flag) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_codec_encode(switch_codec.getCPtr(codec), switch_codec.getCPtr(other_codec), SWIGTYPE_p_void.getCPtr(decoded_data), decoded_data_len, decoded_rate, SWIGTYPE_p_void.getCPtr(encoded_data), SWIGTYPE_p_unsigned_long.getCPtr(encoded_data_len), SWIGTYPE_p_unsigned_long.getCPtr(encoded_rate), SWIGTYPE_p_unsigned_int.getCPtr(flag));
|
||||
return ret;
|
||||
@@ -7007,6 +7006,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_codec_copy")]
|
||||
public static extern int switch_core_codec_copy(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_codec_reset")]
|
||||
public static extern int switch_core_codec_reset(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_codec_encode")]
|
||||
public static extern int switch_core_codec_encode(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3, uint jarg4, uint jarg5, HandleRef jarg6, HandleRef jarg7, HandleRef jarg8, HandleRef jarg9);
|
||||
|
||||
@@ -12404,12 +12406,6 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_EventConsumer_e_event_id_get")]
|
||||
public static extern int EventConsumer_e_event_id_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_EventConsumer_node_set")]
|
||||
public static extern void EventConsumer_node_set(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_EventConsumer_node_get")]
|
||||
public static extern IntPtr EventConsumer_node_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_EventConsumer_e_callback_set")]
|
||||
public static extern void EventConsumer_e_callback_set(HandleRef jarg1, string jarg2);
|
||||
|
||||
@@ -12434,6 +12430,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_delete_EventConsumer")]
|
||||
public static extern void delete_EventConsumer(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_EventConsumer_bind")]
|
||||
public static extern int EventConsumer_bind(HandleRef jarg1, string jarg2, string jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_EventConsumer_pop")]
|
||||
public static extern IntPtr EventConsumer_pop(HandleRef jarg1, int jarg2);
|
||||
|
||||
@@ -16430,36 +16429,6 @@ namespace FreeSWITCH.Native {
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class SWIGTYPE_p_switch_event_node {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
internal SWIGTYPE_p_switch_event_node(IntPtr cPtr, bool futureUse) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_switch_event_node() {
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(SWIGTYPE_p_switch_event_node 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_switch_event_types_t {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
|
||||
Reference in new issue
Block a user