add insertFile front end to switch_ivr_insert_file and reswig

This commit is contained in:
Anthony Minessale
2010-12-29 15:09:57 -06:00
parent 0920645d1f
commit c4e350ab0c
12 changed files with 230 additions and 3 deletions
@@ -116,6 +116,10 @@ public class CoreSession {
return freeswitchJNI.CoreSession_voice_name_get(swigCPtr, this);
}
public int insertFile(String file, String insert_file, int sample_point) {
return freeswitchJNI.CoreSession_insertFile(swigCPtr, this, file, insert_file, sample_point);
}
public int answer() {
return freeswitchJNI.CoreSession_answer(swigCPtr, this);
}
@@ -101,6 +101,7 @@ class freeswitchJNI {
public final static native String CoreSession_tts_name_get(long jarg1, CoreSession jarg1_);
public final static native void CoreSession_voice_name_set(long jarg1, CoreSession jarg1_, String jarg2);
public final static native String CoreSession_voice_name_get(long jarg1, CoreSession jarg1_);
public final static native int CoreSession_insertFile(long jarg1, CoreSession jarg1_, String jarg2, String jarg3, int jarg4);
public final static native int CoreSession_answer(long jarg1, CoreSession jarg1_);
public final static native int CoreSession_preAnswer(long jarg1, CoreSession jarg1_);
public final static native void CoreSession_hangup(long jarg1, CoreSession jarg1_, String jarg2);
@@ -1866,6 +1866,37 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1v
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1insertFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jint jarg4) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
int arg4 ;
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 = 0;
if (jarg3) {
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
if (!arg3) return 0;
}
arg4 = (int)jarg4;
result = (int)(arg1)->insertFile((char const *)arg2,(char const *)arg3,arg4);
jresult = (jint)result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
return jresult;
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1answer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;