[Freeswitch-svn] [commit] r11570 - in freeswitch/trunk/src: . include mod/languages/mod_java mod/languages/mod_lua mod/languages/mod_managed mod/languages/mod_perl mod/languages/mod_python
FreeSWITCH SVN
anthm at freeswitch.org
Fri Jan 30 15:19:38 PST 2009
Author: anthm
Date: Fri Jan 30 17:19:38 2009
New Revision: 11570
Log:
FSCORE-282
Modified:
freeswitch/trunk/src/include/switch_cpp.h
freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_wrap.cxx
freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp
freeswitch/trunk/src/switch_cpp.cpp
Modified: freeswitch/trunk/src/include/switch_cpp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_cpp.h (original)
+++ freeswitch/trunk/src/include/switch_cpp.h Fri Jan 30 17:19:38 2009
@@ -337,7 +337,7 @@
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);
Modified: freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp Fri Jan 30 17:19:38 2009
@@ -2906,7 +2906,7 @@
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 @@
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);
}
Modified: freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp Fri Jan 30 17:19:38 2009
@@ -6589,8 +6589,8 @@
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 @@
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 @@
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;
Modified: freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_wrap.cxx
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_wrap.cxx (original)
+++ freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_wrap.cxx Fri Jan 30 17:19:38 2009
@@ -21517,7 +21517,7 @@
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 @@
arg1 = (CoreSession *)jarg1;
arg2 = (char *)jarg2;
arg3 = (char *)jarg3;
- (arg1)->execute(arg2,arg3);
+ (arg1)->execute((char const *)arg2,(char const *)arg3);
}
Modified: freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp Fri Jan 30 17:19:38 2009
@@ -8937,15 +8937,15 @@
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 @@
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 @@
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);
Modified: freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp Fri Jan 30 17:19:38 2009
@@ -8609,15 +8609,15 @@
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 @@
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 @@
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;
}
Modified: freeswitch/trunk/src/switch_cpp.cpp
==============================================================================
--- freeswitch/trunk/src/switch_cpp.cpp (original)
+++ freeswitch/trunk/src/switch_cpp.cpp Fri Jan 30 17:19:38 2009
@@ -580,18 +580,15 @@
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) {
More information about the Freeswitch-svn
mailing list