fix MODLANG-65

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8828 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-06-23 19:19:17 +00:00
parent 27b289bd4b
commit 0f3d46063b
6 changed files with 486 additions and 6 deletions

View File

@ -182,7 +182,11 @@ public class CoreSession {
} }
public String getDigits(int maxdigits, String terminators, int timeout) { public String getDigits(int maxdigits, String terminators, int timeout) {
return freeswitchJNI.CoreSession_getDigits(swigCPtr, this, maxdigits, terminators, timeout); return freeswitchJNI.CoreSession_getDigits__SWIG_0(swigCPtr, this, maxdigits, terminators, timeout);
}
public String getDigits(int maxdigits, String terminators, int timeout, int interdigit) {
return freeswitchJNI.CoreSession_getDigits__SWIG_1(swigCPtr, this, maxdigits, terminators, timeout, interdigit);
} }
public int transfer(String extensions, String dialplan, String context) { public int transfer(String extensions, String dialplan, String context) {

View File

@ -96,7 +96,8 @@ class freeswitchJNI {
public final static native int CoreSession_speak(long jarg1, CoreSession jarg1_, String jarg2); public final static native int CoreSession_speak(long jarg1, CoreSession jarg1_, String jarg2);
public final static native void CoreSession_set_tts_parms(long jarg1, CoreSession jarg1_, String jarg2, String jarg3); public final static native void CoreSession_set_tts_parms(long jarg1, CoreSession jarg1_, String jarg2, String jarg3);
public final static native int CoreSession_collectDigits(long jarg1, CoreSession jarg1_, int jarg2); public final static native int CoreSession_collectDigits(long jarg1, CoreSession jarg1_, int jarg2);
public final static native String CoreSession_getDigits(long jarg1, CoreSession jarg1_, int jarg2, String jarg3, int jarg4); public final static native String CoreSession_getDigits__SWIG_0(long jarg1, CoreSession jarg1_, int jarg2, String jarg3, int jarg4);
public final static native String CoreSession_getDigits__SWIG_1(long jarg1, CoreSession jarg1_, int jarg2, String jarg3, int jarg4, int jarg5);
public final static native int CoreSession_transfer(long jarg1, CoreSession jarg1_, String jarg2, String jarg3, String jarg4); public final static native int CoreSession_transfer(long jarg1, CoreSession jarg1_, String jarg2, String jarg3, String jarg4);
public final static native String CoreSession_read(long jarg1, CoreSession jarg1_, int jarg2, int jarg3, String jarg4, int jarg5, String jarg6); public final static native String CoreSession_read(long jarg1, CoreSession jarg1_, int jarg2, int jarg3, String jarg4, int jarg5, String jarg6);
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 String CoreSession_playAndGetDigits(long jarg1, CoreSession jarg1_, int jarg2, int jarg3, int jarg4, int jarg5, String jarg6, String jarg7, String jarg8, String jarg9);

View File

@ -1850,7 +1850,7 @@ SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1coll
} }
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1getDigits(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jstring jarg3, jint jarg4) { SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1getDigits_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jstring jarg3, jint jarg4) {
jstring jresult = 0 ; jstring jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ; CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ; int arg2 ;
@ -1876,6 +1876,34 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1g
} }
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1getDigits_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jstring jarg3, jint jarg4, jint jarg5) {
jstring jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
int arg4 ;
int arg5 ;
char *result = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
arg2 = (int)jarg2;
arg3 = 0;
if (jarg3) {
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
if (!arg3) return 0;
}
arg4 = (int)jarg4;
arg5 = (int)jarg5;
result = (char *)(arg1)->getDigits(arg2,arg3,arg4,arg5);
if(result) jresult = jenv->NewStringUTF((const char *)result);
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
return jresult;
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1transfer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) { SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1transfer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) {
jint jresult = 0 ; jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ; CoreSession *arg1 = (CoreSession *) 0 ;

View File

@ -4505,7 +4505,7 @@ fail:
} }
static int _wrap_CoreSession_getDigits(lua_State* L) { static int _wrap_CoreSession_getDigits__SWIG_0(lua_State* L) {
int SWIG_arg = -1; int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ; CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ; int arg2 ;
@ -4539,6 +4539,119 @@ fail:
} }
static int _wrap_CoreSession_getDigits__SWIG_1(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
int arg4 ;
int arg5 ;
char *result = 0 ;
SWIG_check_num_args("getDigits",5,5)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getDigits",1,"CoreSession *");
if(!lua_isnumber(L,2)) SWIG_fail_arg("getDigits",2,"int");
if(!lua_isstring(L,3)) SWIG_fail_arg("getDigits",3,"char *");
if(!lua_isnumber(L,4)) SWIG_fail_arg("getDigits",4,"int");
if(!lua_isnumber(L,5)) SWIG_fail_arg("getDigits",5,"int");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
SWIG_fail_ptr("CoreSession_getDigits",1,SWIGTYPE_p_CoreSession);
}
arg2 = (int)lua_tonumber(L, 2);
arg3 = (char *)lua_tostring(L, 3);
arg4 = (int)lua_tonumber(L, 4);
arg5 = (int)lua_tonumber(L, 5);
result = (char *)(arg1)->getDigits(arg2,arg3,arg4,arg5);
SWIG_arg=0;
lua_pushstring(L,(const char*)result); SWIG_arg++;
return SWIG_arg;
if(0) SWIG_fail;
fail:
lua_error(L);
return SWIG_arg;
}
static int _wrap_CoreSession_getDigits(lua_State* L) {
int argc;
int argv[6]={
1,2,3,4,5,6
};
argc = lua_gettop(L);
if (argc == 4) {
int _v;
{
void *ptr;
if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) {
_v = 0;
} else {
_v = 1;
}
}
if (_v) {
{
_v = lua_isnumber(L,argv[1]);
}
if (_v) {
{
_v = lua_isstring(L,argv[2]);
}
if (_v) {
{
_v = lua_isnumber(L,argv[3]);
}
if (_v) {
return _wrap_CoreSession_getDigits__SWIG_0(L);
}
}
}
}
}
if (argc == 5) {
int _v;
{
void *ptr;
if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) {
_v = 0;
} else {
_v = 1;
}
}
if (_v) {
{
_v = lua_isnumber(L,argv[1]);
}
if (_v) {
{
_v = lua_isstring(L,argv[2]);
}
if (_v) {
{
_v = lua_isnumber(L,argv[3]);
}
if (_v) {
{
_v = lua_isnumber(L,argv[4]);
}
if (_v) {
return _wrap_CoreSession_getDigits__SWIG_1(L);
}
}
}
}
}
}
lua_pushstring(L,"No matching function for overloaded 'CoreSession_getDigits'");
lua_error(L);return 0;
}
static int _wrap_CoreSession_transfer(lua_State* L) { static int _wrap_CoreSession_transfer(lua_State* L) {
int SWIG_arg = -1; int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ; CoreSession *arg1 = (CoreSession *) 0 ;

View File

@ -5902,7 +5902,7 @@ XS(_wrap_CoreSession_collectDigits) {
} }
XS(_wrap_CoreSession_getDigits) { XS(_wrap_CoreSession_getDigits__SWIG_0) {
{ {
CoreSession *arg1 = (CoreSession *) 0 ; CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ; int arg2 ;
@ -5961,6 +5961,203 @@ XS(_wrap_CoreSession_getDigits) {
} }
XS(_wrap_CoreSession_getDigits__SWIG_1) {
{
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
int arg4 ;
int arg5 ;
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
int val4 ;
int ecode4 = 0 ;
int val5 ;
int ecode5 = 0 ;
int argvi = 0;
dXSARGS;
if ((items < 5) || (items > 5)) {
SWIG_croak("Usage: CoreSession_getDigits(self,maxdigits,terminators,timeout,interdigit);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getDigits" "', argument " "1"" of type '" "CoreSession *""'");
}
arg1 = reinterpret_cast< CoreSession * >(argp1);
ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_getDigits" "', argument " "2"" of type '" "int""'");
}
arg2 = static_cast< int >(val2);
res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_getDigits" "', argument " "3"" of type '" "char *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
if (!SWIG_IsOK(ecode4)) {
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_getDigits" "', argument " "4"" of type '" "int""'");
}
arg4 = static_cast< int >(val4);
ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
if (!SWIG_IsOK(ecode5)) {
SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoreSession_getDigits" "', argument " "5"" of type '" "int""'");
}
arg5 = static_cast< int >(val5);
result = (char *)(arg1)->getDigits(arg2,arg3,arg4,arg5);
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
XSRETURN(argvi);
fail:
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
SWIG_croak_null();
}
}
XS(_wrap_CoreSession_getDigits) {
dXSARGS;
{
unsigned long _index = 0;
SWIG_TypeRank _rank = 0;
if (items == 4) {
SWIG_TypeRank _ranki = 0;
SWIG_TypeRank _rankm = 0;
SWIG_TypeRank _pi = 1;
int _v = 0;
{
void *vptr = 0;
int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_1;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_1;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_1;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_1;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
if (!_index || (_ranki < _rank)) {
_rank = _ranki; _index = 1;
if (_rank == _rankm) goto dispatch;
}
}
check_1:
if (items == 5) {
SWIG_TypeRank _ranki = 0;
SWIG_TypeRank _rankm = 0;
SWIG_TypeRank _pi = 1;
int _v = 0;
{
void *vptr = 0;
int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
if (!_index || (_ranki < _rank)) {
_rank = _ranki; _index = 2;
if (_rank == _rankm) goto dispatch;
}
}
check_2:
dispatch:
switch(_index) {
case 1:
++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_getDigits__SWIG_0); return;
case 2:
++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_getDigits__SWIG_1); return;
}
}
croak("No matching function for overloaded 'CoreSession_getDigits'");
XSRETURN(0);
}
XS(_wrap_CoreSession_transfer) { XS(_wrap_CoreSession_transfer) {
{ {
CoreSession *arg1 = (CoreSession *) 0 ; CoreSession *arg1 = (CoreSession *) 0 ;

View File

@ -6217,7 +6217,7 @@ fail:
} }
SWIGINTERN PyObject *_wrap_CoreSession_getDigits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *_wrap_CoreSession_getDigits__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0; PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ; CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ; int arg2 ;
@ -6269,6 +6269,143 @@ fail:
} }
SWIGINTERN PyObject *_wrap_CoreSession_getDigits__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
int arg4 ;
int arg5 ;
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
int val4 ;
int ecode4 = 0 ;
int val5 ;
int ecode5 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
PyObject * obj3 = 0 ;
PyObject * obj4 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OOOOO:CoreSession_getDigits",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getDigits" "', argument " "1"" of type '" "CoreSession *""'");
}
arg1 = reinterpret_cast< CoreSession * >(argp1);
ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_getDigits" "', argument " "2"" of type '" "int""'");
}
arg2 = static_cast< int >(val2);
res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_getDigits" "', argument " "3"" of type '" "char *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
ecode4 = SWIG_AsVal_int(obj3, &val4);
if (!SWIG_IsOK(ecode4)) {
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_getDigits" "', argument " "4"" of type '" "int""'");
}
arg4 = static_cast< int >(val4);
ecode5 = SWIG_AsVal_int(obj4, &val5);
if (!SWIG_IsOK(ecode5)) {
SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoreSession_getDigits" "', argument " "5"" of type '" "int""'");
}
arg5 = static_cast< int >(val5);
result = (char *)(arg1)->getDigits(arg2,arg3,arg4,arg5);
resultobj = SWIG_FromCharPtr((const char *)result);
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
return resultobj;
fail:
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
return NULL;
}
SWIGINTERN PyObject *_wrap_CoreSession_getDigits(PyObject *self, PyObject *args) {
int argc;
PyObject *argv[6];
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = (int)PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 5); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
if (argc == 4) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_int(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_int(argv[3], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_CoreSession_getDigits__SWIG_0(self, args);
}
}
}
}
}
if (argc == 5) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_int(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_int(argv[3], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_int(argv[4], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_CoreSession_getDigits__SWIG_1(self, args);
}
}
}
}
}
}
fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_getDigits'.\n"
" Possible C/C++ prototypes are:\n"
" getDigits(CoreSession *,int,char *,int)\n"
" getDigits(CoreSession *,int,char *,int,int)\n");
return NULL;
}
SWIGINTERN PyObject *_wrap_CoreSession_transfer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *_wrap_CoreSession_transfer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0; PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ; CoreSession *arg1 = (CoreSession *) 0 ;