fix callback arg and CoreSession::sleep to not require a file

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9004 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West
2008-07-12 18:44:05 +00:00
parent ebb35b5d97
commit 8b8a7f14c6
14 changed files with 213 additions and 163 deletions
@@ -209,8 +209,8 @@ public class CoreSession {
return freeswitchJNI.CoreSession_streamFile__SWIG_1(swigCPtr, this, file);
}
public int sleep(String file, int ms) {
return freeswitchJNI.CoreSession_sleep(swigCPtr, this, file, ms);
public int sleep(int ms) {
return freeswitchJNI.CoreSession_sleep(swigCPtr, this, ms);
}
public int flushEvents() {
@@ -127,7 +127,7 @@ class freeswitchJNI {
public final static native String CoreSession_playAndGetDigits(long jarg1, CoreSession jarg1_, int jarg2, int jarg3, int jarg4, int jarg5, String jarg6, String jarg7, String jarg8, String jarg9);
public final static native int CoreSession_streamFile__SWIG_0(long jarg1, CoreSession jarg1_, String jarg2, int jarg3);
public final static native int CoreSession_streamFile__SWIG_1(long jarg1, CoreSession jarg1_, String jarg2);
public final static native int CoreSession_sleep(long jarg1, CoreSession jarg1_, String jarg2, int jarg3);
public final static native int CoreSession_sleep(long jarg1, CoreSession jarg1_, int jarg2);
public final static native int CoreSession_flushEvents(long jarg1, CoreSession jarg1_);
public final static native int CoreSession_flushDigits(long jarg1, CoreSession jarg1_);
public final static native int CoreSession_setAutoHangup(long jarg1, CoreSession jarg1_, boolean jarg2);
@@ -2487,26 +2487,19 @@ SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1stre
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1sleep(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1sleep(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
int arg3 ;
int arg2 ;
int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return 0;
}
arg3 = (int)jarg3;
result = (int)(arg1)->sleep(arg2,arg3);
arg2 = (int)jarg2;
result = (int)(arg1)->sleep(arg2);
jresult = (jint)result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
return jresult;
}