This commit is contained in:
Anthony Minessale
2011-12-16 14:24:34 -06:00
parent 6dd5e59b05
commit 5ed0152dd1
8 changed files with 146 additions and 36 deletions
@@ -99,8 +99,8 @@ public class EventConsumer {
return freeswitchJNI.EventConsumer_bind(swigCPtr, this, event_name, subclass_name);
}
public Event pop(int block) {
long cPtr = freeswitchJNI.EventConsumer_pop(swigCPtr, this, block);
public Event pop(int block, int timeout) {
long cPtr = freeswitchJNI.EventConsumer_pop(swigCPtr, this, block, timeout);
return (cPtr == 0) ? null : new Event(cPtr, true);
}
@@ -84,7 +84,7 @@ class freeswitchJNI {
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);
public final static native long EventConsumer_pop(long jarg1, EventConsumer jarg1_, int jarg2);
public final static native long EventConsumer_pop(long jarg1, EventConsumer jarg1_, int jarg2, int jarg3);
public final static native void delete_CoreSession(long jarg1);
public final static native void CoreSession_session_set(long jarg1, CoreSession jarg1_, long jarg2);
public final static native long CoreSession_session_get(long jarg1, CoreSession jarg1_);
@@ -1653,10 +1653,11 @@ SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1bi
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1pop(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1pop(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3) {
jlong jresult = 0 ;
EventConsumer *arg1 = (EventConsumer *) 0 ;
int arg2 = (int) 0 ;
int arg3 = (int) 0 ;
Event *result = 0 ;
(void)jenv;
@@ -1664,7 +1665,8 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1p
(void)jarg1_;
arg1 = *(EventConsumer **)&jarg1;
arg2 = (int)jarg2;
result = (Event *)(arg1)->pop(arg2);
arg3 = (int)jarg3;
result = (Event *)(arg1)->pop(arg2,arg3);
*(Event **)&jresult = result;
return jresult;
}