fix eventConsumer issue and add flush() method
This commit is contained in:
parent
f1132a2b71
commit
7fd3aff6f0
|
@ -173,6 +173,9 @@ SWITCH_DECLARE(void) consoleCleanLog(char *msg);
|
|||
char *e_callback;
|
||||
char *e_subclass_name;
|
||||
char *e_cb_arg;
|
||||
switch_event_node_t *enodes[SWITCH_EVENT_ALL + 1];
|
||||
uint32_t node_index;
|
||||
|
||||
SWITCH_DECLARE_CONSTRUCTOR EventConsumer(const char *event_name = NULL, const char *subclass_name = "");
|
||||
SWITCH_DECLARE_CONSTRUCTOR ~ EventConsumer();
|
||||
SWITCH_DECLARE(int) bind(const char *event_name, const char *subclass_name = "");
|
||||
|
|
|
@ -74,6 +74,23 @@ public class EventConsumer {
|
|||
return freeswitchJNI.EventConsumer_e_cb_arg_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setEnodes(SWIGTYPE_p_p_switch_event_node_t value) {
|
||||
freeswitchJNI.EventConsumer_enodes_set(swigCPtr, this, SWIGTYPE_p_p_switch_event_node_t.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_p_switch_event_node_t getEnodes() {
|
||||
long cPtr = freeswitchJNI.EventConsumer_enodes_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_p_switch_event_node_t(cPtr, false);
|
||||
}
|
||||
|
||||
public void setNode_index(SWIGTYPE_p_uint32_t value) {
|
||||
freeswitchJNI.EventConsumer_node_index_set(swigCPtr, this, SWIGTYPE_p_uint32_t.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_uint32_t getNode_index() {
|
||||
return new SWIGTYPE_p_uint32_t(freeswitchJNI.EventConsumer_node_index_get(swigCPtr, this), true);
|
||||
}
|
||||
|
||||
public EventConsumer(String event_name, String subclass_name) {
|
||||
this(freeswitchJNI.new_EventConsumer(event_name, subclass_name), true);
|
||||
}
|
||||
|
|
|
@ -72,6 +72,10 @@ class freeswitchJNI {
|
|||
public final static native String EventConsumer_e_subclass_name_get(long jarg1, EventConsumer jarg1_);
|
||||
public final static native void EventConsumer_e_cb_arg_set(long jarg1, EventConsumer jarg1_, String jarg2);
|
||||
public final static native String EventConsumer_e_cb_arg_get(long jarg1, EventConsumer jarg1_);
|
||||
public final static native void EventConsumer_enodes_set(long jarg1, EventConsumer jarg1_, long jarg2);
|
||||
public final static native long EventConsumer_enodes_get(long jarg1, EventConsumer jarg1_);
|
||||
public final static native void EventConsumer_node_index_set(long jarg1, EventConsumer jarg1_, long jarg2);
|
||||
public final static native long EventConsumer_node_index_get(long jarg1, EventConsumer jarg1_);
|
||||
public final static native long new_EventConsumer(String jarg1, String jarg2);
|
||||
public final static native void delete_EventConsumer(long jarg1);
|
||||
public final static native int EventConsumer_bind(long jarg1, EventConsumer jarg1_, String jarg2, String jarg3);
|
||||
|
|
|
@ -1365,6 +1365,74 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1enodes_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
switch_event_node_t **arg2 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(EventConsumer **)&jarg1;
|
||||
arg2 = *(switch_event_node_t ***)&jarg2;
|
||||
{
|
||||
size_t ii;
|
||||
switch_event_node_t * *b = (switch_event_node_t * *) arg1->enodes;
|
||||
for (ii = 0; ii < (size_t)SWITCH_EVENT_ALL+1; ii++) b[ii] = *((switch_event_node_t * *) arg2 + ii);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1enodes_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jlong jresult = 0 ;
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
switch_event_node_t **result = 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(EventConsumer **)&jarg1;
|
||||
result = (switch_event_node_t **)(switch_event_node_t **) ((arg1)->enodes);
|
||||
*(switch_event_node_t ***)&jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1node_1index_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
uint32_t arg2 ;
|
||||
uint32_t *argp2 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(EventConsumer **)&jarg1;
|
||||
argp2 = *(uint32_t **)&jarg2;
|
||||
if (!argp2) {
|
||||
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null uint32_t");
|
||||
return ;
|
||||
}
|
||||
arg2 = *argp2;
|
||||
if (arg1) (arg1)->node_index = arg2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1node_1index_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jlong jresult = 0 ;
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
uint32_t result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(EventConsumer **)&jarg1;
|
||||
result = ((arg1)->node_index);
|
||||
*(uint32_t **)&jresult = new uint32_t((uint32_t &)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1EventConsumer(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
|
||||
jlong jresult = 0 ;
|
||||
char *arg1 = (char *) NULL ;
|
||||
|
|
|
@ -1494,24 +1494,25 @@ SWIG_Lua_dostring(lua_State *L, const char* str) {
|
|||
#define SWIGTYPE_p_Stream swig_types[7]
|
||||
#define SWIGTYPE_p_input_callback_state swig_types[8]
|
||||
#define SWIGTYPE_p_lua_State swig_types[9]
|
||||
#define SWIGTYPE_p_session_flag_t swig_types[10]
|
||||
#define SWIGTYPE_p_switch_call_cause_t swig_types[11]
|
||||
#define SWIGTYPE_p_switch_channel_state_t swig_types[12]
|
||||
#define SWIGTYPE_p_switch_channel_t swig_types[13]
|
||||
#define SWIGTYPE_p_switch_core_session_t swig_types[14]
|
||||
#define SWIGTYPE_p_switch_event_t swig_types[15]
|
||||
#define SWIGTYPE_p_switch_event_types_t swig_types[16]
|
||||
#define SWIGTYPE_p_switch_input_args_t swig_types[17]
|
||||
#define SWIGTYPE_p_switch_input_type_t swig_types[18]
|
||||
#define SWIGTYPE_p_switch_priority_t swig_types[19]
|
||||
#define SWIGTYPE_p_switch_queue_t swig_types[20]
|
||||
#define SWIGTYPE_p_switch_state_handler_table_t swig_types[21]
|
||||
#define SWIGTYPE_p_switch_status_t swig_types[22]
|
||||
#define SWIGTYPE_p_switch_stream_handle_t swig_types[23]
|
||||
#define SWIGTYPE_p_uint32_t swig_types[24]
|
||||
#define SWIGTYPE_p_void swig_types[25]
|
||||
static swig_type_info *swig_types[27];
|
||||
static swig_module_info swig_module = {swig_types, 26, 0, 0, 0, 0};
|
||||
#define SWIGTYPE_p_p_switch_event_node_t swig_types[10]
|
||||
#define SWIGTYPE_p_session_flag_t swig_types[11]
|
||||
#define SWIGTYPE_p_switch_call_cause_t swig_types[12]
|
||||
#define SWIGTYPE_p_switch_channel_state_t swig_types[13]
|
||||
#define SWIGTYPE_p_switch_channel_t swig_types[14]
|
||||
#define SWIGTYPE_p_switch_core_session_t swig_types[15]
|
||||
#define SWIGTYPE_p_switch_event_t swig_types[16]
|
||||
#define SWIGTYPE_p_switch_event_types_t swig_types[17]
|
||||
#define SWIGTYPE_p_switch_input_args_t swig_types[18]
|
||||
#define SWIGTYPE_p_switch_input_type_t swig_types[19]
|
||||
#define SWIGTYPE_p_switch_priority_t swig_types[20]
|
||||
#define SWIGTYPE_p_switch_queue_t swig_types[21]
|
||||
#define SWIGTYPE_p_switch_state_handler_table_t swig_types[22]
|
||||
#define SWIGTYPE_p_switch_status_t swig_types[23]
|
||||
#define SWIGTYPE_p_switch_stream_handle_t swig_types[24]
|
||||
#define SWIGTYPE_p_uint32_t swig_types[25]
|
||||
#define SWIGTYPE_p_void swig_types[26]
|
||||
static swig_type_info *swig_types[28];
|
||||
static swig_module_info swig_module = {swig_types, 27, 0, 0, 0, 0};
|
||||
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
||||
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
||||
|
||||
|
@ -3417,6 +3418,128 @@ fail:
|
|||
}
|
||||
|
||||
|
||||
static int _wrap_EventConsumer_enodes_set(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
switch_event_node_t **arg2 ;
|
||||
|
||||
SWIG_check_num_args("enodes",2,2)
|
||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("enodes",1,"EventConsumer *");
|
||||
if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("enodes",2,"switch_event_node_t *[SWITCH_EVENT_ALL+1]");
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_EventConsumer,0))){
|
||||
SWIG_fail_ptr("EventConsumer_enodes_set",1,SWIGTYPE_p_EventConsumer);
|
||||
}
|
||||
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_p_switch_event_node_t,0))){
|
||||
SWIG_fail_ptr("EventConsumer_enodes_set",2,SWIGTYPE_p_p_switch_event_node_t);
|
||||
}
|
||||
|
||||
{
|
||||
size_t ii;
|
||||
switch_event_node_t * *b = (switch_event_node_t * *) arg1->enodes;
|
||||
for (ii = 0; ii < (size_t)SWITCH_EVENT_ALL+1; ii++) b[ii] = *((switch_event_node_t * *) arg2 + ii);
|
||||
}
|
||||
SWIG_arg=0;
|
||||
|
||||
return SWIG_arg;
|
||||
|
||||
if(0) SWIG_fail;
|
||||
|
||||
fail:
|
||||
lua_error(L);
|
||||
return SWIG_arg;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_EventConsumer_enodes_get(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
switch_event_node_t **result = 0 ;
|
||||
|
||||
SWIG_check_num_args("enodes",1,1)
|
||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("enodes",1,"EventConsumer *");
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_EventConsumer,0))){
|
||||
SWIG_fail_ptr("EventConsumer_enodes_get",1,SWIGTYPE_p_EventConsumer);
|
||||
}
|
||||
|
||||
result = (switch_event_node_t **)(switch_event_node_t **) ((arg1)->enodes);
|
||||
SWIG_arg=0;
|
||||
SWIG_NewPointerObj(L,result,SWIGTYPE_p_p_switch_event_node_t,0); SWIG_arg++;
|
||||
return SWIG_arg;
|
||||
|
||||
if(0) SWIG_fail;
|
||||
|
||||
fail:
|
||||
lua_error(L);
|
||||
return SWIG_arg;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_EventConsumer_node_index_set(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
uint32_t arg2 ;
|
||||
uint32_t *argp2 ;
|
||||
|
||||
SWIG_check_num_args("node_index",2,2)
|
||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("node_index",1,"EventConsumer *");
|
||||
if(!lua_isuserdata(L,2)) SWIG_fail_arg("node_index",2,"uint32_t");
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_EventConsumer,0))){
|
||||
SWIG_fail_ptr("EventConsumer_node_index_set",1,SWIGTYPE_p_EventConsumer);
|
||||
}
|
||||
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_uint32_t,0))){
|
||||
SWIG_fail_ptr("EventConsumer_node_index_set",2,SWIGTYPE_p_uint32_t);
|
||||
}
|
||||
arg2 = *argp2;
|
||||
|
||||
if (arg1) (arg1)->node_index = arg2;
|
||||
|
||||
SWIG_arg=0;
|
||||
|
||||
return SWIG_arg;
|
||||
|
||||
if(0) SWIG_fail;
|
||||
|
||||
fail:
|
||||
lua_error(L);
|
||||
return SWIG_arg;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_EventConsumer_node_index_get(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
uint32_t result;
|
||||
|
||||
SWIG_check_num_args("node_index",1,1)
|
||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("node_index",1,"EventConsumer *");
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_EventConsumer,0))){
|
||||
SWIG_fail_ptr("EventConsumer_node_index_get",1,SWIGTYPE_p_EventConsumer);
|
||||
}
|
||||
|
||||
result = ((arg1)->node_index);
|
||||
SWIG_arg=0;
|
||||
{
|
||||
uint32_t * resultptr = new uint32_t((uint32_t &) result);
|
||||
SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_uint32_t,1); SWIG_arg++;
|
||||
}
|
||||
return SWIG_arg;
|
||||
|
||||
if(0) SWIG_fail;
|
||||
|
||||
fail:
|
||||
lua_error(L);
|
||||
return SWIG_arg;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_new_EventConsumer(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
char *arg1 = (char *) NULL ;
|
||||
|
@ -3548,6 +3671,8 @@ static swig_lua_attribute swig_EventConsumer_attributes[] = {
|
|||
{ "e_callback", _wrap_EventConsumer_e_callback_get, _wrap_EventConsumer_e_callback_set},
|
||||
{ "e_subclass_name", _wrap_EventConsumer_e_subclass_name_get, _wrap_EventConsumer_e_subclass_name_set},
|
||||
{ "e_cb_arg", _wrap_EventConsumer_e_cb_arg_get, _wrap_EventConsumer_e_cb_arg_set},
|
||||
{ "enodes", _wrap_EventConsumer_enodes_get, _wrap_EventConsumer_enodes_set},
|
||||
{ "node_index", _wrap_EventConsumer_node_index_get, _wrap_EventConsumer_node_index_set},
|
||||
{0,0,0}
|
||||
};
|
||||
static swig_lua_class *swig_EventConsumer_bases[] = {0};
|
||||
|
@ -6922,6 +7047,7 @@ static swig_type_info _swigt__p_LUA__Session = {"_p_LUA__Session", "LUA::Session
|
|||
static swig_type_info _swigt__p_Stream = {"_p_Stream", "Stream *", 0, 0, (void*)&_wrap_class_Stream, 0};
|
||||
static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void*)&_wrap_class_input_callback_state_t, 0};
|
||||
static swig_type_info _swigt__p_lua_State = {"_p_lua_State", "lua_State *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_p_switch_event_node_t = {"_p_p_switch_event_node_t", "switch_event_node_t **", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_session_flag_t = {"_p_session_flag_t", "enum session_flag_t *|session_flag_t *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_switch_call_cause_t = {"_p_switch_call_cause_t", "switch_call_cause_t *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_switch_channel_state_t = {"_p_switch_channel_state_t", "switch_channel_state_t *", 0, 0, (void*)0, 0};
|
||||
|
@ -6950,6 +7076,7 @@ static swig_type_info *swig_type_initial[] = {
|
|||
&_swigt__p_Stream,
|
||||
&_swigt__p_input_callback_state,
|
||||
&_swigt__p_lua_State,
|
||||
&_swigt__p_p_switch_event_node_t,
|
||||
&_swigt__p_session_flag_t,
|
||||
&_swigt__p_switch_call_cause_t,
|
||||
&_swigt__p_switch_channel_state_t,
|
||||
|
@ -6978,6 +7105,7 @@ static swig_cast_info _swigc__p_LUA__Session[] = { {&_swigt__p_LUA__Session, 0,
|
|||
static swig_cast_info _swigc__p_Stream[] = { {&_swigt__p_Stream, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_input_callback_state[] = { {&_swigt__p_input_callback_state, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_lua_State[] = { {&_swigt__p_lua_State, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_p_switch_event_node_t[] = { {&_swigt__p_p_switch_event_node_t, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_session_flag_t[] = { {&_swigt__p_session_flag_t, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_switch_call_cause_t[] = { {&_swigt__p_switch_call_cause_t, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_switch_channel_state_t[] = { {&_swigt__p_switch_channel_state_t, 0, 0, 0},{0, 0, 0, 0}};
|
||||
|
@ -7006,6 +7134,7 @@ static swig_cast_info *swig_cast_initial[] = {
|
|||
_swigc__p_Stream,
|
||||
_swigc__p_input_callback_state,
|
||||
_swigc__p_lua_State,
|
||||
_swigc__p_p_switch_event_node_t,
|
||||
_swigc__p_session_flag_t,
|
||||
_swigc__p_switch_call_cause_t,
|
||||
_swigc__p_switch_channel_state_t,
|
||||
|
|
|
@ -31132,6 +31132,55 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_EventConsumer_e_cb_arg_get(void * jarg1) {
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_EventConsumer_enodes_set(void * jarg1, void * jarg2) {
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
switch_event_node_t **arg2 ;
|
||||
|
||||
arg1 = (EventConsumer *)jarg1;
|
||||
arg2 = (switch_event_node_t **)jarg2;
|
||||
{
|
||||
size_t ii;
|
||||
switch_event_node_t * *b = (switch_event_node_t * *) arg1->enodes;
|
||||
for (ii = 0; ii < (size_t)SWITCH_EVENT_ALL+1; ii++) b[ii] = *((switch_event_node_t * *) arg2 + ii);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_EventConsumer_enodes_get(void * jarg1) {
|
||||
void * jresult ;
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
switch_event_node_t **result = 0 ;
|
||||
|
||||
arg1 = (EventConsumer *)jarg1;
|
||||
result = (switch_event_node_t **)(switch_event_node_t **) ((arg1)->enodes);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_EventConsumer_node_index_set(void * jarg1, unsigned long jarg2) {
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
uint32_t arg2 ;
|
||||
|
||||
arg1 = (EventConsumer *)jarg1;
|
||||
arg2 = (uint32_t)jarg2;
|
||||
if (arg1) (arg1)->node_index = arg2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_EventConsumer_node_index_get(void * jarg1) {
|
||||
unsigned long jresult ;
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
uint32_t result;
|
||||
|
||||
arg1 = (EventConsumer *)jarg1;
|
||||
result = (uint32_t) ((arg1)->node_index);
|
||||
jresult = (unsigned long)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_new_EventConsumer(char * jarg1, char * jarg2) {
|
||||
void * jresult ;
|
||||
char *arg1 = (char *) NULL ;
|
||||
|
|
|
@ -584,6 +584,27 @@ public class EventConsumer : IDisposable {
|
|||
}
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_p_switch_event_node enodes {
|
||||
set {
|
||||
freeswitchPINVOKE.EventConsumer_enodes_set(swigCPtr, SWIGTYPE_p_p_switch_event_node.getCPtr(value));
|
||||
}
|
||||
get {
|
||||
IntPtr cPtr = freeswitchPINVOKE.EventConsumer_enodes_get(swigCPtr);
|
||||
SWIGTYPE_p_p_switch_event_node ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_p_switch_event_node(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public uint node_index {
|
||||
set {
|
||||
freeswitchPINVOKE.EventConsumer_node_index_set(swigCPtr, value);
|
||||
}
|
||||
get {
|
||||
uint ret = freeswitchPINVOKE.EventConsumer_node_index_get(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public EventConsumer(string event_name, string subclass_name) : this(freeswitchPINVOKE.new_EventConsumer(event_name, subclass_name), true) {
|
||||
}
|
||||
|
||||
|
@ -12424,6 +12445,18 @@ class freeswitchPINVOKE {
|
|||
[DllImport("mod_managed", EntryPoint="CSharp_EventConsumer_e_cb_arg_get")]
|
||||
public static extern string EventConsumer_e_cb_arg_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_EventConsumer_enodes_set")]
|
||||
public static extern void EventConsumer_enodes_set(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_EventConsumer_enodes_get")]
|
||||
public static extern IntPtr EventConsumer_enodes_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_EventConsumer_node_index_set")]
|
||||
public static extern void EventConsumer_node_index_set(HandleRef jarg1, uint jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_EventConsumer_node_index_get")]
|
||||
public static extern uint EventConsumer_node_index_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_new_EventConsumer")]
|
||||
public static extern IntPtr new_EventConsumer(string jarg1, string jarg2);
|
||||
|
||||
|
|
|
@ -330,6 +330,10 @@ use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
|
|||
*swig_e_subclass_name_set = *freeswitchc::EventConsumer_e_subclass_name_set;
|
||||
*swig_e_cb_arg_get = *freeswitchc::EventConsumer_e_cb_arg_get;
|
||||
*swig_e_cb_arg_set = *freeswitchc::EventConsumer_e_cb_arg_set;
|
||||
*swig_enodes_get = *freeswitchc::EventConsumer_enodes_get;
|
||||
*swig_enodes_set = *freeswitchc::EventConsumer_enodes_set;
|
||||
*swig_node_index_get = *freeswitchc::EventConsumer_node_index_get;
|
||||
*swig_node_index_set = *freeswitchc::EventConsumer_node_index_set;
|
||||
sub new {
|
||||
my $pkg = shift;
|
||||
my $self = freeswitchc::new_EventConsumer(@_);
|
||||
|
|
|
@ -1457,24 +1457,25 @@ SWIG_Perl_SetModule(swig_module_info *module) {
|
|||
#define SWIGTYPE_p_Stream swig_types[8]
|
||||
#define SWIGTYPE_p_char swig_types[9]
|
||||
#define SWIGTYPE_p_input_callback_state swig_types[10]
|
||||
#define SWIGTYPE_p_session_flag_t swig_types[11]
|
||||
#define SWIGTYPE_p_switch_call_cause_t swig_types[12]
|
||||
#define SWIGTYPE_p_switch_channel_state_t swig_types[13]
|
||||
#define SWIGTYPE_p_switch_channel_t swig_types[14]
|
||||
#define SWIGTYPE_p_switch_core_session_t swig_types[15]
|
||||
#define SWIGTYPE_p_switch_event_t swig_types[16]
|
||||
#define SWIGTYPE_p_switch_event_types_t swig_types[17]
|
||||
#define SWIGTYPE_p_switch_input_args_t swig_types[18]
|
||||
#define SWIGTYPE_p_switch_input_type_t swig_types[19]
|
||||
#define SWIGTYPE_p_switch_priority_t swig_types[20]
|
||||
#define SWIGTYPE_p_switch_queue_t swig_types[21]
|
||||
#define SWIGTYPE_p_switch_state_handler_table_t swig_types[22]
|
||||
#define SWIGTYPE_p_switch_status_t swig_types[23]
|
||||
#define SWIGTYPE_p_switch_stream_handle_t swig_types[24]
|
||||
#define SWIGTYPE_p_uint32_t swig_types[25]
|
||||
#define SWIGTYPE_p_void swig_types[26]
|
||||
static swig_type_info *swig_types[28];
|
||||
static swig_module_info swig_module = {swig_types, 27, 0, 0, 0, 0};
|
||||
#define SWIGTYPE_p_p_switch_event_node_t swig_types[11]
|
||||
#define SWIGTYPE_p_session_flag_t swig_types[12]
|
||||
#define SWIGTYPE_p_switch_call_cause_t swig_types[13]
|
||||
#define SWIGTYPE_p_switch_channel_state_t swig_types[14]
|
||||
#define SWIGTYPE_p_switch_channel_t swig_types[15]
|
||||
#define SWIGTYPE_p_switch_core_session_t swig_types[16]
|
||||
#define SWIGTYPE_p_switch_event_t swig_types[17]
|
||||
#define SWIGTYPE_p_switch_event_types_t swig_types[18]
|
||||
#define SWIGTYPE_p_switch_input_args_t swig_types[19]
|
||||
#define SWIGTYPE_p_switch_input_type_t swig_types[20]
|
||||
#define SWIGTYPE_p_switch_priority_t swig_types[21]
|
||||
#define SWIGTYPE_p_switch_queue_t swig_types[22]
|
||||
#define SWIGTYPE_p_switch_state_handler_table_t swig_types[23]
|
||||
#define SWIGTYPE_p_switch_status_t swig_types[24]
|
||||
#define SWIGTYPE_p_switch_stream_handle_t swig_types[25]
|
||||
#define SWIGTYPE_p_uint32_t swig_types[26]
|
||||
#define SWIGTYPE_p_void swig_types[27]
|
||||
static swig_type_info *swig_types[29];
|
||||
static swig_module_info swig_module = {swig_types, 28, 0, 0, 0, 0};
|
||||
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
||||
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
||||
|
||||
|
@ -4261,6 +4262,148 @@ XS(_wrap_EventConsumer_e_cb_arg_get) {
|
|||
}
|
||||
|
||||
|
||||
XS(_wrap_EventConsumer_enodes_set) {
|
||||
{
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
switch_event_node_t **arg2 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
void *argp2 = 0 ;
|
||||
int res2 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 2) || (items > 2)) {
|
||||
SWIG_croak("Usage: EventConsumer_enodes_set(self,enodes);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EventConsumer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EventConsumer_enodes_set" "', argument " "1"" of type '" "EventConsumer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< EventConsumer * >(argp1);
|
||||
res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_switch_event_node_t, 0 | 0 );
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EventConsumer_enodes_set" "', argument " "2"" of type '" "switch_event_node_t *[SWITCH_EVENT_ALL+1]""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< switch_event_node_t ** >(argp2);
|
||||
{
|
||||
if (arg2) {
|
||||
size_t ii = 0;
|
||||
for (; ii < (size_t)SWITCH_EVENT_ALL+1; ++ii) arg1->enodes[ii] = arg2[ii];
|
||||
} else {
|
||||
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""enodes""' of type '""switch_event_node_t *[SWITCH_EVENT_ALL+1]""'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_EventConsumer_enodes_get) {
|
||||
{
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
switch_event_node_t **result = 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 1) || (items > 1)) {
|
||||
SWIG_croak("Usage: EventConsumer_enodes_get(self);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EventConsumer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EventConsumer_enodes_get" "', argument " "1"" of type '" "EventConsumer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< EventConsumer * >(argp1);
|
||||
result = (switch_event_node_t **)(switch_event_node_t **) ((arg1)->enodes);
|
||||
ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_switch_event_node_t, 0 | 0); argvi++ ;
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_EventConsumer_node_index_set) {
|
||||
{
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
uint32_t arg2 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
void *argp2 ;
|
||||
int res2 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 2) || (items > 2)) {
|
||||
SWIG_croak("Usage: EventConsumer_node_index_set(self,node_index);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EventConsumer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EventConsumer_node_index_set" "', argument " "1"" of type '" "EventConsumer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< EventConsumer * >(argp1);
|
||||
{
|
||||
res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_uint32_t, 0 );
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EventConsumer_node_index_set" "', argument " "2"" of type '" "uint32_t""'");
|
||||
}
|
||||
if (!argp2) {
|
||||
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EventConsumer_node_index_set" "', argument " "2"" of type '" "uint32_t""'");
|
||||
} else {
|
||||
arg2 = *(reinterpret_cast< uint32_t * >(argp2));
|
||||
}
|
||||
}
|
||||
if (arg1) (arg1)->node_index = arg2;
|
||||
|
||||
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_EventConsumer_node_index_get) {
|
||||
{
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
uint32_t result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 1) || (items > 1)) {
|
||||
SWIG_croak("Usage: EventConsumer_node_index_get(self);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EventConsumer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EventConsumer_node_index_get" "', argument " "1"" of type '" "EventConsumer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< EventConsumer * >(argp1);
|
||||
result = ((arg1)->node_index);
|
||||
ST(argvi) = SWIG_NewPointerObj((new uint32_t(static_cast< const uint32_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0); argvi++ ;
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_new_EventConsumer) {
|
||||
{
|
||||
char *arg1 = (char *) NULL ;
|
||||
|
@ -8985,6 +9128,7 @@ static swig_type_info _swigt__p_PerlInterpreter = {"_p_PerlInterpreter", "PerlIn
|
|||
static swig_type_info _swigt__p_Stream = {"_p_Stream", "Stream *", 0, 0, (void*)"freeswitch::Stream", 0};
|
||||
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void*)"freeswitch::input_callback_state_t", 0};
|
||||
static swig_type_info _swigt__p_p_switch_event_node_t = {"_p_p_switch_event_node_t", "switch_event_node_t **", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_session_flag_t = {"_p_session_flag_t", "enum session_flag_t *|session_flag_t *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_switch_call_cause_t = {"_p_switch_call_cause_t", "switch_call_cause_t *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_switch_channel_state_t = {"_p_switch_channel_state_t", "switch_channel_state_t *", 0, 0, (void*)0, 0};
|
||||
|
@ -9014,6 +9158,7 @@ static swig_type_info *swig_type_initial[] = {
|
|||
&_swigt__p_Stream,
|
||||
&_swigt__p_char,
|
||||
&_swigt__p_input_callback_state,
|
||||
&_swigt__p_p_switch_event_node_t,
|
||||
&_swigt__p_session_flag_t,
|
||||
&_swigt__p_switch_call_cause_t,
|
||||
&_swigt__p_switch_channel_state_t,
|
||||
|
@ -9043,6 +9188,7 @@ static swig_cast_info _swigc__p_PerlInterpreter[] = { {&_swigt__p_PerlInterpret
|
|||
static swig_cast_info _swigc__p_Stream[] = { {&_swigt__p_Stream, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_input_callback_state[] = { {&_swigt__p_input_callback_state, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_p_switch_event_node_t[] = { {&_swigt__p_p_switch_event_node_t, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_session_flag_t[] = { {&_swigt__p_session_flag_t, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_switch_call_cause_t[] = { {&_swigt__p_switch_call_cause_t, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_switch_channel_state_t[] = { {&_swigt__p_switch_channel_state_t, 0, 0, 0},{0, 0, 0, 0}};
|
||||
|
@ -9072,6 +9218,7 @@ static swig_cast_info *swig_cast_initial[] = {
|
|||
_swigc__p_Stream,
|
||||
_swigc__p_char,
|
||||
_swigc__p_input_callback_state,
|
||||
_swigc__p_p_switch_event_node_t,
|
||||
_swigc__p_session_flag_t,
|
||||
_swigc__p_switch_call_cause_t,
|
||||
_swigc__p_switch_channel_state_t,
|
||||
|
@ -9161,6 +9308,10 @@ static swig_command_info swig_commands[] = {
|
|||
{"freeswitchc::EventConsumer_e_subclass_name_get", _wrap_EventConsumer_e_subclass_name_get},
|
||||
{"freeswitchc::EventConsumer_e_cb_arg_set", _wrap_EventConsumer_e_cb_arg_set},
|
||||
{"freeswitchc::EventConsumer_e_cb_arg_get", _wrap_EventConsumer_e_cb_arg_get},
|
||||
{"freeswitchc::EventConsumer_enodes_set", _wrap_EventConsumer_enodes_set},
|
||||
{"freeswitchc::EventConsumer_enodes_get", _wrap_EventConsumer_enodes_get},
|
||||
{"freeswitchc::EventConsumer_node_index_set", _wrap_EventConsumer_node_index_set},
|
||||
{"freeswitchc::EventConsumer_node_index_get", _wrap_EventConsumer_node_index_get},
|
||||
{"freeswitchc::new_EventConsumer", _wrap_new_EventConsumer},
|
||||
{"freeswitchc::delete_EventConsumer", _wrap_delete_EventConsumer},
|
||||
{"freeswitchc::EventConsumer_bind", _wrap_EventConsumer_bind},
|
||||
|
|
|
@ -207,6 +207,12 @@ class EventConsumer(_object):
|
|||
__swig_setmethods__["e_cb_arg"] = _freeswitch.EventConsumer_e_cb_arg_set
|
||||
__swig_getmethods__["e_cb_arg"] = _freeswitch.EventConsumer_e_cb_arg_get
|
||||
if _newclass:e_cb_arg = _swig_property(_freeswitch.EventConsumer_e_cb_arg_get, _freeswitch.EventConsumer_e_cb_arg_set)
|
||||
__swig_setmethods__["enodes"] = _freeswitch.EventConsumer_enodes_set
|
||||
__swig_getmethods__["enodes"] = _freeswitch.EventConsumer_enodes_get
|
||||
if _newclass:enodes = _swig_property(_freeswitch.EventConsumer_enodes_get, _freeswitch.EventConsumer_enodes_set)
|
||||
__swig_setmethods__["node_index"] = _freeswitch.EventConsumer_node_index_set
|
||||
__swig_getmethods__["node_index"] = _freeswitch.EventConsumer_node_index_get
|
||||
if _newclass:node_index = _swig_property(_freeswitch.EventConsumer_node_index_get, _freeswitch.EventConsumer_node_index_set)
|
||||
def __init__(self, *args):
|
||||
this = _freeswitch.new_EventConsumer(*args)
|
||||
try: self.this.append(this)
|
||||
|
|
|
@ -2505,24 +2505,25 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags)
|
|||
#define SWIGTYPE_p_Stream swig_types[7]
|
||||
#define SWIGTYPE_p_char swig_types[8]
|
||||
#define SWIGTYPE_p_input_callback_state swig_types[9]
|
||||
#define SWIGTYPE_p_session_flag_t swig_types[10]
|
||||
#define SWIGTYPE_p_switch_call_cause_t swig_types[11]
|
||||
#define SWIGTYPE_p_switch_channel_state_t swig_types[12]
|
||||
#define SWIGTYPE_p_switch_channel_t swig_types[13]
|
||||
#define SWIGTYPE_p_switch_core_session_t swig_types[14]
|
||||
#define SWIGTYPE_p_switch_event_t swig_types[15]
|
||||
#define SWIGTYPE_p_switch_event_types_t swig_types[16]
|
||||
#define SWIGTYPE_p_switch_input_args_t swig_types[17]
|
||||
#define SWIGTYPE_p_switch_input_type_t swig_types[18]
|
||||
#define SWIGTYPE_p_switch_priority_t swig_types[19]
|
||||
#define SWIGTYPE_p_switch_queue_t swig_types[20]
|
||||
#define SWIGTYPE_p_switch_state_handler_table_t swig_types[21]
|
||||
#define SWIGTYPE_p_switch_status_t swig_types[22]
|
||||
#define SWIGTYPE_p_switch_stream_handle_t swig_types[23]
|
||||
#define SWIGTYPE_p_uint32_t swig_types[24]
|
||||
#define SWIGTYPE_p_void swig_types[25]
|
||||
static swig_type_info *swig_types[27];
|
||||
static swig_module_info swig_module = {swig_types, 26, 0, 0, 0, 0};
|
||||
#define SWIGTYPE_p_p_switch_event_node_t swig_types[10]
|
||||
#define SWIGTYPE_p_session_flag_t swig_types[11]
|
||||
#define SWIGTYPE_p_switch_call_cause_t swig_types[12]
|
||||
#define SWIGTYPE_p_switch_channel_state_t swig_types[13]
|
||||
#define SWIGTYPE_p_switch_channel_t swig_types[14]
|
||||
#define SWIGTYPE_p_switch_core_session_t swig_types[15]
|
||||
#define SWIGTYPE_p_switch_event_t swig_types[16]
|
||||
#define SWIGTYPE_p_switch_event_types_t swig_types[17]
|
||||
#define SWIGTYPE_p_switch_input_args_t swig_types[18]
|
||||
#define SWIGTYPE_p_switch_input_type_t swig_types[19]
|
||||
#define SWIGTYPE_p_switch_priority_t swig_types[20]
|
||||
#define SWIGTYPE_p_switch_queue_t swig_types[21]
|
||||
#define SWIGTYPE_p_switch_state_handler_table_t swig_types[22]
|
||||
#define SWIGTYPE_p_switch_status_t swig_types[23]
|
||||
#define SWIGTYPE_p_switch_stream_handle_t swig_types[24]
|
||||
#define SWIGTYPE_p_uint32_t swig_types[25]
|
||||
#define SWIGTYPE_p_void swig_types[26]
|
||||
static swig_type_info *swig_types[28];
|
||||
static swig_module_info swig_module = {swig_types, 27, 0, 0, 0, 0};
|
||||
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
||||
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
||||
|
||||
|
@ -5028,6 +5029,126 @@ fail:
|
|||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_EventConsumer_enodes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
switch_event_node_t **arg2 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
void *argp2 = 0 ;
|
||||
int res2 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
|
||||
if (!PyArg_ParseTuple(args,(char *)"OO:EventConsumer_enodes_set",&obj0,&obj1)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EventConsumer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EventConsumer_enodes_set" "', argument " "1"" of type '" "EventConsumer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< EventConsumer * >(argp1);
|
||||
res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_switch_event_node_t, 0 | 0 );
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EventConsumer_enodes_set" "', argument " "2"" of type '" "switch_event_node_t *[SWITCH_EVENT_ALL+1]""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< switch_event_node_t ** >(argp2);
|
||||
{
|
||||
if (arg2) {
|
||||
size_t ii = 0;
|
||||
for (; ii < (size_t)SWITCH_EVENT_ALL+1; ++ii) arg1->enodes[ii] = arg2[ii];
|
||||
} else {
|
||||
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""enodes""' of type '""switch_event_node_t *[SWITCH_EVENT_ALL+1]""'");
|
||||
}
|
||||
}
|
||||
resultobj = SWIG_Py_Void();
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_EventConsumer_enodes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
switch_event_node_t **result = 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
|
||||
if (!PyArg_ParseTuple(args,(char *)"O:EventConsumer_enodes_get",&obj0)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EventConsumer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EventConsumer_enodes_get" "', argument " "1"" of type '" "EventConsumer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< EventConsumer * >(argp1);
|
||||
result = (switch_event_node_t **)(switch_event_node_t **) ((arg1)->enodes);
|
||||
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_switch_event_node_t, 0 | 0 );
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_EventConsumer_node_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
uint32_t arg2 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
void *argp2 ;
|
||||
int res2 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
|
||||
if (!PyArg_ParseTuple(args,(char *)"OO:EventConsumer_node_index_set",&obj0,&obj1)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EventConsumer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EventConsumer_node_index_set" "', argument " "1"" of type '" "EventConsumer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< EventConsumer * >(argp1);
|
||||
{
|
||||
res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_uint32_t, 0 | 0);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EventConsumer_node_index_set" "', argument " "2"" of type '" "uint32_t""'");
|
||||
}
|
||||
if (!argp2) {
|
||||
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EventConsumer_node_index_set" "', argument " "2"" of type '" "uint32_t""'");
|
||||
} else {
|
||||
uint32_t * temp = reinterpret_cast< uint32_t * >(argp2);
|
||||
arg2 = *temp;
|
||||
if (SWIG_IsNewObj(res2)) delete temp;
|
||||
}
|
||||
}
|
||||
if (arg1) (arg1)->node_index = arg2;
|
||||
|
||||
resultobj = SWIG_Py_Void();
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_EventConsumer_node_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
||||
uint32_t result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
|
||||
if (!PyArg_ParseTuple(args,(char *)"O:EventConsumer_node_index_get",&obj0)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EventConsumer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EventConsumer_node_index_get" "', argument " "1"" of type '" "EventConsumer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< EventConsumer * >(argp1);
|
||||
result = ((arg1)->node_index);
|
||||
resultobj = SWIG_NewPointerObj((new uint32_t(static_cast< const uint32_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0 );
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_new_EventConsumer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
char *arg1 = (char *) NULL ;
|
||||
|
@ -8742,6 +8863,10 @@ static PyMethodDef SwigMethods[] = {
|
|||
{ (char *)"EventConsumer_e_subclass_name_get", _wrap_EventConsumer_e_subclass_name_get, METH_VARARGS, NULL},
|
||||
{ (char *)"EventConsumer_e_cb_arg_set", _wrap_EventConsumer_e_cb_arg_set, METH_VARARGS, NULL},
|
||||
{ (char *)"EventConsumer_e_cb_arg_get", _wrap_EventConsumer_e_cb_arg_get, METH_VARARGS, NULL},
|
||||
{ (char *)"EventConsumer_enodes_set", _wrap_EventConsumer_enodes_set, METH_VARARGS, NULL},
|
||||
{ (char *)"EventConsumer_enodes_get", _wrap_EventConsumer_enodes_get, METH_VARARGS, NULL},
|
||||
{ (char *)"EventConsumer_node_index_set", _wrap_EventConsumer_node_index_set, METH_VARARGS, NULL},
|
||||
{ (char *)"EventConsumer_node_index_get", _wrap_EventConsumer_node_index_get, METH_VARARGS, NULL},
|
||||
{ (char *)"new_EventConsumer", _wrap_new_EventConsumer, METH_VARARGS, NULL},
|
||||
{ (char *)"delete_EventConsumer", _wrap_delete_EventConsumer, METH_VARARGS, NULL},
|
||||
{ (char *)"EventConsumer_bind", _wrap_EventConsumer_bind, METH_VARARGS, NULL},
|
||||
|
@ -8861,6 +8986,7 @@ static swig_type_info _swigt__p_PYTHON__Session = {"_p_PYTHON__Session", "PYTHON
|
|||
static swig_type_info _swigt__p_Stream = {"_p_Stream", "Stream *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_p_switch_event_node_t = {"_p_p_switch_event_node_t", "switch_event_node_t **", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_session_flag_t = {"_p_session_flag_t", "enum session_flag_t *|session_flag_t *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_switch_call_cause_t = {"_p_switch_call_cause_t", "switch_call_cause_t *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_switch_channel_state_t = {"_p_switch_channel_state_t", "switch_channel_state_t *", 0, 0, (void*)0, 0};
|
||||
|
@ -8889,6 +9015,7 @@ static swig_type_info *swig_type_initial[] = {
|
|||
&_swigt__p_Stream,
|
||||
&_swigt__p_char,
|
||||
&_swigt__p_input_callback_state,
|
||||
&_swigt__p_p_switch_event_node_t,
|
||||
&_swigt__p_session_flag_t,
|
||||
&_swigt__p_switch_call_cause_t,
|
||||
&_swigt__p_switch_channel_state_t,
|
||||
|
@ -8917,6 +9044,7 @@ static swig_cast_info _swigc__p_PYTHON__Session[] = { {&_swigt__p_PYTHON__Sessi
|
|||
static swig_cast_info _swigc__p_Stream[] = { {&_swigt__p_Stream, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_input_callback_state[] = { {&_swigt__p_input_callback_state, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_p_switch_event_node_t[] = { {&_swigt__p_p_switch_event_node_t, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_session_flag_t[] = { {&_swigt__p_session_flag_t, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_switch_call_cause_t[] = { {&_swigt__p_switch_call_cause_t, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_switch_channel_state_t[] = { {&_swigt__p_switch_channel_state_t, 0, 0, 0},{0, 0, 0, 0}};
|
||||
|
@ -8945,6 +9073,7 @@ static swig_cast_info *swig_cast_initial[] = {
|
|||
_swigc__p_Stream,
|
||||
_swigc__p_char,
|
||||
_swigc__p_input_callback_state,
|
||||
_swigc__p_p_switch_event_node_t,
|
||||
_swigc__p_session_flag_t,
|
||||
_swigc__p_switch_call_cause_t,
|
||||
_swigc__p_switch_channel_state_t,
|
||||
|
|
|
@ -72,8 +72,10 @@ SWITCH_DECLARE(int) EventConsumer::bind(const char *event_name, const char *subc
|
|||
subclass_name = NULL;
|
||||
}
|
||||
|
||||
if (switch_event_bind(__FILE__, event_id, subclass_name, event_handler, this) == SWITCH_STATUS_SUCCESS) {
|
||||
if (node_index <= SWITCH_EVENT_ALL &&
|
||||
switch_event_bind_removable(__FILE__, event_id, subclass_name, event_handler, this, &enodes[node_index]) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "bound to %s %s\n", event_name, switch_str_nil(subclass_name));
|
||||
node_index++;
|
||||
return 1;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot bind to %s %s\n", event_name, switch_str_nil(subclass_name));
|
||||
|
@ -103,8 +105,11 @@ SWITCH_DECLARE(Event *) EventConsumer::pop(int block)
|
|||
|
||||
SWITCH_DECLARE_CONSTRUCTOR EventConsumer::~EventConsumer()
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
switch_event_unbind_callback(event_handler);
|
||||
for (i = 0; i < node_index; i++) {
|
||||
switch_event_unbind(&enodes[i]);
|
||||
}
|
||||
|
||||
if (events) {
|
||||
switch_queue_interrupt_all(events);
|
||||
|
@ -220,7 +225,7 @@ SWITCH_DECLARE(const char *) API::executeString(const char *cmd)
|
|||
}
|
||||
|
||||
switch_safe_free(last_data);
|
||||
|
||||
|
||||
SWITCH_STANDARD_STREAM(stream);
|
||||
switch_api_execute(mycmd, arg, NULL, &stream);
|
||||
last_data = (char *) stream.data;
|
||||
|
|
Loading…
Reference in New Issue