FSCORE-282

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11570 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-01-30 23:19:38 +00:00
parent 2c0575834b
commit b32de05846
7 changed files with 29 additions and 32 deletions

View File

@ -337,7 +337,7 @@ SWITCH_DECLARE(void) consoleCleanLog(char *msg);
SWITCH_DECLARE(void) waitForAnswer(CoreSession *calling_session);
SWITCH_DECLARE(void) execute(char *app, char *data = NULL);
SWITCH_DECLARE(void) execute(const char *app, const char *data = NULL);
SWITCH_DECLARE(void) sendEvent(Event * sendME);

View File

@ -2906,7 +2906,7 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1exec
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
if (!arg3) return ;
}
(arg1)->execute(arg2,arg3);
(arg1)->execute((char const *)arg2,(char const *)arg3);
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
}
@ -2925,7 +2925,7 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1exec
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return ;
}
(arg1)->execute(arg2);
(arg1)->execute((char const *)arg2);
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
}

View File

@ -6589,8 +6589,8 @@ static int _wrap_CoreSession_execute__SWIG_0(lua_State* L) {
SWIG_check_num_args("execute",3,3)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("execute",1,"CoreSession *");
if(!lua_isstring(L,2)) SWIG_fail_arg("execute",2,"char *");
if(!lua_isstring(L,3)) SWIG_fail_arg("execute",3,"char *");
if(!lua_isstring(L,2)) SWIG_fail_arg("execute",2,"char const *");
if(!lua_isstring(L,3)) SWIG_fail_arg("execute",3,"char const *");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
SWIG_fail_ptr("CoreSession_execute",1,SWIGTYPE_p_CoreSession);
@ -6598,7 +6598,7 @@ static int _wrap_CoreSession_execute__SWIG_0(lua_State* L) {
arg2 = (char *)lua_tostring(L, 2);
arg3 = (char *)lua_tostring(L, 3);
(arg1)->execute(arg2,arg3);
(arg1)->execute((char const *)arg2,(char const *)arg3);
SWIG_arg=0;
return SWIG_arg;
@ -6618,14 +6618,14 @@ static int _wrap_CoreSession_execute__SWIG_1(lua_State* L) {
SWIG_check_num_args("execute",2,2)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("execute",1,"CoreSession *");
if(!lua_isstring(L,2)) SWIG_fail_arg("execute",2,"char *");
if(!lua_isstring(L,2)) SWIG_fail_arg("execute",2,"char const *");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
SWIG_fail_ptr("CoreSession_execute",1,SWIGTYPE_p_CoreSession);
}
arg2 = (char *)lua_tostring(L, 2);
(arg1)->execute(arg2);
(arg1)->execute((char const *)arg2);
SWIG_arg=0;
return SWIG_arg;

View File

@ -21517,7 +21517,7 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_ivr_schedule_broadcast(void *
arg2 = (char *)jarg2;
arg3 = (char *)jarg3;
arg4 = (switch_media_flag_t)jarg4;
result = (uint32_t)switch_ivr_schedule_broadcast(arg1,arg2,arg3,arg4);
result = (uint32_t)switch_ivr_schedule_broadcast(arg1,(char const *)arg2,(char const *)arg3,arg4);
jresult = (unsigned long)result;
return jresult;
}
@ -27643,7 +27643,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_CoreSession_Execute(void * jarg1, char * jarg
arg1 = (CoreSession *)jarg1;
arg2 = (char *)jarg2;
arg3 = (char *)jarg3;
(arg1)->execute(arg2,arg3);
(arg1)->execute((char const *)arg2,(char const *)arg3);
}

View File

@ -8937,15 +8937,15 @@ XS(_wrap_CoreSession_execute__SWIG_0) {
arg1 = reinterpret_cast< CoreSession * >(argp1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'");
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_execute" "', argument " "3"" of type '" "char *""'");
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_execute" "', argument " "3"" of type '" "char const *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
(arg1)->execute(arg2,arg3);
(arg1)->execute((char const *)arg2,(char const *)arg3);
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
@ -8982,10 +8982,10 @@ XS(_wrap_CoreSession_execute__SWIG_1) {
arg1 = reinterpret_cast< CoreSession * >(argp1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'");
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
(arg1)->execute(arg2);
(arg1)->execute((char const *)arg2);
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
@ -11483,17 +11483,17 @@ XS(SWIG_init) {
SWIG_TypeClientData(SWIGTYPE_p_IVRMenu, (void*) "freeswitch::IVRMenu");
SWIG_TypeClientData(SWIGTYPE_p_API, (void*) "freeswitch::API");
SWIG_TypeClientData(SWIGTYPE_p_input_callback_state, (void*) "freeswitch::input_callback_state_t");
/*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
/*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "S_HUP", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_HUP)));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
/*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
/*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "S_FREE", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_FREE)));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
/*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
/*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "S_RDLOCK", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_RDLOCK)));
SvREADONLY_on(sv);

View File

@ -8609,15 +8609,15 @@ SWIGINTERN PyObject *_wrap_CoreSession_execute__SWIG_0(PyObject *SWIGUNUSEDPARM(
arg1 = reinterpret_cast< CoreSession * >(argp1);
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'");
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_execute" "', argument " "3"" of type '" "char *""'");
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_execute" "', argument " "3"" of type '" "char const *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
(arg1)->execute(arg2,arg3);
(arg1)->execute((char const *)arg2,(char const *)arg3);
resultobj = SWIG_Py_Void();
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
@ -8649,10 +8649,10 @@ SWIGINTERN PyObject *_wrap_CoreSession_execute__SWIG_1(PyObject *SWIGUNUSEDPARM(
arg1 = reinterpret_cast< CoreSession * >(argp1);
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'");
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
(arg1)->execute(arg2);
(arg1)->execute((char const *)arg2);
resultobj = SWIG_Py_Void();
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return resultobj;
@ -8706,8 +8706,8 @@ SWIGINTERN PyObject *_wrap_CoreSession_execute(PyObject *self, PyObject *args) {
fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_execute'.\n"
" Possible C/C++ prototypes are:\n"
" execute(CoreSession *,char *,char *)\n"
" execute(CoreSession *,char *)\n");
" execute(CoreSession *,char const *,char const *)\n"
" execute(CoreSession *,char const *)\n");
return NULL;
}

View File

@ -580,18 +580,15 @@ SWITCH_DECLARE(const char *)CoreSession::getVariable(char *var)
return switch_channel_get_variable(channel, var);
}
SWITCH_DECLARE(void) CoreSession::execute(char *app, char *data)
SWITCH_DECLARE(void) CoreSession::execute(const char *app, const char *data)
{
const switch_application_interface_t *application_interface;
this_check_void();
sanity_check_noreturn;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CoreSession::execute. app: %s data:%s\n", app, data);
if ((application_interface = switch_loadable_module_get_application_interface(app))) {
begin_allow_threads();
switch_core_session_exec(session, application_interface, data);
end_allow_threads();
}
begin_allow_threads();
switch_core_session_execute_application(session, app, data);
end_allow_threads();
}
SWITCH_DECLARE(void) CoreSession::setDTMFCallback(void *cbfunc, char *funcargs) {