fix eventConsumer issue and add flush() method

This commit is contained in:
Anthony Minessale
2010-05-17 18:37:27 -05:00
parent f1132a2b71
commit 7fd3aff6f0
12 changed files with 655 additions and 57 deletions
@@ -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 ;