update script langs
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8249 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
540a2fecf8
commit
aa47e3e5fd
|
@ -64,6 +64,33 @@ Note that the first parameter to the new operator is implicitly handled by c++..
|
|||
SWITCH_DECLARE(void) consoleLog(char *level_str, char *msg);
|
||||
SWITCH_DECLARE(void) consoleCleanLog(char *msg);
|
||||
|
||||
class CoreSession;
|
||||
|
||||
class IVRMenu {
|
||||
protected:
|
||||
switch_ivr_menu_t *menu;
|
||||
switch_memory_pool_t *pool;
|
||||
public:
|
||||
SWITCH_DECLARE_CONSTRUCTOR IVRMenu(IVRMenu *main,
|
||||
const char *name,
|
||||
const char *greeting_sound,
|
||||
const char *short_greeting_sound,
|
||||
const char *invalid_sound,
|
||||
const char *exit_sound,
|
||||
const char *confirm_macro,
|
||||
const char *confirm_key,
|
||||
int confirm_attempts,
|
||||
int inter_timeout,
|
||||
int digit_len,
|
||||
int timeout,
|
||||
int max_failures
|
||||
);
|
||||
virtual SWITCH_DECLARE_CONSTRUCTOR ~IVRMenu();
|
||||
SWITCH_DECLARE(void) bindAction(char *action, const char *arg, const char *bind);
|
||||
SWITCH_DECLARE(void) execute(CoreSession *session, const char *name);
|
||||
};
|
||||
|
||||
|
||||
class API {
|
||||
protected:
|
||||
char *last_data;
|
||||
|
|
|
@ -717,6 +717,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_free(switch_ivr_menu_t * s
|
|||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_build(switch_ivr_menu_xml_ctx_t * xml_menu_ctx,
|
||||
switch_ivr_menu_t ** menu_stack, switch_xml_t xml_menus, switch_xml_t xml_menu);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_str2action(const char *action_name, switch_ivr_action_t *action);
|
||||
|
||||
/*!
|
||||
*\param xml_menu_ctx The XML menu parser context previously created by switch_ivr_menu_stack_xml_init
|
||||
*\param name The xml tag name to add to the parser engine
|
||||
|
|
|
@ -11,6 +11,10 @@ package org.freeswitch.swig;
|
|||
class freeswitchJNI {
|
||||
public final static native void consoleLog(String jarg1, String jarg2);
|
||||
public final static native void consoleCleanLog(String jarg1);
|
||||
public final static native long new_IVRMenu(long jarg1, IVRMenu jarg1_, String jarg2, String jarg3, String jarg4, String jarg5, String jarg6, String jarg7, String jarg8, int jarg9, int jarg10, int jarg11, int jarg12, int jarg13);
|
||||
public final static native void delete_IVRMenu(long jarg1);
|
||||
public final static native void IVRMenu_bindAction(long jarg1, IVRMenu jarg1_, String jarg2, String jarg3, String jarg4);
|
||||
public final static native void IVRMenu_execute(long jarg1, IVRMenu jarg1_, long jarg2, CoreSession jarg2_, String jarg3);
|
||||
public final static native long new_API();
|
||||
public final static native void delete_API(long jarg1);
|
||||
public final static native String API_execute(long jarg1, API jarg1_, String jarg2, String jarg3);
|
||||
|
|
|
@ -244,6 +244,144 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_consoleCleanLog(J
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1IVRMenu(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4, jstring jarg5, jstring jarg6, jstring jarg7, jstring jarg8, jint jarg9, jint jarg10, jint jarg11, jint jarg12, jint jarg13) {
|
||||
jlong jresult = 0 ;
|
||||
IVRMenu *arg1 = (IVRMenu *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
char *arg4 = (char *) 0 ;
|
||||
char *arg5 = (char *) 0 ;
|
||||
char *arg6 = (char *) 0 ;
|
||||
char *arg7 = (char *) 0 ;
|
||||
char *arg8 = (char *) 0 ;
|
||||
int arg9 ;
|
||||
int arg10 ;
|
||||
int arg11 ;
|
||||
int arg12 ;
|
||||
int arg13 ;
|
||||
IVRMenu *result = 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(IVRMenu **)&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 = 0;
|
||||
if (jarg4) {
|
||||
arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
|
||||
if (!arg4) return 0;
|
||||
}
|
||||
arg5 = 0;
|
||||
if (jarg5) {
|
||||
arg5 = (char *)jenv->GetStringUTFChars(jarg5, 0);
|
||||
if (!arg5) return 0;
|
||||
}
|
||||
arg6 = 0;
|
||||
if (jarg6) {
|
||||
arg6 = (char *)jenv->GetStringUTFChars(jarg6, 0);
|
||||
if (!arg6) return 0;
|
||||
}
|
||||
arg7 = 0;
|
||||
if (jarg7) {
|
||||
arg7 = (char *)jenv->GetStringUTFChars(jarg7, 0);
|
||||
if (!arg7) return 0;
|
||||
}
|
||||
arg8 = 0;
|
||||
if (jarg8) {
|
||||
arg8 = (char *)jenv->GetStringUTFChars(jarg8, 0);
|
||||
if (!arg8) return 0;
|
||||
}
|
||||
arg9 = (int)jarg9;
|
||||
arg10 = (int)jarg10;
|
||||
arg11 = (int)jarg11;
|
||||
arg12 = (int)jarg12;
|
||||
arg13 = (int)jarg13;
|
||||
result = (IVRMenu *)new IVRMenu(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,arg9,arg10,arg11,arg12,arg13);
|
||||
*(IVRMenu **)&jresult = result;
|
||||
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
|
||||
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
|
||||
if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
|
||||
if (arg5) jenv->ReleaseStringUTFChars(jarg5, (const char *)arg5);
|
||||
if (arg6) jenv->ReleaseStringUTFChars(jarg6, (const char *)arg6);
|
||||
if (arg7) jenv->ReleaseStringUTFChars(jarg7, (const char *)arg7);
|
||||
if (arg8) jenv->ReleaseStringUTFChars(jarg8, (const char *)arg8);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1IVRMenu(JNIEnv *jenv, jclass jcls, jlong jarg1) {
|
||||
IVRMenu *arg1 = (IVRMenu *) 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
arg1 = *(IVRMenu **)&jarg1;
|
||||
delete arg1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_IVRMenu_1bindAction(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) {
|
||||
IVRMenu *arg1 = (IVRMenu *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
char *arg4 = (char *) 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(IVRMenu **)&jarg1;
|
||||
arg2 = 0;
|
||||
if (jarg2) {
|
||||
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
|
||||
if (!arg2) return ;
|
||||
}
|
||||
arg3 = 0;
|
||||
if (jarg3) {
|
||||
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
|
||||
if (!arg3) return ;
|
||||
}
|
||||
arg4 = 0;
|
||||
if (jarg4) {
|
||||
arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
|
||||
if (!arg4) return ;
|
||||
}
|
||||
(arg1)->bindAction(arg2,(char const *)arg3,(char const *)arg4);
|
||||
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
|
||||
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
|
||||
if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_IVRMenu_1execute(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jstring jarg3) {
|
||||
IVRMenu *arg1 = (IVRMenu *) 0 ;
|
||||
CoreSession *arg2 = (CoreSession *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
(void)jarg2_;
|
||||
arg1 = *(IVRMenu **)&jarg1;
|
||||
arg2 = *(CoreSession **)&jarg2;
|
||||
arg3 = 0;
|
||||
if (jarg3) {
|
||||
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
|
||||
if (!arg3) return ;
|
||||
}
|
||||
(arg1)->execute(arg2,(char const *)arg3);
|
||||
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1API(JNIEnv *jenv, jclass jcls) {
|
||||
jlong jresult = 0 ;
|
||||
API *result = 0 ;
|
||||
|
|
|
@ -1487,23 +1487,24 @@ SWIG_Lua_dostring(lua_State *L, const char* str) {
|
|||
#define SWIGTYPE_p_API swig_types[0]
|
||||
#define SWIGTYPE_p_CoreSession swig_types[1]
|
||||
#define SWIGTYPE_p_Event swig_types[2]
|
||||
#define SWIGTYPE_p_Session swig_types[3]
|
||||
#define SWIGTYPE_p_Stream swig_types[4]
|
||||
#define SWIGTYPE_p_input_callback_state swig_types[5]
|
||||
#define SWIGTYPE_p_lua_State swig_types[6]
|
||||
#define SWIGTYPE_p_session_flag_t swig_types[7]
|
||||
#define SWIGTYPE_p_switch_channel_state_t swig_types[8]
|
||||
#define SWIGTYPE_p_switch_channel_t swig_types[9]
|
||||
#define SWIGTYPE_p_switch_core_session_t swig_types[10]
|
||||
#define SWIGTYPE_p_switch_event_t swig_types[11]
|
||||
#define SWIGTYPE_p_switch_input_args_t swig_types[12]
|
||||
#define SWIGTYPE_p_switch_input_type_t swig_types[13]
|
||||
#define SWIGTYPE_p_switch_priority_t swig_types[14]
|
||||
#define SWIGTYPE_p_switch_status_t swig_types[15]
|
||||
#define SWIGTYPE_p_switch_stream_handle_t swig_types[16]
|
||||
#define SWIGTYPE_p_void swig_types[17]
|
||||
static swig_type_info *swig_types[19];
|
||||
static swig_module_info swig_module = {swig_types, 18, 0, 0, 0, 0};
|
||||
#define SWIGTYPE_p_IVRMenu swig_types[3]
|
||||
#define SWIGTYPE_p_Session swig_types[4]
|
||||
#define SWIGTYPE_p_Stream swig_types[5]
|
||||
#define SWIGTYPE_p_input_callback_state swig_types[6]
|
||||
#define SWIGTYPE_p_lua_State swig_types[7]
|
||||
#define SWIGTYPE_p_session_flag_t swig_types[8]
|
||||
#define SWIGTYPE_p_switch_channel_state_t swig_types[9]
|
||||
#define SWIGTYPE_p_switch_channel_t swig_types[10]
|
||||
#define SWIGTYPE_p_switch_core_session_t swig_types[11]
|
||||
#define SWIGTYPE_p_switch_event_t swig_types[12]
|
||||
#define SWIGTYPE_p_switch_input_args_t swig_types[13]
|
||||
#define SWIGTYPE_p_switch_input_type_t swig_types[14]
|
||||
#define SWIGTYPE_p_switch_priority_t swig_types[15]
|
||||
#define SWIGTYPE_p_switch_status_t swig_types[16]
|
||||
#define SWIGTYPE_p_switch_stream_handle_t swig_types[17]
|
||||
#define SWIGTYPE_p_void swig_types[18]
|
||||
static swig_type_info *swig_types[20];
|
||||
static swig_module_info swig_module = {swig_types, 19, 0, 0, 0, 0};
|
||||
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
||||
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
||||
|
||||
|
@ -1571,6 +1572,175 @@ fail:
|
|||
}
|
||||
|
||||
|
||||
static int _wrap_new_IVRMenu(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
IVRMenu *arg1 = (IVRMenu *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
char *arg4 = (char *) 0 ;
|
||||
char *arg5 = (char *) 0 ;
|
||||
char *arg6 = (char *) 0 ;
|
||||
char *arg7 = (char *) 0 ;
|
||||
char *arg8 = (char *) 0 ;
|
||||
int arg9 ;
|
||||
int arg10 ;
|
||||
int arg11 ;
|
||||
int arg12 ;
|
||||
int arg13 ;
|
||||
IVRMenu *result = 0 ;
|
||||
|
||||
SWIG_check_num_args("IVRMenu",13,13)
|
||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IVRMenu",1,"IVRMenu *");
|
||||
if(!lua_isstring(L,2)) SWIG_fail_arg("IVRMenu",2,"char const *");
|
||||
if(!lua_isstring(L,3)) SWIG_fail_arg("IVRMenu",3,"char const *");
|
||||
if(!lua_isstring(L,4)) SWIG_fail_arg("IVRMenu",4,"char const *");
|
||||
if(!lua_isstring(L,5)) SWIG_fail_arg("IVRMenu",5,"char const *");
|
||||
if(!lua_isstring(L,6)) SWIG_fail_arg("IVRMenu",6,"char const *");
|
||||
if(!lua_isstring(L,7)) SWIG_fail_arg("IVRMenu",7,"char const *");
|
||||
if(!lua_isstring(L,8)) SWIG_fail_arg("IVRMenu",8,"char const *");
|
||||
if(!lua_isnumber(L,9)) SWIG_fail_arg("IVRMenu",9,"int");
|
||||
if(!lua_isnumber(L,10)) SWIG_fail_arg("IVRMenu",10,"int");
|
||||
if(!lua_isnumber(L,11)) SWIG_fail_arg("IVRMenu",11,"int");
|
||||
if(!lua_isnumber(L,12)) SWIG_fail_arg("IVRMenu",12,"int");
|
||||
if(!lua_isnumber(L,13)) SWIG_fail_arg("IVRMenu",13,"int");
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IVRMenu,0))){
|
||||
SWIG_fail_ptr("new_IVRMenu",1,SWIGTYPE_p_IVRMenu);
|
||||
}
|
||||
|
||||
arg2 = (char *)lua_tostring(L, 2);
|
||||
arg3 = (char *)lua_tostring(L, 3);
|
||||
arg4 = (char *)lua_tostring(L, 4);
|
||||
arg5 = (char *)lua_tostring(L, 5);
|
||||
arg6 = (char *)lua_tostring(L, 6);
|
||||
arg7 = (char *)lua_tostring(L, 7);
|
||||
arg8 = (char *)lua_tostring(L, 8);
|
||||
arg9 = (int)lua_tonumber(L, 9);
|
||||
arg10 = (int)lua_tonumber(L, 10);
|
||||
arg11 = (int)lua_tonumber(L, 11);
|
||||
arg12 = (int)lua_tonumber(L, 12);
|
||||
arg13 = (int)lua_tonumber(L, 13);
|
||||
result = (IVRMenu *)new IVRMenu(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,arg9,arg10,arg11,arg12,arg13);
|
||||
SWIG_arg=0;
|
||||
SWIG_NewPointerObj(L,result,SWIGTYPE_p_IVRMenu,1); SWIG_arg++;
|
||||
return SWIG_arg;
|
||||
|
||||
if(0) SWIG_fail;
|
||||
|
||||
fail:
|
||||
lua_error(L);
|
||||
return SWIG_arg;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_delete_IVRMenu(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
IVRMenu *arg1 = (IVRMenu *) 0 ;
|
||||
|
||||
SWIG_check_num_args("IVRMenu",1,1)
|
||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IVRMenu",1,"IVRMenu *");
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IVRMenu,SWIG_POINTER_DISOWN))){
|
||||
SWIG_fail_ptr("delete_IVRMenu",1,SWIGTYPE_p_IVRMenu);
|
||||
}
|
||||
|
||||
delete arg1;
|
||||
|
||||
SWIG_arg=0;
|
||||
|
||||
return SWIG_arg;
|
||||
|
||||
if(0) SWIG_fail;
|
||||
|
||||
fail:
|
||||
lua_error(L);
|
||||
return SWIG_arg;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_IVRMenu_bindAction(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
IVRMenu *arg1 = (IVRMenu *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
char *arg4 = (char *) 0 ;
|
||||
|
||||
SWIG_check_num_args("bindAction",4,4)
|
||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("bindAction",1,"IVRMenu *");
|
||||
if(!lua_isstring(L,2)) SWIG_fail_arg("bindAction",2,"char *");
|
||||
if(!lua_isstring(L,3)) SWIG_fail_arg("bindAction",3,"char const *");
|
||||
if(!lua_isstring(L,4)) SWIG_fail_arg("bindAction",4,"char const *");
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IVRMenu,0))){
|
||||
SWIG_fail_ptr("IVRMenu_bindAction",1,SWIGTYPE_p_IVRMenu);
|
||||
}
|
||||
|
||||
arg2 = (char *)lua_tostring(L, 2);
|
||||
arg3 = (char *)lua_tostring(L, 3);
|
||||
arg4 = (char *)lua_tostring(L, 4);
|
||||
(arg1)->bindAction(arg2,(char const *)arg3,(char const *)arg4);
|
||||
SWIG_arg=0;
|
||||
|
||||
return SWIG_arg;
|
||||
|
||||
if(0) SWIG_fail;
|
||||
|
||||
fail:
|
||||
lua_error(L);
|
||||
return SWIG_arg;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_IVRMenu_execute(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
IVRMenu *arg1 = (IVRMenu *) 0 ;
|
||||
CoreSession *arg2 = (CoreSession *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
|
||||
SWIG_check_num_args("execute",3,3)
|
||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("execute",1,"IVRMenu *");
|
||||
if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("execute",2,"CoreSession *");
|
||||
if(!lua_isstring(L,3)) SWIG_fail_arg("execute",3,"char const *");
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IVRMenu,0))){
|
||||
SWIG_fail_ptr("IVRMenu_execute",1,SWIGTYPE_p_IVRMenu);
|
||||
}
|
||||
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_CoreSession,0))){
|
||||
SWIG_fail_ptr("IVRMenu_execute",2,SWIGTYPE_p_CoreSession);
|
||||
}
|
||||
|
||||
arg3 = (char *)lua_tostring(L, 3);
|
||||
(arg1)->execute(arg2,(char const *)arg3);
|
||||
SWIG_arg=0;
|
||||
|
||||
return SWIG_arg;
|
||||
|
||||
if(0) SWIG_fail;
|
||||
|
||||
fail:
|
||||
lua_error(L);
|
||||
return SWIG_arg;
|
||||
}
|
||||
|
||||
|
||||
static void swig_delete_IVRMenu(void *obj) {
|
||||
IVRMenu *arg1 = (IVRMenu *) obj;
|
||||
delete arg1;
|
||||
}
|
||||
static swig_lua_method swig_IVRMenu_methods[] = {
|
||||
{"bindAction", _wrap_IVRMenu_bindAction},
|
||||
{"execute", _wrap_IVRMenu_execute},
|
||||
{0,0}
|
||||
};
|
||||
static swig_lua_attribute swig_IVRMenu_attributes[] = {
|
||||
{0,0,0}
|
||||
};
|
||||
static swig_lua_class *swig_IVRMenu_bases[] = {0};
|
||||
static const char *swig_IVRMenu_base_names[] = {0};
|
||||
static swig_lua_class _wrap_class_IVRMenu = { "IVRMenu", &SWIGTYPE_p_IVRMenu,_wrap_new_IVRMenu, swig_delete_IVRMenu, swig_IVRMenu_methods, swig_IVRMenu_attributes, swig_IVRMenu_bases, swig_IVRMenu_base_names };
|
||||
|
||||
static int _wrap_new_API(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
API *result = 0 ;
|
||||
|
@ -5474,6 +5644,7 @@ static void *_p_SessionTo_p_CoreSession(void *x, int *newmemory) {
|
|||
static swig_type_info _swigt__p_API = {"_p_API", "API *", 0, 0, (void*)&_wrap_class_API, 0};
|
||||
static swig_type_info _swigt__p_CoreSession = {"_p_CoreSession", "CoreSession *", 0, 0, (void*)&_wrap_class_CoreSession, 0};
|
||||
static swig_type_info _swigt__p_Event = {"_p_Event", "Event *", 0, 0, (void*)&_wrap_class_Event, 0};
|
||||
static swig_type_info _swigt__p_IVRMenu = {"_p_IVRMenu", "IVRMenu *", 0, 0, (void*)&_wrap_class_IVRMenu, 0};
|
||||
static swig_type_info _swigt__p_Session = {"_p_Session", "Session *", 0, 0, (void*)&_wrap_class_Session, 0};
|
||||
static swig_type_info _swigt__p_Stream = {"_p_Stream", "Stream *", 0, 0, (void*)&_wrap_class_Stream, 0};
|
||||
static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void*)&_wrap_class_input_callback_state_t, 0};
|
||||
|
@ -5494,6 +5665,7 @@ static swig_type_info *swig_type_initial[] = {
|
|||
&_swigt__p_API,
|
||||
&_swigt__p_CoreSession,
|
||||
&_swigt__p_Event,
|
||||
&_swigt__p_IVRMenu,
|
||||
&_swigt__p_Session,
|
||||
&_swigt__p_Stream,
|
||||
&_swigt__p_input_callback_state,
|
||||
|
@ -5514,6 +5686,7 @@ static swig_type_info *swig_type_initial[] = {
|
|||
static swig_cast_info _swigc__p_API[] = { {&_swigt__p_API, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_CoreSession[] = { {&_swigt__p_CoreSession, 0, 0, 0}, {&_swigt__p_Session, _p_SessionTo_p_CoreSession, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_Event[] = { {&_swigt__p_Event, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_IVRMenu[] = { {&_swigt__p_IVRMenu, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_Session[] = { {&_swigt__p_Session, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_Stream[] = { {&_swigt__p_Stream, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_input_callback_state[] = { {&_swigt__p_input_callback_state, 0, 0, 0},{0, 0, 0, 0}};
|
||||
|
@ -5534,6 +5707,7 @@ static swig_cast_info *swig_cast_initial[] = {
|
|||
_swigc__p_API,
|
||||
_swigc__p_CoreSession,
|
||||
_swigc__p_Event,
|
||||
_swigc__p_IVRMenu,
|
||||
_swigc__p_Session,
|
||||
_swigc__p_Stream,
|
||||
_swigc__p_input_callback_state,
|
||||
|
|
|
@ -11,7 +11,7 @@ include $(BASE)/build/modmake.rules
|
|||
|
||||
|
||||
swigclean: clean
|
||||
rm -f mod_perl_wrap.*
|
||||
rm -f mod_perl_wrap.* freeswitch.so freeswitch.pm
|
||||
|
||||
mod_perl_wrap.cpp:
|
||||
swig -static -shadow -perl5 -c++ -DMULTIPLICITY -I../../../../src/include -o mod_perl_wrap.cpp freeswitch.i
|
||||
|
|
|
@ -56,6 +56,45 @@ package freeswitch;
|
|||
*hanguphook = *freeswitchc::hanguphook;
|
||||
*dtmf_callback = *freeswitchc::dtmf_callback;
|
||||
|
||||
############# Class : freeswitch::IVRMenu ##############
|
||||
|
||||
package freeswitch::IVRMenu;
|
||||
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
|
||||
@ISA = qw( freeswitch );
|
||||
%OWNER = ();
|
||||
%ITERATORS = ();
|
||||
sub new {
|
||||
my $pkg = shift;
|
||||
my $self = freeswitchc::new_IVRMenu(@_);
|
||||
bless $self, $pkg if defined($self);
|
||||
}
|
||||
|
||||
sub DESTROY {
|
||||
return unless $_[0]->isa('HASH');
|
||||
my $self = tied(%{$_[0]});
|
||||
return unless defined $self;
|
||||
delete $ITERATORS{$self};
|
||||
if (exists $OWNER{$self}) {
|
||||
freeswitchc::delete_IVRMenu($self);
|
||||
delete $OWNER{$self};
|
||||
}
|
||||
}
|
||||
|
||||
*bindAction = *freeswitchc::IVRMenu_bindAction;
|
||||
*execute = *freeswitchc::IVRMenu_execute;
|
||||
sub DISOWN {
|
||||
my $self = shift;
|
||||
my $ptr = tied(%$self);
|
||||
delete $OWNER{$ptr};
|
||||
}
|
||||
|
||||
sub ACQUIRE {
|
||||
my $self = shift;
|
||||
my $ptr = tied(%$self);
|
||||
$OWNER{$ptr} = 1;
|
||||
}
|
||||
|
||||
|
||||
############# Class : freeswitch::API ##############
|
||||
|
||||
package freeswitch::API;
|
||||
|
|
|
@ -121,14 +121,16 @@ static int perl_parse_and_execute(PerlInterpreter *my_perl, char *input_code, ch
|
|||
}
|
||||
if (!error) {
|
||||
char *file = input_code;
|
||||
|
||||
char *err;
|
||||
|
||||
if (!switch_is_file_path(file)) {
|
||||
file = switch_mprintf("do '%s/%s';\n", SWITCH_GLOBAL_dirs.script_dir, file);
|
||||
file = switch_mprintf("require '%s/%s';", SWITCH_GLOBAL_dirs.script_dir, file);
|
||||
switch_assert(file);
|
||||
} else {
|
||||
file = switch_mprintf("do '%s';\n", file);
|
||||
file = switch_mprintf("require '%s';", file);
|
||||
switch_assert(file);
|
||||
}
|
||||
|
||||
error = Perl_safe_eval(my_perl, file);
|
||||
switch_safe_free(file);
|
||||
}
|
||||
|
|
|
@ -1449,24 +1449,25 @@ SWIG_Perl_SetModule(swig_module_info *module) {
|
|||
#define SWIGTYPE_p_API swig_types[0]
|
||||
#define SWIGTYPE_p_CoreSession swig_types[1]
|
||||
#define SWIGTYPE_p_Event swig_types[2]
|
||||
#define SWIGTYPE_p_PerlInterpreter swig_types[3]
|
||||
#define SWIGTYPE_p_Session swig_types[4]
|
||||
#define SWIGTYPE_p_Stream swig_types[5]
|
||||
#define SWIGTYPE_p_char swig_types[6]
|
||||
#define SWIGTYPE_p_input_callback_state swig_types[7]
|
||||
#define SWIGTYPE_p_session_flag_t swig_types[8]
|
||||
#define SWIGTYPE_p_switch_channel_state_t swig_types[9]
|
||||
#define SWIGTYPE_p_switch_channel_t swig_types[10]
|
||||
#define SWIGTYPE_p_switch_core_session_t swig_types[11]
|
||||
#define SWIGTYPE_p_switch_event_t swig_types[12]
|
||||
#define SWIGTYPE_p_switch_input_args_t swig_types[13]
|
||||
#define SWIGTYPE_p_switch_input_type_t swig_types[14]
|
||||
#define SWIGTYPE_p_switch_priority_t swig_types[15]
|
||||
#define SWIGTYPE_p_switch_status_t swig_types[16]
|
||||
#define SWIGTYPE_p_switch_stream_handle_t swig_types[17]
|
||||
#define SWIGTYPE_p_void swig_types[18]
|
||||
static swig_type_info *swig_types[20];
|
||||
static swig_module_info swig_module = {swig_types, 19, 0, 0, 0, 0};
|
||||
#define SWIGTYPE_p_IVRMenu swig_types[3]
|
||||
#define SWIGTYPE_p_PerlInterpreter swig_types[4]
|
||||
#define SWIGTYPE_p_Session swig_types[5]
|
||||
#define SWIGTYPE_p_Stream swig_types[6]
|
||||
#define SWIGTYPE_p_char swig_types[7]
|
||||
#define SWIGTYPE_p_input_callback_state swig_types[8]
|
||||
#define SWIGTYPE_p_session_flag_t swig_types[9]
|
||||
#define SWIGTYPE_p_switch_channel_state_t swig_types[10]
|
||||
#define SWIGTYPE_p_switch_channel_t swig_types[11]
|
||||
#define SWIGTYPE_p_switch_core_session_t swig_types[12]
|
||||
#define SWIGTYPE_p_switch_event_t swig_types[13]
|
||||
#define SWIGTYPE_p_switch_input_args_t swig_types[14]
|
||||
#define SWIGTYPE_p_switch_input_type_t swig_types[15]
|
||||
#define SWIGTYPE_p_switch_priority_t swig_types[16]
|
||||
#define SWIGTYPE_p_switch_status_t swig_types[17]
|
||||
#define SWIGTYPE_p_switch_stream_handle_t swig_types[18]
|
||||
#define SWIGTYPE_p_void swig_types[19]
|
||||
static swig_type_info *swig_types[21];
|
||||
static swig_module_info swig_module = {swig_types, 20, 0, 0, 0, 0};
|
||||
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
||||
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
||||
|
||||
|
@ -1557,42 +1558,6 @@ SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
|
|||
|
||||
|
||||
|
||||
SWIGINTERNINLINE SV *
|
||||
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
|
||||
{
|
||||
SV *obj = sv_newmortal();
|
||||
if (carray) {
|
||||
sv_setpvn(obj, carray, size);
|
||||
} else {
|
||||
sv_setsv(obj, &PL_sv_undef);
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE SV *
|
||||
SWIG_FromCharPtr(const char *cptr)
|
||||
{
|
||||
return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE SV *
|
||||
SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value)
|
||||
{
|
||||
SV *obj = sv_newmortal();
|
||||
sv_setiv(obj, (IV) value);
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE SV *
|
||||
SWIG_From_int SWIG_PERL_DECL_ARGS_1(int value)
|
||||
{
|
||||
return SWIG_From_long SWIG_PERL_CALL_ARGS_1(value);
|
||||
}
|
||||
|
||||
|
||||
#include <limits.h>
|
||||
#if !defined(SWIG_NO_LLONG_MAX)
|
||||
# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
|
||||
|
@ -1721,6 +1686,42 @@ SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
|
|||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE SV *
|
||||
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
|
||||
{
|
||||
SV *obj = sv_newmortal();
|
||||
if (carray) {
|
||||
sv_setpvn(obj, carray, size);
|
||||
} else {
|
||||
sv_setsv(obj, &PL_sv_undef);
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE SV *
|
||||
SWIG_FromCharPtr(const char *cptr)
|
||||
{
|
||||
return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE SV *
|
||||
SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value)
|
||||
{
|
||||
SV *obj = sv_newmortal();
|
||||
sv_setiv(obj, (IV) value);
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE SV *
|
||||
SWIG_From_int SWIG_PERL_DECL_ARGS_1(int value)
|
||||
{
|
||||
return SWIG_From_long SWIG_PERL_CALL_ARGS_1(value);
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE SV *
|
||||
SWIG_From_bool SWIG_PERL_DECL_ARGS_1(bool value)
|
||||
{
|
||||
|
@ -1923,6 +1924,297 @@ XS(_wrap_consoleCleanLog) {
|
|||
}
|
||||
|
||||
|
||||
XS(_wrap_new_IVRMenu) {
|
||||
{
|
||||
IVRMenu *arg1 = (IVRMenu *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
char *arg4 = (char *) 0 ;
|
||||
char *arg5 = (char *) 0 ;
|
||||
char *arg6 = (char *) 0 ;
|
||||
char *arg7 = (char *) 0 ;
|
||||
char *arg8 = (char *) 0 ;
|
||||
int arg9 ;
|
||||
int arg10 ;
|
||||
int arg11 ;
|
||||
int arg12 ;
|
||||
int arg13 ;
|
||||
IVRMenu *result = 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int res3 ;
|
||||
char *buf3 = 0 ;
|
||||
int alloc3 = 0 ;
|
||||
int res4 ;
|
||||
char *buf4 = 0 ;
|
||||
int alloc4 = 0 ;
|
||||
int res5 ;
|
||||
char *buf5 = 0 ;
|
||||
int alloc5 = 0 ;
|
||||
int res6 ;
|
||||
char *buf6 = 0 ;
|
||||
int alloc6 = 0 ;
|
||||
int res7 ;
|
||||
char *buf7 = 0 ;
|
||||
int alloc7 = 0 ;
|
||||
int res8 ;
|
||||
char *buf8 = 0 ;
|
||||
int alloc8 = 0 ;
|
||||
int val9 ;
|
||||
int ecode9 = 0 ;
|
||||
int val10 ;
|
||||
int ecode10 = 0 ;
|
||||
int val11 ;
|
||||
int ecode11 = 0 ;
|
||||
int val12 ;
|
||||
int ecode12 = 0 ;
|
||||
int val13 ;
|
||||
int ecode13 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 13) || (items > 13)) {
|
||||
SWIG_croak("Usage: new_IVRMenu(main,name,greeting_sound,short_greeting_sound,invalid_sound,exit_sound,confirm_macro,confirm_key,confirm_attempts,inter_timeout,digit_len,timeout,max_failures);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IVRMenu, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IVRMenu" "', argument " "1"" of type '" "IVRMenu *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< IVRMenu * >(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IVRMenu" "', 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 '" "new_IVRMenu" "', argument " "3"" of type '" "char const *""'");
|
||||
}
|
||||
arg3 = reinterpret_cast< char * >(buf3);
|
||||
res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
|
||||
if (!SWIG_IsOK(res4)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_IVRMenu" "', argument " "4"" of type '" "char const *""'");
|
||||
}
|
||||
arg4 = reinterpret_cast< char * >(buf4);
|
||||
res5 = SWIG_AsCharPtrAndSize(ST(4), &buf5, NULL, &alloc5);
|
||||
if (!SWIG_IsOK(res5)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_IVRMenu" "', argument " "5"" of type '" "char const *""'");
|
||||
}
|
||||
arg5 = reinterpret_cast< char * >(buf5);
|
||||
res6 = SWIG_AsCharPtrAndSize(ST(5), &buf6, NULL, &alloc6);
|
||||
if (!SWIG_IsOK(res6)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_IVRMenu" "', argument " "6"" of type '" "char const *""'");
|
||||
}
|
||||
arg6 = reinterpret_cast< char * >(buf6);
|
||||
res7 = SWIG_AsCharPtrAndSize(ST(6), &buf7, NULL, &alloc7);
|
||||
if (!SWIG_IsOK(res7)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_IVRMenu" "', argument " "7"" of type '" "char const *""'");
|
||||
}
|
||||
arg7 = reinterpret_cast< char * >(buf7);
|
||||
res8 = SWIG_AsCharPtrAndSize(ST(7), &buf8, NULL, &alloc8);
|
||||
if (!SWIG_IsOK(res8)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_IVRMenu" "', argument " "8"" of type '" "char const *""'");
|
||||
}
|
||||
arg8 = reinterpret_cast< char * >(buf8);
|
||||
ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
|
||||
if (!SWIG_IsOK(ecode9)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_IVRMenu" "', argument " "9"" of type '" "int""'");
|
||||
}
|
||||
arg9 = static_cast< int >(val9);
|
||||
ecode10 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
|
||||
if (!SWIG_IsOK(ecode10)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_IVRMenu" "', argument " "10"" of type '" "int""'");
|
||||
}
|
||||
arg10 = static_cast< int >(val10);
|
||||
ecode11 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
|
||||
if (!SWIG_IsOK(ecode11)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_IVRMenu" "', argument " "11"" of type '" "int""'");
|
||||
}
|
||||
arg11 = static_cast< int >(val11);
|
||||
ecode12 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
|
||||
if (!SWIG_IsOK(ecode12)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_IVRMenu" "', argument " "12"" of type '" "int""'");
|
||||
}
|
||||
arg12 = static_cast< int >(val12);
|
||||
ecode13 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
|
||||
if (!SWIG_IsOK(ecode13)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_IVRMenu" "', argument " "13"" of type '" "int""'");
|
||||
}
|
||||
arg13 = static_cast< int >(val13);
|
||||
result = (IVRMenu *)new IVRMenu(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,arg9,arg10,arg11,arg12,arg13);
|
||||
ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IVRMenu, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
|
||||
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
|
||||
if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
|
||||
if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
|
||||
if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
|
||||
if (alloc8 == SWIG_NEWOBJ) delete[] buf8;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
|
||||
if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
|
||||
if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
|
||||
if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
|
||||
if (alloc8 == SWIG_NEWOBJ) delete[] buf8;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_delete_IVRMenu) {
|
||||
{
|
||||
IVRMenu *arg1 = (IVRMenu *) 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 1) || (items > 1)) {
|
||||
SWIG_croak("Usage: delete_IVRMenu(self);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IVRMenu, SWIG_POINTER_DISOWN | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IVRMenu" "', argument " "1"" of type '" "IVRMenu *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< IVRMenu * >(argp1);
|
||||
delete arg1;
|
||||
|
||||
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_IVRMenu_bindAction) {
|
||||
{
|
||||
IVRMenu *arg1 = (IVRMenu *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
char *arg4 = (char *) 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int res3 ;
|
||||
char *buf3 = 0 ;
|
||||
int alloc3 = 0 ;
|
||||
int res4 ;
|
||||
char *buf4 = 0 ;
|
||||
int alloc4 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 4) || (items > 4)) {
|
||||
SWIG_croak("Usage: IVRMenu_bindAction(self,action,arg,bind);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IVRMenu, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVRMenu_bindAction" "', argument " "1"" of type '" "IVRMenu *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< IVRMenu * >(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IVRMenu_bindAction" "', argument " "2"" of type '" "char *""'");
|
||||
}
|
||||
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 '" "IVRMenu_bindAction" "', argument " "3"" of type '" "char const *""'");
|
||||
}
|
||||
arg3 = reinterpret_cast< char * >(buf3);
|
||||
res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
|
||||
if (!SWIG_IsOK(res4)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IVRMenu_bindAction" "', argument " "4"" of type '" "char const *""'");
|
||||
}
|
||||
arg4 = reinterpret_cast< char * >(buf4);
|
||||
(arg1)->bindAction(arg2,(char const *)arg3,(char const *)arg4);
|
||||
|
||||
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_IVRMenu_execute) {
|
||||
{
|
||||
IVRMenu *arg1 = (IVRMenu *) 0 ;
|
||||
CoreSession *arg2 = (CoreSession *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
void *argp2 = 0 ;
|
||||
int res2 = 0 ;
|
||||
int res3 ;
|
||||
char *buf3 = 0 ;
|
||||
int alloc3 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 3) || (items > 3)) {
|
||||
SWIG_croak("Usage: IVRMenu_execute(self,session,name);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IVRMenu, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVRMenu_execute" "', argument " "1"" of type '" "IVRMenu *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< IVRMenu * >(argp1);
|
||||
res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_CoreSession, 0 | 0 );
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IVRMenu_execute" "', argument " "2"" of type '" "CoreSession *""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< CoreSession * >(argp2);
|
||||
res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
|
||||
if (!SWIG_IsOK(res3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IVRMenu_execute" "', argument " "3"" of type '" "char const *""'");
|
||||
}
|
||||
arg3 = reinterpret_cast< char * >(buf3);
|
||||
(arg1)->execute(arg2,(char const *)arg3);
|
||||
|
||||
|
||||
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_new_API) {
|
||||
{
|
||||
API *result = 0 ;
|
||||
|
@ -6964,6 +7256,7 @@ static void *_p_SessionTo_p_CoreSession(void *x, int *newmemory) {
|
|||
static swig_type_info _swigt__p_API = {"_p_API", "API *", 0, 0, (void*)"freeswitch::API", 0};
|
||||
static swig_type_info _swigt__p_CoreSession = {"_p_CoreSession", "CoreSession *", 0, 0, (void*)"freeswitch::CoreSession", 0};
|
||||
static swig_type_info _swigt__p_Event = {"_p_Event", "Event *", 0, 0, (void*)"freeswitch::Event", 0};
|
||||
static swig_type_info _swigt__p_IVRMenu = {"_p_IVRMenu", "IVRMenu *", 0, 0, (void*)"freeswitch::IVRMenu", 0};
|
||||
static swig_type_info _swigt__p_PerlInterpreter = {"_p_PerlInterpreter", "PerlInterpreter *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_Session = {"_p_Session", "Session *", 0, 0, (void*)"freeswitch::Session", 0};
|
||||
static swig_type_info _swigt__p_Stream = {"_p_Stream", "Stream *", 0, 0, (void*)"freeswitch::Stream", 0};
|
||||
|
@ -6985,6 +7278,7 @@ static swig_type_info *swig_type_initial[] = {
|
|||
&_swigt__p_API,
|
||||
&_swigt__p_CoreSession,
|
||||
&_swigt__p_Event,
|
||||
&_swigt__p_IVRMenu,
|
||||
&_swigt__p_PerlInterpreter,
|
||||
&_swigt__p_Session,
|
||||
&_swigt__p_Stream,
|
||||
|
@ -7006,6 +7300,7 @@ static swig_type_info *swig_type_initial[] = {
|
|||
static swig_cast_info _swigc__p_API[] = { {&_swigt__p_API, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_CoreSession[] = { {&_swigt__p_CoreSession, 0, 0, 0}, {&_swigt__p_Session, _p_SessionTo_p_CoreSession, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_Event[] = { {&_swigt__p_Event, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_IVRMenu[] = { {&_swigt__p_IVRMenu, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_PerlInterpreter[] = { {&_swigt__p_PerlInterpreter, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_Session[] = { {&_swigt__p_Session, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_Stream[] = { {&_swigt__p_Stream, 0, 0, 0},{0, 0, 0, 0}};
|
||||
|
@ -7027,6 +7322,7 @@ static swig_cast_info *swig_cast_initial[] = {
|
|||
_swigc__p_API,
|
||||
_swigc__p_CoreSession,
|
||||
_swigc__p_Event,
|
||||
_swigc__p_IVRMenu,
|
||||
_swigc__p_PerlInterpreter,
|
||||
_swigc__p_Session,
|
||||
_swigc__p_Stream,
|
||||
|
@ -7060,6 +7356,10 @@ static swig_variable_info swig_variables[] = {
|
|||
static swig_command_info swig_commands[] = {
|
||||
{"freeswitchc::consoleLog", _wrap_consoleLog},
|
||||
{"freeswitchc::consoleCleanLog", _wrap_consoleCleanLog},
|
||||
{"freeswitchc::new_IVRMenu", _wrap_new_IVRMenu},
|
||||
{"freeswitchc::delete_IVRMenu", _wrap_delete_IVRMenu},
|
||||
{"freeswitchc::IVRMenu_bindAction", _wrap_IVRMenu_bindAction},
|
||||
{"freeswitchc::IVRMenu_execute", _wrap_IVRMenu_execute},
|
||||
{"freeswitchc::new_API", _wrap_new_API},
|
||||
{"freeswitchc::delete_API", _wrap_delete_API},
|
||||
{"freeswitchc::API_execute", _wrap_API_execute},
|
||||
|
@ -7454,6 +7754,7 @@ XS(SWIG_init) {
|
|||
SvREADONLY_on(sv);
|
||||
}
|
||||
|
||||
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 {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# This file was automatically generated by SWIG (http://www.swig.org).
|
||||
# Version 1.3.31
|
||||
# Version 1.3.35
|
||||
#
|
||||
# Don't modify this file, modify the SWIG interface instead.
|
||||
# This file is compatible with both classic and new-style classes.
|
||||
|
@ -50,6 +50,23 @@ del types
|
|||
|
||||
consoleLog = _freeswitch.consoleLog
|
||||
consoleCleanLog = _freeswitch.consoleCleanLog
|
||||
class IVRMenu(_object):
|
||||
__swig_setmethods__ = {}
|
||||
__setattr__ = lambda self, name, value: _swig_setattr(self, IVRMenu, name, value)
|
||||
__swig_getmethods__ = {}
|
||||
__getattr__ = lambda self, name: _swig_getattr(self, IVRMenu, name)
|
||||
__repr__ = _swig_repr
|
||||
def __init__(self, *args):
|
||||
this = _freeswitch.new_IVRMenu(*args)
|
||||
try: self.this.append(this)
|
||||
except: self.this = this
|
||||
__swig_destroy__ = _freeswitch.delete_IVRMenu
|
||||
__del__ = lambda self : None;
|
||||
def bindAction(*args): return _freeswitch.IVRMenu_bindAction(*args)
|
||||
def execute(*args): return _freeswitch.IVRMenu_execute(*args)
|
||||
IVRMenu_swigregister = _freeswitch.IVRMenu_swigregister
|
||||
IVRMenu_swigregister(IVRMenu)
|
||||
|
||||
class API(_object):
|
||||
__swig_setmethods__ = {}
|
||||
__setattr__ = lambda self, name, value: _swig_setattr(self, API, name, value)
|
||||
|
@ -152,7 +169,7 @@ class CoreSession(_object):
|
|||
__setattr__ = lambda self, name, value: _swig_setattr(self, CoreSession, name, value)
|
||||
__swig_getmethods__ = {}
|
||||
__getattr__ = lambda self, name: _swig_getattr(self, CoreSession, name)
|
||||
def __init__(self): raise AttributeError, "No constructor defined"
|
||||
def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined"
|
||||
__repr__ = _swig_repr
|
||||
__swig_destroy__ = _freeswitch.delete_CoreSession
|
||||
__del__ = lambda self : None;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -37,6 +37,59 @@
|
|||
#pragma warning(disable:4127 4003)
|
||||
#endif
|
||||
|
||||
|
||||
SWITCH_DECLARE_CONSTRUCTOR IVRMenu::IVRMenu(IVRMenu *main,
|
||||
const char *name,
|
||||
const char *greeting_sound,
|
||||
const char *short_greeting_sound,
|
||||
const char *invalid_sound,
|
||||
const char *exit_sound,
|
||||
const char *confirm_macro,
|
||||
const char *confirm_key,
|
||||
int confirm_attempts,
|
||||
int inter_timeout,
|
||||
int digit_len,
|
||||
int timeout,
|
||||
int max_failures)
|
||||
{
|
||||
menu = NULL;
|
||||
switch_core_new_memory_pool(&pool);
|
||||
switch_assert(pool);
|
||||
if (switch_strlen_zero(name)) {
|
||||
name = "no name";
|
||||
}
|
||||
|
||||
switch_ivr_menu_init(&menu, main ? main->menu : NULL, name, greeting_sound, short_greeting_sound, invalid_sound,
|
||||
exit_sound, confirm_macro, confirm_key, confirm_attempts, inter_timeout, digit_len, timeout, max_failures, pool);
|
||||
|
||||
|
||||
}
|
||||
|
||||
SWITCH_DECLARE_CONSTRUCTOR IVRMenu::~IVRMenu()
|
||||
{
|
||||
if (menu) {
|
||||
switch_ivr_menu_stack_free(menu);
|
||||
}
|
||||
switch_core_destroy_memory_pool(&pool);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) IVRMenu::bindAction(char *action, const char *arg, const char *bind)
|
||||
{
|
||||
switch_ivr_action_t ivr_action = SWITCH_IVR_ACTION_NOOP;
|
||||
|
||||
if (switch_ivr_menu_str2action(action, &ivr_action) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "bind %s to %s(%s)\n", bind, action, arg);
|
||||
switch_ivr_menu_bind_action(menu, ivr_action, arg, bind);
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invalid action %s\n", action);
|
||||
}
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) IVRMenu::execute(CoreSession *session, const char *name)
|
||||
{
|
||||
switch_ivr_menu_execute(session->session, menu, (char *)name, NULL);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE_CONSTRUCTOR API::API()
|
||||
{
|
||||
last_data = NULL;
|
||||
|
|
|
@ -601,6 +601,27 @@ static struct iam_s {
|
|||
};
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_str2action(const char *action_name, switch_ivr_action_t *action)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!switch_strlen_zero(action_name)) {
|
||||
for(i = 0;;i++) {
|
||||
if (!iam[i].name) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (!strcasecmp(iam[i].name, action_name)) {
|
||||
*action = iam[i].action;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
|
||||
static switch_bool_t is_valid_action(const char *action)
|
||||
{
|
||||
int i;
|
||||
|
|
Loading…
Reference in New Issue