freeswitch-svn
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
April 2008
- 10 participants
- 225 discussions
[Freeswitch-svn] [commit] r8225 - in freeswitch/trunk/src: . include mod/languages/mod_java mod/languages/mod_java/src/org/freeswitch/swig mod/languages/mod_lua mod/languages/mod_perl mod/languages/mod_python
by Freeswitch SVN 30 Apr '08
by Freeswitch SVN 30 Apr '08
30 Apr '08
Author: anthm
Date: Wed Apr 30 19:42:37 2008
New Revision: 8225
Modified:
freeswitch/trunk/src/include/switch_cpp.h
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitch.java
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java
freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.c
freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm
freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py
freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp
freeswitch/trunk/src/switch_cpp.cpp
Log:
break all the api in the swig stuff
Modified: freeswitch/trunk/src/include/switch_cpp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_cpp.h (original)
+++ freeswitch/trunk/src/include/switch_cpp.h Wed Apr 30 19:42:37 2008
@@ -61,6 +61,19 @@
*/
+SWITCH_DECLARE(void) consoleLog(char *level_str, char *msg);
+SWITCH_DECLARE(void) consoleCleanLog(char *msg);
+
+class API {
+ protected:
+ char *last_data;
+ public:
+ SWITCH_DECLARE_CONSTRUCTOR API(void);
+ virtual SWITCH_DECLARE_CONSTRUCTOR ~API();
+ SWITCH_DECLARE(char *) execute(const char *command, const char *data);
+ SWITCH_DECLARE(char *) executeString(const char *command);
+};
+
typedef struct input_callback_state {
void *function; // pointer to the language specific callback function
@@ -291,8 +304,6 @@
SWITCH_DECLARE(void) console_log(char *level_str, char *msg);
SWITCH_DECLARE(void) console_clean_log(char *msg);
-SWITCH_DECLARE(char *)api_execute(char *cmd, char *arg);
-SWITCH_DECLARE(void) api_reply_delete(char *reply);
/** \brief bridge the audio of session_b into session_a
*
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitch.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitch.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitch.java Wed Apr 30 19:42:37 2008
@@ -9,20 +9,20 @@
package org.freeswitch.swig;
public class freeswitch {
- public static void console_log(String level_str, String msg) {
- freeswitchJNI.console_log(level_str, msg);
+ public static void consoleLog(String level_str, String msg) {
+ freeswitchJNI.consoleLog(level_str, msg);
}
- public static void console_clean_log(String msg) {
- freeswitchJNI.console_clean_log(msg);
+ public static void consoleCleanLog(String msg) {
+ freeswitchJNI.consoleCleanLog(msg);
}
- public static String api_execute(String cmd, String arg) {
- return freeswitchJNI.api_execute(cmd, arg);
+ public static void console_log(String level_str, String msg) {
+ freeswitchJNI.console_log(level_str, msg);
}
- public static void api_reply_delete(String reply) {
- freeswitchJNI.api_reply_delete(reply);
+ public static void console_clean_log(String msg) {
+ freeswitchJNI.console_clean_log(msg);
}
public static void bridge(CoreSession session_a, CoreSession session_b) {
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java Wed Apr 30 19:42:37 2008
@@ -9,6 +9,12 @@
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_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);
+ public final static native String API_executeString(long jarg1, API jarg1_, String jarg2);
public final static native void input_callback_state_t_function_set(long jarg1, input_callback_state_t jarg1_, long jarg2);
public final static native long input_callback_state_t_function_get(long jarg1, input_callback_state_t jarg1_);
public final static native void input_callback_state_t_threadState_set(long jarg1, input_callback_state_t jarg1_, long jarg2);
@@ -101,8 +107,6 @@
public final static native long CoreSession_run_dtmf_callback(long jarg1, CoreSession jarg1_, long jarg2, long jarg3);
public final static native void console_log(String jarg1, String jarg2);
public final static native void console_clean_log(String jarg1);
- public final static native String api_execute(String jarg1, String jarg2);
- public final static native void api_reply_delete(String jarg1);
public final static native void bridge(long jarg1, CoreSession jarg1_, long jarg2, CoreSession jarg2_);
public final static native long hanguphook(long jarg1);
public final static native long dtmf_callback(long jarg1, long jarg2, long jarg3, long jarg4, long jarg5);
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 Wed Apr 30 19:42:37 2008
@@ -207,6 +207,117 @@
extern "C" {
#endif
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_consoleLog(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = 0;
+ if (jarg1) {
+ arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
+ if (!arg1) return ;
+ }
+ arg2 = 0;
+ if (jarg2) {
+ arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2) return ;
+ }
+ consoleLog(arg1,arg2);
+ if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_consoleCleanLog(JNIEnv *jenv, jclass jcls, jstring jarg1) {
+ char *arg1 = (char *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = 0;
+ if (jarg1) {
+ arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
+ if (!arg1) return ;
+ }
+ consoleCleanLog(arg1);
+ if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
+}
+
+
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1API(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ API *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (API *)new API();
+ *(API **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1API(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ API *arg1 = (API *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(API **)&jarg1;
+ delete arg1;
+
+}
+
+
+SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_API_1execute(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
+ jstring jresult = 0 ;
+ API *arg1 = (API *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(API **)&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;
+ }
+ result = (char *)(arg1)->execute((char const *)arg2,(char const *)arg3);
+ if(result) jresult = jenv->NewStringUTF((const char *)result);
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+ if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_API_1executeString(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ jstring jresult = 0 ;
+ API *arg1 = (API *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(API **)&jarg1;
+ arg2 = 0;
+ if (jarg2) {
+ arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2) return 0;
+ }
+ result = (char *)(arg1)->executeString((char const *)arg2);
+ if(result) jresult = jenv->NewStringUTF((const char *)result);
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+ return jresult;
+}
+
+
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_input_1callback_1state_1t_1function_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
void *arg2 = (void *) 0 ;
@@ -1915,47 +2026,6 @@
}
-SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_api_1execute(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
- jstring jresult = 0 ;
- char *arg1 = (char *) 0 ;
- char *arg2 = (char *) 0 ;
- char *result = 0 ;
-
- (void)jenv;
- (void)jcls;
- arg1 = 0;
- if (jarg1) {
- arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
- if (!arg1) return 0;
- }
- arg2 = 0;
- if (jarg2) {
- arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
- if (!arg2) return 0;
- }
- result = (char *)api_execute(arg1,arg2);
- if(result) jresult = jenv->NewStringUTF((const char *)result);
- if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
- if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
- return jresult;
-}
-
-
-SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_api_1reply_1delete(JNIEnv *jenv, jclass jcls, jstring jarg1) {
- char *arg1 = (char *) 0 ;
-
- (void)jenv;
- (void)jcls;
- arg1 = 0;
- if (jarg1) {
- arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
- if (!arg1) return ;
- }
- api_reply_delete(arg1);
- if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
-}
-
-
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_bridge(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
CoreSession *arg1 = 0 ;
CoreSession *arg2 = 0 ;
Modified: freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.c Wed Apr 30 19:42:37 2008
@@ -140,7 +140,15 @@
}
}
if (!error) {
- error = luaL_loadfile(L, input_code) || docall(L, 0, 1);
+ char *file = input_code, *fdup = NULL;
+
+ if (!switch_is_file_path(file)) {
+ fdup = switch_mprintf("%s/%s", SWITCH_GLOBAL_dirs.script_dir, file);
+ switch_assert(fdup);
+ file = fdup;
+ }
+ error = luaL_loadfile(L, file) || docall(L, 0, 1);
+ switch_safe_free(fdup);
}
}
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 Wed Apr 30 19:42:37 2008
@@ -1484,26 +1484,27 @@
/* -------- TYPES TABLE (BEGIN) -------- */
-#define SWIGTYPE_p_CoreSession swig_types[0]
-#define SWIGTYPE_p_Event swig_types[1]
-#define SWIGTYPE_p_Session swig_types[2]
-#define SWIGTYPE_p_Stream swig_types[3]
-#define SWIGTYPE_p_input_callback_state swig_types[4]
-#define SWIGTYPE_p_lua_State swig_types[5]
-#define SWIGTYPE_p_session_flag_t swig_types[6]
-#define SWIGTYPE_p_switch_channel_state_t swig_types[7]
-#define SWIGTYPE_p_switch_channel_t swig_types[8]
-#define SWIGTYPE_p_switch_core_session_t swig_types[9]
-#define SWIGTYPE_p_switch_event_t swig_types[10]
-#define SWIGTYPE_p_switch_input_args_t swig_types[11]
-#define SWIGTYPE_p_switch_input_type_t swig_types[12]
-#define SWIGTYPE_p_switch_priority_t swig_types[13]
-#define SWIGTYPE_p_switch_size_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_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_size_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)
@@ -1528,6 +1529,167 @@
#ifdef __cplusplus
extern "C" {
#endif
+static int _wrap_consoleLog(lua_State* L) {
+ int SWIG_arg = -1;
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+
+ SWIG_check_num_args("consoleLog",2,2)
+ if(!lua_isstring(L,1)) SWIG_fail_arg("consoleLog",1,"char *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("consoleLog",2,"char *");
+ arg1 = (char *)lua_tostring(L, 1);
+ arg2 = (char *)lua_tostring(L, 2);
+ consoleLog(arg1,arg2);
+ SWIG_arg=0;
+
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
+static int _wrap_consoleCleanLog(lua_State* L) {
+ int SWIG_arg = -1;
+ char *arg1 = (char *) 0 ;
+
+ SWIG_check_num_args("consoleCleanLog",1,1)
+ if(!lua_isstring(L,1)) SWIG_fail_arg("consoleCleanLog",1,"char *");
+ arg1 = (char *)lua_tostring(L, 1);
+ consoleCleanLog(arg1);
+ SWIG_arg=0;
+
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
+static int _wrap_new_API(lua_State* L) {
+ int SWIG_arg = -1;
+ API *result = 0 ;
+
+ SWIG_check_num_args("API",0,0)
+ result = (API *)new API();
+ SWIG_arg=0;
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_API,1); SWIG_arg++;
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
+static int _wrap_delete_API(lua_State* L) {
+ int SWIG_arg = -1;
+ API *arg1 = (API *) 0 ;
+
+ SWIG_check_num_args("API",1,1)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("API",1,"API *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_API,SWIG_POINTER_DISOWN))){
+ SWIG_fail_ptr("delete_API",1,SWIGTYPE_p_API);
+ }
+
+ delete arg1;
+
+ SWIG_arg=0;
+
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
+static int _wrap_API_execute(lua_State* L) {
+ int SWIG_arg = -1;
+ API *arg1 = (API *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ char *result = 0 ;
+
+ SWIG_check_num_args("execute",3,3)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("execute",1,"API *");
+ 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_API,0))){
+ SWIG_fail_ptr("API_execute",1,SWIGTYPE_p_API);
+ }
+
+ arg2 = (char *)lua_tostring(L, 2);
+ arg3 = (char *)lua_tostring(L, 3);
+ result = (char *)(arg1)->execute((char const *)arg2,(char const *)arg3);
+ 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_API_executeString(lua_State* L) {
+ int SWIG_arg = -1;
+ API *arg1 = (API *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *result = 0 ;
+
+ SWIG_check_num_args("executeString",2,2)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("executeString",1,"API *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("executeString",2,"char const *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_API,0))){
+ SWIG_fail_ptr("API_executeString",1,SWIGTYPE_p_API);
+ }
+
+ arg2 = (char *)lua_tostring(L, 2);
+ result = (char *)(arg1)->executeString((char const *)arg2);
+ 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 void swig_delete_API(void *obj) {
+API *arg1 = (API *) obj;
+delete arg1;
+}
+static swig_lua_method swig_API_methods[] = {
+ {"execute", _wrap_API_execute},
+ {"executeString", _wrap_API_executeString},
+ {0,0}
+};
+static swig_lua_attribute swig_API_attributes[] = {
+ {0,0,0}
+};
+static swig_lua_class *swig_API_bases[] = {0};
+static const char *swig_API_base_names[] = {0};
+static swig_lua_class _wrap_class_API = { "API", &SWIGTYPE_p_API,_wrap_new_API, swig_delete_API, swig_API_methods, swig_API_attributes, swig_API_bases, swig_API_base_names };
+
static int _wrap_input_callback_state_t_function_set(lua_State* L) {
int SWIG_arg = -1;
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
@@ -4640,50 +4802,6 @@
}
-static int _wrap_api_execute(lua_State* L) {
- int SWIG_arg = -1;
- char *arg1 = (char *) 0 ;
- char *arg2 = (char *) 0 ;
- char *result = 0 ;
-
- SWIG_check_num_args("api_execute",2,2)
- if(!lua_isstring(L,1)) SWIG_fail_arg("api_execute",1,"char *");
- if(!lua_isstring(L,2)) SWIG_fail_arg("api_execute",2,"char *");
- arg1 = (char *)lua_tostring(L, 1);
- arg2 = (char *)lua_tostring(L, 2);
- result = (char *)api_execute(arg1,arg2);
- 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_api_reply_delete(lua_State* L) {
- int SWIG_arg = -1;
- char *arg1 = (char *) 0 ;
-
- SWIG_check_num_args("api_reply_delete",1,1)
- if(!lua_isstring(L,1)) SWIG_fail_arg("api_reply_delete",1,"char *");
- arg1 = (char *)lua_tostring(L, 1);
- api_reply_delete(arg1);
- SWIG_arg=0;
-
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
-fail:
- lua_error(L);
- return SWIG_arg;
-}
-
-
static int _wrap_bridge(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = 0 ;
@@ -5349,10 +5467,10 @@
#endif
static const struct luaL_reg swig_commands[] = {
+ { "consoleLog", _wrap_consoleLog},
+ { "consoleCleanLog", _wrap_consoleCleanLog},
{ "console_log", _wrap_console_log},
{ "console_clean_log", _wrap_console_clean_log},
- { "api_execute", _wrap_api_execute},
- { "api_reply_delete", _wrap_api_reply_delete},
{ "bridge", _wrap_bridge},
{ "hanguphook", _wrap_hanguphook},
{ "dtmf_callback", _wrap_dtmf_callback},
@@ -5375,6 +5493,7 @@
static void *_p_SessionTo_p_CoreSession(void *x, int *newmemory) {
return (void *)((CoreSession *) ((Session *) x));
}
+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_Session = {"_p_Session", "Session *", 0, 0, (void*)&_wrap_class_Session, 0};
@@ -5395,6 +5514,7 @@
static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
static swig_type_info *swig_type_initial[] = {
+ &_swigt__p_API,
&_swigt__p_CoreSession,
&_swigt__p_Event,
&_swigt__p_Session,
@@ -5415,6 +5535,7 @@
&_swigt__p_void,
};
+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_Session[] = { {&_swigt__p_Session, 0, 0, 0},{0, 0, 0, 0}};
@@ -5435,6 +5556,7 @@
static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info *swig_cast_initial[] = {
+ _swigc__p_API,
_swigc__p_CoreSession,
_swigc__p_Event,
_swigc__p_Session,
Modified: freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm Wed Apr 30 19:42:37 2008
@@ -48,13 +48,54 @@
package freeswitch;
+*consoleLog = *freeswitchc::consoleLog;
+*consoleCleanLog = *freeswitchc::consoleCleanLog;
*console_log = *freeswitchc::console_log;
*console_clean_log = *freeswitchc::console_clean_log;
-*api_execute = *freeswitchc::api_execute;
-*api_reply_delete = *freeswitchc::api_reply_delete;
*bridge = *freeswitchc::bridge;
*hanguphook = *freeswitchc::hanguphook;
*dtmf_callback = *freeswitchc::dtmf_callback;
+*api_execute = *freeswitchc::api_execute;
+*api_reply_delete = *freeswitchc::api_reply_delete;
+
+############# Class : freeswitch::API ##############
+
+package freeswitch::API;
+use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
+@ISA = qw( freeswitch );
+%OWNER = ();
+%ITERATORS = ();
+sub new {
+ my $pkg = shift;
+ my $self = freeswitchc::new_API(@_);
+ 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_API($self);
+ delete $OWNER{$self};
+ }
+}
+
+*execute = *freeswitchc::API_execute;
+*executeString = *freeswitchc::API_executeString;
+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::input_callback_state_t ##############
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 Wed Apr 30 19:42:37 2008
@@ -1446,26 +1446,27 @@
/* -------- TYPES TABLE (BEGIN) -------- */
-#define SWIGTYPE_p_CoreSession swig_types[0]
-#define SWIGTYPE_p_Event swig_types[1]
-#define SWIGTYPE_p_Session swig_types[2]
-#define SWIGTYPE_p_Stream swig_types[3]
-#define SWIGTYPE_p_char swig_types[4]
-#define SWIGTYPE_p_input_callback_state swig_types[5]
-#define SWIGTYPE_p_session_flag_t swig_types[6]
-#define SWIGTYPE_p_switch_channel_state_t swig_types[7]
-#define SWIGTYPE_p_switch_channel_t swig_types[8]
-#define SWIGTYPE_p_switch_core_session_t swig_types[9]
-#define SWIGTYPE_p_switch_event_t swig_types[10]
-#define SWIGTYPE_p_switch_input_args_t swig_types[11]
-#define SWIGTYPE_p_switch_input_type_t swig_types[12]
-#define SWIGTYPE_p_switch_priority_t swig_types[13]
-#define SWIGTYPE_p_switch_size_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_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_char swig_types[5]
+#define SWIGTYPE_p_input_callback_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_size_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)
@@ -1855,6 +1856,208 @@
#ifdef __cplusplus
extern "C" {
#endif
+XS(_wrap_consoleLog) {
+ {
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 2) || (items > 2)) {
+ SWIG_croak("Usage: consoleLog(level_str,msg);");
+ }
+ res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "consoleLog" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "consoleLog" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ consoleLog(arg1,arg2);
+
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ XSRETURN(argvi);
+ fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_consoleCleanLog) {
+ {
+ char *arg1 = (char *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: consoleCleanLog(msg);");
+ }
+ res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "consoleCleanLog" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ consoleCleanLog(arg1);
+
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ XSRETURN(argvi);
+ fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_new_API) {
+ {
+ API *result = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 0) || (items > 0)) {
+ SWIG_croak("Usage: new_API();");
+ }
+ result = (API *)new API();
+ ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_API, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
+ XSRETURN(argvi);
+ fail:
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_delete_API) {
+ {
+ API *arg1 = (API *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: delete_API(self);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_API, SWIG_POINTER_DISOWN | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_API" "', argument " "1"" of type '" "API *""'");
+ }
+ arg1 = reinterpret_cast< API * >(argp1);
+ delete arg1;
+
+
+
+ XSRETURN(argvi);
+ fail:
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_API_execute) {
+ {
+ API *arg1 = (API *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ char *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 argvi = 0;
+ dXSARGS;
+
+ if ((items < 3) || (items > 3)) {
+ SWIG_croak("Usage: API_execute(self,command,data);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_API, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "API_execute" "', argument " "1"" of type '" "API *""'");
+ }
+ arg1 = reinterpret_cast< API * >(argp1);
+ res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "API_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 '" "API_execute" "', argument " "3"" of type '" "char const *""'");
+ }
+ arg3 = reinterpret_cast< char * >(buf3);
+ result = (char *)(arg1)->execute((char const *)arg2,(char const *)arg3);
+ ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ XSRETURN(argvi);
+ fail:
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_API_executeString) {
+ {
+ API *arg1 = (API *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 2) || (items > 2)) {
+ SWIG_croak("Usage: API_executeString(self,command);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_API, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "API_executeString" "', argument " "1"" of type '" "API *""'");
+ }
+ arg1 = reinterpret_cast< API * >(argp1);
+ res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "API_executeString" "', argument " "2"" of type '" "char const *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ result = (char *)(arg1)->executeString((char const *)arg2);
+ ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ XSRETURN(argvi);
+ fail:
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ SWIG_croak_null();
+ }
+}
+
+
XS(_wrap_input_callback_state_t_function_set) {
{
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
@@ -5978,74 +6181,6 @@
}
-XS(_wrap_api_execute) {
- {
- char *arg1 = (char *) 0 ;
- char *arg2 = (char *) 0 ;
- char *result = 0 ;
- int res1 ;
- char *buf1 = 0 ;
- int alloc1 = 0 ;
- int res2 ;
- char *buf2 = 0 ;
- int alloc2 = 0 ;
- int argvi = 0;
- dXSARGS;
-
- if ((items < 2) || (items > 2)) {
- SWIG_croak("Usage: api_execute(cmd,arg);");
- }
- res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "api_execute" "', argument " "1"" of type '" "char *""'");
- }
- arg1 = reinterpret_cast< char * >(buf1);
- res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "api_execute" "', argument " "2"" of type '" "char *""'");
- }
- arg2 = reinterpret_cast< char * >(buf2);
- result = (char *)api_execute(arg1,arg2);
- ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
- XSRETURN(argvi);
- fail:
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
- SWIG_croak_null();
- }
-}
-
-
-XS(_wrap_api_reply_delete) {
- {
- char *arg1 = (char *) 0 ;
- int res1 ;
- char *buf1 = 0 ;
- int alloc1 = 0 ;
- int argvi = 0;
- dXSARGS;
-
- if ((items < 1) || (items > 1)) {
- SWIG_croak("Usage: api_reply_delete(reply);");
- }
- res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "api_reply_delete" "', argument " "1"" of type '" "char *""'");
- }
- arg1 = reinterpret_cast< char * >(buf1);
- api_reply_delete(arg1);
-
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- XSRETURN(argvi);
- fail:
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- SWIG_croak_null();
- }
-}
-
-
XS(_wrap_bridge) {
{
CoreSession *arg1 = 0 ;
@@ -6185,6 +6320,74 @@
}
+XS(_wrap_api_execute) {
+ {
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *result = 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 2) || (items > 2)) {
+ SWIG_croak("Usage: api_execute(cmd,arg);");
+ }
+ res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "api_execute" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "api_execute" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ result = (char *)api_execute(arg1,arg2);
+ ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ XSRETURN(argvi);
+ fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_api_reply_delete) {
+ {
+ char *arg1 = (char *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: api_reply_delete(reply);");
+ }
+ res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "api_reply_delete" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ api_reply_delete(arg1);
+
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ XSRETURN(argvi);
+ fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ SWIG_croak_null();
+ }
+}
+
+
XS(_wrap_new_Session__SWIG_0) {
{
Session *result = 0 ;
@@ -6898,6 +7101,7 @@
static void *_p_SessionTo_p_CoreSession(void *x, int *newmemory) {
return (void *)((CoreSession *) ((Session *) x));
}
+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_Session = {"_p_Session", "Session *", 0, 0, (void*)"freeswitch::Session", 0};
@@ -6918,6 +7122,7 @@
static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
static swig_type_info *swig_type_initial[] = {
+ &_swigt__p_API,
&_swigt__p_CoreSession,
&_swigt__p_Event,
&_swigt__p_Session,
@@ -6938,6 +7143,7 @@
&_swigt__p_void,
};
+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_Session[] = { {&_swigt__p_Session, 0, 0, 0},{0, 0, 0, 0}};
@@ -6958,6 +7164,7 @@
static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info *swig_cast_initial[] = {
+ _swigc__p_API,
_swigc__p_CoreSession,
_swigc__p_Event,
_swigc__p_Session,
@@ -6991,6 +7198,12 @@
{0,0,0,0}
};
static swig_command_info swig_commands[] = {
+{"freeswitchc::consoleLog", _wrap_consoleLog},
+{"freeswitchc::consoleCleanLog", _wrap_consoleCleanLog},
+{"freeswitchc::new_API", _wrap_new_API},
+{"freeswitchc::delete_API", _wrap_delete_API},
+{"freeswitchc::API_execute", _wrap_API_execute},
+{"freeswitchc::API_executeString", _wrap_API_executeString},
{"freeswitchc::input_callback_state_t_function_set", _wrap_input_callback_state_t_function_set},
{"freeswitchc::input_callback_state_t_function_get", _wrap_input_callback_state_t_function_get},
{"freeswitchc::input_callback_state_t_threadState_set", _wrap_input_callback_state_t_threadState_set},
@@ -7068,11 +7281,11 @@
{"freeswitchc::CoreSession_run_dtmf_callback", _wrap_CoreSession_run_dtmf_callback},
{"freeswitchc::console_log", _wrap_console_log},
{"freeswitchc::console_clean_log", _wrap_console_clean_log},
-{"freeswitchc::api_execute", _wrap_api_execute},
-{"freeswitchc::api_reply_delete", _wrap_api_reply_delete},
{"freeswitchc::bridge", _wrap_bridge},
{"freeswitchc::hanguphook", _wrap_hanguphook},
{"freeswitchc::dtmf_callback", _wrap_dtmf_callback},
+{"freeswitchc::api_execute", _wrap_api_execute},
+{"freeswitchc::api_reply_delete", _wrap_api_reply_delete},
{"freeswitchc::new_Session", _wrap_new_Session},
{"freeswitchc::delete_Session", _wrap_delete_Session},
{"freeswitchc::Session_begin_allow_threads", _wrap_Session_begin_allow_threads},
@@ -7385,6 +7598,7 @@
SvREADONLY_on(sv);
}
+ 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 {
SV *sv = get_sv((char*) SWIG_prefix "S_HUP", TRUE | 0x2 | GV_ADDMULTI);
Modified: freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py (original)
+++ freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py Wed Apr 30 19:42:37 2008
@@ -48,6 +48,25 @@
del types
+consoleLog = _freeswitch.consoleLog
+consoleCleanLog = _freeswitch.consoleCleanLog
+class API(_object):
+ __swig_setmethods__ = {}
+ __setattr__ = lambda self, name, value: _swig_setattr(self, API, name, value)
+ __swig_getmethods__ = {}
+ __getattr__ = lambda self, name: _swig_getattr(self, API, name)
+ __repr__ = _swig_repr
+ def __init__(self, *args):
+ this = _freeswitch.new_API(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ __swig_destroy__ = _freeswitch.delete_API
+ __del__ = lambda self : None;
+ def execute(*args): return _freeswitch.API_execute(*args)
+ def executeString(*args): return _freeswitch.API_executeString(*args)
+API_swigregister = _freeswitch.API_swigregister
+API_swigregister(API)
+
class input_callback_state_t(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, input_callback_state_t, name, value)
@@ -191,13 +210,13 @@
console_log = _freeswitch.console_log
console_clean_log = _freeswitch.console_clean_log
-api_execute = _freeswitch.api_execute
-api_reply_delete = _freeswitch.api_reply_delete
bridge = _freeswitch.bridge
hanguphook = _freeswitch.hanguphook
dtmf_callback = _freeswitch.dtmf_callback
S_SWAPPED_IN = _freeswitch.S_SWAPPED_IN
S_SWAPPED_OUT = _freeswitch.S_SWAPPED_OUT
+api_execute = _freeswitch.api_execute
+api_reply_delete = _freeswitch.api_reply_delete
class PySession(CoreSession):
__swig_setmethods__ = {}
for _s in [CoreSession]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
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 Wed Apr 30 19:42:37 2008
@@ -2495,27 +2495,28 @@
/* -------- TYPES TABLE (BEGIN) -------- */
-#define SWIGTYPE_p_CoreSession swig_types[0]
-#define SWIGTYPE_p_Event swig_types[1]
-#define SWIGTYPE_p_PySession swig_types[2]
-#define SWIGTYPE_p_Stream swig_types[3]
-#define SWIGTYPE_p_char swig_types[4]
-#define SWIGTYPE_p_input_callback_state swig_types[5]
-#define SWIGTYPE_p_session_flag_t swig_types[6]
-#define SWIGTYPE_p_swap_state_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_size_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_API swig_types[0]
+#define SWIGTYPE_p_CoreSession swig_types[1]
+#define SWIGTYPE_p_Event swig_types[2]
+#define SWIGTYPE_p_PySession swig_types[3]
+#define SWIGTYPE_p_Stream swig_types[4]
+#define SWIGTYPE_p_char swig_types[5]
+#define SWIGTYPE_p_input_callback_state swig_types[6]
+#define SWIGTYPE_p_session_flag_t swig_types[7]
+#define SWIGTYPE_p_swap_state_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_size_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)
@@ -2953,6 +2954,188 @@
#ifdef __cplusplus
extern "C" {
#endif
+SWIGINTERN PyObject *_wrap_consoleLog(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:consoleLog",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "consoleLog" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "consoleLog" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ consoleLog(arg1,arg2);
+ resultobj = SWIG_Py_Void();
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return resultobj;
+fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_consoleCleanLog(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ char *arg1 = (char *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:consoleCleanLog",&obj0)) SWIG_fail;
+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "consoleCleanLog" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ consoleCleanLog(arg1);
+ resultobj = SWIG_Py_Void();
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ return resultobj;
+fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_API(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ API *result = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)":new_API")) SWIG_fail;
+ result = (API *)new API();
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_API, SWIG_POINTER_NEW | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_delete_API(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ API *arg1 = (API *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:delete_API",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_API, SWIG_POINTER_DISOWN | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_API" "', argument " "1"" of type '" "API *""'");
+ }
+ arg1 = reinterpret_cast< API * >(argp1);
+ delete arg1;
+
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_API_execute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ API *arg1 = (API *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ char *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int res3 ;
+ char *buf3 = 0 ;
+ int alloc3 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:API_execute",&obj0,&obj1,&obj2)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_API, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "API_execute" "', argument " "1"" of type '" "API *""'");
+ }
+ arg1 = reinterpret_cast< API * >(argp1);
+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "API_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 '" "API_execute" "', argument " "3"" of type '" "char const *""'");
+ }
+ arg3 = reinterpret_cast< char * >(buf3);
+ result = (char *)(arg1)->execute((char const *)arg2,(char const *)arg3);
+ resultobj = SWIG_FromCharPtr((const char *)result);
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ return resultobj;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_API_executeString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ API *arg1 = (API *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:API_executeString",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_API, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "API_executeString" "', argument " "1"" of type '" "API *""'");
+ }
+ arg1 = reinterpret_cast< API * >(argp1);
+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "API_executeString" "', argument " "2"" of type '" "char const *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ result = (char *)(arg1)->executeString((char const *)arg2);
+ resultobj = SWIG_FromCharPtr((const char *)result);
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return resultobj;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *API_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *obj;
+ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+ SWIG_TypeNewClientData(SWIGTYPE_p_API, SWIG_NewClientData(obj));
+ return SWIG_Py_Void();
+}
+
SWIGINTERN PyObject *_wrap_input_callback_state_t_function_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
@@ -6294,67 +6477,6 @@
}
-SWIGINTERN PyObject *_wrap_api_execute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
- PyObject *resultobj = 0;
- char *arg1 = (char *) 0 ;
- char *arg2 = (char *) 0 ;
- char *result = 0 ;
- int res1 ;
- char *buf1 = 0 ;
- int alloc1 = 0 ;
- int res2 ;
- char *buf2 = 0 ;
- int alloc2 = 0 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
-
- if (!PyArg_ParseTuple(args,(char *)"OO:api_execute",&obj0,&obj1)) SWIG_fail;
- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "api_execute" "', argument " "1"" of type '" "char *""'");
- }
- arg1 = reinterpret_cast< char * >(buf1);
- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "api_execute" "', argument " "2"" of type '" "char *""'");
- }
- arg2 = reinterpret_cast< char * >(buf2);
- result = (char *)api_execute(arg1,arg2);
- resultobj = SWIG_FromCharPtr((const char *)result);
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
- return resultobj;
-fail:
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
- return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_api_reply_delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
- PyObject *resultobj = 0;
- char *arg1 = (char *) 0 ;
- int res1 ;
- char *buf1 = 0 ;
- int alloc1 = 0 ;
- PyObject * obj0 = 0 ;
-
- if (!PyArg_ParseTuple(args,(char *)"O:api_reply_delete",&obj0)) SWIG_fail;
- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "api_reply_delete" "', argument " "1"" of type '" "char *""'");
- }
- arg1 = reinterpret_cast< char * >(buf1);
- api_reply_delete(arg1);
- resultobj = SWIG_Py_Void();
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- return resultobj;
-fail:
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- return NULL;
-}
-
-
SWIGINTERN PyObject *_wrap_bridge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = 0 ;
@@ -6475,6 +6597,67 @@
}
+SWIGINTERN PyObject *_wrap_api_execute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *result = 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:api_execute",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "api_execute" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "api_execute" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ result = (char *)api_execute(arg1,arg2);
+ resultobj = SWIG_FromCharPtr((const char *)result);
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return resultobj;
+fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_api_reply_delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ char *arg1 = (char *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:api_reply_delete",&obj0)) SWIG_fail;
+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "api_reply_delete" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ api_reply_delete(arg1);
+ resultobj = SWIG_Py_Void();
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ return resultobj;
+fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_new_PySession__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
PySession *result = 0 ;
@@ -6810,6 +6993,13 @@
}
static PyMethodDef SwigMethods[] = {
+ { (char *)"consoleLog", _wrap_consoleLog, METH_VARARGS, NULL},
+ { (char *)"consoleCleanLog", _wrap_consoleCleanLog, METH_VARARGS, NULL},
+ { (char *)"new_API", _wrap_new_API, METH_VARARGS, NULL},
+ { (char *)"delete_API", _wrap_delete_API, METH_VARARGS, NULL},
+ { (char *)"API_execute", _wrap_API_execute, METH_VARARGS, NULL},
+ { (char *)"API_executeString", _wrap_API_executeString, METH_VARARGS, NULL},
+ { (char *)"API_swigregister", API_swigregister, METH_VARARGS, NULL},
{ (char *)"input_callback_state_t_function_set", _wrap_input_callback_state_t_function_set, METH_VARARGS, NULL},
{ (char *)"input_callback_state_t_function_get", _wrap_input_callback_state_t_function_get, METH_VARARGS, NULL},
{ (char *)"input_callback_state_t_threadState_set", _wrap_input_callback_state_t_threadState_set, METH_VARARGS, NULL},
@@ -6891,11 +7081,11 @@
{ (char *)"CoreSession_swigregister", CoreSession_swigregister, METH_VARARGS, NULL},
{ (char *)"console_log", _wrap_console_log, METH_VARARGS, NULL},
{ (char *)"console_clean_log", _wrap_console_clean_log, METH_VARARGS, NULL},
- { (char *)"api_execute", _wrap_api_execute, METH_VARARGS, NULL},
- { (char *)"api_reply_delete", _wrap_api_reply_delete, METH_VARARGS, NULL},
{ (char *)"bridge", _wrap_bridge, METH_VARARGS, NULL},
{ (char *)"hanguphook", _wrap_hanguphook, METH_VARARGS, NULL},
{ (char *)"dtmf_callback", _wrap_dtmf_callback, METH_VARARGS, NULL},
+ { (char *)"api_execute", _wrap_api_execute, METH_VARARGS, NULL},
+ { (char *)"api_reply_delete", _wrap_api_reply_delete, METH_VARARGS, NULL},
{ (char *)"new_PySession", _wrap_new_PySession, METH_VARARGS, NULL},
{ (char *)"delete_PySession", _wrap_delete_PySession, METH_VARARGS, NULL},
{ (char *)"PySession_setDTMFCallback", _wrap_PySession_setDTMFCallback, METH_VARARGS, NULL},
@@ -6915,6 +7105,7 @@
static void *_p_PySessionTo_p_CoreSession(void *x, int *newmemory) {
return (void *)((CoreSession *) ((PySession *) x));
}
+static swig_type_info _swigt__p_API = {"_p_API", "API *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_CoreSession = {"_p_CoreSession", "CoreSession *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Event = {"_p_Event", "Event *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_PySession = {"_p_PySession", "PySession *", 0, 0, (void*)0, 0};
@@ -6936,6 +7127,7 @@
static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
static swig_type_info *swig_type_initial[] = {
+ &_swigt__p_API,
&_swigt__p_CoreSession,
&_swigt__p_Event,
&_swigt__p_PySession,
@@ -6957,6 +7149,7 @@
&_swigt__p_void,
};
+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_PySession, _p_PySessionTo_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_PySession[] = { {&_swigt__p_PySession, 0, 0, 0},{0, 0, 0, 0}};
@@ -6978,6 +7171,7 @@
static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info *swig_cast_initial[] = {
+ _swigc__p_API,
_swigc__p_CoreSession,
_swigc__p_Event,
_swigc__p_PySession,
Modified: freeswitch/trunk/src/switch_cpp.cpp
==============================================================================
--- freeswitch/trunk/src/switch_cpp.cpp (original)
+++ freeswitch/trunk/src/switch_cpp.cpp Wed Apr 30 19:42:37 2008
@@ -37,6 +37,46 @@
#pragma warning(disable:4127 4003)
#endif
+SWITCH_DECLARE_CONSTRUCTOR API::API()
+{
+ last_data = NULL;
+}
+
+SWITCH_DECLARE_CONSTRUCTOR API::~API()
+{
+ switch_safe_free(last_data);
+}
+
+
+SWITCH_DECLARE(char *) API::execute(const char *cmd, const char *arg)
+{
+ switch_stream_handle_t stream = { 0 };
+ SWITCH_STANDARD_STREAM(stream);
+ switch_api_execute(cmd, arg, NULL, &stream);
+ last_data = (char *) stream.data;
+ return last_data;
+}
+
+SWITCH_DECLARE(char *) API::executeString(const char *cmd)
+{
+ char *arg;
+ switch_stream_handle_t stream = { 0 };
+ char *mycmd = strdup(cmd);
+
+ switch_assert(mycmd);
+
+ if ((arg = strchr(mycmd, ' '))) {
+ *arg++ = '\0';
+ }
+
+ switch_safe_free(last_data);
+
+ SWITCH_STANDARD_STREAM(stream);
+ switch_api_execute(mycmd, arg, NULL, &stream);
+ last_data = (char *) stream.data;
+ switch_safe_free(mycmd);
+ return last_data;
+}
SWITCH_DECLARE_CONSTRUCTOR Event::Event(const char *type, const char *subclass_name)
{
@@ -697,6 +737,15 @@
/* ---- methods not bound to CoreSession instance ---- */
+SWITCH_DECLARE(void) consoleLog(char *level_str, char *msg)
+{
+ return console_log(level_str, msg);
+}
+
+SWITCH_DECLARE(void) consoleCleanLog(char *msg)
+{
+ return console_clean_log(msg);
+}
SWITCH_DECLARE(void) console_log(char *level_str, char *msg)
{
@@ -716,22 +765,6 @@
}
-SWITCH_DECLARE(char *)api_execute(char *cmd, char *arg)
-{
- switch_stream_handle_t stream = { 0 };
- SWITCH_STANDARD_STREAM(stream);
- switch_api_execute(cmd, arg, NULL, &stream);
- return (char *) stream.data;
-}
-
-SWITCH_DECLARE(void) api_reply_delete(char *reply)
-{
- if (!switch_strlen_zero(reply)) {
- free(reply);
- }
-}
-
-
SWITCH_DECLARE(void) bridge(CoreSession &session_a, CoreSession &session_b)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "bridge called, session_a uuid: %s\n", session_a.get_uuid());
@@ -746,7 +779,6 @@
}
-
SWITCH_DECLARE_NONSTD(switch_status_t) hanguphook(switch_core_session_t *session_hungup)
{
switch_channel_t *channel = switch_core_session_get_channel(session_hungup);
1
0
[Freeswitch-svn] [commit] r8224 - freeswitch/trunk/src/mod/endpoints/mod_sofia
by Freeswitch SVN 30 Apr '08
by Freeswitch SVN 30 Apr '08
30 Apr '08
Author: anthm
Date: Wed Apr 30 18:14:03 2008
New Revision: 8224
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
Log:
add options ping to gateway
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c Wed Apr 30 18:14:03 2008
@@ -159,6 +159,7 @@
case REG_STATE_FAILED:
sofia_reg_kill_reg(gateway_ptr, 0);
+ gateway_ptr->status = SOFIA_GATEWAY_DOWN;
case REG_STATE_TRYING:
if (gateway_ptr->retry && now >= gateway_ptr->retry) {
gateway_ptr->state = REG_STATE_UNREGED;
1
0
[Freeswitch-svn] [commit] r8223 - in freeswitch/trunk: conf/directory/default src/mod/endpoints/mod_sofia
by Freeswitch SVN 30 Apr '08
by Freeswitch SVN 30 Apr '08
30 Apr '08
Author: anthm
Date: Wed Apr 30 18:09:54 2008
New Revision: 8223
Modified:
freeswitch/trunk/conf/directory/default/brian.xml
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
Log:
add options ping to gateway
Modified: freeswitch/trunk/conf/directory/default/brian.xml
==============================================================================
--- freeswitch/trunk/conf/directory/default/brian.xml (original)
+++ freeswitch/trunk/conf/directory/default/brian.xml Wed Apr 30 18:09:54 2008
@@ -35,6 +35,8 @@
<!--<param name="caller-id-in-from" value="false"/>-->
<!--extra sip params to send in the contact-->
<!--<param name="contact-params" value="tport=tcp"/>-->
+ <!--send an options ping every x seconds, failure will unregister and/or mark it down-->
+ <!--<param name="ping" value="25"/>-->
<!--</gateway>-->
</gateways>
<params>
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Wed Apr 30 18:09:54 2008
@@ -1161,6 +1161,8 @@
return 0;
}
+static const char *status_names[] = { "DOWN", "UP", NULL };
+
static switch_status_t cmd_status(char **argv, int argc, switch_stream_handle_t *stream)
{
sofia_profile_t *profile = NULL;
@@ -1180,7 +1182,7 @@
if (!strcasecmp(argv[0], "gateway")) {
if ((gp = sofia_reg_find_gateway(argv[1]))) {
switch_assert(gp->state < REG_STATE_LAST);
-
+
stream->write_function(stream, "%s\n", line);
stream->write_function(stream, "Name \t%s\n", switch_str_nil(gp->name));
stream->write_function(stream, "Scheme \t%s\n", switch_str_nil(gp->register_scheme));
@@ -1194,7 +1196,10 @@
stream->write_function(stream, "Context \t%s\n", switch_str_nil(gp->register_context));
stream->write_function(stream, "Expires \t%s\n", switch_str_nil(gp->expires_str));
stream->write_function(stream, "Freq \t%d\n", gp->freq);
+ stream->write_function(stream, "Ping \t%d\n", gp->ping);
+ stream->write_function(stream, "PingFreq\t%d\n", gp->ping_freq);
stream->write_function(stream, "State \t%s\n", sofia_state_names[gp->state]);
+ stream->write_function(stream, "Status \t%s%s\n", status_names[gp->status], gp->pinging ? " (ping)" : "");
stream->write_function(stream, "%s\n", line);
sofia_reg_release_gateway(gp);
} else {
@@ -1695,6 +1700,14 @@
goto error;
}
+ if (gateway_ptr->status != SOFIA_GATEWAY_UP) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Gateway is down!\n");
+ cause = SWITCH_CAUSE_NETWORK_OUT_OF_ORDER;
+ sofia_reg_release_gateway(gateway_ptr);
+ gateway_ptr = NULL;
+ goto error;
+ }
+
tech_pvt->transport = gateway_ptr->register_transport;
/*
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h Wed Apr 30 18:09:54 2008
@@ -99,6 +99,7 @@
struct sofia_private {
char uuid[SWITCH_UUID_FORMATTED_LENGTH + 1];
sofia_gateway_t *gateway;
+ char gateway_name[512];
};
#define set_param(ptr,val) if (ptr) {free(ptr) ; ptr = NULL;} if (val) {ptr = strdup(val);}
@@ -221,6 +222,11 @@
SOFIA_TRANSPORT_SCTP
} sofia_transport_t;
+typedef enum {
+ SOFIA_GATEWAY_DOWN,
+ SOFIA_GATEWAY_UP
+} sofia_gateway_status_t;
+
struct sofia_gateway {
sofia_private_t *sofia_private;
nua_handle_t *nh;
@@ -241,6 +247,10 @@
uint32_t freq;
time_t expires;
time_t retry;
+ time_t ping;
+ int pinging;
+ sofia_gateway_status_t status;
+ uint32_t ping_freq;
uint32_t flags;
int32_t retry_seconds;
reg_state_t state;
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Wed Apr 30 18:09:54 2008
@@ -782,12 +782,16 @@
*params = NULL,
*register_transport = NULL;
+ uint32_t ping_freq = 0;
+
gateway->register_transport = SOFIA_TRANSPORT_UDP;
gateway->pool = profile->pool;
gateway->profile = profile;
gateway->name = switch_core_strdup(gateway->pool, name);
gateway->freq = 0;
gateway->next = NULL;
+ gateway->ping = 0;
+ gateway->ping_freq = 0;
for (param = switch_xml_child(gateway_tag, "param"); param; param = param->next) {
char *var = (char *) switch_xml_attr_soft(param, "name");
@@ -807,6 +811,8 @@
caller_id_in_from = val;
} else if (!strcmp(var, "extension")) {
extension = val;
+ } else if (!strcmp(var, "ping")) {
+ ping_freq = atoi(val);
} else if (!strcmp(var, "proxy")) {
proxy = val;
} else if (!strcmp(var, "context")) {
@@ -835,6 +841,15 @@
}
}
+ if (ping_freq) {
+ if (ping_freq >= 5) {
+ gateway->ping_freq = ping_freq;
+ gateway->ping = switch_timestamp(NULL) + ping_freq;
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERROR: invalid ping!\n");
+ }
+ }
+
if (switch_strlen_zero(realm)) {
realm = name;
}
@@ -1497,10 +1512,33 @@
}
static void sofia_handle_sip_r_options(switch_core_session_t *session, int status,
- char const *phrase,
+ char const *phrase,
nua_t *nua, sofia_profile_t *profile, nua_handle_t *nh, sofia_private_t *sofia_private, sip_t const *sip, tagi_t tags[])
{
- if ((profile->pflags & PFLAG_UNREG_OPTIONS_FAIL) && status != 200 && sip && sip->sip_to) {
+ sofia_gateway_t *gateway = NULL;
+
+ if (sofia_private->gateway_name) {
+ gateway = sofia_reg_find_gateway(sofia_private->gateway_name);
+ }
+
+ if (gateway) {
+ if (status == 200 || status == 404) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "ping success %s\n", gateway->name);
+ gateway->status = SOFIA_GATEWAY_UP;
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "ping failed %s\n", gateway->name);
+ gateway->status = SOFIA_GATEWAY_DOWN;
+ if (gateway->state == REG_STATE_REGED) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "unregister %s\n", gateway->name);
+ gateway->state = REG_STATE_UNREGISTER;
+ }
+ }
+ gateway->ping = switch_timestamp(NULL) + gateway->ping_freq;
+ sofia_reg_release_gateway(gateway);
+ nua_handle_bind(nh, NULL);
+ free(sofia_private);
+ gateway->pinging = 0;
+ } else if ((profile->pflags & PFLAG_UNREG_OPTIONS_FAIL) && status != 200 && sip && sip->sip_to) {
char *sql;
time_t now = switch_timestamp(NULL);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Expire registration '%s@%s' due to options failure\n",
@@ -1515,6 +1553,7 @@
);
sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE);
}
+ nua_handle_destroy(nh);
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c Wed Apr 30 18:09:54 2008
@@ -80,6 +80,21 @@
gateway_ptr->expires_str = "0";
}
+ if (gateway_ptr->ping && !gateway_ptr->pinging && (now >= gateway_ptr->ping && (ostate == REG_STATE_NOREG || ostate == REG_STATE_REGED))) {
+ nua_handle_t *nh = nua_handle(profile->nua, NULL, NUTAG_URL(gateway_ptr->register_url), SIPTAG_CONTACT_STR(profile->url), TAG_END());
+ sofia_private_t *pvt;
+
+ pvt = malloc(sizeof(*pvt));
+ switch_assert(pvt);
+ memset(pvt, 0, sizeof(*pvt));
+
+ switch_copy_string(pvt->gateway_name, gateway_ptr->name, sizeof(pvt->gateway_name));
+ nua_handle_bind(nh, pvt);
+
+ gateway_ptr->pinging = 1;
+ nua_options(nh, TAG_END());
+ }
+
switch (ostate) {
case REG_STATE_NOREG:
break;
@@ -87,6 +102,7 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "registered %s\n", gateway_ptr->name);
gateway_ptr->expires = now + gateway_ptr->freq;
gateway_ptr->state = REG_STATE_REGED;
+ gateway_ptr->status = SOFIA_GATEWAY_UP;
break;
case REG_STATE_UNREGISTER:
1
0
[Freeswitch-svn] [commit] r8222 - freeswitch/trunk/src/mod/endpoints/mod_sofia
by Freeswitch SVN 30 Apr '08
by Freeswitch SVN 30 Apr '08
30 Apr '08
Author: anthm
Date: Wed Apr 30 16:03:20 2008
New Revision: 8222
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
Log:
update
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Wed Apr 30 16:03:20 2008
@@ -2615,15 +2615,16 @@
if ((profile->pflags & PFLAG_AUTH_CALLS) || (!(profile->pflags & PFLAG_BLIND_AUTH) && (sip->sip_proxy_authorization || sip->sip_authorization))) {
- if (strcmp(network_ip, profile->sipip)) {
+ int rport = ntohs(((struct sockaddr_in *) msg_addrinfo(nua_current_request(nua))->ai_addr)->sin_port);
+ if (!strcmp(network_ip, profile->sipip) && rport == profile->sip_port) {
+ calling_myself++;
+ } else {
if (sofia_reg_handle_register(nua, profile, nh, sip, REG_INVITE, key, sizeof(key), &v_event)) {
if (v_event) {
switch_event_destroy(&v_event);
}
return;
}
- } else {
- calling_myself++;
}
is_auth++;
}
1
0
[Freeswitch-svn] [commit] r8221 - in freeswitch/trunk: . src src/include src/mod/languages/mod_java src/mod/languages/mod_java/src/org/freeswitch/swig src/mod/languages/mod_lua src/mod/languages/mod_perl src/mod/languages/mod_python
by Freeswitch SVN 30 Apr '08
by Freeswitch SVN 30 Apr '08
30 Apr '08
Author: anthm
Date: Wed Apr 30 15:42:26 2008
New Revision: 8221
Added:
freeswitch/trunk/src/mod/languages/mod_lua/my_swigable_cpp.h
Modified:
freeswitch/trunk/Makefile.am
freeswitch/trunk/src/include/switch_cpp.h
freeswitch/trunk/src/mod/languages/mod_java/mod_java.i
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/JavaSession.java
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_JavaVM.java
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_channel_state_t.java
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_channel_t.java
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_core_session_t.java
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_input_args_t.java
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_input_type_t.java
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_status_t.java
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_void.java
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitch.java
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/input_callback_state_t.java
freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/session_flag_t.java
freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_lua/Makefile
freeswitch/trunk/src/mod/languages/mod_lua/freeswitch.i
freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.cpp
freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.h
freeswitch/trunk/src/mod/languages/mod_lua/hack.diff
freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_extra.h
freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_perl/Makefile
freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.i
freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm
freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp
freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py
freeswitch/trunk/src/mod/languages/mod_python/mod_python.i
freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp
freeswitch/trunk/src/switch_cpp.cpp
Log:
look out below
Modified: freeswitch/trunk/Makefile.am
==============================================================================
--- freeswitch/trunk/Makefile.am (original)
+++ freeswitch/trunk/Makefile.am Wed Apr 30 15:42:26 2008
@@ -148,16 +148,16 @@
libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS)
libfreeswitch_la_LIBADD = $(CORE_LIBS)
libfreeswitch_la_DEPENDENCIES = $(BUILT_SOURCES)
-nodist_libfreeswitch_la_SOURCES = src/include/switch_version.h
+nodist_libfreeswitch_la_SOURCES = src/include/switch_version.h src/include/switch_swigable_cpp.h
MOD_LINK = $(BASE)/libfreeswitch.la
-CLEANFILES = src/include/switch_version.h
-BUILT_SOURCES = src/include/switch_version.h
+CLEANFILES = src/include/switch_version.h src/include/switch_swigable_cpp.h
+BUILT_SOURCES = src/include/switch_version.h src/include/switch_swigable_cpp.h
bin_PROGRAMS = freeswitch
freeswitch_SOURCES = src/switch.c
-nodist_freeswitch_SOURCES = src/include/switch_version.h
+nodist_freeswitch_SOURCES = src/include/switch_version.h
freeswitch_CFLAGS = $(AM_CFLAGS) $(CORE_CFLAGS)
freeswitch_LDFLAGS = $(AM_LDFLAGS) -rpath $(libdir)
freeswitch_LDADD = libfreeswitch.la libs/apr/libapr-1.la
@@ -180,6 +180,8 @@
bin_SCRIPTS = scripts/gentls_cert scripts/fsxs
+src/include/switch_swigable_cpp.h: src/include/switch_cpp.h
+ $(CC) -E src/include/switch_cpp.h -DSWITCH_DECLARE\(x\)=x -DSWITCH_DECLARE_CONSTRUCTOR= -DSWITCH_DECLARE_NONSTD\(x\)=x 2>/dev/null | grep -v "^#" > src/include/switch_swigable_cpp.h
libs/libedit/src/.libs/libedit.a:
cd libs/libedit && $(MAKE)
Modified: freeswitch/trunk/src/include/switch_cpp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_cpp.h (original)
+++ freeswitch/trunk/src/include/switch_cpp.h Wed Apr 30 15:42:26 2008
@@ -11,6 +11,7 @@
#include <switch.h>
+
#define sanity_check(x) do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return x;}} while(0)
#define sanity_check_noreturn do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return;}} while(0)
#define init_vars() do { session = NULL; channel = NULL; uuid = NULL; tts_name = NULL; voice_name = NULL; memset(&args, 0, sizeof(args)); ap = NULL; caller_profile.source = "mod_unknown"; caller_profile.dialplan = ""; caller_profile.context = ""; caller_profile.caller_id_name = ""; caller_profile.caller_id_number = ""; caller_profile.network_addr = ""; caller_profile.ani = ""; caller_profile.aniii = ""; caller_profile.rdnis = ""; caller_profile.username = ""; on_hangup = NULL; memset(&cb_state, 0, sizeof(cb_state)); hook_state = CS_NEW; } while(0)
@@ -26,7 +27,7 @@
// Copyright: See COPYING file that comes with this distribution
//
-
+#if 0
#ifndef SWITCHTOMEMPOOL
#define SWITCHTOMEMPOOL
class SwitchToMempool {
@@ -42,7 +43,7 @@
switch_memory_pool_t *memorypool;
};
#endif
-
+#endif
/*
@@ -100,13 +101,15 @@
SWITCH_DECLARE_CONSTRUCTOR Event(switch_event_t *wrap_me, int free_me=0);
virtual SWITCH_DECLARE_CONSTRUCTOR ~Event();
SWITCH_DECLARE(const char *)serialize(const char *format=NULL);
- SWITCH_DECLARE(bool) set_priority(switch_priority_t priority = SWITCH_PRIORITY_NORMAL);
- SWITCH_DECLARE(char *)get_header(char *header_name);
- SWITCH_DECLARE(char *)get_body(void);
- SWITCH_DECLARE(bool) add_body(const char *value);
- SWITCH_DECLARE(bool) add_header(const char *header_name, const char *value);
- SWITCH_DECLARE(bool) del_header(const char *header_name);
+ SWITCH_DECLARE(bool) setPriority(switch_priority_t priority = SWITCH_PRIORITY_NORMAL);
+ SWITCH_DECLARE(char *)getHeader(char *header_name);
+ SWITCH_DECLARE(char *)getBody(void);
+ SWITCH_DECLARE(char *)getType(void);
+ SWITCH_DECLARE(bool) addBody(const char *value);
+ SWITCH_DECLARE(bool) addHeader(const char *header_name, const char *value);
+ SWITCH_DECLARE(bool) delHeader(const char *header_name);
SWITCH_DECLARE(bool) fire(void);
+
};
Modified: freeswitch/trunk/src/mod/languages/mod_java/mod_java.i
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/mod_java.i (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/mod_java.i Wed Apr 30 15:42:26 2008
@@ -52,6 +52,6 @@
%include "enums.swg"
-%include switch_cpp.h
+%include switch_swigable_cpp.h
%include freeswitch_java.h
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java Wed Apr 30 15:42:26 2008
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org)
- * Version 1.3.31
+ * Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
@@ -59,6 +59,14 @@
return freeswitchJNI.CoreSession_flags_get(swigCPtr, this);
}
+ public void setAllocated(int value) {
+ freeswitchJNI.CoreSession_allocated_set(swigCPtr, this, value);
+ }
+
+ public int getAllocated() {
+ return freeswitchJNI.CoreSession_allocated_get(swigCPtr, this);
+ }
+
public void setCb_state(input_callback_state_t value) {
freeswitchJNI.CoreSession_cb_state_set(swigCPtr, this, input_callback_state_t.getCPtr(value), value);
}
@@ -85,19 +93,44 @@
}
public void hangup(String cause) {
- freeswitchJNI.CoreSession_hangup(swigCPtr, this, cause);
+ freeswitchJNI.CoreSession_hangup__SWIG_0(swigCPtr, this, cause);
+ }
+
+ public void hangup() {
+ freeswitchJNI.CoreSession_hangup__SWIG_1(swigCPtr, this);
}
public void setVariable(String var, String val) {
freeswitchJNI.CoreSession_setVariable(swigCPtr, this, var, val);
}
+ public void setPrivate(String var, SWIGTYPE_p_void val) {
+ freeswitchJNI.CoreSession_setPrivate(swigCPtr, this, var, SWIGTYPE_p_void.getCPtr(val));
+ }
+
+ public SWIGTYPE_p_void getPrivate(String var) {
+ long cPtr = freeswitchJNI.CoreSession_getPrivate(swigCPtr, this, var);
+ return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+ }
+
public String getVariable(String var) {
return freeswitchJNI.CoreSession_getVariable(swigCPtr, this, var);
}
public int recordFile(String file_name, int max_len, int silence_threshold, int silence_secs) {
- return freeswitchJNI.CoreSession_recordFile(swigCPtr, this, file_name, max_len, silence_threshold, silence_secs);
+ return freeswitchJNI.CoreSession_recordFile__SWIG_0(swigCPtr, this, file_name, max_len, silence_threshold, silence_secs);
+ }
+
+ public int recordFile(String file_name, int max_len, int silence_threshold) {
+ return freeswitchJNI.CoreSession_recordFile__SWIG_1(swigCPtr, this, file_name, max_len, silence_threshold);
+ }
+
+ public int recordFile(String file_name, int max_len) {
+ return freeswitchJNI.CoreSession_recordFile__SWIG_2(swigCPtr, this, file_name, max_len);
+ }
+
+ public int recordFile(String file_name) {
+ return freeswitchJNI.CoreSession_recordFile__SWIG_3(swigCPtr, this, file_name);
}
public void setCallerData(String var, String val) {
@@ -105,7 +138,11 @@
}
public int originate(CoreSession a_leg_session, String dest, int timeout) {
- return freeswitchJNI.CoreSession_originate(swigCPtr, this, CoreSession.getCPtr(a_leg_session), a_leg_session, dest, timeout);
+ return freeswitchJNI.CoreSession_originate__SWIG_0(swigCPtr, this, CoreSession.getCPtr(a_leg_session), a_leg_session, dest, timeout);
+ }
+
+ public int originate(CoreSession a_leg_session, String dest) {
+ return freeswitchJNI.CoreSession_originate__SWIG_1(swigCPtr, this, CoreSession.getCPtr(a_leg_session), a_leg_session, dest);
}
public void setDTMFCallback(SWIGTYPE_p_void cbfunc, String funcargs) {
@@ -124,8 +161,8 @@
return freeswitchJNI.CoreSession_collectDigits(swigCPtr, this, timeout);
}
- public int getDigits(byte[] dtmf_buf, int buflen, int maxdigits, String terminators, byte[] terminator, int timeout) {
- return freeswitchJNI.CoreSession_getDigits(swigCPtr, this, dtmf_buf, buflen, maxdigits, terminators, terminator, timeout);
+ public int getDigits(byte[] dtmf_buf, SWIGTYPE_p_switch_size_t buflen, SWIGTYPE_p_switch_size_t maxdigits, String terminators, byte[] terminator, int timeout) {
+ return freeswitchJNI.CoreSession_getDigits(swigCPtr, this, dtmf_buf, SWIGTYPE_p_switch_size_t.getCPtr(buflen), SWIGTYPE_p_switch_size_t.getCPtr(maxdigits), terminators, terminator, timeout);
}
public int transfer(String extensions, String dialplan, String context) {
@@ -137,7 +174,11 @@
}
public int streamFile(String file, int starting_sample_count) {
- return freeswitchJNI.CoreSession_streamFile(swigCPtr, this, file, starting_sample_count);
+ return freeswitchJNI.CoreSession_streamFile__SWIG_0(swigCPtr, this, file, starting_sample_count);
+ }
+
+ public int streamFile(String file) {
+ return freeswitchJNI.CoreSession_streamFile__SWIG_1(swigCPtr, this, file);
}
public int flushEvents() {
@@ -164,6 +205,10 @@
freeswitchJNI.CoreSession_execute(swigCPtr, this, app, data);
}
+ public void sendEvent(Event sendME) {
+ freeswitchJNI.CoreSession_sendEvent(swigCPtr, this, Event.getCPtr(sendME), sendME);
+ }
+
public boolean begin_allow_threads() {
return freeswitchJNI.CoreSession_begin_allow_threads(swigCPtr, this);
}
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/JavaSession.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/JavaSession.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/JavaSession.java Wed Apr 30 15:42:26 2008
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org)
- * Version 1.3.31
+ * Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_JavaVM.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_JavaVM.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_JavaVM.java Wed Apr 30 15:42:26 2008
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org)
- * Version 1.3.31
+ * Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_channel_state_t.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_channel_state_t.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_channel_state_t.java Wed Apr 30 15:42:26 2008
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org)
- * Version 1.3.31
+ * Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_channel_t.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_channel_t.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_channel_t.java Wed Apr 30 15:42:26 2008
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org)
- * Version 1.3.31
+ * Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_core_session_t.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_core_session_t.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_core_session_t.java Wed Apr 30 15:42:26 2008
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org)
- * Version 1.3.31
+ * Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_input_args_t.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_input_args_t.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_input_args_t.java Wed Apr 30 15:42:26 2008
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org)
- * Version 1.3.31
+ * Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_input_type_t.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_input_type_t.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_input_type_t.java Wed Apr 30 15:42:26 2008
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org)
- * Version 1.3.31
+ * Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_status_t.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_status_t.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_switch_status_t.java Wed Apr 30 15:42:26 2008
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org)
- * Version 1.3.31
+ * Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_void.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_void.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_void.java Wed Apr 30 15:42:26 2008
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org)
- * Version 1.3.31
+ * Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitch.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitch.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitch.java Wed Apr 30 15:42:26 2008
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org)
- * Version 1.3.31
+ * Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
@@ -25,10 +25,6 @@
freeswitchJNI.api_reply_delete(reply);
}
- public static SWIGTYPE_p_switch_status_t process_callback_result(String raw_result, input_callback_state_t cb_state, SWIGTYPE_p_switch_core_session_t session) {
- return new SWIGTYPE_p_switch_status_t(freeswitchJNI.process_callback_result(raw_result, input_callback_state_t.getCPtr(cb_state), cb_state, SWIGTYPE_p_switch_core_session_t.getCPtr(session)), true);
- }
-
public static void bridge(CoreSession session_a, CoreSession session_b) {
freeswitchJNI.bridge(CoreSession.getCPtr(session_a), session_a, CoreSession.getCPtr(session_b), session_b);
}
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java Wed Apr 30 15:42:26 2008
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org)
- * Version 1.3.31
+ * Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
@@ -9,11 +9,6 @@
package org.freeswitch.swig;
class freeswitchJNI {
- public final static native void console_log(String jarg1, String jarg2);
- public final static native void console_clean_log(String jarg1);
- public final static native String api_execute(String jarg1, String jarg2);
- public final static native void api_reply_delete(String jarg1);
- public final static native long process_callback_result(String jarg1, long jarg2, input_callback_state_t jarg2_, long jarg3);
public final static native void input_callback_state_t_function_set(long jarg1, input_callback_state_t jarg1_, long jarg2);
public final static native long input_callback_state_t_function_get(long jarg1, input_callback_state_t jarg1_);
public final static native void input_callback_state_t_threadState_set(long jarg1, input_callback_state_t jarg1_, long jarg2);
@@ -27,6 +22,33 @@
public final static native int S_HUP_get();
public final static native int S_FREE_get();
public final static native int S_RDLOCK_get();
+ public final static native long new_Stream__SWIG_0();
+ public final static native long new_Stream__SWIG_1(long jarg1);
+ public final static native void delete_Stream(long jarg1);
+ public final static native void Stream_write(long jarg1, Stream jarg1_, String jarg2);
+ public final static native String Stream_get_data(long jarg1, Stream jarg1_);
+ public final static native void Event_event_set(long jarg1, Event jarg1_, long jarg2);
+ public final static native long Event_event_get(long jarg1, Event jarg1_);
+ public final static native void Event_serialized_string_set(long jarg1, Event jarg1_, String jarg2);
+ public final static native String Event_serialized_string_get(long jarg1, Event jarg1_);
+ public final static native void Event_mine_set(long jarg1, Event jarg1_, int jarg2);
+ public final static native int Event_mine_get(long jarg1, Event jarg1_);
+ public final static native long new_Event__SWIG_0(String jarg1, String jarg2);
+ public final static native long new_Event__SWIG_1(String jarg1);
+ public final static native long new_Event__SWIG_2(long jarg1, int jarg2);
+ public final static native long new_Event__SWIG_3(long jarg1);
+ public final static native void delete_Event(long jarg1);
+ public final static native String Event_serialize__SWIG_0(long jarg1, Event jarg1_, String jarg2);
+ public final static native String Event_serialize__SWIG_1(long jarg1, Event jarg1_);
+ public final static native boolean Event_setPriority__SWIG_0(long jarg1, Event jarg1_, long jarg2);
+ public final static native boolean Event_setPriority__SWIG_1(long jarg1, Event jarg1_);
+ public final static native String Event_getHeader(long jarg1, Event jarg1_, String jarg2);
+ public final static native String Event_getBody(long jarg1, Event jarg1_);
+ public final static native String Event_getType(long jarg1, Event jarg1_);
+ public final static native boolean Event_addBody(long jarg1, Event jarg1_, String jarg2);
+ public final static native boolean Event_addHeader(long jarg1, Event jarg1_, String jarg2, String jarg3);
+ public final static native boolean Event_delHeader(long jarg1, Event jarg1_, String jarg2);
+ public final static native boolean Event_fire(long jarg1, Event jarg1_);
public final static native void delete_CoreSession(long jarg1);
public final static native void CoreSession_session_set(long jarg1, CoreSession jarg1_, long jarg2);
public final static native long CoreSession_session_get(long jarg1, CoreSession jarg1_);
@@ -34,38 +56,53 @@
public final static native long CoreSession_channel_get(long jarg1, CoreSession jarg1_);
public final static native void CoreSession_flags_set(long jarg1, CoreSession jarg1_, long jarg2);
public final static native long CoreSession_flags_get(long jarg1, CoreSession jarg1_);
+ public final static native void CoreSession_allocated_set(long jarg1, CoreSession jarg1_, int jarg2);
+ public final static native int CoreSession_allocated_get(long jarg1, CoreSession jarg1_);
public final static native void CoreSession_cb_state_set(long jarg1, CoreSession jarg1_, long jarg2, input_callback_state_t jarg2_);
public final static native long CoreSession_cb_state_get(long jarg1, CoreSession jarg1_);
public final static native void CoreSession_hook_state_set(long jarg1, CoreSession jarg1_, long jarg2);
public final static native long CoreSession_hook_state_get(long jarg1, CoreSession jarg1_);
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);
+ public final static native void CoreSession_hangup__SWIG_0(long jarg1, CoreSession jarg1_, String jarg2);
+ public final static native void CoreSession_hangup__SWIG_1(long jarg1, CoreSession jarg1_);
public final static native void CoreSession_setVariable(long jarg1, CoreSession jarg1_, String jarg2, String jarg3);
+ public final static native void CoreSession_setPrivate(long jarg1, CoreSession jarg1_, String jarg2, long jarg3);
+ public final static native long CoreSession_getPrivate(long jarg1, CoreSession jarg1_, String jarg2);
public final static native String CoreSession_getVariable(long jarg1, CoreSession jarg1_, String jarg2);
- public final static native int CoreSession_recordFile(long jarg1, CoreSession jarg1_, String jarg2, int jarg3, int jarg4, int jarg5);
+ public final static native int CoreSession_recordFile__SWIG_0(long jarg1, CoreSession jarg1_, String jarg2, int jarg3, int jarg4, int jarg5);
+ public final static native int CoreSession_recordFile__SWIG_1(long jarg1, CoreSession jarg1_, String jarg2, int jarg3, int jarg4);
+ public final static native int CoreSession_recordFile__SWIG_2(long jarg1, CoreSession jarg1_, String jarg2, int jarg3);
+ public final static native int CoreSession_recordFile__SWIG_3(long jarg1, CoreSession jarg1_, String jarg2);
public final static native void CoreSession_setCallerData(long jarg1, CoreSession jarg1_, String jarg2, String jarg3);
- public final static native int CoreSession_originate(long jarg1, CoreSession jarg1_, long jarg2, CoreSession jarg2_, String jarg3, int jarg4);
+ public final static native int CoreSession_originate__SWIG_0(long jarg1, CoreSession jarg1_, long jarg2, CoreSession jarg2_, String jarg3, int jarg4);
+ public final static native int CoreSession_originate__SWIG_1(long jarg1, CoreSession jarg1_, long jarg2, CoreSession jarg2_, String jarg3);
public final static native void CoreSession_setDTMFCallback(long jarg1, CoreSession jarg1_, long jarg2, String jarg3);
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 int CoreSession_collectDigits(long jarg1, CoreSession jarg1_, int jarg2);
- public final static native int CoreSession_getDigits(long jarg1, CoreSession jarg1_, byte[] jarg2, int jarg3, int jarg4, String jarg5, byte[] jarg6, int jarg7);
+ public final static native int CoreSession_getDigits(long jarg1, CoreSession jarg1_, byte[] jarg2, long jarg3, long jarg4, String jarg5, byte[] jarg6, int jarg7);
public final static native int CoreSession_transfer(long jarg1, CoreSession jarg1_, String jarg2, String jarg3, String jarg4);
public final static native int CoreSession_playAndGetDigits(long jarg1, CoreSession jarg1_, int jarg2, int jarg3, int jarg4, int jarg5, String jarg6, String jarg7, String jarg8, byte[] jarg9, String jarg10);
- public final static native int CoreSession_streamFile(long jarg1, CoreSession jarg1_, String jarg2, int jarg3);
+ public final static native int CoreSession_streamFile__SWIG_0(long jarg1, CoreSession jarg1_, String jarg2, int jarg3);
+ public final static native int CoreSession_streamFile__SWIG_1(long jarg1, CoreSession jarg1_, String jarg2);
public final static native int CoreSession_flushEvents(long jarg1, CoreSession jarg1_);
public final static native int CoreSession_flushDigits(long jarg1, CoreSession jarg1_);
public final static native int CoreSession_setAutoHangup(long jarg1, CoreSession jarg1_, boolean jarg2);
public final static native void CoreSession_setHangupHook(long jarg1, CoreSession jarg1_, long jarg2);
public final static native boolean CoreSession_ready(long jarg1, CoreSession jarg1_);
public final static native void CoreSession_execute(long jarg1, CoreSession jarg1_, String jarg2, String jarg3);
+ public final static native void CoreSession_sendEvent(long jarg1, CoreSession jarg1_, long jarg2, Event jarg2_);
public final static native boolean CoreSession_begin_allow_threads(long jarg1, CoreSession jarg1_);
public final static native boolean CoreSession_end_allow_threads(long jarg1, CoreSession jarg1_);
public final static native String CoreSession_get_uuid(long jarg1, CoreSession jarg1_);
public final static native long CoreSession_get_cb_args(long jarg1, CoreSession jarg1_);
public final static native void CoreSession_check_hangup_hook(long jarg1, CoreSession jarg1_);
public final static native long CoreSession_run_dtmf_callback(long jarg1, CoreSession jarg1_, long jarg2, long jarg3);
+ public final static native void console_log(String jarg1, String jarg2);
+ public final static native void console_clean_log(String jarg1);
+ public final static native String api_execute(String jarg1, String jarg2);
+ public final static native void api_reply_delete(String jarg1);
public final static native void bridge(long jarg1, CoreSession jarg1_, long jarg2, CoreSession jarg2_);
public final static native long hanguphook(long jarg1);
public final static native long dtmf_callback(long jarg1, long jarg2, long jarg3, long jarg4, long jarg5);
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/input_callback_state_t.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/input_callback_state_t.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/input_callback_state_t.java Wed Apr 30 15:42:26 2008
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org)
- * Version 1.3.31
+ * Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/session_flag_t.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/session_flag_t.java (original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/session_flag_t.java Wed Apr 30 15:42:26 2008
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org)
- * Version 1.3.31
+ * Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
@@ -27,15 +27,18 @@
throw new IllegalArgumentException("No enum " + session_flag_t.class + " with value " + swigValue);
}
+ @SuppressWarnings("unused")
private session_flag_t() {
this.swigValue = SwigNext.next++;
}
+ @SuppressWarnings("unused")
private session_flag_t(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
+ @SuppressWarnings("unused")
private session_flag_t(session_flag_t swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
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 Wed Apr 30 15:42:26 2008
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org)
- * Version 1.3.31
+ * Version 1.3.35
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
@@ -10,7 +10,7 @@
#ifdef __cplusplus
-template<class T> class SwigValueWrapper {
+template<typename T> class SwigValueWrapper {
T *tt;
public:
SwigValueWrapper() : tt(0) { }
@@ -23,6 +23,10 @@
private:
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
};
+
+template <typename T> T SwigValueInit() {
+ return T();
+}
#endif
/* -----------------------------------------------------------------------------
@@ -32,14 +36,14 @@
/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
-# if defined(__SUNPRO_CC)
-# if (__SUNPRO_CC <= 0x560)
-# define SWIGTEMPLATEDISAMBIGUATOR template
-# else
-# define SWIGTEMPLATEDISAMBIGUATOR
-# endif
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+# define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+# define SWIGTEMPLATEDISAMBIGUATOR template
# else
-# define SWIGTEMPLATEDISAMBIGUATOR
+# define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif
@@ -122,6 +126,12 @@
# define _CRT_SECURE_NO_DEPRECATE
#endif
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+
/* Fix for jlong on some versions of gcc on Windows */
#if defined(__GNUC__) && !defined(__INTELC__)
@@ -197,108 +207,6 @@
extern "C" {
#endif
-SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_console_1log(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
- char *arg1 = (char *) 0 ;
- char *arg2 = (char *) 0 ;
-
- (void)jenv;
- (void)jcls;
- arg1 = 0;
- if (jarg1) {
- arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
- if (!arg1) return ;
- }
- arg2 = 0;
- if (jarg2) {
- arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
- if (!arg2) return ;
- }
- console_log(arg1,arg2);
- if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
- if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
-}
-
-
-SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_console_1clean_1log(JNIEnv *jenv, jclass jcls, jstring jarg1) {
- char *arg1 = (char *) 0 ;
-
- (void)jenv;
- (void)jcls;
- arg1 = 0;
- if (jarg1) {
- arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
- if (!arg1) return ;
- }
- console_clean_log(arg1);
- if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
-}
-
-
-SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_api_1execute(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
- jstring jresult = 0 ;
- char *arg1 = (char *) 0 ;
- char *arg2 = (char *) 0 ;
- char *result = 0 ;
-
- (void)jenv;
- (void)jcls;
- arg1 = 0;
- if (jarg1) {
- arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
- if (!arg1) return 0;
- }
- arg2 = 0;
- if (jarg2) {
- arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
- if (!arg2) return 0;
- }
- result = (char *)api_execute(arg1,arg2);
- if(result) jresult = jenv->NewStringUTF((const char *)result);
- if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
- if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
- return jresult;
-}
-
-
-SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_api_1reply_1delete(JNIEnv *jenv, jclass jcls, jstring jarg1) {
- char *arg1 = (char *) 0 ;
-
- (void)jenv;
- (void)jcls;
- arg1 = 0;
- if (jarg1) {
- arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
- if (!arg1) return ;
- }
- api_reply_delete(arg1);
- if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
-}
-
-
-SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_process_1callback_1result(JNIEnv *jenv, jclass jcls, jstring jarg1, jlong jarg2, jobject jarg2_, jlong jarg3) {
- jlong jresult = 0 ;
- char *arg1 = (char *) 0 ;
- input_callback_state *arg2 = (input_callback_state *) 0 ;
- switch_core_session_t *arg3 = (switch_core_session_t *) 0 ;
- switch_status_t result;
-
- (void)jenv;
- (void)jcls;
- (void)jarg2_;
- arg1 = 0;
- if (jarg1) {
- arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
- if (!arg1) return 0;
- }
- arg2 = *(input_callback_state **)&jarg2;
- arg3 = *(switch_core_session_t **)&jarg3;
- result = process_callback_result(arg1,arg2,arg3);
- *(switch_status_t **)&jresult = new switch_status_t((switch_status_t &)result);
- if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
- return jresult;
-}
-
-
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_input_1callback_1state_1t_1function_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
void *arg2 = (void *) 0 ;
@@ -486,202 +394,824 @@
}
-SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1CoreSession(JNIEnv *jenv, jclass jcls, jlong jarg1) {
- CoreSession *arg1 = (CoreSession *) 0 ;
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1Stream_1_1SWIG_10(JNIEnv *jenv, jclass jcls) {
+ jlong jresult = 0 ;
+ Stream *result = 0 ;
(void)jenv;
(void)jcls;
- arg1 = *(CoreSession **)&jarg1;
+ result = (Stream *)new Stream();
+ *(Stream **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1Stream_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ jlong jresult = 0 ;
+ switch_stream_handle_t *arg1 = (switch_stream_handle_t *) 0 ;
+ Stream *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(switch_stream_handle_t **)&jarg1;
+ result = (Stream *)new Stream(arg1);
+ *(Stream **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1Stream(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ Stream *arg1 = (Stream *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(Stream **)&jarg1;
delete arg1;
}
-SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1session_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
- CoreSession *arg1 = (CoreSession *) 0 ;
- switch_core_session_t *arg2 = (switch_core_session_t *) 0 ;
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_Stream_1write(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ Stream *arg1 = (Stream *) 0 ;
+ char *arg2 = (char *) 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
- arg1 = *(CoreSession **)&jarg1;
- arg2 = *(switch_core_session_t **)&jarg2;
- if (arg1) (arg1)->session = arg2;
-
+ arg1 = *(Stream **)&jarg1;
+ arg2 = 0;
+ if (jarg2) {
+ arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2) return ;
+ }
+ (arg1)->write((char const *)arg2);
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
}
-SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1session_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
- jlong jresult = 0 ;
- CoreSession *arg1 = (CoreSession *) 0 ;
- switch_core_session_t *result = 0 ;
+SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_Stream_1get_1data(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ Stream *arg1 = (Stream *) 0 ;
+ char *result = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
- arg1 = *(CoreSession **)&jarg1;
- result = (switch_core_session_t *) ((arg1)->session);
- *(switch_core_session_t **)&jresult = result;
+ arg1 = *(Stream **)&jarg1;
+ result = (char *)(arg1)->get_data();
+ if(result) jresult = jenv->NewStringUTF((const char *)result);
return jresult;
}
-SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1channel_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
- CoreSession *arg1 = (CoreSession *) 0 ;
- switch_channel_t *arg2 = (switch_channel_t *) 0 ;
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1event_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ Event *arg1 = (Event *) 0 ;
+ switch_event_t *arg2 = (switch_event_t *) 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
- arg1 = *(CoreSession **)&jarg1;
- arg2 = *(switch_channel_t **)&jarg2;
- if (arg1) (arg1)->channel = arg2;
+ arg1 = *(Event **)&jarg1;
+ arg2 = *(switch_event_t **)&jarg2;
+ if (arg1) (arg1)->event = arg2;
}
-SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1channel_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1event_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jlong jresult = 0 ;
- CoreSession *arg1 = (CoreSession *) 0 ;
- switch_channel_t *result = 0 ;
+ Event *arg1 = (Event *) 0 ;
+ switch_event_t *result = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
- arg1 = *(CoreSession **)&jarg1;
- result = (switch_channel_t *) ((arg1)->channel);
- *(switch_channel_t **)&jresult = result;
+ arg1 = *(Event **)&jarg1;
+ result = (switch_event_t *) ((arg1)->event);
+ *(switch_event_t **)&jresult = result;
return jresult;
}
-SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1flags_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
- CoreSession *arg1 = (CoreSession *) 0 ;
- unsigned int arg2 ;
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1serialized_1string_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ Event *arg1 = (Event *) 0 ;
+ char *arg2 = (char *) 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
- arg1 = *(CoreSession **)&jarg1;
- arg2 = (unsigned int)jarg2;
- if (arg1) (arg1)->flags = arg2;
-
+ arg1 = *(Event **)&jarg1;
+ arg2 = 0;
+ if (jarg2) {
+ arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2) return ;
+ }
+ {
+ if (arg1->serialized_string) delete [] arg1->serialized_string;
+ if (arg2) {
+ arg1->serialized_string = (char *) (new char[strlen((const char *)arg2)+1]);
+ strcpy((char *)arg1->serialized_string, (const char *)arg2);
+ } else {
+ arg1->serialized_string = 0;
+ }
+ }
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
}
-SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1flags_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
- jlong jresult = 0 ;
- CoreSession *arg1 = (CoreSession *) 0 ;
- unsigned int result;
+SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1serialized_1string_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ Event *arg1 = (Event *) 0 ;
+ char *result = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
- arg1 = *(CoreSession **)&jarg1;
- result = (unsigned int) ((arg1)->flags);
- jresult = (jlong)result;
+ arg1 = *(Event **)&jarg1;
+ result = (char *) ((arg1)->serialized_string);
+ if(result) jresult = jenv->NewStringUTF((const char *)result);
return jresult;
}
-SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1cb_1state_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
- CoreSession *arg1 = (CoreSession *) 0 ;
- input_callback_state *arg2 = (input_callback_state *) 0 ;
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1mine_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ Event *arg1 = (Event *) 0 ;
+ int arg2 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
- (void)jarg2_;
- arg1 = *(CoreSession **)&jarg1;
- arg2 = *(input_callback_state **)&jarg2;
- if (arg1) (arg1)->cb_state = *arg2;
+ arg1 = *(Event **)&jarg1;
+ arg2 = (int)jarg2;
+ if (arg1) (arg1)->mine = arg2;
}
-SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1cb_1state_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
- jlong jresult = 0 ;
- CoreSession *arg1 = (CoreSession *) 0 ;
- input_callback_state *result = 0 ;
+SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1mine_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ Event *arg1 = (Event *) 0 ;
+ int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
- arg1 = *(CoreSession **)&jarg1;
- result = (input_callback_state *)& ((arg1)->cb_state);
- *(input_callback_state **)&jresult = result;
+ arg1 = *(Event **)&jarg1;
+ result = (int) ((arg1)->mine);
+ jresult = (jint)result;
return jresult;
}
-SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hook_1state_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
- CoreSession *arg1 = (CoreSession *) 0 ;
- switch_channel_state_t arg2 ;
- switch_channel_state_t *argp2 ;
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1Event_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
+ jlong jresult = 0 ;
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+ Event *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = 0;
+ if (jarg1) {
+ arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
+ if (!arg1) return 0;
+ }
+ arg2 = 0;
+ if (jarg2) {
+ arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2) return 0;
+ }
+ result = (Event *)new Event((char const *)arg1,(char const *)arg2);
+ *(Event **)&jresult = result;
+ if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1Event_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1) {
+ jlong jresult = 0 ;
+ char *arg1 = (char *) 0 ;
+ Event *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = 0;
+ if (jarg1) {
+ arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
+ if (!arg1) return 0;
+ }
+ result = (Event *)new Event((char const *)arg1);
+ *(Event **)&jresult = result;
+ if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1Event_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) {
+ jlong jresult = 0 ;
+ switch_event_t *arg1 = (switch_event_t *) 0 ;
+ int arg2 ;
+ Event *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(switch_event_t **)&jarg1;
+ arg2 = (int)jarg2;
+ result = (Event *)new Event(arg1,arg2);
+ *(Event **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1Event_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ jlong jresult = 0 ;
+ switch_event_t *arg1 = (switch_event_t *) 0 ;
+ Event *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(switch_event_t **)&jarg1;
+ result = (Event *)new Event(arg1);
+ *(Event **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1Event(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ Event *arg1 = (Event *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(Event **)&jarg1;
+ delete arg1;
+
+}
+
+
+SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1serialize_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ jstring jresult = 0 ;
+ Event *arg1 = (Event *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(Event **)&jarg1;
+ arg2 = 0;
+ if (jarg2) {
+ arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2) return 0;
+ }
+ result = (char *)(arg1)->serialize((char const *)arg2);
+ if(result) jresult = jenv->NewStringUTF((const char *)result);
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1serialize_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ Event *arg1 = (Event *) 0 ;
+ char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(Event **)&jarg1;
+ result = (char *)(arg1)->serialize();
+ if(result) jresult = jenv->NewStringUTF((const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1setPriority_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ jboolean jresult = 0 ;
+ Event *arg1 = (Event *) 0 ;
+ switch_priority_t arg2 ;
+ bool result;
+ switch_priority_t *argp2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(Event **)&jarg1;
+ argp2 = *(switch_priority_t **)&jarg2;
+ if (!argp2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null switch_priority_t");
+ return 0;
+ }
+ arg2 = *argp2;
+ result = (bool)(arg1)->setPriority(arg2);
+ jresult = (jboolean)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1setPriority_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jboolean jresult = 0 ;
+ Event *arg1 = (Event *) 0 ;
+ bool result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(Event **)&jarg1;
+ result = (bool)(arg1)->setPriority();
+ jresult = (jboolean)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1getHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ jstring jresult = 0 ;
+ Event *arg1 = (Event *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(Event **)&jarg1;
+ arg2 = 0;
+ if (jarg2) {
+ arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2) return 0;
+ }
+ result = (char *)(arg1)->getHeader(arg2);
+ if(result) jresult = jenv->NewStringUTF((const char *)result);
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1getBody(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ Event *arg1 = (Event *) 0 ;
+ char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(Event **)&jarg1;
+ result = (char *)(arg1)->getBody();
+ if(result) jresult = jenv->NewStringUTF((const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1getType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ Event *arg1 = (Event *) 0 ;
+ char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(Event **)&jarg1;
+ result = (char *)(arg1)->getType();
+ if(result) jresult = jenv->NewStringUTF((const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1addBody(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ jboolean jresult = 0 ;
+ Event *arg1 = (Event *) 0 ;
+ char *arg2 = (char *) 0 ;
+ bool result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(Event **)&jarg1;
+ arg2 = 0;
+ if (jarg2) {
+ arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2) return 0;
+ }
+ result = (bool)(arg1)->addBody((char const *)arg2);
+ jresult = (jboolean)result;
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+ return jresult;
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1addHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
+ jboolean jresult = 0 ;
+ Event *arg1 = (Event *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ bool result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(Event **)&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;
+ }
+ result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3);
+ jresult = (jboolean)result;
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+ if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
+ return jresult;
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1delHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ jboolean jresult = 0 ;
+ Event *arg1 = (Event *) 0 ;
+ char *arg2 = (char *) 0 ;
+ bool result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(Event **)&jarg1;
+ arg2 = 0;
+ if (jarg2) {
+ arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2) return 0;
+ }
+ result = (bool)(arg1)->delHeader((char const *)arg2);
+ jresult = (jboolean)result;
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+ return jresult;
+}
+
+
+SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1fire(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jboolean jresult = 0 ;
+ Event *arg1 = (Event *) 0 ;
+ bool result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(Event **)&jarg1;
+ result = (bool)(arg1)->fire();
+ jresult = (jboolean)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1CoreSession(JNIEnv *jenv, jclass jcls, jlong jarg1) {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = *(CoreSession **)&jarg1;
+ delete arg1;
+
+}
+
+
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1session_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ switch_core_session_t *arg2 = (switch_core_session_t *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(CoreSession **)&jarg1;
+ arg2 = *(switch_core_session_t **)&jarg2;
+ if (arg1) (arg1)->session = arg2;
+
+}
+
+
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1session_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ switch_core_session_t *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(CoreSession **)&jarg1;
+ result = (switch_core_session_t *) ((arg1)->session);
+ *(switch_core_session_t **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1channel_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ switch_channel_t *arg2 = (switch_channel_t *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(CoreSession **)&jarg1;
+ arg2 = *(switch_channel_t **)&jarg2;
+ if (arg1) (arg1)->channel = arg2;
+
+}
+
+
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1channel_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ switch_channel_t *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(CoreSession **)&jarg1;
+ result = (switch_channel_t *) ((arg1)->channel);
+ *(switch_channel_t **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1flags_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ unsigned int arg2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(CoreSession **)&jarg1;
+ arg2 = (unsigned int)jarg2;
+ if (arg1) (arg1)->flags = arg2;
+
+}
+
+
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1flags_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ unsigned int result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(CoreSession **)&jarg1;
+ result = (unsigned int) ((arg1)->flags);
+ jresult = (jlong)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1allocated_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ int arg2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(CoreSession **)&jarg1;
+ arg2 = (int)jarg2;
+ if (arg1) (arg1)->allocated = arg2;
+
+}
+
+
+SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1allocated_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ int result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(CoreSession **)&jarg1;
+ result = (int) ((arg1)->allocated);
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1cb_1state_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ input_callback_state *arg2 = (input_callback_state *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+ arg1 = *(CoreSession **)&jarg1;
+ arg2 = *(input_callback_state **)&jarg2;
+ if (arg1) (arg1)->cb_state = *arg2;
+
+}
+
+
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1cb_1state_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ input_callback_state *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(CoreSession **)&jarg1;
+ result = (input_callback_state *)& ((arg1)->cb_state);
+ *(input_callback_state **)&jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hook_1state_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ switch_channel_state_t arg2 ;
+ switch_channel_state_t *argp2 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(CoreSession **)&jarg1;
+ argp2 = *(switch_channel_state_t **)&jarg2;
+ if (!argp2) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null switch_channel_state_t");
+ return ;
+ }
+ arg2 = *argp2;
+ if (arg1) (arg1)->hook_state = arg2;
+
+}
+
+
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hook_1state_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jlong jresult = 0 ;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ switch_channel_state_t result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(CoreSession **)&jarg1;
+ result = ((arg1)->hook_state);
+ *(switch_channel_state_t **)&jresult = new switch_channel_state_t((switch_channel_state_t &)result);
+ 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 ;
+ int result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(CoreSession **)&jarg1;
+ result = (int)(arg1)->answer();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1preAnswer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jint jresult = 0 ;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ int result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(CoreSession **)&jarg1;
+ result = (int)(arg1)->preAnswer();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hangup_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(CoreSession **)&jarg1;
+ arg2 = 0;
+ if (jarg2) {
+ arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2) return ;
+ }
+ (arg1)->hangup(arg2);
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hangup_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(CoreSession **)&jarg1;
+ (arg1)->hangup();
+}
+
+
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1setVariable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
- argp2 = *(switch_channel_state_t **)&jarg2;
- if (!argp2) {
- SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null switch_channel_state_t");
- return ;
+ arg2 = 0;
+ if (jarg2) {
+ arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2) return ;
}
- arg2 = *argp2;
- if (arg1) (arg1)->hook_state = arg2;
-
+ arg3 = 0;
+ if (jarg3) {
+ arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
+ if (!arg3) return ;
+ }
+ (arg1)->setVariable(arg2,arg3);
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+ if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
}
-SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hook_1state_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
- jlong jresult = 0 ;
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1setPrivate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3) {
CoreSession *arg1 = (CoreSession *) 0 ;
- switch_channel_state_t result;
+ char *arg2 = (char *) 0 ;
+ void *arg3 = (void *) 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
- result = ((arg1)->hook_state);
- *(switch_channel_state_t **)&jresult = new switch_channel_state_t((switch_channel_state_t &)result);
- return jresult;
+ arg2 = 0;
+ if (jarg2) {
+ arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2) return ;
+ }
+ arg3 = *(void **)&jarg3;
+ (arg1)->setPrivate(arg2,arg3);
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
}
-SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1answer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
- jint jresult = 0 ;
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1getPrivate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ jlong jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
- int result;
+ char *arg2 = (char *) 0 ;
+ void *result = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
- result = (int)(arg1)->answer();
- jresult = (jint)result;
+ arg2 = 0;
+ if (jarg2) {
+ arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2) return 0;
+ }
+ result = (void *)(arg1)->getPrivate(arg2);
+ *(void **)&jresult = result;
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
return jresult;
}
-SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1preAnswer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
- jint jresult = 0 ;
+SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1getVariable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ jstring jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
- int result;
+ char *arg2 = (char *) 0 ;
+ char *result = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
- result = (int)(arg1)->preAnswer();
- jresult = (jint)result;
+ arg2 = 0;
+ if (jarg2) {
+ arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2) return 0;
+ }
+ result = (char *)(arg1)->getVariable(arg2);
+ if(result) jresult = jenv->NewStringUTF((const char *)result);
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
return jresult;
}
-SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hangup(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1recordFile_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3, jint jarg4, jint jarg5) {
+ jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
+ int arg3 ;
+ int arg4 ;
+ int arg5 ;
+ int result;
(void)jenv;
(void)jcls;
@@ -690,17 +1220,25 @@
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
- if (!arg2) return ;
+ if (!arg2) return 0;
}
- (arg1)->hangup(arg2);
+ arg3 = (int)jarg3;
+ arg4 = (int)jarg4;
+ arg5 = (int)jarg5;
+ result = (int)(arg1)->recordFile(arg2,arg3,arg4,arg5);
+ jresult = (jint)result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+ return jresult;
}
-SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1setVariable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
+SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1recordFile_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3, jint jarg4) {
+ jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
+ int arg3 ;
+ int arg4 ;
+ int result;
(void)jenv;
(void)jcls;
@@ -709,24 +1247,23 @@
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 ;
+ if (!arg2) return 0;
}
- (arg1)->setVariable(arg2,arg3);
+ arg3 = (int)jarg3;
+ arg4 = (int)jarg4;
+ result = (int)(arg1)->recordFile(arg2,arg3,arg4);
+ jresult = (jint)result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
- if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
+ return jresult;
}
-SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1getVariable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
- jstring jresult = 0 ;
+SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1recordFile_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
+ jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
- char *result = 0 ;
+ int arg3 ;
+ int result;
(void)jenv;
(void)jcls;
@@ -737,20 +1274,18 @@
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return 0;
}
- result = (char *)(arg1)->getVariable(arg2);
- if(result) jresult = jenv->NewStringUTF((const char *)result);
+ arg3 = (int)jarg3;
+ result = (int)(arg1)->recordFile(arg2,arg3);
+ jresult = (jint)result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
return jresult;
}
-SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1recordFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3, jint jarg4, jint jarg5) {
+SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1recordFile_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
- int arg3 = (int) 0 ;
- int arg4 = (int) 0 ;
- int arg5 = (int) 0 ;
int result;
(void)jenv;
@@ -762,10 +1297,7 @@
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return 0;
}
- arg3 = (int)jarg3;
- arg4 = (int)jarg4;
- arg5 = (int)jarg5;
- result = (int)(arg1)->recordFile(arg2,arg3,arg4,arg5);
+ result = (int)(arg1)->recordFile(arg2);
jresult = (jint)result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
return jresult;
@@ -797,12 +1329,12 @@
}
-SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1originate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jstring jarg3, jint jarg4) {
+SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1originate_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jstring jarg3, jint jarg4) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
CoreSession *arg2 = (CoreSession *) 0 ;
char *arg3 = (char *) 0 ;
- int arg4 = (int) 60 ;
+ int arg4 ;
int result;
(void)jenv;
@@ -824,6 +1356,31 @@
}
+SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1originate_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jstring jarg3) {
+ jint jresult = 0 ;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ CoreSession *arg2 = (CoreSession *) 0 ;
+ char *arg3 = (char *) 0 ;
+ int result;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+ arg1 = *(CoreSession **)&jarg1;
+ arg2 = *(CoreSession **)&jarg2;
+ arg3 = 0;
+ if (jarg3) {
+ arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
+ if (!arg3) return 0;
+ }
+ result = (int)(arg1)->originate(arg2,arg3);
+ jresult = (jint)result;
+ if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
+ return jresult;
+}
+
+
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1setDTMFCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jstring jarg3) {
CoreSession *arg1 = (CoreSession *) 0 ;
void *arg2 = (void *) 0 ;
@@ -908,16 +1465,18 @@
}
-SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1getDigits(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jint jarg3, jint jarg4, jstring jarg5, jbyteArray jarg6, jint jarg7) {
+SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1getDigits(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3, jlong jarg4, jstring jarg5, jbyteArray jarg6, jint jarg7) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
- int arg3 ;
- int arg4 ;
+ switch_size_t arg3 ;
+ switch_size_t arg4 ;
char *arg5 = (char *) 0 ;
char *arg6 = (char *) 0 ;
int arg7 ;
int result;
+ switch_size_t *argp3 ;
+ switch_size_t *argp4 ;
(void)jenv;
(void)jcls;
@@ -927,8 +1486,18 @@
arg2 = (char*) jenv->GetByteArrayElements(jarg2, 0);
if (!arg2) return 0;
}
- arg3 = (int)jarg3;
- arg4 = (int)jarg4;
+ argp3 = *(switch_size_t **)&jarg3;
+ if (!argp3) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null switch_size_t");
+ return 0;
+ }
+ arg3 = *argp3;
+ argp4 = *(switch_size_t **)&jarg4;
+ if (!argp4) {
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null switch_size_t");
+ return 0;
+ }
+ arg4 = *argp4;
arg5 = 0;
if (jarg5) {
arg5 = (char *)jenv->GetStringUTFChars(jarg5, 0);
@@ -1050,11 +1619,11 @@
}
-SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1streamFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
+SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1streamFile_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
- int arg3 = (int) 0 ;
+ int arg3 ;
int result;
(void)jenv;
@@ -1074,6 +1643,28 @@
}
+SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1streamFile_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+ jint jresult = 0 ;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ 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;
+ }
+ result = (int)(arg1)->streamFile(arg2);
+ jresult = (jint)result;
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+ return jresult;
+}
+
+
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1flushEvents(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -1174,6 +1765,20 @@
}
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1sendEvent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ Event *arg2 = (Event *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ (void)jarg2_;
+ arg1 = *(CoreSession **)&jarg1;
+ arg2 = *(Event **)&jarg2;
+ (arg1)->sendEvent(arg2);
+}
+
+
SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1begin_1allow_1threads(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jboolean jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -1273,6 +1878,84 @@
}
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_console_1log(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = 0;
+ if (jarg1) {
+ arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
+ if (!arg1) return ;
+ }
+ arg2 = 0;
+ if (jarg2) {
+ arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2) return ;
+ }
+ console_log(arg1,arg2);
+ if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+}
+
+
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_console_1clean_1log(JNIEnv *jenv, jclass jcls, jstring jarg1) {
+ char *arg1 = (char *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = 0;
+ if (jarg1) {
+ arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
+ if (!arg1) return ;
+ }
+ console_clean_log(arg1);
+ if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
+}
+
+
+SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_api_1execute(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
+ jstring jresult = 0 ;
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = 0;
+ if (jarg1) {
+ arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
+ if (!arg1) return 0;
+ }
+ arg2 = 0;
+ if (jarg2) {
+ arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+ if (!arg2) return 0;
+ }
+ result = (char *)api_execute(arg1,arg2);
+ if(result) jresult = jenv->NewStringUTF((const char *)result);
+ if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_api_1reply_1delete(JNIEnv *jenv, jclass jcls, jstring jarg1) {
+ char *arg1 = (char *) 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = 0;
+ if (jarg1) {
+ arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
+ if (!arg1) return ;
+ }
+ api_reply_delete(arg1);
+ if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
+}
+
+
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_bridge(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
CoreSession *arg1 = 0 ;
CoreSession *arg2 = 0 ;
Modified: freeswitch/trunk/src/mod/languages/mod_lua/Makefile
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/Makefile (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/Makefile Wed Apr 30 15:42:26 2008
@@ -21,8 +21,8 @@
allclean: clean luaclean
rm -f mod_lua_wrap.* freeswitch_lua.$(DYNAMIC_LIB_EXTEN)
-swigclean:
- rm mod_lua_wrap.*
+swigclean: clean
+ rm -f mod_lua_wrap.*
mod_lua_wrap.cpp: mod_lua_extra.c
swig -lua -c++ -I../../../../src/include -oh mod_lua_wrap.h -o mod_lua_wrap.cpp freeswitch.i
Modified: freeswitch/trunk/src/mod/languages/mod_lua/freeswitch.i
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/freeswitch.i (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/freeswitch.i Wed Apr 30 15:42:26 2008
@@ -12,6 +12,7 @@
/** insert the following includes into generated code so it compiles */
%{
+#include "switch.h"
#include "switch_cpp.h"
#include "freeswitch_lua.h"
%}
@@ -23,7 +24,7 @@
* tell swig to grok everything defined in these header files and
* build all sorts of c wrappers and lua shadows of the c wrappers.
*/
-%include switch_cpp.h
+%include switch_swigable_cpp.h
%include freeswitch_lua.h
Modified: freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.cpp Wed Apr 30 15:42:26 2008
@@ -1,26 +1,22 @@
+#include <switch.h>
#include "freeswitch_lua.h"
-SWITCH_BEGIN_EXTERN_C
-#include "lua.h"
-#include <lauxlib.h>
-#include <lualib.h>
-#include "mod_lua_extra.h"
-SWITCH_END_EXTERN_C
-
-
Session::Session() : CoreSession()
{
cb_function = cb_arg = hangup_func_str = NULL;
+ hh = mark = 0;
}
Session::Session(char *uuid) : CoreSession(uuid)
{
cb_function = cb_arg = hangup_func_str = NULL;
+ hh = mark = 0;
}
Session::Session(switch_core_session_t *new_session) : CoreSession(new_session)
{
cb_function = cb_arg = hangup_func_str = NULL;
+ hh = mark = 0;
}
static switch_status_t lua_hanguphook(switch_core_session_t *session_hungup);
Session::~Session()
@@ -31,31 +27,68 @@
switch_core_event_hook_remove_state_change(session, lua_hanguphook);
}
-
bool Session::begin_allow_threads()
{
+ do_hangup_hook();
return true;
}
bool Session::end_allow_threads()
{
+ do_hangup_hook();
return true;
}
+void Session::setLUA(lua_State *state)
+{
+ L = state;
+}
+
+lua_State *Session::getLUA()
+{
+ if (!L) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Doh!\n");
+ }
+ return L;
+}
+
+
+bool Session::ready() {
+ bool r;
+
+ sanity_check(false);
+ r = switch_channel_ready(channel) != 0;
+ do_hangup_hook();
+
+ return r;
+}
+
void Session::check_hangup_hook()
{
if (hangup_func_str && (hook_state == CS_HANGUP || hook_state == CS_RING)) {
- lua_State *L;
- L = (lua_State *) getPrivate("__L");
+ hh++;
+ }
+}
+
+void Session::do_hangup_hook()
+{
+ if (hh && !mark) {
+ const char *err = NULL;
+ mark++;
- if (!L) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Doh!\n");
+ if (!getLUA()) {
return;
}
-
+
lua_getfield(L, LUA_GLOBALSINDEX, (char *)hangup_func_str);
+
lua_pushstring(L, hook_state == CS_HANGUP ? "hangup" : "transfer");
- lua_call(L, 1, 0);
+ lua_call(L, 1, 1);
+ err = lua_tostring(L, -1);
+
+ if (!switch_strlen_zero(err)) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s\n", err);
+ }
}
}
@@ -82,9 +115,6 @@
switch_safe_free(hangup_func_str);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Not Currently Available\n");
- func = NULL;
-
if (func) {
hangup_func_str = strdup(func);
switch_channel_set_private(channel, "CoreSession", this);
@@ -106,7 +136,7 @@
if (funcargs) {
cb_arg = strdup(funcargs);
}
-
+
args.buf = this;
switch_channel_set_private(channel, "CoreSession", this);
@@ -116,13 +146,10 @@
switch_status_t Session::run_dtmf_callback(void *input, switch_input_type_t itype)
{
- lua_State *L;
const char *ret;
-
- L = (lua_State *) getPrivate("__L");
- if (!L) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Doh!\n");
- return SWITCH_STATUS_FALSE;
+
+ if (!getLUA()) {
+ return SWITCH_STATUS_FALSE;;
}
switch (itype) {
Modified: freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.h
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.h (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.h Wed Apr 30 15:42:26 2008
@@ -1,25 +1,41 @@
#ifndef FREESWITCH_LUA_H
#define FREESWITCH_LUA_H
+extern "C" {
+#include "lua.h"
+#include <lauxlib.h>
+#include <lualib.h>
+#include "mod_lua_extra.h"
+}
+
#include <switch_cpp.h>
class Session : public CoreSession {
+ private:
+ virtual void do_hangup_hook();
+ lua_State *getLUA();
+ lua_State *L;
+ int hh;
+ int mark;
public:
Session();
Session(char *uuid);
Session(switch_core_session_t *session);
~Session();
-
+
virtual bool begin_allow_threads();
virtual bool end_allow_threads();
virtual void check_hangup_hook();
+
virtual switch_status_t run_dtmf_callback(void *input, switch_input_type_t itype);
void setInputCallback(char *cbfunc, char *funcargs);
void setHangupHook(char *func);
-
+ bool ready();
+
char *cb_function;
char *cb_arg;
char *hangup_func_str;
+ void setLUA(lua_State *state);
};
#endif
Modified: freeswitch/trunk/src/mod/languages/mod_lua/hack.diff
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/hack.diff (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/hack.diff Wed Apr 30 15:42:26 2008
@@ -5,7 +5,7 @@
result = (Session *)new Session();
SWIG_arg=0;
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++;
-+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setPrivate("__L", L);
++ SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setLUA(L);
return SWIG_arg;
if(0) SWIG_fail;
@@ -14,7 +14,7 @@
result = (Session *)new Session(arg1);
SWIG_arg=0;
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++;
-+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setPrivate("__L", L);
++ SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setLUA(L);
return SWIG_arg;
if(0) SWIG_fail;
@@ -23,7 +23,7 @@
result = (Session *)new Session(arg1);
SWIG_arg=0;
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++;
-+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setPrivate("__L", L);
++ SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setLUA(L);
return SWIG_arg;
if(0) SWIG_fail;
Modified: freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_extra.h
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_extra.h (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_extra.h Wed Apr 30 15:42:26 2008
@@ -2,8 +2,8 @@
#define MOD_LUA_EXTRA
SWITCH_BEGIN_EXTERN_C
-int mod_lua_conjure_event(lua_State *L, switch_event_t *event, const char *name, int destroy_me);
-int mod_lua_conjure_stream(lua_State *L, switch_stream_handle_t *stream, const char *name, int destroy_me);
+void mod_lua_conjure_event(lua_State *L, switch_event_t *event, const char *name, int destroy_me);
+void mod_lua_conjure_stream(lua_State *L, switch_stream_handle_t *stream, const char *name, int destroy_me);
SWITCH_END_EXTERN_C
#endif
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 Wed Apr 30 15:42:26 2008
@@ -1489,20 +1489,21 @@
#define SWIGTYPE_p_Session swig_types[2]
#define SWIGTYPE_p_Stream swig_types[3]
#define SWIGTYPE_p_input_callback_state swig_types[4]
-#define SWIGTYPE_p_session_flag_t swig_types[5]
-#define SWIGTYPE_p_switch_channel_state_t swig_types[6]
-#define SWIGTYPE_p_switch_channel_t swig_types[7]
-#define SWIGTYPE_p_switch_core_session_t swig_types[8]
-#define SWIGTYPE_p_switch_event_t swig_types[9]
-#define SWIGTYPE_p_switch_input_args_t swig_types[10]
-#define SWIGTYPE_p_switch_input_type_t swig_types[11]
-#define SWIGTYPE_p_switch_priority_t swig_types[12]
-#define SWIGTYPE_p_switch_size_t swig_types[13]
-#define SWIGTYPE_p_switch_status_t swig_types[14]
-#define SWIGTYPE_p_switch_stream_handle_t swig_types[15]
-#define SWIGTYPE_p_void swig_types[16]
-static swig_type_info *swig_types[18];
-static swig_module_info swig_module = {swig_types, 17, 0, 0, 0, 0};
+#define SWIGTYPE_p_lua_State swig_types[5]
+#define SWIGTYPE_p_session_flag_t swig_types[6]
+#define SWIGTYPE_p_switch_channel_state_t swig_types[7]
+#define SWIGTYPE_p_switch_channel_t swig_types[8]
+#define SWIGTYPE_p_switch_core_session_t swig_types[9]
+#define SWIGTYPE_p_switch_event_t swig_types[10]
+#define SWIGTYPE_p_switch_input_args_t swig_types[11]
+#define SWIGTYPE_p_switch_input_type_t swig_types[12]
+#define SWIGTYPE_p_switch_priority_t swig_types[13]
+#define SWIGTYPE_p_switch_size_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 SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
@@ -1520,99 +1521,13 @@
}
+#include "switch.h"
#include "switch_cpp.h"
#include "freeswitch_lua.h"
#ifdef __cplusplus
extern "C" {
#endif
-static int _wrap_console_log(lua_State* L) {
- int SWIG_arg = -1;
- char *arg1 = (char *) 0 ;
- char *arg2 = (char *) 0 ;
-
- SWIG_check_num_args("console_log",2,2)
- if(!lua_isstring(L,1)) SWIG_fail_arg("console_log",1,"char *");
- if(!lua_isstring(L,2)) SWIG_fail_arg("console_log",2,"char *");
- arg1 = (char *)lua_tostring(L, 1);
- arg2 = (char *)lua_tostring(L, 2);
- console_log(arg1,arg2);
- SWIG_arg=0;
-
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
-fail:
- lua_error(L);
- return SWIG_arg;
-}
-
-
-static int _wrap_console_clean_log(lua_State* L) {
- int SWIG_arg = -1;
- char *arg1 = (char *) 0 ;
-
- SWIG_check_num_args("console_clean_log",1,1)
- if(!lua_isstring(L,1)) SWIG_fail_arg("console_clean_log",1,"char *");
- arg1 = (char *)lua_tostring(L, 1);
- console_clean_log(arg1);
- SWIG_arg=0;
-
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
-fail:
- lua_error(L);
- return SWIG_arg;
-}
-
-
-static int _wrap_api_execute(lua_State* L) {
- int SWIG_arg = -1;
- char *arg1 = (char *) 0 ;
- char *arg2 = (char *) 0 ;
- char *result = 0 ;
-
- SWIG_check_num_args("api_execute",2,2)
- if(!lua_isstring(L,1)) SWIG_fail_arg("api_execute",1,"char *");
- if(!lua_isstring(L,2)) SWIG_fail_arg("api_execute",2,"char *");
- arg1 = (char *)lua_tostring(L, 1);
- arg2 = (char *)lua_tostring(L, 2);
- result = (char *)api_execute(arg1,arg2);
- 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_api_reply_delete(lua_State* L) {
- int SWIG_arg = -1;
- char *arg1 = (char *) 0 ;
-
- SWIG_check_num_args("api_reply_delete",1,1)
- if(!lua_isstring(L,1)) SWIG_fail_arg("api_reply_delete",1,"char *");
- arg1 = (char *)lua_tostring(L, 1);
- api_reply_delete(arg1);
- SWIG_arg=0;
-
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
-fail:
- lua_error(L);
- return SWIG_arg;
-}
-
-
static int _wrap_input_callback_state_t_function_set(lua_State* L) {
int SWIG_arg = -1;
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
@@ -2232,16 +2147,14 @@
static int _wrap_new_Event__SWIG_0(lua_State* L) {
int SWIG_arg = -1;
char *arg1 = (char *) 0 ;
- char *arg2 = (char *) NULL ;
+ char *arg2 = (char *) 0 ;
Event *result = 0 ;
- SWIG_check_num_args("Event",1,2)
+ SWIG_check_num_args("Event",2,2)
if(!lua_isstring(L,1)) SWIG_fail_arg("Event",1,"char const *");
- if(lua_gettop(L)>=2 && !lua_isstring(L,2)) SWIG_fail_arg("Event",2,"char const *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("Event",2,"char const *");
arg1 = (char *)lua_tostring(L, 1);
- if(lua_gettop(L)>=2){
- arg2 = (char *)lua_tostring(L, 2);
- }
+ arg2 = (char *)lua_tostring(L, 2);
result = (Event *)new Event((char const *)arg1,(char const *)arg2);
SWIG_arg=0;
SWIG_NewPointerObj(L,result,SWIGTYPE_p_Event,1); SWIG_arg++;
@@ -2257,21 +2170,40 @@
static int _wrap_new_Event__SWIG_1(lua_State* L) {
int SWIG_arg = -1;
+ char *arg1 = (char *) 0 ;
+ Event *result = 0 ;
+
+ SWIG_check_num_args("Event",1,1)
+ if(!lua_isstring(L,1)) SWIG_fail_arg("Event",1,"char const *");
+ arg1 = (char *)lua_tostring(L, 1);
+ result = (Event *)new Event((char const *)arg1);
+ SWIG_arg=0;
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_Event,1); SWIG_arg++;
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
+static int _wrap_new_Event__SWIG_2(lua_State* L) {
+ int SWIG_arg = -1;
switch_event_t *arg1 = (switch_event_t *) 0 ;
- int arg2 = (int) 0 ;
+ int arg2 ;
Event *result = 0 ;
- SWIG_check_num_args("Event",1,2)
+ SWIG_check_num_args("Event",2,2)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Event",1,"switch_event_t *");
- if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("Event",2,"int");
+ if(!lua_isnumber(L,2)) SWIG_fail_arg("Event",2,"int");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_switch_event_t,0))){
SWIG_fail_ptr("new_Event",1,SWIGTYPE_p_switch_event_t);
}
- if(lua_gettop(L)>=2){
- arg2 = (int)lua_tonumber(L, 2);
- }
+ arg2 = (int)lua_tonumber(L, 2);
result = (Event *)new Event(arg1,arg2);
SWIG_arg=0;
SWIG_NewPointerObj(L,result,SWIGTYPE_p_Event,1); SWIG_arg++;
@@ -2285,6 +2217,31 @@
}
+static int _wrap_new_Event__SWIG_3(lua_State* L) {
+ int SWIG_arg = -1;
+ switch_event_t *arg1 = (switch_event_t *) 0 ;
+ Event *result = 0 ;
+
+ SWIG_check_num_args("Event",1,1)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Event",1,"switch_event_t *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_switch_event_t,0))){
+ SWIG_fail_ptr("new_Event",1,SWIGTYPE_p_switch_event_t);
+ }
+
+ result = (Event *)new Event(arg1);
+ SWIG_arg=0;
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_Event,1); SWIG_arg++;
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
static int _wrap_new_Event(lua_State* L) {
int argc;
int argv[3]={
@@ -2292,7 +2249,7 @@
};
argc = lua_gettop(L);
- if ((argc >= 1) && (argc <= 2)) {
+ if (argc == 1) {
int _v;
{
void *ptr;
@@ -2303,26 +2260,43 @@
}
}
if (_v) {
- if (argc <= 1) {
- return _wrap_new_Event__SWIG_1(L);
+ return _wrap_new_Event__SWIG_3(L);
+ }
+ }
+ if (argc == 1) {
+ int _v;
+ {
+ _v = lua_isstring(L,argv[0]);
+ }
+ if (_v) {
+ return _wrap_new_Event__SWIG_1(L);
+ }
+ }
+ if (argc == 2) {
+ int _v;
+ {
+ void *ptr;
+ if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_switch_event_t, 0)) {
+ _v = 0;
+ } else {
+ _v = 1;
}
+ }
+ if (_v) {
{
_v = lua_isnumber(L,argv[1]);
}
if (_v) {
- return _wrap_new_Event__SWIG_1(L);
+ return _wrap_new_Event__SWIG_2(L);
}
}
}
- if ((argc >= 1) && (argc <= 2)) {
+ if (argc == 2) {
int _v;
{
_v = lua_isstring(L,argv[0]);
}
if (_v) {
- if (argc <= 1) {
- return _wrap_new_Event__SWIG_0(L);
- }
{
_v = lua_isstring(L,argv[1]);
}
@@ -2362,23 +2336,21 @@
}
-static int _wrap_Event_serialize(lua_State* L) {
+static int _wrap_Event_serialize__SWIG_0(lua_State* L) {
int SWIG_arg = -1;
Event *arg1 = (Event *) 0 ;
- char *arg2 = (char *) NULL ;
+ char *arg2 = (char *) 0 ;
char *result = 0 ;
- SWIG_check_num_args("serialize",1,2)
+ SWIG_check_num_args("serialize",2,2)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("serialize",1,"Event *");
- if(lua_gettop(L)>=2 && !lua_isstring(L,2)) SWIG_fail_arg("serialize",2,"char const *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("serialize",2,"char const *");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){
SWIG_fail_ptr("Event_serialize",1,SWIGTYPE_p_Event);
}
- if(lua_gettop(L)>=2){
- arg2 = (char *)lua_tostring(L, 2);
- }
+ arg2 = (char *)lua_tostring(L, 2);
result = (char *)(arg1)->serialize((char const *)arg2);
SWIG_arg=0;
lua_pushstring(L,(const char*)result); SWIG_arg++;
@@ -2392,56 +2364,19 @@
}
-static int _wrap_Event_set_priority(lua_State* L) {
- int SWIG_arg = -1;
- Event *arg1 = (Event *) 0 ;
- switch_priority_t arg2 = (switch_priority_t) SWITCH_PRIORITY_NORMAL ;
- bool result;
- switch_priority_t *argp2 ;
-
- SWIG_check_num_args("set_priority",1,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("set_priority",1,"Event *");
- if(lua_gettop(L)>=2 && !lua_isuserdata(L,2)) SWIG_fail_arg("set_priority",2,"switch_priority_t");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){
- SWIG_fail_ptr("Event_set_priority",1,SWIGTYPE_p_Event);
- }
-
- if(lua_gettop(L)>=2){
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_switch_priority_t,0))){
- SWIG_fail_ptr("Event_set_priority",2,SWIGTYPE_p_switch_priority_t);
- }
- arg2 = *argp2;
- }
- result = (bool)(arg1)->set_priority(arg2);
- SWIG_arg=0;
- lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
-fail:
- lua_error(L);
- return SWIG_arg;
-}
-
-
-static int _wrap_Event_get_header(lua_State* L) {
+static int _wrap_Event_serialize__SWIG_1(lua_State* L) {
int SWIG_arg = -1;
Event *arg1 = (Event *) 0 ;
- char *arg2 = (char *) 0 ;
char *result = 0 ;
- SWIG_check_num_args("get_header",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("get_header",1,"Event *");
- if(!lua_isstring(L,2)) SWIG_fail_arg("get_header",2,"char *");
+ SWIG_check_num_args("serialize",1,1)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("serialize",1,"Event *");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){
- SWIG_fail_ptr("Event_get_header",1,SWIGTYPE_p_Event);
+ SWIG_fail_ptr("Event_serialize",1,SWIGTYPE_p_Event);
}
- arg2 = (char *)lua_tostring(L, 2);
- result = (char *)(arg1)->get_header(arg2);
+ result = (char *)(arg1)->serialize();
SWIG_arg=0;
lua_pushstring(L,(const char*)result); SWIG_arg++;
return SWIG_arg;
@@ -2454,47 +2389,74 @@
}
-static int _wrap_Event_get_body(lua_State* L) {
- int SWIG_arg = -1;
- Event *arg1 = (Event *) 0 ;
- char *result = 0 ;
-
- SWIG_check_num_args("get_body",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("get_body",1,"Event *");
+static int _wrap_Event_serialize(lua_State* L) {
+ int argc;
+ int argv[3]={
+ 1,2,3
+ };
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){
- SWIG_fail_ptr("Event_get_body",1,SWIGTYPE_p_Event);
+ argc = lua_gettop(L);
+ if (argc == 1) {
+ int _v;
+ {
+ void *ptr;
+ if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Event, 0)) {
+ _v = 0;
+ } else {
+ _v = 1;
+ }
+ }
+ if (_v) {
+ return _wrap_Event_serialize__SWIG_1(L);
+ }
+ }
+ if (argc == 2) {
+ int _v;
+ {
+ void *ptr;
+ if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Event, 0)) {
+ _v = 0;
+ } else {
+ _v = 1;
+ }
+ }
+ if (_v) {
+ {
+ _v = lua_isstring(L,argv[1]);
+ }
+ if (_v) {
+ return _wrap_Event_serialize__SWIG_0(L);
+ }
+ }
}
- result = (char *)(arg1)->get_body();
- 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;
+ lua_pushstring(L,"No matching function for overloaded 'Event_serialize'");
+ lua_error(L);return 0;
}
-static int _wrap_Event_add_body(lua_State* L) {
+static int _wrap_Event_setPriority__SWIG_0(lua_State* L) {
int SWIG_arg = -1;
Event *arg1 = (Event *) 0 ;
- char *arg2 = (char *) 0 ;
+ switch_priority_t arg2 ;
bool result;
+ switch_priority_t *argp2 ;
- SWIG_check_num_args("add_body",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("add_body",1,"Event *");
- if(!lua_isstring(L,2)) SWIG_fail_arg("add_body",2,"char const *");
+ SWIG_check_num_args("setPriority",2,2)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setPriority",1,"Event *");
+ if(!lua_isuserdata(L,2)) SWIG_fail_arg("setPriority",2,"switch_priority_t");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){
- SWIG_fail_ptr("Event_add_body",1,SWIGTYPE_p_Event);
+ SWIG_fail_ptr("Event_setPriority",1,SWIGTYPE_p_Event);
}
- arg2 = (char *)lua_tostring(L, 2);
- result = (bool)(arg1)->add_body((char const *)arg2);
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_switch_priority_t,0))){
+ SWIG_fail_ptr("Event_setPriority",2,SWIGTYPE_p_switch_priority_t);
+ }
+ arg2 = *argp2;
+
+ result = (bool)(arg1)->setPriority(arg2);
SWIG_arg=0;
lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
return SWIG_arg;
@@ -2507,25 +2469,19 @@
}
-static int _wrap_Event_add_header(lua_State* L) {
+static int _wrap_Event_setPriority__SWIG_1(lua_State* L) {
int SWIG_arg = -1;
Event *arg1 = (Event *) 0 ;
- char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
bool result;
- SWIG_check_num_args("add_header",3,3)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("add_header",1,"Event *");
- if(!lua_isstring(L,2)) SWIG_fail_arg("add_header",2,"char const *");
- if(!lua_isstring(L,3)) SWIG_fail_arg("add_header",3,"char const *");
+ SWIG_check_num_args("setPriority",1,1)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setPriority",1,"Event *");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){
- SWIG_fail_ptr("Event_add_header",1,SWIGTYPE_p_Event);
+ SWIG_fail_ptr("Event_setPriority",1,SWIGTYPE_p_Event);
}
- arg2 = (char *)lua_tostring(L, 2);
- arg3 = (char *)lua_tostring(L, 3);
- result = (bool)(arg1)->add_header((char const *)arg2,(char const *)arg3);
+ result = (bool)(arg1)->setPriority();
SWIG_arg=0;
lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
return SWIG_arg;
@@ -2538,22 +2494,210 @@
}
-static int _wrap_Event_del_header(lua_State* L) {
- int SWIG_arg = -1;
- Event *arg1 = (Event *) 0 ;
- char *arg2 = (char *) 0 ;
- bool result;
-
- SWIG_check_num_args("del_header",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("del_header",1,"Event *");
- if(!lua_isstring(L,2)) SWIG_fail_arg("del_header",2,"char const *");
+static int _wrap_Event_setPriority(lua_State* L) {
+ int argc;
+ int argv[3]={
+ 1,2,3
+ };
+
+ argc = lua_gettop(L);
+ if (argc == 1) {
+ int _v;
+ {
+ void *ptr;
+ if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Event, 0)) {
+ _v = 0;
+ } else {
+ _v = 1;
+ }
+ }
+ if (_v) {
+ return _wrap_Event_setPriority__SWIG_1(L);
+ }
+ }
+ if (argc == 2) {
+ int _v;
+ {
+ void *ptr;
+ if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Event, 0)) {
+ _v = 0;
+ } else {
+ _v = 1;
+ }
+ }
+ if (_v) {
+ {
+ void *ptr;
+ if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_switch_priority_t, 0)) {
+ _v = 0;
+ } else {
+ _v = 1;
+ }
+ }
+ if (_v) {
+ return _wrap_Event_setPriority__SWIG_0(L);
+ }
+ }
+ }
+
+ lua_pushstring(L,"No matching function for overloaded 'Event_setPriority'");
+ lua_error(L);return 0;
+}
+
+
+static int _wrap_Event_getHeader(lua_State* L) {
+ int SWIG_arg = -1;
+ Event *arg1 = (Event *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *result = 0 ;
+
+ SWIG_check_num_args("getHeader",2,2)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getHeader",1,"Event *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("getHeader",2,"char *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){
+ SWIG_fail_ptr("Event_getHeader",1,SWIGTYPE_p_Event);
+ }
+
+ arg2 = (char *)lua_tostring(L, 2);
+ result = (char *)(arg1)->getHeader(arg2);
+ 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_Event_getBody(lua_State* L) {
+ int SWIG_arg = -1;
+ Event *arg1 = (Event *) 0 ;
+ char *result = 0 ;
+
+ SWIG_check_num_args("getBody",1,1)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getBody",1,"Event *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){
+ SWIG_fail_ptr("Event_getBody",1,SWIGTYPE_p_Event);
+ }
+
+ result = (char *)(arg1)->getBody();
+ 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_Event_getType(lua_State* L) {
+ int SWIG_arg = -1;
+ Event *arg1 = (Event *) 0 ;
+ char *result = 0 ;
+
+ SWIG_check_num_args("getType",1,1)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getType",1,"Event *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){
+ SWIG_fail_ptr("Event_getType",1,SWIGTYPE_p_Event);
+ }
+
+ result = (char *)(arg1)->getType();
+ 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_Event_addBody(lua_State* L) {
+ int SWIG_arg = -1;
+ Event *arg1 = (Event *) 0 ;
+ char *arg2 = (char *) 0 ;
+ bool result;
+
+ SWIG_check_num_args("addBody",2,2)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("addBody",1,"Event *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("addBody",2,"char const *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){
+ SWIG_fail_ptr("Event_addBody",1,SWIGTYPE_p_Event);
+ }
+
+ arg2 = (char *)lua_tostring(L, 2);
+ result = (bool)(arg1)->addBody((char const *)arg2);
+ SWIG_arg=0;
+ lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
+static int _wrap_Event_addHeader(lua_State* L) {
+ int SWIG_arg = -1;
+ Event *arg1 = (Event *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ bool result;
+
+ SWIG_check_num_args("addHeader",3,3)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("addHeader",1,"Event *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("addHeader",2,"char const *");
+ if(!lua_isstring(L,3)) SWIG_fail_arg("addHeader",3,"char const *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){
+ SWIG_fail_ptr("Event_addHeader",1,SWIGTYPE_p_Event);
+ }
+
+ arg2 = (char *)lua_tostring(L, 2);
+ arg3 = (char *)lua_tostring(L, 3);
+ result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3);
+ SWIG_arg=0;
+ lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
+static int _wrap_Event_delHeader(lua_State* L) {
+ int SWIG_arg = -1;
+ Event *arg1 = (Event *) 0 ;
+ char *arg2 = (char *) 0 ;
+ bool result;
+
+ SWIG_check_num_args("delHeader",2,2)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("delHeader",1,"Event *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("delHeader",2,"char const *");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){
- SWIG_fail_ptr("Event_del_header",1,SWIGTYPE_p_Event);
+ SWIG_fail_ptr("Event_delHeader",1,SWIGTYPE_p_Event);
}
arg2 = (char *)lua_tostring(L, 2);
- result = (bool)(arg1)->del_header((char const *)arg2);
+ result = (bool)(arg1)->delHeader((char const *)arg2);
SWIG_arg=0;
lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
return SWIG_arg;
@@ -2597,12 +2741,13 @@
}
static swig_lua_method swig_Event_methods[] = {
{"serialize", _wrap_Event_serialize},
- {"set_priority", _wrap_Event_set_priority},
- {"get_header", _wrap_Event_get_header},
- {"get_body", _wrap_Event_get_body},
- {"add_body", _wrap_Event_add_body},
- {"add_header", _wrap_Event_add_header},
- {"del_header", _wrap_Event_del_header},
+ {"setPriority", _wrap_Event_setPriority},
+ {"getHeader", _wrap_Event_getHeader},
+ {"getBody", _wrap_Event_getBody},
+ {"getType", _wrap_Event_getType},
+ {"addBody", _wrap_Event_addBody},
+ {"addHeader", _wrap_Event_addHeader},
+ {"delHeader", _wrap_Event_delHeader},
{"fire", _wrap_Event_fire},
{0,0}
};
@@ -3030,22 +3175,20 @@
}
-static int _wrap_CoreSession_hangup(lua_State* L) {
+static int _wrap_CoreSession_hangup__SWIG_0(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ;
- char *arg2 = (char *) "normal_clearing" ;
+ char *arg2 = (char *) 0 ;
- SWIG_check_num_args("hangup",1,2)
+ SWIG_check_num_args("hangup",2,2)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangup",1,"CoreSession *");
- if(lua_gettop(L)>=2 && !lua_isstring(L,2)) SWIG_fail_arg("hangup",2,"char *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("hangup",2,"char *");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
SWIG_fail_ptr("CoreSession_hangup",1,SWIGTYPE_p_CoreSession);
}
- if(lua_gettop(L)>=2){
- arg2 = (char *)lua_tostring(L, 2);
- }
+ arg2 = (char *)lua_tostring(L, 2);
(arg1)->hangup(arg2);
SWIG_arg=0;
@@ -3059,6 +3202,76 @@
}
+static int _wrap_CoreSession_hangup__SWIG_1(lua_State* L) {
+ int SWIG_arg = -1;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+
+ SWIG_check_num_args("hangup",1,1)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangup",1,"CoreSession *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
+ SWIG_fail_ptr("CoreSession_hangup",1,SWIGTYPE_p_CoreSession);
+ }
+
+ (arg1)->hangup();
+ SWIG_arg=0;
+
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
+static int _wrap_CoreSession_hangup(lua_State* L) {
+ int argc;
+ int argv[3]={
+ 1,2,3
+ };
+
+ argc = lua_gettop(L);
+ if (argc == 1) {
+ 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) {
+ return _wrap_CoreSession_hangup__SWIG_1(L);
+ }
+ }
+ if (argc == 2) {
+ 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_isstring(L,argv[1]);
+ }
+ if (_v) {
+ return _wrap_CoreSession_hangup__SWIG_0(L);
+ }
+ }
+ }
+
+ lua_pushstring(L,"No matching function for overloaded 'CoreSession_hangup'");
+ lua_error(L);return 0;
+}
+
+
static int _wrap_CoreSession_setVariable(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -3175,37 +3388,124 @@
}
-static int _wrap_CoreSession_recordFile(lua_State* L) {
+static int _wrap_CoreSession_recordFile__SWIG_0(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
- int arg3 = (int) 0 ;
- int arg4 = (int) 0 ;
- int arg5 = (int) 0 ;
+ int arg3 ;
+ int arg4 ;
+ int arg5 ;
int result;
- SWIG_check_num_args("recordFile",2,5)
+ SWIG_check_num_args("recordFile",5,5)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("recordFile",1,"CoreSession *");
if(!lua_isstring(L,2)) SWIG_fail_arg("recordFile",2,"char *");
- if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("recordFile",3,"int");
- if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg("recordFile",4,"int");
- if(lua_gettop(L)>=5 && !lua_isnumber(L,5)) SWIG_fail_arg("recordFile",5,"int");
+ if(!lua_isnumber(L,3)) SWIG_fail_arg("recordFile",3,"int");
+ if(!lua_isnumber(L,4)) SWIG_fail_arg("recordFile",4,"int");
+ if(!lua_isnumber(L,5)) SWIG_fail_arg("recordFile",5,"int");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
SWIG_fail_ptr("CoreSession_recordFile",1,SWIGTYPE_p_CoreSession);
}
arg2 = (char *)lua_tostring(L, 2);
- if(lua_gettop(L)>=3){
- arg3 = (int)lua_tonumber(L, 3);
+ arg3 = (int)lua_tonumber(L, 3);
+ arg4 = (int)lua_tonumber(L, 4);
+ arg5 = (int)lua_tonumber(L, 5);
+ result = (int)(arg1)->recordFile(arg2,arg3,arg4,arg5);
+ SWIG_arg=0;
+ lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
+static int _wrap_CoreSession_recordFile__SWIG_1(lua_State* L) {
+ int SWIG_arg = -1;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int arg3 ;
+ int arg4 ;
+ int result;
+
+ SWIG_check_num_args("recordFile",4,4)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("recordFile",1,"CoreSession *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("recordFile",2,"char *");
+ if(!lua_isnumber(L,3)) SWIG_fail_arg("recordFile",3,"int");
+ if(!lua_isnumber(L,4)) SWIG_fail_arg("recordFile",4,"int");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
+ SWIG_fail_ptr("CoreSession_recordFile",1,SWIGTYPE_p_CoreSession);
}
- if(lua_gettop(L)>=4){
- arg4 = (int)lua_tonumber(L, 4);
+
+ arg2 = (char *)lua_tostring(L, 2);
+ arg3 = (int)lua_tonumber(L, 3);
+ arg4 = (int)lua_tonumber(L, 4);
+ result = (int)(arg1)->recordFile(arg2,arg3,arg4);
+ SWIG_arg=0;
+ lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
+static int _wrap_CoreSession_recordFile__SWIG_2(lua_State* L) {
+ int SWIG_arg = -1;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int arg3 ;
+ int result;
+
+ SWIG_check_num_args("recordFile",3,3)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("recordFile",1,"CoreSession *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("recordFile",2,"char *");
+ if(!lua_isnumber(L,3)) SWIG_fail_arg("recordFile",3,"int");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
+ SWIG_fail_ptr("CoreSession_recordFile",1,SWIGTYPE_p_CoreSession);
}
- if(lua_gettop(L)>=5){
- arg5 = (int)lua_tonumber(L, 5);
+
+ arg2 = (char *)lua_tostring(L, 2);
+ arg3 = (int)lua_tonumber(L, 3);
+ result = (int)(arg1)->recordFile(arg2,arg3);
+ SWIG_arg=0;
+ lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
+static int _wrap_CoreSession_recordFile__SWIG_3(lua_State* L) {
+ int SWIG_arg = -1;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int result;
+
+ SWIG_check_num_args("recordFile",2,2)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("recordFile",1,"CoreSession *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("recordFile",2,"char *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
+ SWIG_fail_ptr("CoreSession_recordFile",1,SWIGTYPE_p_CoreSession);
}
- result = (int)(arg1)->recordFile(arg2,arg3,arg4,arg5);
+
+ arg2 = (char *)lua_tostring(L, 2);
+ result = (int)(arg1)->recordFile(arg2);
SWIG_arg=0;
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
return SWIG_arg;
@@ -3218,6 +3518,125 @@
}
+static int _wrap_CoreSession_recordFile(lua_State* L) {
+ int argc;
+ int argv[6]={
+ 1,2,3,4,5,6
+ };
+
+ argc = lua_gettop(L);
+ if (argc == 2) {
+ 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_isstring(L,argv[1]);
+ }
+ if (_v) {
+ return _wrap_CoreSession_recordFile__SWIG_3(L);
+ }
+ }
+ }
+ if (argc == 3) {
+ 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_isstring(L,argv[1]);
+ }
+ if (_v) {
+ {
+ _v = lua_isnumber(L,argv[2]);
+ }
+ if (_v) {
+ return _wrap_CoreSession_recordFile__SWIG_2(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_isstring(L,argv[1]);
+ }
+ if (_v) {
+ {
+ _v = lua_isnumber(L,argv[2]);
+ }
+ if (_v) {
+ {
+ _v = lua_isnumber(L,argv[3]);
+ }
+ if (_v) {
+ return _wrap_CoreSession_recordFile__SWIG_1(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_isstring(L,argv[1]);
+ }
+ if (_v) {
+ {
+ _v = lua_isnumber(L,argv[2]);
+ }
+ if (_v) {
+ {
+ _v = lua_isnumber(L,argv[3]);
+ }
+ if (_v) {
+ {
+ _v = lua_isnumber(L,argv[4]);
+ }
+ if (_v) {
+ return _wrap_CoreSession_recordFile__SWIG_0(L);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ lua_pushstring(L,"No matching function for overloaded 'CoreSession_recordFile'");
+ lua_error(L);return 0;
+}
+
+
static int _wrap_CoreSession_setCallerData(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -3233,11 +3652,49 @@
SWIG_fail_ptr("CoreSession_setCallerData",1,SWIGTYPE_p_CoreSession);
}
- arg2 = (char *)lua_tostring(L, 2);
+ arg2 = (char *)lua_tostring(L, 2);
+ arg3 = (char *)lua_tostring(L, 3);
+ (arg1)->setCallerData(arg2,arg3);
+ SWIG_arg=0;
+
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
+static int _wrap_CoreSession_originate__SWIG_0(lua_State* L) {
+ int SWIG_arg = -1;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ CoreSession *arg2 = (CoreSession *) 0 ;
+ char *arg3 = (char *) 0 ;
+ int arg4 ;
+ int result;
+
+ SWIG_check_num_args("originate",4,4)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("originate",1,"CoreSession *");
+ if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("originate",2,"CoreSession *");
+ if(!lua_isstring(L,3)) SWIG_fail_arg("originate",3,"char *");
+ if(!lua_isnumber(L,4)) SWIG_fail_arg("originate",4,"int");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
+ SWIG_fail_ptr("CoreSession_originate",1,SWIGTYPE_p_CoreSession);
+ }
+
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_CoreSession,0))){
+ SWIG_fail_ptr("CoreSession_originate",2,SWIGTYPE_p_CoreSession);
+ }
+
arg3 = (char *)lua_tostring(L, 3);
- (arg1)->setCallerData(arg2,arg3);
+ arg4 = (int)lua_tonumber(L, 4);
+ result = (int)(arg1)->originate(arg2,arg3,arg4);
SWIG_arg=0;
-
+ lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
return SWIG_arg;
if(0) SWIG_fail;
@@ -3248,19 +3705,17 @@
}
-static int _wrap_CoreSession_originate(lua_State* L) {
+static int _wrap_CoreSession_originate__SWIG_1(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ;
CoreSession *arg2 = (CoreSession *) 0 ;
char *arg3 = (char *) 0 ;
- int arg4 = (int) 60 ;
int result;
- SWIG_check_num_args("originate",3,4)
+ SWIG_check_num_args("originate",3,3)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("originate",1,"CoreSession *");
if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("originate",2,"CoreSession *");
if(!lua_isstring(L,3)) SWIG_fail_arg("originate",3,"char *");
- if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg("originate",4,"int");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
SWIG_fail_ptr("CoreSession_originate",1,SWIGTYPE_p_CoreSession);
@@ -3272,10 +3727,7 @@
}
arg3 = (char *)lua_tostring(L, 3);
- if(lua_gettop(L)>=4){
- arg4 = (int)lua_tonumber(L, 4);
- }
- result = (int)(arg1)->originate(arg2,arg3,arg4);
+ result = (int)(arg1)->originate(arg2,arg3);
SWIG_arg=0;
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
return SWIG_arg;
@@ -3288,6 +3740,82 @@
}
+static int _wrap_CoreSession_originate(lua_State* L) {
+ int argc;
+ int argv[5]={
+ 1,2,3,4,5
+ };
+
+ argc = lua_gettop(L);
+ if (argc == 3) {
+ 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) {
+ {
+ void *ptr;
+ if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) {
+ _v = 0;
+ } else {
+ _v = 1;
+ }
+ }
+ if (_v) {
+ {
+ _v = lua_isstring(L,argv[2]);
+ }
+ if (_v) {
+ return _wrap_CoreSession_originate__SWIG_1(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) {
+ {
+ void *ptr;
+ if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) {
+ _v = 0;
+ } else {
+ _v = 1;
+ }
+ }
+ if (_v) {
+ {
+ _v = lua_isstring(L,argv[2]);
+ }
+ if (_v) {
+ {
+ _v = lua_isnumber(L,argv[3]);
+ }
+ if (_v) {
+ return _wrap_CoreSession_originate__SWIG_0(L);
+ }
+ }
+ }
+ }
+ }
+
+ lua_pushstring(L,"No matching function for overloaded 'CoreSession_originate'");
+ lua_error(L);return 0;
+}
+
+
static int _wrap_CoreSession_setDTMFCallback(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -3545,26 +4073,24 @@
}
-static int _wrap_CoreSession_streamFile(lua_State* L) {
+static int _wrap_CoreSession_streamFile__SWIG_0(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
- int arg3 = (int) 0 ;
+ int arg3 ;
int result;
- SWIG_check_num_args("streamFile",2,3)
+ SWIG_check_num_args("streamFile",3,3)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("streamFile",1,"CoreSession *");
if(!lua_isstring(L,2)) SWIG_fail_arg("streamFile",2,"char *");
- if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("streamFile",3,"int");
+ if(!lua_isnumber(L,3)) SWIG_fail_arg("streamFile",3,"int");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
SWIG_fail_ptr("CoreSession_streamFile",1,SWIGTYPE_p_CoreSession);
}
arg2 = (char *)lua_tostring(L, 2);
- if(lua_gettop(L)>=3){
- arg3 = (int)lua_tonumber(L, 3);
- }
+ arg3 = (int)lua_tonumber(L, 3);
result = (int)(arg1)->streamFile(arg2,arg3);
SWIG_arg=0;
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
@@ -3578,6 +4104,90 @@
}
+static int _wrap_CoreSession_streamFile__SWIG_1(lua_State* L) {
+ int SWIG_arg = -1;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int result;
+
+ SWIG_check_num_args("streamFile",2,2)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("streamFile",1,"CoreSession *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("streamFile",2,"char *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
+ SWIG_fail_ptr("CoreSession_streamFile",1,SWIGTYPE_p_CoreSession);
+ }
+
+ arg2 = (char *)lua_tostring(L, 2);
+ result = (int)(arg1)->streamFile(arg2);
+ SWIG_arg=0;
+ lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
+static int _wrap_CoreSession_streamFile(lua_State* L) {
+ int argc;
+ int argv[4]={
+ 1,2,3,4
+ };
+
+ argc = lua_gettop(L);
+ if (argc == 2) {
+ 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_isstring(L,argv[1]);
+ }
+ if (_v) {
+ return _wrap_CoreSession_streamFile__SWIG_1(L);
+ }
+ }
+ }
+ if (argc == 3) {
+ 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_isstring(L,argv[1]);
+ }
+ if (_v) {
+ {
+ _v = lua_isnumber(L,argv[2]);
+ }
+ if (_v) {
+ return _wrap_CoreSession_streamFile__SWIG_0(L);
+ }
+ }
+ }
+ }
+
+ lua_pushstring(L,"No matching function for overloaded 'CoreSession_streamFile'");
+ lua_error(L);return 0;
+}
+
+
static int _wrap_CoreSession_flushEvents(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -3987,6 +4597,93 @@
static const char *swig_CoreSession_base_names[] = {0};
static swig_lua_class _wrap_class_CoreSession = { "CoreSession", &SWIGTYPE_p_CoreSession,0, swig_delete_CoreSession, swig_CoreSession_methods, swig_CoreSession_attributes, swig_CoreSession_bases, swig_CoreSession_base_names };
+static int _wrap_console_log(lua_State* L) {
+ int SWIG_arg = -1;
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+
+ SWIG_check_num_args("console_log",2,2)
+ if(!lua_isstring(L,1)) SWIG_fail_arg("console_log",1,"char *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("console_log",2,"char *");
+ arg1 = (char *)lua_tostring(L, 1);
+ arg2 = (char *)lua_tostring(L, 2);
+ console_log(arg1,arg2);
+ SWIG_arg=0;
+
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
+static int _wrap_console_clean_log(lua_State* L) {
+ int SWIG_arg = -1;
+ char *arg1 = (char *) 0 ;
+
+ SWIG_check_num_args("console_clean_log",1,1)
+ if(!lua_isstring(L,1)) SWIG_fail_arg("console_clean_log",1,"char *");
+ arg1 = (char *)lua_tostring(L, 1);
+ console_clean_log(arg1);
+ SWIG_arg=0;
+
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
+static int _wrap_api_execute(lua_State* L) {
+ int SWIG_arg = -1;
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *result = 0 ;
+
+ SWIG_check_num_args("api_execute",2,2)
+ if(!lua_isstring(L,1)) SWIG_fail_arg("api_execute",1,"char *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("api_execute",2,"char *");
+ arg1 = (char *)lua_tostring(L, 1);
+ arg2 = (char *)lua_tostring(L, 2);
+ result = (char *)api_execute(arg1,arg2);
+ 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_api_reply_delete(lua_State* L) {
+ int SWIG_arg = -1;
+ char *arg1 = (char *) 0 ;
+
+ SWIG_check_num_args("api_reply_delete",1,1)
+ if(!lua_isstring(L,1)) SWIG_fail_arg("api_reply_delete",1,"char *");
+ arg1 = (char *)lua_tostring(L, 1);
+ api_reply_delete(arg1);
+ SWIG_arg=0;
+
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
static int _wrap_bridge(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = 0 ;
@@ -4099,7 +4796,7 @@
SWIG_check_num_args("Session",0,0)
result = (Session *)new Session();
SWIG_arg=0;
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setPrivate("__L", L);
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setLUA(L);
return SWIG_arg;
if(0) SWIG_fail;
@@ -4120,7 +4817,7 @@
arg1 = (char *)lua_tostring(L, 1);
result = (Session *)new Session(arg1);
SWIG_arg=0;
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setPrivate("__L", L);
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setLUA(L);
return SWIG_arg;
if(0) SWIG_fail;
@@ -4145,7 +4842,7 @@
result = (Session *)new Session(arg1);
SWIG_arg=0;
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setPrivate("__L", L);
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setLUA(L);
return SWIG_arg;
if(0) SWIG_fail;
@@ -4391,6 +5088,31 @@
}
+static int _wrap_Session_ready(lua_State* L) {
+ int SWIG_arg = -1;
+ Session *arg1 = (Session *) 0 ;
+ bool result;
+
+ SWIG_check_num_args("ready",1,1)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ready",1,"Session *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
+ SWIG_fail_ptr("Session_ready",1,SWIGTYPE_p_Session);
+ }
+
+ result = (bool)(arg1)->ready();
+ SWIG_arg=0;
+ lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
static int _wrap_Session_cb_function_set(lua_State* L) {
int SWIG_arg = -1;
Session *arg1 = (Session *) 0 ;
@@ -4571,6 +5293,32 @@
}
+static int _wrap_Session_setLUA(lua_State* L) {
+ int SWIG_arg = -1;
+ Session *arg1 = (Session *) 0 ;
+ lua_State *arg2 = (lua_State *) 0 ;
+
+ arg2 = L;
+ SWIG_check_num_args("setLUA",1,1)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLUA",1,"Session *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Session,0))){
+ SWIG_fail_ptr("Session_setLUA",1,SWIGTYPE_p_Session);
+ }
+
+ (arg1)->setLUA(arg2);
+ SWIG_arg=0;
+
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
static void swig_delete_Session(void *obj) {
Session *arg1 = (Session *) obj;
delete arg1;
@@ -4582,6 +5330,8 @@
{"run_dtmf_callback", _wrap_Session_run_dtmf_callback},
{"setInputCallback", _wrap_Session_setInputCallback},
{"setHangupHook", _wrap_Session_setHangupHook},
+ {"ready", _wrap_Session_ready},
+ {"setLUA", _wrap_Session_setLUA},
{0,0}
};
static swig_lua_attribute swig_Session_attributes[] = {
@@ -4630,6 +5380,7 @@
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};
+static swig_type_info _swigt__p_lua_State = {"_p_lua_State", "lua_State *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_session_flag_t = {"_p_session_flag_t", "enum session_flag_t *|session_flag_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_switch_channel_state_t = {"_p_switch_channel_state_t", "switch_channel_state_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_switch_channel_t = {"_p_switch_channel_t", "switch_channel_t *", 0, 0, (void*)0, 0};
@@ -4649,6 +5400,7 @@
&_swigt__p_Session,
&_swigt__p_Stream,
&_swigt__p_input_callback_state,
+ &_swigt__p_lua_State,
&_swigt__p_session_flag_t,
&_swigt__p_switch_channel_state_t,
&_swigt__p_switch_channel_t,
@@ -4668,6 +5420,7 @@
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}};
+static swig_cast_info _swigc__p_lua_State[] = { {&_swigt__p_lua_State, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_session_flag_t[] = { {&_swigt__p_session_flag_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_switch_channel_state_t[] = { {&_swigt__p_switch_channel_state_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_switch_channel_t[] = { {&_swigt__p_switch_channel_t, 0, 0, 0},{0, 0, 0, 0}};
@@ -4687,6 +5440,7 @@
_swigc__p_Session,
_swigc__p_Stream,
_swigc__p_input_callback_state,
+ _swigc__p_lua_State,
_swigc__p_session_flag_t,
_swigc__p_switch_channel_state_t,
_swigc__p_switch_channel_t,
Added: freeswitch/trunk/src/mod/languages/mod_lua/my_swigable_cpp.h
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/languages/mod_lua/my_swigable_cpp.h Wed Apr 30 15:42:26 2008
@@ -0,0 +1,196 @@
+typedef struct input_callback_state {
+ void *function;
+
+ void *threadState;
+
+ void *extra;
+ char *funcargs;
+} input_callback_state_t;
+
+typedef enum {
+ S_HUP = (1 << 0),
+ S_FREE = (1 << 1),
+ S_RDLOCK = (1 << 2)
+} session_flag_t;
+
+class Stream {
+ protected:
+ switch_stream_handle_t mystream;
+ switch_stream_handle_t *stream_p;
+ int mine;
+ public:
+ Stream(void);
+ Stream(switch_stream_handle_t *);
+ virtual ~Stream();
+ void write(const char *data);
+ const char *get_data(void);
+};
+
+class Event {
+ protected:
+ public:
+ switch_event_t *event;
+ char *serialized_string;
+ int mine;
+
+ Event(const char *type, const char *subclass_name = NULL);
+ Event(switch_event_t *wrap_me, int free_me=0);
+ virtual ~Event();
+ const char *serialize(const char *format=NULL);
+ bool setPriority(switch_priority_t priority = SWITCH_PRIORITY_NORMAL);
+ char *getHeader(char *header_name);
+ char *getBody(void);
+ char *getType(void);
+ bool addBody(const char *value);
+ bool addHeader(const char *header_name, const char *value);
+ bool delHeader(const char *header_name);
+ bool fire(void);
+
+};
+
+
+class CoreSession {
+ protected:
+ switch_input_args_t args;
+
+ switch_input_args_t *ap;
+ switch_caller_profile_t caller_profile;
+
+ char *uuid;
+ char *tts_name;
+ char *voice_name;
+ void store_file_handle(switch_file_handle_t *fh);
+ void *on_hangup;
+ switch_file_handle_t local_fh;
+ switch_file_handle_t *fhp;
+ switch_status_t process_callback_result(char *ret);
+ public:
+ CoreSession();
+ CoreSession(char *uuid);
+ CoreSession(switch_core_session_t *new_session);
+ virtual ~CoreSession();
+ switch_core_session_t *session;
+ switch_channel_t *channel;
+ unsigned int flags;
+ int allocated;
+ input_callback_state cb_state;
+
+ switch_channel_state_t hook_state;
+
+ int answer();
+ int preAnswer();
+ virtual void hangup(char *cause = "normal_clearing");
+ void setVariable(char *var, char *val);
+ void setPrivate(char *var, void *val);
+ void *getPrivate(char *var);
+ const char *getVariable(char *var);
+ int recordFile(char *file_name, int max_len=0, int silence_threshold=0, int silence_secs=0);
+
+
+
+
+
+
+ void setCallerData(char *var, char *val);
+ int originate(CoreSession *a_leg_session,
+ char *dest,
+ int timeout=60);
+ void setDTMFCallback(void *cbfunc, char *funcargs);
+
+ int speak(char *text);
+ void set_tts_parms(char *tts_name, char *voice_name);
+
+
+
+
+
+ int collectDigits(int timeout);
+ int getDigits(char *dtmf_buf,
+ switch_size_t buflen,
+ switch_size_t maxdigits,
+ char *terminators,
+ char *terminator,
+ int timeout);
+
+ int transfer(char *extensions, char *dialplan, char *context);
+ int playAndGetDigits(int min_digits,
+ int max_digits,
+ int max_tries,
+ int timeout,
+ char *terminators,
+ char *audio_files,
+ char *bad_input_audio_files,
+ char *dtmf_buf,
+ char *digits_regex);
+ int streamFile(char *file, int starting_sample_count=0);
+
+
+
+ int flushEvents();
+
+
+
+ int flushDigits();
+
+ int setAutoHangup(bool val);
+
+
+
+
+ void setHangupHook(void *hangup_func);
+
+ bool ready();
+
+ void execute(char *app, char *data);
+
+ void sendEvent(Event *sendME);
+
+ virtual bool begin_allow_threads() = 0;
+ virtual bool end_allow_threads() = 0;
+
+
+
+
+ char* get_uuid() const { return uuid; };
+
+
+
+
+ const switch_input_args_t& get_cb_args() const { return args; };
+
+
+
+ virtual void check_hangup_hook() = 0;
+
+ virtual switch_status_t run_dtmf_callback(void *input,
+ switch_input_type_t itype) = 0;
+
+};
+
+
+
+
+void console_log(char *level_str, char *msg);
+void console_clean_log(char *msg);
+char *api_execute(char *cmd, char *arg);
+void api_reply_delete(char *reply);
+
+
+
+
+
+
+void bridge(CoreSession &session_a, CoreSession &session_b);
+
+
+
+
+
+
+switch_status_t hanguphook(switch_core_session_t *session);
+
+switch_status_t dtmf_callback(switch_core_session_t *session,
+ void *input,
+ switch_input_type_t itype,
+ void *buf,
+ unsigned int buflen);
Modified: freeswitch/trunk/src/mod/languages/mod_perl/Makefile
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/Makefile (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/Makefile Wed Apr 30 15:42:26 2008
@@ -9,10 +9,11 @@
include $(BASE)/build/modmake.rules
+
swigclean: clean
- rm mod_perl_wrap.*
+ rm -f mod_perl_wrap.*
-mod_perl_wrap.cpp: $(TOLUA_A)
+mod_perl_wrap.cpp:
swig -static -shadow -perl5 -c++ -DMULTIPLICITY -I../../../../src/include -o mod_perl_wrap.cpp freeswitch.i
freeswitch.$(DYNAMIC_LIB_EXTEN): $(LOCAL_OBJS) $(LOCAL_LIBADD)
Modified: freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.i
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.i (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.i Wed Apr 30 15:42:26 2008
@@ -23,7 +23,7 @@
* tell swig to grok everything defined in these header files and
* build all sorts of c wrappers and lua shadows of the c wrappers.
*/
-%include switch_cpp.h
+%include switch_swigable_cpp.h
%include freeswitch_perl.h
Modified: freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm Wed Apr 30 15:42:26 2008
@@ -171,12 +171,13 @@
}
*serialize = *freeswitchc::Event_serialize;
-*set_priority = *freeswitchc::Event_set_priority;
-*get_header = *freeswitchc::Event_get_header;
-*get_body = *freeswitchc::Event_get_body;
-*add_body = *freeswitchc::Event_add_body;
-*add_header = *freeswitchc::Event_add_header;
-*del_header = *freeswitchc::Event_del_header;
+*setPriority = *freeswitchc::Event_setPriority;
+*getHeader = *freeswitchc::Event_getHeader;
+*getBody = *freeswitchc::Event_getBody;
+*getType = *freeswitchc::Event_getType;
+*addBody = *freeswitchc::Event_addBody;
+*addHeader = *freeswitchc::Event_addHeader;
+*delHeader = *freeswitchc::Event_delHeader;
*fire = *freeswitchc::Event_fire;
sub DISOWN {
my $self = shift;
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 Wed Apr 30 15:42:26 2008
@@ -1855,141 +1855,6 @@
#ifdef __cplusplus
extern "C" {
#endif
-XS(_wrap_console_log) {
- {
- char *arg1 = (char *) 0 ;
- char *arg2 = (char *) 0 ;
- int res1 ;
- char *buf1 = 0 ;
- int alloc1 = 0 ;
- int res2 ;
- char *buf2 = 0 ;
- int alloc2 = 0 ;
- int argvi = 0;
- dXSARGS;
-
- if ((items < 2) || (items > 2)) {
- SWIG_croak("Usage: console_log(level_str,msg);");
- }
- res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "console_log" "', argument " "1"" of type '" "char *""'");
- }
- arg1 = reinterpret_cast< char * >(buf1);
- res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "console_log" "', argument " "2"" of type '" "char *""'");
- }
- arg2 = reinterpret_cast< char * >(buf2);
- console_log(arg1,arg2);
-
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
- XSRETURN(argvi);
- fail:
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
- SWIG_croak_null();
- }
-}
-
-
-XS(_wrap_console_clean_log) {
- {
- char *arg1 = (char *) 0 ;
- int res1 ;
- char *buf1 = 0 ;
- int alloc1 = 0 ;
- int argvi = 0;
- dXSARGS;
-
- if ((items < 1) || (items > 1)) {
- SWIG_croak("Usage: console_clean_log(msg);");
- }
- res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "console_clean_log" "', argument " "1"" of type '" "char *""'");
- }
- arg1 = reinterpret_cast< char * >(buf1);
- console_clean_log(arg1);
-
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- XSRETURN(argvi);
- fail:
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- SWIG_croak_null();
- }
-}
-
-
-XS(_wrap_api_execute) {
- {
- char *arg1 = (char *) 0 ;
- char *arg2 = (char *) 0 ;
- char *result = 0 ;
- int res1 ;
- char *buf1 = 0 ;
- int alloc1 = 0 ;
- int res2 ;
- char *buf2 = 0 ;
- int alloc2 = 0 ;
- int argvi = 0;
- dXSARGS;
-
- if ((items < 2) || (items > 2)) {
- SWIG_croak("Usage: api_execute(cmd,arg);");
- }
- res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "api_execute" "', argument " "1"" of type '" "char *""'");
- }
- arg1 = reinterpret_cast< char * >(buf1);
- res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "api_execute" "', argument " "2"" of type '" "char *""'");
- }
- arg2 = reinterpret_cast< char * >(buf2);
- result = (char *)api_execute(arg1,arg2);
- ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
- XSRETURN(argvi);
- fail:
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
- SWIG_croak_null();
- }
-}
-
-
-XS(_wrap_api_reply_delete) {
- {
- char *arg1 = (char *) 0 ;
- int res1 ;
- char *buf1 = 0 ;
- int alloc1 = 0 ;
- int argvi = 0;
- dXSARGS;
-
- if ((items < 1) || (items > 1)) {
- SWIG_croak("Usage: api_reply_delete(reply);");
- }
- res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "api_reply_delete" "', argument " "1"" of type '" "char *""'");
- }
- arg1 = reinterpret_cast< char * >(buf1);
- api_reply_delete(arg1);
-
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- XSRETURN(argvi);
- fail:
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- SWIG_croak_null();
- }
-}
-
-
XS(_wrap_input_callback_state_t_function_set) {
{
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
@@ -2696,7 +2561,7 @@
XS(_wrap_new_Event__SWIG_0) {
{
char *arg1 = (char *) 0 ;
- char *arg2 = (char *) NULL ;
+ char *arg2 = (char *) 0 ;
Event *result = 0 ;
int res1 ;
char *buf1 = 0 ;
@@ -2707,7 +2572,7 @@
int argvi = 0;
dXSARGS;
- if ((items < 1) || (items > 2)) {
+ if ((items < 2) || (items > 2)) {
SWIG_croak("Usage: new_Event(type,subclass_name);");
}
res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
@@ -2715,13 +2580,11 @@
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "char const *""'");
}
arg1 = reinterpret_cast< char * >(buf1);
- if (items > 1) {
- res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Event" "', argument " "2"" of type '" "char const *""'");
- }
- arg2 = reinterpret_cast< char * >(buf2);
+ res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Event" "', argument " "2"" of type '" "char const *""'");
}
+ arg2 = reinterpret_cast< char * >(buf2);
result = (Event *)new Event((char const *)arg1,(char const *)arg2);
ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
@@ -2737,8 +2600,37 @@
XS(_wrap_new_Event__SWIG_1) {
{
+ char *arg1 = (char *) 0 ;
+ Event *result = 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: new_Event(type);");
+ }
+ res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "char const *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ result = (Event *)new Event((char const *)arg1);
+ ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ XSRETURN(argvi);
+ fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_new_Event__SWIG_2) {
+ {
switch_event_t *arg1 = (switch_event_t *) 0 ;
- int arg2 = (int) 0 ;
+ int arg2 ;
Event *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -2747,7 +2639,7 @@
int argvi = 0;
dXSARGS;
- if ((items < 1) || (items > 2)) {
+ if ((items < 2) || (items > 2)) {
SWIG_croak("Usage: new_Event(wrap_me,free_me);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_switch_event_t, 0 | 0 );
@@ -2755,13 +2647,11 @@
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "switch_event_t *""'");
}
arg1 = reinterpret_cast< switch_event_t * >(argp1);
- if (items > 1) {
- ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
- if (!SWIG_IsOK(ecode2)) {
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Event" "', argument " "2"" of type '" "int""'");
- }
- arg2 = static_cast< int >(val2);
- }
+ ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Event" "', argument " "2"" of type '" "int""'");
+ }
+ arg2 = static_cast< int >(val2);
result = (Event *)new Event(arg1,arg2);
ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
@@ -2775,13 +2665,41 @@
}
+XS(_wrap_new_Event__SWIG_3) {
+ {
+ switch_event_t *arg1 = (switch_event_t *) 0 ;
+ Event *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: new_Event(wrap_me);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_switch_event_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "switch_event_t *""'");
+ }
+ arg1 = reinterpret_cast< switch_event_t * >(argp1);
+ result = (Event *)new Event(arg1);
+ ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
+
+ XSRETURN(argvi);
+ fail:
+
+ SWIG_croak_null();
+ }
+}
+
+
XS(_wrap_new_Event) {
dXSARGS;
{
unsigned long _index = 0;
SWIG_TypeRank _rank = 0;
- if ((items >= 1) && (items <= 2)) {
+ if (items == 1) {
SWIG_TypeRank _ranki = 0;
SWIG_TypeRank _rankm = 0;
SWIG_TypeRank _pi = 1;
@@ -2795,18 +2713,6 @@
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
- if (items > 1) {
- {
- {
- 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;
- }
if (!_index || (_ranki < _rank)) {
_rank = _ranki; _index = 1;
if (_rank == _rankm) goto dispatch;
@@ -2814,7 +2720,7 @@
}
check_1:
- if ((items >= 1) && (items <= 2)) {
+ if (items == 1) {
SWIG_TypeRank _ranki = 0;
SWIG_TypeRank _rankm = 0;
SWIG_TypeRank _pi = 1;
@@ -2827,28 +2733,81 @@
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
- if (items > 1) {
+ if (!_index || (_ranki < _rank)) {
+ _rank = _ranki; _index = 2;
+ if (_rank == _rankm) goto dispatch;
+ }
+ }
+ check_2:
+
+ if (items == 2) {
+ 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_switch_event_t, 0);
+ _v = SWIG_CheckState(res);
+ }
+ if (!_v) goto check_3;
+ _ranki += _v*_pi;
+ _rankm += _pi;
+ _pi *= SWIG_MAXCASTRANK;
+ {
{
- int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
+ 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;
}
+ if (!_v) goto check_3;
+ _ranki += _v*_pi;
+ _rankm += _pi;
+ _pi *= SWIG_MAXCASTRANK;
if (!_index || (_ranki < _rank)) {
- _rank = _ranki; _index = 2;
+ _rank = _ranki; _index = 3;
if (_rank == _rankm) goto dispatch;
}
}
- check_2:
+ check_3:
+
+ if (items == 2) {
+ SWIG_TypeRank _ranki = 0;
+ SWIG_TypeRank _rankm = 0;
+ SWIG_TypeRank _pi = 1;
+ int _v = 0;
+ {
+ int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0);
+ _v = SWIG_CheckState(res);
+ }
+ if (!_v) goto check_4;
+ _ranki += _v*_pi;
+ _rankm += _pi;
+ _pi *= SWIG_MAXCASTRANK;
+ {
+ int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
+ _v = SWIG_CheckState(res);
+ }
+ if (!_v) goto check_4;
+ _ranki += _v*_pi;
+ _rankm += _pi;
+ _pi *= SWIG_MAXCASTRANK;
+ if (!_index || (_ranki < _rank)) {
+ _rank = _ranki; _index = 4;
+ if (_rank == _rankm) goto dispatch;
+ }
+ }
+ check_4:
dispatch:
switch(_index) {
case 1:
- ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Event__SWIG_1); return;
+ ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Event__SWIG_3); return;
case 2:
+ ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Event__SWIG_1); return;
+ case 3:
+ ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Event__SWIG_2); return;
+ case 4:
++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Event__SWIG_0); return;
}
}
@@ -2886,10 +2845,10 @@
}
-XS(_wrap_Event_serialize) {
+XS(_wrap_Event_serialize__SWIG_0) {
{
Event *arg1 = (Event *) 0 ;
- char *arg2 = (char *) NULL ;
+ char *arg2 = (char *) 0 ;
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -2899,7 +2858,7 @@
int argvi = 0;
dXSARGS;
- if ((items < 1) || (items > 2)) {
+ if ((items < 2) || (items > 2)) {
SWIG_croak("Usage: Event_serialize(self,format);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 );
@@ -2907,13 +2866,11 @@
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialize" "', argument " "1"" of type '" "Event *""'");
}
arg1 = reinterpret_cast< Event * >(argp1);
- if (items > 1) {
- res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_serialize" "', argument " "2"" of type '" "char const *""'");
- }
- arg2 = reinterpret_cast< char * >(buf2);
+ res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_serialize" "', argument " "2"" of type '" "char const *""'");
}
+ arg2 = reinterpret_cast< char * >(buf2);
result = (char *)(arg1)->serialize((char const *)arg2);
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
@@ -2927,10 +2884,108 @@
}
-XS(_wrap_Event_set_priority) {
+XS(_wrap_Event_serialize__SWIG_1) {
+ {
+ Event *arg1 = (Event *) 0 ;
+ char *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: Event_serialize(self);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialize" "', argument " "1"" of type '" "Event *""'");
+ }
+ arg1 = reinterpret_cast< Event * >(argp1);
+ result = (char *)(arg1)->serialize();
+ ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
+
+ XSRETURN(argvi);
+ fail:
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_Event_serialize) {
+ dXSARGS;
+
+ {
+ unsigned long _index = 0;
+ SWIG_TypeRank _rank = 0;
+ if (items == 1) {
+ 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_Event, 0);
+ _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 == 2) {
+ 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_Event, 0);
+ _v = SWIG_CheckState(res);
+ }
+ if (!_v) goto check_2;
+ _ranki += _v*_pi;
+ _rankm += _pi;
+ _pi *= SWIG_MAXCASTRANK;
+ {
+ int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
+ _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_Event_serialize__SWIG_1); return;
+ case 2:
+ ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Event_serialize__SWIG_0); return;
+ }
+ }
+
+ croak("No matching function for overloaded 'Event_serialize'");
+ XSRETURN(0);
+}
+
+
+XS(_wrap_Event_setPriority__SWIG_0) {
{
Event *arg1 = (Event *) 0 ;
- switch_priority_t arg2 = (switch_priority_t) SWITCH_PRIORITY_NORMAL ;
+ switch_priority_t arg2 ;
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -2939,28 +2994,54 @@
int argvi = 0;
dXSARGS;
- if ((items < 1) || (items > 2)) {
- SWIG_croak("Usage: Event_set_priority(self,priority);");
+ if ((items < 2) || (items > 2)) {
+ SWIG_croak("Usage: Event_setPriority(self,priority);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_set_priority" "', argument " "1"" of type '" "Event *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_setPriority" "', argument " "1"" of type '" "Event *""'");
}
arg1 = reinterpret_cast< Event * >(argp1);
- if (items > 1) {
- {
- res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_switch_priority_t, 0 );
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_set_priority" "', argument " "2"" of type '" "switch_priority_t""'");
- }
- if (!argp2) {
- SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_set_priority" "', argument " "2"" of type '" "switch_priority_t""'");
- } else {
- arg2 = *(reinterpret_cast< switch_priority_t * >(argp2));
- }
+ {
+ res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_switch_priority_t, 0 );
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_setPriority" "', argument " "2"" of type '" "switch_priority_t""'");
+ }
+ if (!argp2) {
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_setPriority" "', argument " "2"" of type '" "switch_priority_t""'");
+ } else {
+ arg2 = *(reinterpret_cast< switch_priority_t * >(argp2));
}
}
- result = (bool)(arg1)->set_priority(arg2);
+ result = (bool)(arg1)->setPriority(arg2);
+ ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
+
+ XSRETURN(argvi);
+ fail:
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_Event_setPriority__SWIG_1) {
+ {
+ Event *arg1 = (Event *) 0 ;
+ bool result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: Event_setPriority(self);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_setPriority" "', argument " "1"" of type '" "Event *""'");
+ }
+ arg1 = reinterpret_cast< Event * >(argp1);
+ result = (bool)(arg1)->setPriority();
ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
XSRETURN(argvi);
@@ -2971,7 +3052,78 @@
}
-XS(_wrap_Event_get_header) {
+XS(_wrap_Event_setPriority) {
+ dXSARGS;
+
+ {
+ unsigned long _index = 0;
+ SWIG_TypeRank _rank = 0;
+ if (items == 1) {
+ 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_Event, 0);
+ _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 == 2) {
+ 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_Event, 0);
+ _v = SWIG_CheckState(res);
+ }
+ if (!_v) goto check_2;
+ _ranki += _v*_pi;
+ _rankm += _pi;
+ _pi *= SWIG_MAXCASTRANK;
+ {
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_switch_priority_t, 0);
+ _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_Event_setPriority__SWIG_1); return;
+ case 2:
+ ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Event_setPriority__SWIG_0); return;
+ }
+ }
+
+ croak("No matching function for overloaded 'Event_setPriority'");
+ XSRETURN(0);
+}
+
+
+XS(_wrap_Event_getHeader) {
{
Event *arg1 = (Event *) 0 ;
char *arg2 = (char *) 0 ;
@@ -2985,19 +3137,19 @@
dXSARGS;
if ((items < 2) || (items > 2)) {
- SWIG_croak("Usage: Event_get_header(self,header_name);");
+ SWIG_croak("Usage: Event_getHeader(self,header_name);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_get_header" "', argument " "1"" of type '" "Event *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getHeader" "', argument " "1"" of type '" "Event *""'");
}
arg1 = reinterpret_cast< Event * >(argp1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_get_header" "', argument " "2"" of type '" "char *""'");
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_getHeader" "', argument " "2"" of type '" "char *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
- result = (char *)(arg1)->get_header(arg2);
+ result = (char *)(arg1)->getHeader(arg2);
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
@@ -3010,7 +3162,35 @@
}
-XS(_wrap_Event_get_body) {
+XS(_wrap_Event_getBody) {
+ {
+ Event *arg1 = (Event *) 0 ;
+ char *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: Event_getBody(self);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getBody" "', argument " "1"" of type '" "Event *""'");
+ }
+ arg1 = reinterpret_cast< Event * >(argp1);
+ result = (char *)(arg1)->getBody();
+ ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
+
+ XSRETURN(argvi);
+ fail:
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_Event_getType) {
{
Event *arg1 = (Event *) 0 ;
char *result = 0 ;
@@ -3020,14 +3200,14 @@
dXSARGS;
if ((items < 1) || (items > 1)) {
- SWIG_croak("Usage: Event_get_body(self);");
+ SWIG_croak("Usage: Event_getType(self);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_get_body" "', argument " "1"" of type '" "Event *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getType" "', argument " "1"" of type '" "Event *""'");
}
arg1 = reinterpret_cast< Event * >(argp1);
- result = (char *)(arg1)->get_body();
+ result = (char *)(arg1)->getType();
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
XSRETURN(argvi);
@@ -3038,7 +3218,7 @@
}
-XS(_wrap_Event_add_body) {
+XS(_wrap_Event_addBody) {
{
Event *arg1 = (Event *) 0 ;
char *arg2 = (char *) 0 ;
@@ -3052,19 +3232,19 @@
dXSARGS;
if ((items < 2) || (items > 2)) {
- SWIG_croak("Usage: Event_add_body(self,value);");
+ SWIG_croak("Usage: Event_addBody(self,value);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_add_body" "', argument " "1"" of type '" "Event *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_addBody" "', argument " "1"" of type '" "Event *""'");
}
arg1 = reinterpret_cast< Event * >(argp1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_add_body" "', argument " "2"" of type '" "char const *""'");
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_addBody" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
- result = (bool)(arg1)->add_body((char const *)arg2);
+ result = (bool)(arg1)->addBody((char const *)arg2);
ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
@@ -3077,7 +3257,7 @@
}
-XS(_wrap_Event_add_header) {
+XS(_wrap_Event_addHeader) {
{
Event *arg1 = (Event *) 0 ;
char *arg2 = (char *) 0 ;
@@ -3095,24 +3275,24 @@
dXSARGS;
if ((items < 3) || (items > 3)) {
- SWIG_croak("Usage: Event_add_header(self,header_name,value);");
+ SWIG_croak("Usage: Event_addHeader(self,header_name,value);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_add_header" "', argument " "1"" of type '" "Event *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_addHeader" "', argument " "1"" of type '" "Event *""'");
}
arg1 = reinterpret_cast< Event * >(argp1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_add_header" "', argument " "2"" of type '" "char const *""'");
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_addHeader" "', 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 '" "Event_add_header" "', argument " "3"" of type '" "char const *""'");
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Event_addHeader" "', argument " "3"" of type '" "char const *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
- result = (bool)(arg1)->add_header((char const *)arg2,(char const *)arg3);
+ result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3);
ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
@@ -3127,7 +3307,7 @@
}
-XS(_wrap_Event_del_header) {
+XS(_wrap_Event_delHeader) {
{
Event *arg1 = (Event *) 0 ;
char *arg2 = (char *) 0 ;
@@ -3141,19 +3321,19 @@
dXSARGS;
if ((items < 2) || (items > 2)) {
- SWIG_croak("Usage: Event_del_header(self,header_name);");
+ SWIG_croak("Usage: Event_delHeader(self,header_name);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_del_header" "', argument " "1"" of type '" "Event *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_delHeader" "', argument " "1"" of type '" "Event *""'");
}
arg1 = reinterpret_cast< Event * >(argp1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_del_header" "', argument " "2"" of type '" "char const *""'");
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_delHeader" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
- result = (bool)(arg1)->del_header((char const *)arg2);
+ result = (bool)(arg1)->delHeader((char const *)arg2);
ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
@@ -3678,10 +3858,10 @@
}
-XS(_wrap_CoreSession_hangup) {
+XS(_wrap_CoreSession_hangup__SWIG_0) {
{
CoreSession *arg1 = (CoreSession *) 0 ;
- char *arg2 = (char *) "normal_clearing" ;
+ char *arg2 = (char *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
@@ -3690,7 +3870,7 @@
int argvi = 0;
dXSARGS;
- if ((items < 1) || (items > 2)) {
+ if ((items < 2) || (items > 2)) {
SWIG_croak("Usage: CoreSession_hangup(self,cause);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
@@ -3698,13 +3878,11 @@
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hangup" "', argument " "1"" of type '" "CoreSession *""'");
}
arg1 = reinterpret_cast< CoreSession * >(argp1);
- if (items > 1) {
- res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_hangup" "', argument " "2"" of type '" "char *""'");
- }
- arg2 = reinterpret_cast< char * >(buf2);
+ res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_hangup" "', argument " "2"" of type '" "char *""'");
}
+ arg2 = reinterpret_cast< char * >(buf2);
(arg1)->hangup(arg2);
@@ -3718,50 +3896,147 @@
}
-XS(_wrap_CoreSession_setVariable) {
+XS(_wrap_CoreSession_hangup__SWIG_1) {
{
CoreSession *arg1 = (CoreSession *) 0 ;
- char *arg2 = (char *) 0 ;
- char *arg3 = (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 argvi = 0;
dXSARGS;
- if ((items < 3) || (items > 3)) {
- SWIG_croak("Usage: CoreSession_setVariable(self,var,val);");
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: CoreSession_hangup(self);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setVariable" "', argument " "1"" of type '" "CoreSession *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hangup" "', argument " "1"" of type '" "CoreSession *""'");
}
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_setVariable" "', 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 '" "CoreSession_setVariable" "', argument " "3"" of type '" "char *""'");
- }
- arg3 = reinterpret_cast< char * >(buf3);
- (arg1)->setVariable(arg2,arg3);
+ (arg1)->hangup();
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
- if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
XSRETURN(argvi);
fail:
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
- if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_CoreSession_hangup) {
+ dXSARGS;
+
+ {
+ unsigned long _index = 0;
+ SWIG_TypeRank _rank = 0;
+ if (items == 1) {
+ 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;
+ if (!_index || (_ranki < _rank)) {
+ _rank = _ranki; _index = 1;
+ if (_rank == _rankm) goto dispatch;
+ }
+ }
+ check_1:
+
+ if (items == 2) {
+ 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_AsCharPtrAndSize(ST(1), 0, NULL, 0);
+ _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_hangup__SWIG_1); return;
+ case 2:
+ ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_hangup__SWIG_0); return;
+ }
+ }
+
+ croak("No matching function for overloaded 'CoreSession_hangup'");
+ XSRETURN(0);
+}
+
+
+XS(_wrap_CoreSession_setVariable) {
+ {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (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 argvi = 0;
+ dXSARGS;
+
+ if ((items < 3) || (items > 3)) {
+ SWIG_croak("Usage: CoreSession_setVariable(self,var,val);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setVariable" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ 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_setVariable" "', 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 '" "CoreSession_setVariable" "', argument " "3"" of type '" "char *""'");
+ }
+ arg3 = reinterpret_cast< char * >(buf3);
+ (arg1)->setVariable(arg2,arg3);
+
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ XSRETURN(argvi);
+ fail:
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
SWIG_croak_null();
}
}
@@ -3877,150 +4152,549 @@
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_getVariable" "', argument " "2"" of type '" "char *""'");
}
- arg2 = reinterpret_cast< char * >(buf2);
- result = (char *)(arg1)->getVariable(arg2);
- ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
+ arg2 = reinterpret_cast< char * >(buf2);
+ result = (char *)(arg1)->getVariable(arg2);
+ ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ XSRETURN(argvi);
+ fail:
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_CoreSession_recordFile__SWIG_0) {
+ {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int arg3 ;
+ int arg4 ;
+ int arg5 ;
+ int result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int val3 ;
+ int ecode3 = 0 ;
+ int val4 ;
+ int ecode4 = 0 ;
+ int val5 ;
+ int ecode5 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 5) || (items > 5)) {
+ SWIG_croak("Usage: CoreSession_recordFile(self,file_name,max_len,silence_threshold,silence_secs);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ 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_recordFile" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3"" of type '" "int""'");
+ }
+ arg3 = static_cast< int >(val3);
+ 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_recordFile" "', 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_recordFile" "', argument " "5"" of type '" "int""'");
+ }
+ arg5 = static_cast< int >(val5);
+ result = (int)(arg1)->recordFile(arg2,arg3,arg4,arg5);
+ ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+
+
+
+ XSRETURN(argvi);
+ fail:
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+
+
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_CoreSession_recordFile__SWIG_1) {
+ {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int arg3 ;
+ int arg4 ;
+ int result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int val3 ;
+ int ecode3 = 0 ;
+ int val4 ;
+ int ecode4 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 4) || (items > 4)) {
+ SWIG_croak("Usage: CoreSession_recordFile(self,file_name,max_len,silence_threshold);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ 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_recordFile" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3"" of type '" "int""'");
+ }
+ arg3 = static_cast< int >(val3);
+ 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_recordFile" "', argument " "4"" of type '" "int""'");
+ }
+ arg4 = static_cast< int >(val4);
+ result = (int)(arg1)->recordFile(arg2,arg3,arg4);
+ ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+
+
+ XSRETURN(argvi);
+ fail:
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_CoreSession_recordFile__SWIG_2) {
+ {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int arg3 ;
+ int result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int val3 ;
+ int ecode3 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 3) || (items > 3)) {
+ SWIG_croak("Usage: CoreSession_recordFile(self,file_name,max_len);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ 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_recordFile" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3"" of type '" "int""'");
+ }
+ arg3 = static_cast< int >(val3);
+ result = (int)(arg1)->recordFile(arg2,arg3);
+ ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+
+ XSRETURN(argvi);
+ fail:
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_CoreSession_recordFile__SWIG_3) {
+ {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 2) || (items > 2)) {
+ SWIG_croak("Usage: CoreSession_recordFile(self,file_name);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ 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_recordFile" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ result = (int)(arg1)->recordFile(arg2);
+ ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ XSRETURN(argvi);
+ fail:
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_CoreSession_recordFile) {
+ dXSARGS;
+
+ {
+ unsigned long _index = 0;
+ SWIG_TypeRank _rank = 0;
+ if (items == 2) {
+ 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_AsCharPtrAndSize(ST(1), 0, NULL, 0);
+ _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 == 3) {
+ 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_AsCharPtrAndSize(ST(1), 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(2), 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:
+
+ 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_3;
+ _ranki += _v*_pi;
+ _rankm += _pi;
+ _pi *= SWIG_MAXCASTRANK;
+ {
+ int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
+ _v = SWIG_CheckState(res);
+ }
+ if (!_v) goto check_3;
+ _ranki += _v*_pi;
+ _rankm += _pi;
+ _pi *= SWIG_MAXCASTRANK;
+ {
+ {
+ int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
+ _v = SWIG_CheckState(res);
+ }
+ }
+ if (!_v) goto check_3;
+ _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_3;
+ _ranki += _v*_pi;
+ _rankm += _pi;
+ _pi *= SWIG_MAXCASTRANK;
+ if (!_index || (_ranki < _rank)) {
+ _rank = _ranki; _index = 3;
+ if (_rank == _rankm) goto dispatch;
+ }
+ }
+ check_3:
+
+ 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_4;
+ _ranki += _v*_pi;
+ _rankm += _pi;
+ _pi *= SWIG_MAXCASTRANK;
+ {
+ int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
+ _v = SWIG_CheckState(res);
+ }
+ if (!_v) goto check_4;
+ _ranki += _v*_pi;
+ _rankm += _pi;
+ _pi *= SWIG_MAXCASTRANK;
+ {
+ {
+ int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
+ _v = SWIG_CheckState(res);
+ }
+ }
+ if (!_v) goto check_4;
+ _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_4;
+ _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_4;
+ _ranki += _v*_pi;
+ _rankm += _pi;
+ _pi *= SWIG_MAXCASTRANK;
+ if (!_index || (_ranki < _rank)) {
+ _rank = _ranki; _index = 4;
+ if (_rank == _rankm) goto dispatch;
+ }
+ }
+ check_4:
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
- XSRETURN(argvi);
- fail:
-
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
- SWIG_croak_null();
+ dispatch:
+ switch(_index) {
+ case 1:
+ ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_recordFile__SWIG_3); return;
+ case 2:
+ ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_recordFile__SWIG_2); return;
+ case 3:
+ ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_recordFile__SWIG_1); return;
+ case 4:
+ ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_recordFile__SWIG_0); return;
+ }
}
+
+ croak("No matching function for overloaded 'CoreSession_recordFile'");
+ XSRETURN(0);
}
-XS(_wrap_CoreSession_recordFile) {
+XS(_wrap_CoreSession_setCallerData) {
{
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
- int arg3 = (int) 0 ;
- int arg4 = (int) 0 ;
- int arg5 = (int) 0 ;
- int result;
+ char *arg3 = (char *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
char *buf2 = 0 ;
int alloc2 = 0 ;
- int val3 ;
- int ecode3 = 0 ;
- int val4 ;
- int ecode4 = 0 ;
- int val5 ;
- int ecode5 = 0 ;
+ int res3 ;
+ char *buf3 = 0 ;
+ int alloc3 = 0 ;
int argvi = 0;
dXSARGS;
- if ((items < 2) || (items > 5)) {
- SWIG_croak("Usage: CoreSession_recordFile(self,file_name,max_len,silence_threshold,silence_secs);");
+ if ((items < 3) || (items > 3)) {
+ SWIG_croak("Usage: CoreSession_setCallerData(self,var,val);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1"" of type '" "CoreSession *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setCallerData" "', argument " "1"" of type '" "CoreSession *""'");
}
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_recordFile" "', argument " "2"" of type '" "char *""'");
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setCallerData" "', argument " "2"" of type '" "char *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
- if (items > 2) {
- ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
- if (!SWIG_IsOK(ecode3)) {
- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3"" of type '" "int""'");
- }
- arg3 = static_cast< int >(val3);
- }
- if (items > 3) {
- 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_recordFile" "', argument " "4"" of type '" "int""'");
- }
- arg4 = static_cast< int >(val4);
- }
- if (items > 4) {
- 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_recordFile" "', argument " "5"" of type '" "int""'");
- }
- arg5 = static_cast< int >(val5);
+ res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setCallerData" "', argument " "3"" of type '" "char *""'");
}
- result = (int)(arg1)->recordFile(arg2,arg3,arg4,arg5);
- ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
-
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
-
+ arg3 = reinterpret_cast< char * >(buf3);
+ (arg1)->setCallerData(arg2,arg3);
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
XSRETURN(argvi);
fail:
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
-
-
-
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
SWIG_croak_null();
}
}
-XS(_wrap_CoreSession_setCallerData) {
+XS(_wrap_CoreSession_originate__SWIG_0) {
{
CoreSession *arg1 = (CoreSession *) 0 ;
- char *arg2 = (char *) 0 ;
+ CoreSession *arg2 = (CoreSession *) 0 ;
char *arg3 = (char *) 0 ;
+ int arg4 ;
+ int result;
void *argp1 = 0 ;
int res1 = 0 ;
- int res2 ;
- char *buf2 = 0 ;
- int alloc2 = 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
+ int val4 ;
+ int ecode4 = 0 ;
int argvi = 0;
dXSARGS;
- if ((items < 3) || (items > 3)) {
- SWIG_croak("Usage: CoreSession_setCallerData(self,var,val);");
+ if ((items < 4) || (items > 4)) {
+ SWIG_croak("Usage: CoreSession_originate(self,a_leg_session,dest,timeout);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setCallerData" "', argument " "1"" of type '" "CoreSession *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_originate" "', argument " "1"" of type '" "CoreSession *""'");
}
arg1 = reinterpret_cast< CoreSession * >(argp1);
- res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
+ res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_CoreSession, 0 | 0 );
if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setCallerData" "', argument " "2"" of type '" "char *""'");
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_originate" "', argument " "2"" of type '" "CoreSession *""'");
}
- arg2 = reinterpret_cast< char * >(buf2);
+ 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 '" "CoreSession_setCallerData" "', argument " "3"" of type '" "char *""'");
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_originate" "', argument " "3"" of type '" "char *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
- (arg1)->setCallerData(arg2,arg3);
+ 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_originate" "', argument " "4"" of type '" "int""'");
+ }
+ arg4 = static_cast< int >(val4);
+ result = (int)(arg1)->originate(arg2,arg3,arg4);
+ ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+
XSRETURN(argvi);
fail:
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+
SWIG_croak_null();
}
}
-XS(_wrap_CoreSession_originate) {
+XS(_wrap_CoreSession_originate__SWIG_1) {
{
CoreSession *arg1 = (CoreSession *) 0 ;
CoreSession *arg2 = (CoreSession *) 0 ;
char *arg3 = (char *) 0 ;
- int arg4 = (int) 60 ;
int result;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -4029,13 +4703,11 @@
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
- int val4 ;
- int ecode4 = 0 ;
int argvi = 0;
dXSARGS;
- if ((items < 3) || (items > 4)) {
- SWIG_croak("Usage: CoreSession_originate(self,a_leg_session,dest,timeout);");
+ if ((items < 3) || (items > 3)) {
+ SWIG_croak("Usage: CoreSession_originate(self,a_leg_session,dest);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
if (!SWIG_IsOK(res1)) {
@@ -4052,30 +4724,127 @@
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_originate" "', argument " "3"" of type '" "char *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
- if (items > 3) {
- 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_originate" "', argument " "4"" of type '" "int""'");
- }
- arg4 = static_cast< int >(val4);
- }
- result = (int)(arg1)->originate(arg2,arg3,arg4);
+ result = (int)(arg1)->originate(arg2,arg3);
ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
-
XSRETURN(argvi);
fail:
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
-
SWIG_croak_null();
}
}
+XS(_wrap_CoreSession_originate) {
+ dXSARGS;
+
+ {
+ unsigned long _index = 0;
+ SWIG_TypeRank _rank = 0;
+ if (items == 3) {
+ 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;
+ {
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(ST(1), &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_AsCharPtrAndSize(ST(2), 0, NULL, 0);
+ _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 == 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_2;
+ _ranki += _v*_pi;
+ _rankm += _pi;
+ _pi *= SWIG_MAXCASTRANK;
+ {
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(ST(1), &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_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;
+ 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_originate__SWIG_1); return;
+ case 2:
+ ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_originate__SWIG_0); return;
+ }
+ }
+
+ croak("No matching function for overloaded 'CoreSession_originate'");
+ XSRETURN(0);
+}
+
+
XS(_wrap_CoreSession_setDTMFCallback) {
{
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -4501,54 +5270,100 @@
if (!SWIG_IsOK(res10)) {
SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "CoreSession_playAndGetDigits" "', argument " "10"" of type '" "char *""'");
}
- arg10 = reinterpret_cast< char * >(buf10);
- result = (int)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
+ arg10 = reinterpret_cast< char * >(buf10);
+ result = (int)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
+ ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
+
+
+
+
+
+ if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
+ if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
+ if (alloc8 == SWIG_NEWOBJ) delete[] buf8;
+ if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
+ if (alloc10 == SWIG_NEWOBJ) delete[] buf10;
+ XSRETURN(argvi);
+ fail:
+
+
+
+
+
+ if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
+ if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
+ if (alloc8 == SWIG_NEWOBJ) delete[] buf8;
+ if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
+ if (alloc10 == SWIG_NEWOBJ) delete[] buf10;
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_CoreSession_streamFile__SWIG_0) {
+ {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int arg3 ;
+ int result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int val3 ;
+ int ecode3 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 3) || (items > 3)) {
+ SWIG_croak("Usage: CoreSession_streamFile(self,file,starting_sample_count);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_streamFile" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ 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_streamFile" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_streamFile" "', argument " "3"" of type '" "int""'");
+ }
+ arg3 = static_cast< int >(val3);
+ result = (int)(arg1)->streamFile(arg2,arg3);
ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
-
-
-
- if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
- if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
- if (alloc8 == SWIG_NEWOBJ) delete[] buf8;
- if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
- if (alloc10 == SWIG_NEWOBJ) delete[] buf10;
XSRETURN(argvi);
fail:
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
-
-
-
- if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
- if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
- if (alloc8 == SWIG_NEWOBJ) delete[] buf8;
- if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
- if (alloc10 == SWIG_NEWOBJ) delete[] buf10;
SWIG_croak_null();
}
}
-XS(_wrap_CoreSession_streamFile) {
+XS(_wrap_CoreSession_streamFile__SWIG_1) {
{
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
- int arg3 = (int) 0 ;
int result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
char *buf2 = 0 ;
int alloc2 = 0 ;
- int val3 ;
- int ecode3 = 0 ;
int argvi = 0;
dXSARGS;
- if ((items < 2) || (items > 3)) {
- SWIG_croak("Usage: CoreSession_streamFile(self,file,starting_sample_count);");
+ if ((items < 2) || (items > 2)) {
+ SWIG_croak("Usage: CoreSession_streamFile(self,file);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
if (!SWIG_IsOK(res1)) {
@@ -4560,28 +5375,107 @@
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_streamFile" "', argument " "2"" of type '" "char *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
- if (items > 2) {
- ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
- if (!SWIG_IsOK(ecode3)) {
- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_streamFile" "', argument " "3"" of type '" "int""'");
- }
- arg3 = static_cast< int >(val3);
- }
- result = (int)(arg1)->streamFile(arg2,arg3);
+ result = (int)(arg1)->streamFile(arg2);
ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
-
XSRETURN(argvi);
fail:
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
-
SWIG_croak_null();
}
}
+XS(_wrap_CoreSession_streamFile) {
+ dXSARGS;
+
+ {
+ unsigned long _index = 0;
+ SWIG_TypeRank _rank = 0;
+ if (items == 2) {
+ 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_AsCharPtrAndSize(ST(1), 0, NULL, 0);
+ _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 == 3) {
+ 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_AsCharPtrAndSize(ST(1), 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(2), 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_streamFile__SWIG_1); return;
+ case 2:
+ ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_streamFile__SWIG_0); return;
+ }
+ }
+
+ croak("No matching function for overloaded 'CoreSession_streamFile'");
+ XSRETURN(0);
+}
+
+
XS(_wrap_CoreSession_flushEvents) {
{
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -5017,6 +5911,141 @@
}
+XS(_wrap_console_log) {
+ {
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 2) || (items > 2)) {
+ SWIG_croak("Usage: console_log(level_str,msg);");
+ }
+ res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "console_log" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "console_log" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ console_log(arg1,arg2);
+
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ XSRETURN(argvi);
+ fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_console_clean_log) {
+ {
+ char *arg1 = (char *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: console_clean_log(msg);");
+ }
+ res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "console_clean_log" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ console_clean_log(arg1);
+
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ XSRETURN(argvi);
+ fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_api_execute) {
+ {
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *result = 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 2) || (items > 2)) {
+ SWIG_croak("Usage: api_execute(cmd,arg);");
+ }
+ res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "api_execute" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "api_execute" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ result = (char *)api_execute(arg1,arg2);
+ ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ XSRETURN(argvi);
+ fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_api_reply_delete) {
+ {
+ char *arg1 = (char *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: api_reply_delete(reply);");
+ }
+ res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "api_reply_delete" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ api_reply_delete(arg1);
+
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ XSRETURN(argvi);
+ fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ SWIG_croak_null();
+ }
+}
+
+
XS(_wrap_bridge) {
{
CoreSession *arg1 = 0 ;
@@ -5962,10 +6991,6 @@
{0,0,0,0}
};
static swig_command_info swig_commands[] = {
-{"freeswitchc::console_log", _wrap_console_log},
-{"freeswitchc::console_clean_log", _wrap_console_clean_log},
-{"freeswitchc::api_execute", _wrap_api_execute},
-{"freeswitchc::api_reply_delete", _wrap_api_reply_delete},
{"freeswitchc::input_callback_state_t_function_set", _wrap_input_callback_state_t_function_set},
{"freeswitchc::input_callback_state_t_function_get", _wrap_input_callback_state_t_function_get},
{"freeswitchc::input_callback_state_t_threadState_set", _wrap_input_callback_state_t_threadState_set},
@@ -5989,12 +7014,13 @@
{"freeswitchc::new_Event", _wrap_new_Event},
{"freeswitchc::delete_Event", _wrap_delete_Event},
{"freeswitchc::Event_serialize", _wrap_Event_serialize},
-{"freeswitchc::Event_set_priority", _wrap_Event_set_priority},
-{"freeswitchc::Event_get_header", _wrap_Event_get_header},
-{"freeswitchc::Event_get_body", _wrap_Event_get_body},
-{"freeswitchc::Event_add_body", _wrap_Event_add_body},
-{"freeswitchc::Event_add_header", _wrap_Event_add_header},
-{"freeswitchc::Event_del_header", _wrap_Event_del_header},
+{"freeswitchc::Event_setPriority", _wrap_Event_setPriority},
+{"freeswitchc::Event_getHeader", _wrap_Event_getHeader},
+{"freeswitchc::Event_getBody", _wrap_Event_getBody},
+{"freeswitchc::Event_getType", _wrap_Event_getType},
+{"freeswitchc::Event_addBody", _wrap_Event_addBody},
+{"freeswitchc::Event_addHeader", _wrap_Event_addHeader},
+{"freeswitchc::Event_delHeader", _wrap_Event_delHeader},
{"freeswitchc::Event_fire", _wrap_Event_fire},
{"freeswitchc::delete_CoreSession", _wrap_delete_CoreSession},
{"freeswitchc::CoreSession_session_set", _wrap_CoreSession_session_set},
@@ -6040,6 +7066,10 @@
{"freeswitchc::CoreSession_get_cb_args", _wrap_CoreSession_get_cb_args},
{"freeswitchc::CoreSession_check_hangup_hook", _wrap_CoreSession_check_hangup_hook},
{"freeswitchc::CoreSession_run_dtmf_callback", _wrap_CoreSession_run_dtmf_callback},
+{"freeswitchc::console_log", _wrap_console_log},
+{"freeswitchc::console_clean_log", _wrap_console_clean_log},
+{"freeswitchc::api_execute", _wrap_api_execute},
+{"freeswitchc::api_reply_delete", _wrap_api_reply_delete},
{"freeswitchc::bridge", _wrap_bridge},
{"freeswitchc::hanguphook", _wrap_hanguphook},
{"freeswitchc::dtmf_callback", _wrap_dtmf_callback},
Modified: freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py (original)
+++ freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py Wed Apr 30 15:42:26 2008
@@ -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.
@@ -48,10 +48,6 @@
del types
-console_log = _freeswitch.console_log
-console_clean_log = _freeswitch.console_clean_log
-api_execute = _freeswitch.api_execute
-api_reply_delete = _freeswitch.api_reply_delete
class input_callback_state_t(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, input_callback_state_t, name, value)
@@ -121,12 +117,13 @@
__swig_destroy__ = _freeswitch.delete_Event
__del__ = lambda self : None;
def serialize(*args): return _freeswitch.Event_serialize(*args)
- def set_priority(*args): return _freeswitch.Event_set_priority(*args)
- def get_header(*args): return _freeswitch.Event_get_header(*args)
- def get_body(*args): return _freeswitch.Event_get_body(*args)
- def add_body(*args): return _freeswitch.Event_add_body(*args)
- def add_header(*args): return _freeswitch.Event_add_header(*args)
- def del_header(*args): return _freeswitch.Event_del_header(*args)
+ def setPriority(*args): return _freeswitch.Event_setPriority(*args)
+ def getHeader(*args): return _freeswitch.Event_getHeader(*args)
+ def getBody(*args): return _freeswitch.Event_getBody(*args)
+ def getType(*args): return _freeswitch.Event_getType(*args)
+ def addBody(*args): return _freeswitch.Event_addBody(*args)
+ def addHeader(*args): return _freeswitch.Event_addHeader(*args)
+ def delHeader(*args): return _freeswitch.Event_delHeader(*args)
def fire(*args): return _freeswitch.Event_fire(*args)
Event_swigregister = _freeswitch.Event_swigregister
Event_swigregister(Event)
@@ -136,7 +133,7 @@
__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;
@@ -192,6 +189,10 @@
CoreSession_swigregister = _freeswitch.CoreSession_swigregister
CoreSession_swigregister(CoreSession)
+console_log = _freeswitch.console_log
+console_clean_log = _freeswitch.console_clean_log
+api_execute = _freeswitch.api_execute
+api_reply_delete = _freeswitch.api_reply_delete
bridge = _freeswitch.bridge
hanguphook = _freeswitch.hanguphook
dtmf_callback = _freeswitch.dtmf_callback
Modified: freeswitch/trunk/src/mod/languages/mod_python/mod_python.i
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_python/mod_python.i (original)
+++ freeswitch/trunk/src/mod/languages/mod_python/mod_python.i Wed Apr 30 15:42:26 2008
@@ -23,7 +23,7 @@
* tell swig to grok everything defined in these header files and
* build all sorts of c wrappers and python shadows of the c wrappers.
*/
-%include switch_cpp.h
+%include switch_swigable_cpp.h
%include freeswitch_python.h
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 Wed Apr 30 15:42:26 2008
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org)
- * Version 1.3.31
+ * Version 1.3.35
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
@@ -12,7 +12,7 @@
#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
#ifdef __cplusplus
-template<class T> class SwigValueWrapper {
+template<typename T> class SwigValueWrapper {
T *tt;
public:
SwigValueWrapper() : tt(0) { }
@@ -25,6 +25,10 @@
private:
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
};
+
+template <typename T> T SwigValueInit() {
+ return T();
+}
#endif
/* -----------------------------------------------------------------------------
@@ -34,14 +38,14 @@
/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
-# if defined(__SUNPRO_CC)
-# if (__SUNPRO_CC <= 0x560)
-# define SWIGTEMPLATEDISAMBIGUATOR template
-# else
-# define SWIGTEMPLATEDISAMBIGUATOR
-# endif
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+# define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+# define SWIGTEMPLATEDISAMBIGUATOR template
# else
-# define SWIGTEMPLATEDISAMBIGUATOR
+# define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif
@@ -124,6 +128,12 @@
# define _CRT_SECURE_NO_DEPRECATE
#endif
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+
/* Python.h has to appear first */
#include <Python.h>
@@ -137,7 +147,7 @@
/* This should only be incremented when either the layout of swig_type_info changes,
or for whatever reason, the runtime changes incompatibly */
-#define SWIG_RUNTIME_VERSION "3"
+#define SWIG_RUNTIME_VERSION "4"
/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
@@ -172,6 +182,7 @@
/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN 0x1
+#define SWIG_CAST_NEW_MEMORY 0x2
/* Flags for new pointer objects */
#define SWIG_POINTER_OWN 0x1
@@ -312,10 +323,10 @@
extern "C" {
#endif
-typedef void *(*swig_converter_func)(void *);
+typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);
-/* Structure to store inforomation on one type */
+/* Structure to store information on one type */
typedef struct swig_type_info {
const char *name; /* mangled name of this type */
const char *str; /* human readable name of this type */
@@ -360,7 +371,7 @@
while ((*f2 == ' ') && (f2 != l2)) ++f2;
if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
}
- return (l1 - f1) - (l2 - f2);
+ return (int)((l1 - f1) - (l2 - f2));
}
/*
@@ -442,8 +453,8 @@
Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
-SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
- return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
+SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
+ return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}
/*
@@ -867,7 +878,7 @@
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_SetString(PyExc_RuntimeError, mesg);
}
}
@@ -1107,14 +1118,14 @@
/* Unpack the argument tuple */
SWIGINTERN int
-SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs)
+SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
{
if (!args) {
if (!min && !max) {
return 1;
} else {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
- name, (min == max ? "" : "at least "), min);
+ name, (min == max ? "" : "at least "), (int)min);
return 0;
}
}
@@ -1122,14 +1133,14 @@
PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
return 0;
} else {
- register int l = PyTuple_GET_SIZE(args);
+ register Py_ssize_t l = PyTuple_GET_SIZE(args);
if (l < min) {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
- name, (min == max ? "" : "at least "), min, l);
+ name, (min == max ? "" : "at least "), (int)min, (int)l);
return 0;
} else if (l > max) {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
- name, (min == max ? "" : "at most "), max, l);
+ name, (min == max ? "" : "at most "), (int)max, (int)l);
return 0;
} else {
register int i;
@@ -1427,7 +1438,7 @@
{
PySwigObject *sobj = (PySwigObject *) v;
PyObject *next = sobj->next;
- if (sobj->own) {
+ if (sobj->own == SWIG_POINTER_OWN) {
swig_type_info *ty = sobj->ty;
PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
PyObject *destroy = data ? data->destroy : 0;
@@ -1445,12 +1456,13 @@
res = ((*meth)(mself, v));
}
Py_XDECREF(res);
- } else {
- const char *name = SWIG_TypePrettyName(ty);
+ }
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
- printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
-#endif
+ else {
+ const char *name = SWIG_TypePrettyName(ty);
+ printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
}
+#endif
}
Py_XDECREF(next);
PyObject_DEL(v);
@@ -1608,9 +1620,11 @@
(unaryfunc)0, /*nb_float*/
(unaryfunc)PySwigObject_oct, /*nb_oct*/
(unaryfunc)PySwigObject_hex, /*nb_hex*/
-#if PY_VERSION_HEX >= 0x02020000
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
-#elif PY_VERSION_HEX >= 0x02000000
+#if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
+#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
+#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
#endif
};
@@ -1953,7 +1967,7 @@
SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject *obj, int own) {
- if (own) {
+ if (own == SWIG_POINTER_OWN) {
PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
if (sobj) {
int oldown = sobj->own;
@@ -1974,6 +1988,8 @@
return SWIG_OK;
} else {
PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
+ if (own)
+ *own = 0;
while (sobj) {
void *vptr = sobj->ptr;
if (ty) {
@@ -1987,7 +2003,15 @@
if (!tc) {
sobj = (PySwigObject *)sobj->next;
} else {
- if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
+ if (ptr) {
+ int newmemory = 0;
+ *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+ if (newmemory == SWIG_CAST_NEW_MEMORY) {
+ assert(own);
+ if (own)
+ *own = *own | SWIG_CAST_NEW_MEMORY;
+ }
+ }
break;
}
}
@@ -1997,7 +2021,8 @@
}
}
if (sobj) {
- if (own) *own = sobj->own;
+ if (own)
+ *own = *own | sobj->own;
if (flags & SWIG_POINTER_DISOWN) {
sobj->own = 0;
}
@@ -2062,8 +2087,13 @@
}
if (ty) {
swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
- if (!tc) return SWIG_ERROR;
- *ptr = SWIG_TypeCast(tc,vptr);
+ if (tc) {
+ int newmemory = 0;
+ *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+ assert(!newmemory); /* newmemory handling not yet implemented */
+ } else {
+ return SWIG_ERROR;
+ }
} else {
*ptr = vptr;
}
@@ -2504,7 +2534,7 @@
#define SWIG_name "_freeswitch"
-#define SWIGVERSION 0x010331
+#define SWIGVERSION 0x010335
#define SWIG_VERSION SWIGVERSION
@@ -2532,7 +2562,9 @@
PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj)
{
- if (initial_ref) Py_XINCREF(_obj);
+ if (initial_ref) {
+ Py_XINCREF(_obj);
+ }
}
PyObject_ptr & operator=(const PyObject_ptr& item)
@@ -2682,14 +2714,12 @@
#include <limits.h>
-#ifndef LLONG_MIN
-# define LLONG_MIN LONG_LONG_MIN
-#endif
-#ifndef LLONG_MAX
-# define LLONG_MAX LONG_LONG_MAX
-#endif
-#ifndef ULLONG_MAX
-# define ULLONG_MAX ULONG_LONG_MAX
+#if !defined(SWIG_NO_LLONG_MAX)
+# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
+# define LLONG_MAX __LONG_LONG_MAX__
+# define LLONG_MIN (-LLONG_MAX - 1LL)
+# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
+# endif
#endif
@@ -2913,144 +2943,16 @@
SWIGINTERN int
SWIG_AsVal_bool (PyObject *obj, bool *val)
{
- if (obj == Py_True) {
- if (val) *val = true;
- return SWIG_OK;
- } else if (obj == Py_False) {
- if (val) *val = false;
- return SWIG_OK;
- } else {
- long v = 0;
- int res = SWIG_AddCast(SWIG_AsVal_long (obj, val ? &v : 0));
- if (SWIG_IsOK(res) && val) *val = v ? true : false;
- return res;
- }
+ int r = PyObject_IsTrue(obj);
+ if (r == -1)
+ return SWIG_ERROR;
+ if (val) *val = r ? true : false;
+ return SWIG_OK;
}
#ifdef __cplusplus
extern "C" {
#endif
-SWIGINTERN PyObject *_wrap_console_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
- PyObject *resultobj = 0;
- char *arg1 = (char *) 0 ;
- char *arg2 = (char *) 0 ;
- int res1 ;
- char *buf1 = 0 ;
- int alloc1 = 0 ;
- int res2 ;
- char *buf2 = 0 ;
- int alloc2 = 0 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
-
- if (!PyArg_ParseTuple(args,(char *)"OO:console_log",&obj0,&obj1)) SWIG_fail;
- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "console_log" "', argument " "1"" of type '" "char *""'");
- }
- arg1 = reinterpret_cast< char * >(buf1);
- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "console_log" "', argument " "2"" of type '" "char *""'");
- }
- arg2 = reinterpret_cast< char * >(buf2);
- console_log(arg1,arg2);
- resultobj = SWIG_Py_Void();
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
- return resultobj;
-fail:
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
- return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_console_clean_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
- PyObject *resultobj = 0;
- char *arg1 = (char *) 0 ;
- int res1 ;
- char *buf1 = 0 ;
- int alloc1 = 0 ;
- PyObject * obj0 = 0 ;
-
- if (!PyArg_ParseTuple(args,(char *)"O:console_clean_log",&obj0)) SWIG_fail;
- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "console_clean_log" "', argument " "1"" of type '" "char *""'");
- }
- arg1 = reinterpret_cast< char * >(buf1);
- console_clean_log(arg1);
- resultobj = SWIG_Py_Void();
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- return resultobj;
-fail:
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_api_execute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
- PyObject *resultobj = 0;
- char *arg1 = (char *) 0 ;
- char *arg2 = (char *) 0 ;
- char *result = 0 ;
- int res1 ;
- char *buf1 = 0 ;
- int alloc1 = 0 ;
- int res2 ;
- char *buf2 = 0 ;
- int alloc2 = 0 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
-
- if (!PyArg_ParseTuple(args,(char *)"OO:api_execute",&obj0,&obj1)) SWIG_fail;
- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "api_execute" "', argument " "1"" of type '" "char *""'");
- }
- arg1 = reinterpret_cast< char * >(buf1);
- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "api_execute" "', argument " "2"" of type '" "char *""'");
- }
- arg2 = reinterpret_cast< char * >(buf2);
- result = (char *)api_execute(arg1,arg2);
- resultobj = SWIG_FromCharPtr((const char *)result);
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
- return resultobj;
-fail:
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
- return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_api_reply_delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
- PyObject *resultobj = 0;
- char *arg1 = (char *) 0 ;
- int res1 ;
- char *buf1 = 0 ;
- int alloc1 = 0 ;
- PyObject * obj0 = 0 ;
-
- if (!PyArg_ParseTuple(args,(char *)"O:api_reply_delete",&obj0)) SWIG_fail;
- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "api_reply_delete" "', argument " "1"" of type '" "char *""'");
- }
- arg1 = reinterpret_cast< char * >(buf1);
- api_reply_delete(arg1);
- resultobj = SWIG_Py_Void();
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- return resultobj;
-fail:
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- return NULL;
-}
-
-
SWIGINTERN PyObject *_wrap_input_callback_state_t_function_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
@@ -3302,7 +3204,7 @@
SWIGINTERN PyObject *input_callback_state_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_input_callback_state, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
@@ -3348,7 +3250,7 @@
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
- argc = PyObject_Length(args);
+ argc = (int)PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 1); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
@@ -3366,7 +3268,10 @@
}
fail:
- SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Stream'.\n Possible C/C++ prototypes are:\n Stream()\n Stream(switch_stream_handle_t *)\n");
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Stream'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " Stream()\n"
+ " Stream(switch_stream_handle_t *)\n");
return NULL;
}
@@ -3450,7 +3355,7 @@
SWIGINTERN PyObject *Stream_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_Stream, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
@@ -3625,7 +3530,7 @@
SWIGINTERN PyObject *_wrap_new_Event__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
char *arg1 = (char *) 0 ;
- char *arg2 = (char *) NULL ;
+ char *arg2 = (char *) 0 ;
Event *result = 0 ;
int res1 ;
char *buf1 = 0 ;
@@ -3636,19 +3541,17 @@
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"O|O:new_Event",&obj0,&obj1)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"OO:new_Event",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "char const *""'");
}
arg1 = reinterpret_cast< char * >(buf1);
- if (obj1) {
- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Event" "', argument " "2"" of type '" "char const *""'");
- }
- arg2 = reinterpret_cast< char * >(buf2);
+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Event" "', argument " "2"" of type '" "char const *""'");
}
+ arg2 = reinterpret_cast< char * >(buf2);
result = (Event *)new Event((char const *)arg1,(char const *)arg2);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_NEW | 0 );
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
@@ -3663,8 +3566,33 @@
SWIGINTERN PyObject *_wrap_new_Event__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
+ char *arg1 = (char *) 0 ;
+ Event *result = 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:new_Event",&obj0)) SWIG_fail;
+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "char const *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ result = (Event *)new Event((char const *)arg1);
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_NEW | 0 );
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ return resultobj;
+fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_Event__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
switch_event_t *arg1 = (switch_event_t *) 0 ;
- int arg2 = (int) 0 ;
+ int arg2 ;
Event *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -3673,19 +3601,17 @@
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"O|O:new_Event",&obj0,&obj1)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"OO:new_Event",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_switch_event_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "switch_event_t *""'");
}
arg1 = reinterpret_cast< switch_event_t * >(argp1);
- if (obj1) {
- ecode2 = SWIG_AsVal_int(obj1, &val2);
- if (!SWIG_IsOK(ecode2)) {
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Event" "', argument " "2"" of type '" "int""'");
- }
- arg2 = static_cast< int >(val2);
- }
+ ecode2 = SWIG_AsVal_int(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Event" "', argument " "2"" of type '" "int""'");
+ }
+ arg2 = static_cast< int >(val2);
result = (Event *)new Event(arg1,arg2);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_NEW | 0 );
return resultobj;
@@ -3694,42 +3620,75 @@
}
+SWIGINTERN PyObject *_wrap_new_Event__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ switch_event_t *arg1 = (switch_event_t *) 0 ;
+ Event *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:new_Event",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_switch_event_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "switch_event_t *""'");
+ }
+ arg1 = reinterpret_cast< switch_event_t * >(argp1);
+ result = (Event *)new Event(arg1);
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_NEW | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_new_Event(PyObject *self, PyObject *args) {
int argc;
PyObject *argv[3];
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
- argc = PyObject_Length(args);
+ argc = (int)PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 2); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
- if ((argc >= 1) && (argc <= 2)) {
+ if (argc == 1) {
+ int _v;
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_switch_event_t, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_new_Event__SWIG_3(self, args);
+ }
+ }
+ if (argc == 1) {
+ int _v;
+ int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_new_Event__SWIG_1(self, args);
+ }
+ }
+ if (argc == 2) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_switch_event_t, 0);
_v = SWIG_CheckState(res);
if (_v) {
- if (argc <= 1) {
- return _wrap_new_Event__SWIG_1(self, args);
- }
{
int res = SWIG_AsVal_int(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
- return _wrap_new_Event__SWIG_1(self, args);
+ return _wrap_new_Event__SWIG_2(self, args);
}
}
}
- if ((argc >= 1) && (argc <= 2)) {
+ if (argc == 2) {
int _v;
int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
- if (argc <= 1) {
- return _wrap_new_Event__SWIG_0(self, args);
- }
int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
@@ -3739,7 +3698,12 @@
}
fail:
- SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Event'.\n Possible C/C++ prototypes are:\n Event(char const *,char const *)\n Event(switch_event_t *,int)\n");
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Event'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " Event(char const *,char const *)\n"
+ " Event(char const *)\n"
+ " Event(switch_event_t *,int)\n"
+ " Event(switch_event_t *)\n");
return NULL;
}
@@ -3766,10 +3730,10 @@
}
-SWIGINTERN PyObject *_wrap_Event_serialize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Event_serialize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
Event *arg1 = (Event *) 0 ;
- char *arg2 = (char *) NULL ;
+ char *arg2 = (char *) 0 ;
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -3779,19 +3743,17 @@
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"O|O:Event_serialize",&obj0,&obj1)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"OO:Event_serialize",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialize" "', argument " "1"" of type '" "Event *""'");
}
arg1 = reinterpret_cast< Event * >(argp1);
- if (obj1) {
- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_serialize" "', argument " "2"" of type '" "char const *""'");
- }
- arg2 = reinterpret_cast< char * >(buf2);
+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_serialize" "', argument " "2"" of type '" "char const *""'");
}
+ arg2 = reinterpret_cast< char * >(buf2);
result = (char *)(arg1)->serialize((char const *)arg2);
resultobj = SWIG_FromCharPtr((const char *)result);
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
@@ -3802,72 +3764,198 @@
}
-SWIGINTERN PyObject *_wrap_Event_set_priority(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Event_serialize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
Event *arg1 = (Event *) 0 ;
- switch_priority_t arg2 = (switch_priority_t) SWITCH_PRIORITY_NORMAL ;
- bool result;
+ char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- void *argp2 ;
- int res2 = 0 ;
PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"O|O:Event_set_priority",&obj0,&obj1)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"O:Event_serialize",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_set_priority" "', argument " "1"" of type '" "Event *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialize" "', argument " "1"" of type '" "Event *""'");
}
arg1 = reinterpret_cast< Event * >(argp1);
- if (obj1) {
- {
- res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_switch_priority_t, 0 | 0);
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_set_priority" "', argument " "2"" of type '" "switch_priority_t""'");
- }
- if (!argp2) {
- SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_set_priority" "', argument " "2"" of type '" "switch_priority_t""'");
- } else {
- switch_priority_t * temp = reinterpret_cast< switch_priority_t * >(argp2);
- arg2 = *temp;
- if (SWIG_IsNewObj(res2)) delete temp;
- }
- }
- }
- result = (bool)(arg1)->set_priority(arg2);
- resultobj = SWIG_From_bool(static_cast< bool >(result));
+ result = (char *)(arg1)->serialize();
+ resultobj = SWIG_FromCharPtr((const char *)result);
return resultobj;
fail:
return NULL;
}
-SWIGINTERN PyObject *_wrap_Event_get_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
- PyObject *resultobj = 0;
- Event *arg1 = (Event *) 0 ;
- char *arg2 = (char *) 0 ;
- char *result = 0 ;
- void *argp1 = 0 ;
- int res1 = 0 ;
- int res2 ;
- char *buf2 = 0 ;
- int alloc2 = 0 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
+SWIGINTERN PyObject *_wrap_Event_serialize(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[3];
+ int ii;
- if (!PyArg_ParseTuple(args,(char *)"OO:Event_get_header",&obj0,&obj1)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
+ if (!PyTuple_Check(args)) SWIG_fail;
+ argc = (int)PyObject_Length(args);
+ for (ii = 0; (ii < argc) && (ii < 2); ii++) {
+ argv[ii] = PyTuple_GET_ITEM(args,ii);
+ }
+ if (argc == 1) {
+ int _v;
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Event, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_Event_serialize__SWIG_1(self, args);
+ }
+ }
+ if (argc == 2) {
+ int _v;
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Event, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_Event_serialize__SWIG_0(self, args);
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Event_serialize'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " serialize(Event *,char const *)\n"
+ " serialize(Event *)\n");
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_Event_setPriority__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ Event *arg1 = (Event *) 0 ;
+ switch_priority_t arg2 ;
+ bool result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ void *argp2 ;
+ int res2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:Event_setPriority",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_setPriority" "', argument " "1"" of type '" "Event *""'");
+ }
+ arg1 = reinterpret_cast< Event * >(argp1);
+ {
+ res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_switch_priority_t, 0 | 0);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_setPriority" "', argument " "2"" of type '" "switch_priority_t""'");
+ }
+ if (!argp2) {
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_setPriority" "', argument " "2"" of type '" "switch_priority_t""'");
+ } else {
+ switch_priority_t * temp = reinterpret_cast< switch_priority_t * >(argp2);
+ arg2 = *temp;
+ if (SWIG_IsNewObj(res2)) delete temp;
+ }
+ }
+ result = (bool)(arg1)->setPriority(arg2);
+ resultobj = SWIG_From_bool(static_cast< bool >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_Event_setPriority__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ Event *arg1 = (Event *) 0 ;
+ bool result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:Event_setPriority",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_setPriority" "', argument " "1"" of type '" "Event *""'");
+ }
+ arg1 = reinterpret_cast< Event * >(argp1);
+ result = (bool)(arg1)->setPriority();
+ resultobj = SWIG_From_bool(static_cast< bool >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_Event_setPriority(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[3];
+ int ii;
+
+ if (!PyTuple_Check(args)) SWIG_fail;
+ argc = (int)PyObject_Length(args);
+ for (ii = 0; (ii < argc) && (ii < 2); ii++) {
+ argv[ii] = PyTuple_GET_ITEM(args,ii);
+ }
+ if (argc == 1) {
+ int _v;
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Event, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_Event_setPriority__SWIG_1(self, args);
+ }
+ }
+ if (argc == 2) {
+ int _v;
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Event, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_switch_priority_t, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_Event_setPriority__SWIG_0(self, args);
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Event_setPriority'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " setPriority(Event *,switch_priority_t)\n"
+ " setPriority(Event *)\n");
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_Event_getHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ Event *arg1 = (Event *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:Event_getHeader",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_get_header" "', argument " "1"" of type '" "Event *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getHeader" "', argument " "1"" of type '" "Event *""'");
}
arg1 = reinterpret_cast< Event * >(argp1);
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_get_header" "', argument " "2"" of type '" "char *""'");
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_getHeader" "', argument " "2"" of type '" "char *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
- result = (char *)(arg1)->get_header(arg2);
+ result = (char *)(arg1)->getHeader(arg2);
resultobj = SWIG_FromCharPtr((const char *)result);
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return resultobj;
@@ -3877,7 +3965,29 @@
}
-SWIGINTERN PyObject *_wrap_Event_get_body(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Event_getBody(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ Event *arg1 = (Event *) 0 ;
+ char *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:Event_getBody",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getBody" "', argument " "1"" of type '" "Event *""'");
+ }
+ arg1 = reinterpret_cast< Event * >(argp1);
+ result = (char *)(arg1)->getBody();
+ resultobj = SWIG_FromCharPtr((const char *)result);
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_Event_getType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
Event *arg1 = (Event *) 0 ;
char *result = 0 ;
@@ -3885,13 +3995,13 @@
int res1 = 0 ;
PyObject * obj0 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"O:Event_get_body",&obj0)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"O:Event_getType",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_get_body" "', argument " "1"" of type '" "Event *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getType" "', argument " "1"" of type '" "Event *""'");
}
arg1 = reinterpret_cast< Event * >(argp1);
- result = (char *)(arg1)->get_body();
+ result = (char *)(arg1)->getType();
resultobj = SWIG_FromCharPtr((const char *)result);
return resultobj;
fail:
@@ -3899,7 +4009,7 @@
}
-SWIGINTERN PyObject *_wrap_Event_add_body(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Event_addBody(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
Event *arg1 = (Event *) 0 ;
char *arg2 = (char *) 0 ;
@@ -3912,18 +4022,18 @@
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"OO:Event_add_body",&obj0,&obj1)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"OO:Event_addBody",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_add_body" "', argument " "1"" of type '" "Event *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_addBody" "', argument " "1"" of type '" "Event *""'");
}
arg1 = reinterpret_cast< Event * >(argp1);
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_add_body" "', argument " "2"" of type '" "char const *""'");
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_addBody" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
- result = (bool)(arg1)->add_body((char const *)arg2);
+ result = (bool)(arg1)->addBody((char const *)arg2);
resultobj = SWIG_From_bool(static_cast< bool >(result));
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return resultobj;
@@ -3933,7 +4043,7 @@
}
-SWIGINTERN PyObject *_wrap_Event_add_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Event_addHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
Event *arg1 = (Event *) 0 ;
char *arg2 = (char *) 0 ;
@@ -3951,23 +4061,23 @@
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"OOO:Event_add_header",&obj0,&obj1,&obj2)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"OOO:Event_addHeader",&obj0,&obj1,&obj2)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_add_header" "', argument " "1"" of type '" "Event *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_addHeader" "', argument " "1"" of type '" "Event *""'");
}
arg1 = reinterpret_cast< Event * >(argp1);
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_add_header" "', argument " "2"" of type '" "char const *""'");
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_addHeader" "', 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 '" "Event_add_header" "', argument " "3"" of type '" "char const *""'");
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Event_addHeader" "', argument " "3"" of type '" "char const *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
- result = (bool)(arg1)->add_header((char const *)arg2,(char const *)arg3);
+ result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3);
resultobj = SWIG_From_bool(static_cast< bool >(result));
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
@@ -3979,7 +4089,7 @@
}
-SWIGINTERN PyObject *_wrap_Event_del_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Event_delHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
Event *arg1 = (Event *) 0 ;
char *arg2 = (char *) 0 ;
@@ -3992,18 +4102,18 @@
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"OO:Event_del_header",&obj0,&obj1)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"OO:Event_delHeader",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_del_header" "', argument " "1"" of type '" "Event *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_delHeader" "', argument " "1"" of type '" "Event *""'");
}
arg1 = reinterpret_cast< Event * >(argp1);
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_del_header" "', argument " "2"" of type '" "char const *""'");
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_delHeader" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
- result = (bool)(arg1)->del_header((char const *)arg2);
+ result = (bool)(arg1)->delHeader((char const *)arg2);
resultobj = SWIG_From_bool(static_cast< bool >(result));
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return resultobj;
@@ -4037,7 +4147,7 @@
SWIGINTERN PyObject *Event_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_Event, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
@@ -4434,10 +4544,10 @@
}
-SWIGINTERN PyObject *_wrap_CoreSession_hangup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_CoreSession_hangup__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
- char *arg2 = (char *) "normal_clearing" ;
+ char *arg2 = (char *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
@@ -4446,19 +4556,17 @@
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"O|O:CoreSession_hangup",&obj0,&obj1)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_hangup",&obj0,&obj1)) 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_hangup" "', argument " "1"" of type '" "CoreSession *""'");
}
arg1 = reinterpret_cast< CoreSession * >(argp1);
- if (obj1) {
- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_hangup" "', argument " "2"" of type '" "char *""'");
- }
- arg2 = reinterpret_cast< char * >(buf2);
+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_hangup" "', argument " "2"" of type '" "char *""'");
}
+ arg2 = reinterpret_cast< char * >(buf2);
(arg1)->hangup(arg2);
resultobj = SWIG_Py_Void();
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
@@ -4469,6 +4577,69 @@
}
+SWIGINTERN PyObject *_wrap_CoreSession_hangup__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_hangup",&obj0)) 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_hangup" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ arg1 = reinterpret_cast< CoreSession * >(argp1);
+ (arg1)->hangup();
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_CoreSession_hangup(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[3];
+ int ii;
+
+ if (!PyTuple_Check(args)) SWIG_fail;
+ argc = (int)PyObject_Length(args);
+ for (ii = 0; (ii < argc) && (ii < 2); ii++) {
+ argv[ii] = PyTuple_GET_ITEM(args,ii);
+ }
+ if (argc == 1) {
+ int _v;
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_CoreSession_hangup__SWIG_1(self, args);
+ }
+ }
+ if (argc == 2) {
+ 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_AsCharPtrAndSize(argv[1], 0, NULL, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_CoreSession_hangup__SWIG_0(self, args);
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_hangup'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " hangup(CoreSession *,char *)\n"
+ " hangup(CoreSession *)\n");
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_CoreSession_setVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -4622,13 +4793,13 @@
}
-SWIGINTERN PyObject *_wrap_CoreSession_recordFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_CoreSession_recordFile__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
- int arg3 = (int) 0 ;
- int arg4 = (int) 0 ;
- int arg5 = (int) 0 ;
+ int arg3 ;
+ int arg4 ;
+ int arg5 ;
int result;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -4647,7 +4818,7 @@
PyObject * obj3 = 0 ;
PyObject * obj4 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"OO|OOO:CoreSession_recordFile",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"OOOOO:CoreSession_recordFile",&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_recordFile" "', argument " "1"" of type '" "CoreSession *""'");
@@ -4658,28 +4829,151 @@
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_recordFile" "', argument " "2"" of type '" "char *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
- if (obj2) {
- ecode3 = SWIG_AsVal_int(obj2, &val3);
- if (!SWIG_IsOK(ecode3)) {
- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3"" of type '" "int""'");
- }
- arg3 = static_cast< int >(val3);
+ ecode3 = SWIG_AsVal_int(obj2, &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3"" of type '" "int""'");
+ }
+ arg3 = static_cast< int >(val3);
+ ecode4 = SWIG_AsVal_int(obj3, &val4);
+ if (!SWIG_IsOK(ecode4)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_recordFile" "', 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_recordFile" "', argument " "5"" of type '" "int""'");
+ }
+ arg5 = static_cast< int >(val5);
+ result = (int)(arg1)->recordFile(arg2,arg3,arg4,arg5);
+ resultobj = SWIG_From_int(static_cast< int >(result));
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return resultobj;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_CoreSession_recordFile__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int arg3 ;
+ int arg4 ;
+ int result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int val3 ;
+ int ecode3 = 0 ;
+ int val4 ;
+ int ecode4 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+ PyObject * obj3 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOOO:CoreSession_recordFile",&obj0,&obj1,&obj2,&obj3)) 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_recordFile" "', argument " "1"" of type '" "CoreSession *""'");
}
- if (obj3) {
- ecode4 = SWIG_AsVal_int(obj3, &val4);
- if (!SWIG_IsOK(ecode4)) {
- SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_recordFile" "', argument " "4"" of type '" "int""'");
- }
- arg4 = static_cast< int >(val4);
+ 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_recordFile" "', argument " "2"" of type '" "char *""'");
}
- if (obj4) {
- ecode5 = SWIG_AsVal_int(obj4, &val5);
- if (!SWIG_IsOK(ecode5)) {
- SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoreSession_recordFile" "', argument " "5"" of type '" "int""'");
- }
- arg5 = static_cast< int >(val5);
+ arg2 = reinterpret_cast< char * >(buf2);
+ ecode3 = SWIG_AsVal_int(obj2, &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3"" of type '" "int""'");
+ }
+ arg3 = static_cast< int >(val3);
+ ecode4 = SWIG_AsVal_int(obj3, &val4);
+ if (!SWIG_IsOK(ecode4)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_recordFile" "', argument " "4"" of type '" "int""'");
+ }
+ arg4 = static_cast< int >(val4);
+ result = (int)(arg1)->recordFile(arg2,arg3,arg4);
+ resultobj = SWIG_From_int(static_cast< int >(result));
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return resultobj;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_CoreSession_recordFile__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int arg3 ;
+ int result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int val3 ;
+ int ecode3 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:CoreSession_recordFile",&obj0,&obj1,&obj2)) 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_recordFile" "', argument " "1"" of type '" "CoreSession *""'");
}
- result = (int)(arg1)->recordFile(arg2,arg3,arg4,arg5);
+ 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_recordFile" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ ecode3 = SWIG_AsVal_int(obj2, &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3"" of type '" "int""'");
+ }
+ arg3 = static_cast< int >(val3);
+ result = (int)(arg1)->recordFile(arg2,arg3);
+ resultobj = SWIG_From_int(static_cast< int >(result));
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return resultobj;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_CoreSession_recordFile__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_recordFile",&obj0,&obj1)) 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_recordFile" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ 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_recordFile" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ result = (int)(arg1)->recordFile(arg2);
resultobj = SWIG_From_int(static_cast< int >(result));
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return resultobj;
@@ -4689,6 +4983,116 @@
}
+SWIGINTERN PyObject *_wrap_CoreSession_recordFile(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 == 2) {
+ 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_AsCharPtrAndSize(argv[1], 0, NULL, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_CoreSession_recordFile__SWIG_3(self, args);
+ }
+ }
+ }
+ if (argc == 3) {
+ 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_AsCharPtrAndSize(argv[1], 0, NULL, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ int res = SWIG_AsVal_int(argv[2], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_CoreSession_recordFile__SWIG_2(self, args);
+ }
+ }
+ }
+ }
+ 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_AsCharPtrAndSize(argv[1], 0, NULL, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ int res = SWIG_AsVal_int(argv[2], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ {
+ int res = SWIG_AsVal_int(argv[3], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_CoreSession_recordFile__SWIG_1(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_AsCharPtrAndSize(argv[1], 0, NULL, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ int res = SWIG_AsVal_int(argv[2], NULL);
+ _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_recordFile__SWIG_0(self, args);
+ }
+ }
+ }
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_recordFile'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " recordFile(CoreSession *,char *,int,int,int)\n"
+ " recordFile(CoreSession *,char *,int,int)\n"
+ " recordFile(CoreSession *,char *,int)\n"
+ " recordFile(CoreSession *,char *)\n");
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_CoreSession_setCallerData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -4722,24 +5126,75 @@
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setCallerData" "', argument " "3"" of type '" "char *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
- (arg1)->setCallerData(arg2,arg3);
- resultobj = SWIG_Py_Void();
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ (arg1)->setCallerData(arg2,arg3);
+ resultobj = SWIG_Py_Void();
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ return resultobj;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_CoreSession_originate__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ CoreSession *arg2 = (CoreSession *) 0 ;
+ char *arg3 = (char *) 0 ;
+ int arg4 ;
+ int result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
+ int res3 ;
+ char *buf3 = 0 ;
+ int alloc3 = 0 ;
+ int val4 ;
+ int ecode4 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+ PyObject * obj3 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOOO:CoreSession_originate",&obj0,&obj1,&obj2,&obj3)) 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_originate" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ arg1 = reinterpret_cast< CoreSession * >(argp1);
+ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_CoreSession, 0 | 0 );
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_originate" "', argument " "2"" of type '" "CoreSession *""'");
+ }
+ arg2 = reinterpret_cast< CoreSession * >(argp2);
+ res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_originate" "', 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_originate" "', argument " "4"" of type '" "int""'");
+ }
+ arg4 = static_cast< int >(val4);
+ result = (int)(arg1)->originate(arg2,arg3,arg4);
+ resultobj = SWIG_From_int(static_cast< int >(result));
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
return resultobj;
fail:
- if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
return NULL;
}
-SWIGINTERN PyObject *_wrap_CoreSession_originate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_CoreSession_originate__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
CoreSession *arg2 = (CoreSession *) 0 ;
char *arg3 = (char *) 0 ;
- int arg4 = (int) 60 ;
int result;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -4748,14 +5203,11 @@
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
- int val4 ;
- int ecode4 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
- PyObject * obj3 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"OOO|O:CoreSession_originate",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"OOO:CoreSession_originate",&obj0,&obj1,&obj2)) 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_originate" "', argument " "1"" of type '" "CoreSession *""'");
@@ -4771,14 +5223,7 @@
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_originate" "', argument " "3"" of type '" "char *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
- if (obj3) {
- ecode4 = SWIG_AsVal_int(obj3, &val4);
- if (!SWIG_IsOK(ecode4)) {
- SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_originate" "', argument " "4"" of type '" "int""'");
- }
- arg4 = static_cast< int >(val4);
- }
- result = (int)(arg1)->originate(arg2,arg3,arg4);
+ result = (int)(arg1)->originate(arg2,arg3);
resultobj = SWIG_From_int(static_cast< int >(result));
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
return resultobj;
@@ -4788,6 +5233,68 @@
}
+SWIGINTERN PyObject *_wrap_CoreSession_originate(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[5];
+ int ii;
+
+ if (!PyTuple_Check(args)) SWIG_fail;
+ argc = (int)PyObject_Length(args);
+ for (ii = 0; (ii < argc) && (ii < 4); ii++) {
+ argv[ii] = PyTuple_GET_ITEM(args,ii);
+ }
+ if (argc == 3) {
+ int _v;
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CoreSession, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_CoreSession_originate__SWIG_1(self, args);
+ }
+ }
+ }
+ }
+ 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) {
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CoreSession, 0);
+ _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_originate__SWIG_0(self, args);
+ }
+ }
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_originate'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " originate(CoreSession *,CoreSession *,char *,int)\n"
+ " originate(CoreSession *,CoreSession *,char *)\n");
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_CoreSession_setDTMFCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -5233,11 +5740,11 @@
}
-SWIGINTERN PyObject *_wrap_CoreSession_streamFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_CoreSession_streamFile__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
- int arg3 = (int) 0 ;
+ int arg3 ;
int result;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -5250,7 +5757,7 @@
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"OO|O:CoreSession_streamFile",&obj0,&obj1,&obj2)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"OOO:CoreSession_streamFile",&obj0,&obj1,&obj2)) 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_streamFile" "', argument " "1"" of type '" "CoreSession *""'");
@@ -5261,13 +5768,11 @@
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_streamFile" "', argument " "2"" of type '" "char *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
- if (obj2) {
- ecode3 = SWIG_AsVal_int(obj2, &val3);
- if (!SWIG_IsOK(ecode3)) {
- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_streamFile" "', argument " "3"" of type '" "int""'");
- }
- arg3 = static_cast< int >(val3);
- }
+ ecode3 = SWIG_AsVal_int(obj2, &val3);
+ if (!SWIG_IsOK(ecode3)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_streamFile" "', argument " "3"" of type '" "int""'");
+ }
+ arg3 = static_cast< int >(val3);
result = (int)(arg1)->streamFile(arg2,arg3);
resultobj = SWIG_From_int(static_cast< int >(result));
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
@@ -5278,6 +5783,92 @@
}
+SWIGINTERN PyObject *_wrap_CoreSession_streamFile__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_streamFile",&obj0,&obj1)) 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_streamFile" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ 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_streamFile" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ result = (int)(arg1)->streamFile(arg2);
+ resultobj = SWIG_From_int(static_cast< int >(result));
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return resultobj;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_CoreSession_streamFile(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[4];
+ int ii;
+
+ if (!PyTuple_Check(args)) SWIG_fail;
+ argc = (int)PyObject_Length(args);
+ for (ii = 0; (ii < argc) && (ii < 3); ii++) {
+ argv[ii] = PyTuple_GET_ITEM(args,ii);
+ }
+ if (argc == 2) {
+ 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_AsCharPtrAndSize(argv[1], 0, NULL, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_CoreSession_streamFile__SWIG_1(self, args);
+ }
+ }
+ }
+ if (argc == 3) {
+ 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_AsCharPtrAndSize(argv[1], 0, NULL, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ {
+ int res = SWIG_AsVal_int(argv[2], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_CoreSession_streamFile__SWIG_0(self, args);
+ }
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_streamFile'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " streamFile(CoreSession *,char *,int)\n"
+ " streamFile(CoreSession *,char *)\n");
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_CoreSession_flushEvents(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -5638,11 +6229,132 @@
SWIGINTERN PyObject *CoreSession_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_CoreSession, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
+SWIGINTERN PyObject *_wrap_console_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:console_log",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "console_log" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "console_log" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ console_log(arg1,arg2);
+ resultobj = SWIG_Py_Void();
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return resultobj;
+fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_console_clean_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ char *arg1 = (char *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:console_clean_log",&obj0)) SWIG_fail;
+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "console_clean_log" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ console_clean_log(arg1);
+ resultobj = SWIG_Py_Void();
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ return resultobj;
+fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_api_execute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ char *arg1 = (char *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *result = 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:api_execute",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "api_execute" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "api_execute" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ result = (char *)api_execute(arg1,arg2);
+ resultobj = SWIG_FromCharPtr((const char *)result);
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return resultobj;
+fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_api_reply_delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ char *arg1 = (char *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:api_reply_delete",&obj0)) SWIG_fail;
+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "api_reply_delete" "', argument " "1"" of type '" "char *""'");
+ }
+ arg1 = reinterpret_cast< char * >(buf1);
+ api_reply_delete(arg1);
+ resultobj = SWIG_Py_Void();
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ return resultobj;
+fail:
+ if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_bridge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = 0 ;
@@ -5829,7 +6541,7 @@
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
- argc = PyObject_Length(args);
+ argc = (int)PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 1); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
@@ -5855,7 +6567,11 @@
}
fail:
- SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_PySession'.\n Possible C/C++ prototypes are:\n PySession()\n PySession(char *)\n PySession(switch_core_session_t *)\n");
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_PySession'.\n"
+ " Possible C/C++ prototypes are:\n"
+ " PySession()\n"
+ " PySession(char *)\n"
+ " PySession(switch_core_session_t *)\n");
return NULL;
}
@@ -6088,16 +6804,12 @@
SWIGINTERN PyObject *PySession_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_PySession, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
static PyMethodDef SwigMethods[] = {
- { (char *)"console_log", _wrap_console_log, METH_VARARGS, NULL},
- { (char *)"console_clean_log", _wrap_console_clean_log, METH_VARARGS, NULL},
- { (char *)"api_execute", _wrap_api_execute, METH_VARARGS, NULL},
- { (char *)"api_reply_delete", _wrap_api_reply_delete, METH_VARARGS, NULL},
{ (char *)"input_callback_state_t_function_set", _wrap_input_callback_state_t_function_set, METH_VARARGS, NULL},
{ (char *)"input_callback_state_t_function_get", _wrap_input_callback_state_t_function_get, METH_VARARGS, NULL},
{ (char *)"input_callback_state_t_threadState_set", _wrap_input_callback_state_t_threadState_set, METH_VARARGS, NULL},
@@ -6123,12 +6835,13 @@
{ (char *)"new_Event", _wrap_new_Event, METH_VARARGS, NULL},
{ (char *)"delete_Event", _wrap_delete_Event, METH_VARARGS, NULL},
{ (char *)"Event_serialize", _wrap_Event_serialize, METH_VARARGS, NULL},
- { (char *)"Event_set_priority", _wrap_Event_set_priority, METH_VARARGS, NULL},
- { (char *)"Event_get_header", _wrap_Event_get_header, METH_VARARGS, NULL},
- { (char *)"Event_get_body", _wrap_Event_get_body, METH_VARARGS, NULL},
- { (char *)"Event_add_body", _wrap_Event_add_body, METH_VARARGS, NULL},
- { (char *)"Event_add_header", _wrap_Event_add_header, METH_VARARGS, NULL},
- { (char *)"Event_del_header", _wrap_Event_del_header, METH_VARARGS, NULL},
+ { (char *)"Event_setPriority", _wrap_Event_setPriority, METH_VARARGS, NULL},
+ { (char *)"Event_getHeader", _wrap_Event_getHeader, METH_VARARGS, NULL},
+ { (char *)"Event_getBody", _wrap_Event_getBody, METH_VARARGS, NULL},
+ { (char *)"Event_getType", _wrap_Event_getType, METH_VARARGS, NULL},
+ { (char *)"Event_addBody", _wrap_Event_addBody, METH_VARARGS, NULL},
+ { (char *)"Event_addHeader", _wrap_Event_addHeader, METH_VARARGS, NULL},
+ { (char *)"Event_delHeader", _wrap_Event_delHeader, METH_VARARGS, NULL},
{ (char *)"Event_fire", _wrap_Event_fire, METH_VARARGS, NULL},
{ (char *)"Event_swigregister", Event_swigregister, METH_VARARGS, NULL},
{ (char *)"delete_CoreSession", _wrap_delete_CoreSession, METH_VARARGS, NULL},
@@ -6176,6 +6889,10 @@
{ (char *)"CoreSession_check_hangup_hook", _wrap_CoreSession_check_hangup_hook, METH_VARARGS, NULL},
{ (char *)"CoreSession_run_dtmf_callback", _wrap_CoreSession_run_dtmf_callback, METH_VARARGS, NULL},
{ (char *)"CoreSession_swigregister", CoreSession_swigregister, METH_VARARGS, NULL},
+ { (char *)"console_log", _wrap_console_log, METH_VARARGS, NULL},
+ { (char *)"console_clean_log", _wrap_console_clean_log, METH_VARARGS, NULL},
+ { (char *)"api_execute", _wrap_api_execute, METH_VARARGS, NULL},
+ { (char *)"api_reply_delete", _wrap_api_reply_delete, METH_VARARGS, NULL},
{ (char *)"bridge", _wrap_bridge, METH_VARARGS, NULL},
{ (char *)"hanguphook", _wrap_hanguphook, METH_VARARGS, NULL},
{ (char *)"dtmf_callback", _wrap_dtmf_callback, METH_VARARGS, NULL},
@@ -6195,7 +6912,7 @@
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
-static void *_p_PySessionTo_p_CoreSession(void *x) {
+static void *_p_PySessionTo_p_CoreSession(void *x, int *newmemory) {
return (void *)((CoreSession *) ((PySession *) x));
}
static swig_type_info _swigt__p_CoreSession = {"_p_CoreSession", "CoreSession *", 0, 0, (void*)0, 0};
@@ -6203,7 +6920,7 @@
static swig_type_info _swigt__p_PySession = {"_p_PySession", "PySession *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Stream = {"_p_Stream", "Stream *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_session_flag_t = {"_p_session_flag_t", "enum session_flag_t *|session_flag_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_swap_state_t = {"_p_swap_state_t", "enum swap_state_t *|swap_state_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_switch_channel_state_t = {"_p_switch_channel_state_t", "switch_channel_state_t *", 0, 0, (void*)0, 0};
@@ -6348,7 +7065,7 @@
SWIG_InitializeModule(void *clientdata) {
size_t i;
swig_module_info *module_head, *iter;
- int found;
+ int found, init;
clientdata = clientdata;
@@ -6358,6 +7075,9 @@
swig_module.type_initial = swig_type_initial;
swig_module.cast_initial = swig_cast_initial;
swig_module.next = &swig_module;
+ init = 1;
+ } else {
+ init = 0;
}
/* Try and load any already created modules */
@@ -6386,6 +7106,12 @@
module_head->next = &swig_module;
}
+ /* When multiple interpeters are used, a module could have already been initialized in
+ a different interpreter, but not yet have a pointer in this interpreter.
+ In this case, we do not want to continue adding types... everything should be
+ set up already */
+ if (init == 0) return;
+
/* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
printf("SWIG_InitializeModule: size %d\n", swig_module.size);
Modified: freeswitch/trunk/src/switch_cpp.cpp
==============================================================================
--- freeswitch/trunk/src/switch_cpp.cpp (original)
+++ freeswitch/trunk/src/switch_cpp.cpp Wed Apr 30 15:42:26 2008
@@ -120,7 +120,7 @@
return false;
}
-SWITCH_DECLARE(bool) Event::set_priority(switch_priority_t priority)
+SWITCH_DECLARE(bool) Event::setPriority(switch_priority_t priority)
{
if (event) {
switch_event_set_priority(event, priority);
@@ -129,7 +129,7 @@
return false;
}
-SWITCH_DECLARE(char *)Event::get_header(char *header_name)
+SWITCH_DECLARE(char *)Event::getHeader(char *header_name)
{
if (event) {
return switch_event_get_header(event, header_name);
@@ -137,7 +137,7 @@
return NULL;
}
-SWITCH_DECLARE(bool) Event::add_header(const char *header_name, const char *value)
+SWITCH_DECLARE(bool) Event::addHeader(const char *header_name, const char *value)
{
if (event) {
return switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, header_name, value) == SWITCH_STATUS_SUCCESS ? true : false;
@@ -146,7 +146,7 @@
return false;
}
-SWITCH_DECLARE(bool) Event::del_header(const char *header_name)
+SWITCH_DECLARE(bool) Event::delHeader(const char *header_name)
{
if (event) {
return switch_event_del_header(event, header_name) == SWITCH_STATUS_SUCCESS ? true : false;
@@ -156,7 +156,7 @@
}
-SWITCH_DECLARE(bool) Event::add_body(const char *value)
+SWITCH_DECLARE(bool) Event::addBody(const char *value)
{
if (event) {
return switch_event_add_body(event, "%s", value) == SWITCH_STATUS_SUCCESS ? true : false;
@@ -165,7 +165,7 @@
return false;
}
-SWITCH_DECLARE(char *)Event::get_body(void)
+SWITCH_DECLARE(char *)Event::getBody(void)
{
if (event) {
return switch_event_get_body(event);
@@ -174,6 +174,15 @@
return NULL;
}
+SWITCH_DECLARE(char *)Event::getType(void)
+{
+ if (event) {
+ return switch_event_name(event->event_id);
+ }
+
+ return "invalid";
+}
+
SWITCH_DECLARE_CONSTRUCTOR Stream::Stream()
{
SWITCH_STANDARD_STREAM(mystream);
@@ -520,21 +529,11 @@
SWITCH_DECLARE(bool) CoreSession::ready() {
- switch_channel_t *channel;
-
- if (!session) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "You must call the session.originate method before calling this method!\n");
- return false;
- }
-
- channel = switch_core_session_get_channel(session);
-
+ sanity_check(false);
return switch_channel_ready(channel) != 0;
}
-SWITCH_DECLARE(int) CoreSession::originate(CoreSession *a_leg_session,
- char *dest,
- int timeout)
+SWITCH_DECLARE(int) CoreSession::originate(CoreSession *a_leg_session, char *dest, int timeout)
{
switch_memory_pool_t *pool = NULL;
1
0
30 Apr '08
Author: mikej
Date: Wed Apr 30 13:19:07 2008
New Revision: 8220
Modified:
freeswitch/trunk/src/include/switch_cpp.h
freeswitch/trunk/src/switch_cpp.cpp
Log:
start of msvc build for mod_lua
Modified: freeswitch/trunk/src/include/switch_cpp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_cpp.h (original)
+++ freeswitch/trunk/src/include/switch_cpp.h Wed Apr 30 13:19:07 2008
@@ -82,11 +82,11 @@
switch_stream_handle_t *stream_p;
int mine;
public:
- Stream(void);
- Stream(switch_stream_handle_t *);
- virtual ~Stream();
- void write(const char *data);
- const char *get_data(void);
+ SWITCH_DECLARE_CONSTRUCTOR Stream(void);
+ SWITCH_DECLARE_CONSTRUCTOR Stream(switch_stream_handle_t *);
+ virtual SWITCH_DECLARE_CONSTRUCTOR ~Stream();
+ SWITCH_DECLARE(void) write(const char *data);
+ SWITCH_DECLARE(const char *)get_data(void);
};
class Event {
@@ -96,17 +96,17 @@
char *serialized_string;
int mine;
- Event(const char *type, const char *subclass_name = NULL);
- Event(switch_event_t *wrap_me, int free_me=0);
- virtual ~Event();
- const char *serialize(const char *format=NULL);
- bool set_priority(switch_priority_t priority = SWITCH_PRIORITY_NORMAL);
- char *get_header(char *header_name);
- char *get_body(void);
- bool add_body(const char *value);
- bool add_header(const char *header_name, const char *value);
- bool del_header(const char *header_name);
- bool fire(void);
+ SWITCH_DECLARE_CONSTRUCTOR Event(const char *type, const char *subclass_name = NULL);
+ SWITCH_DECLARE_CONSTRUCTOR Event(switch_event_t *wrap_me, int free_me=0);
+ virtual SWITCH_DECLARE_CONSTRUCTOR ~Event();
+ SWITCH_DECLARE(const char *)serialize(const char *format=NULL);
+ SWITCH_DECLARE(bool) set_priority(switch_priority_t priority = SWITCH_PRIORITY_NORMAL);
+ SWITCH_DECLARE(char *)get_header(char *header_name);
+ SWITCH_DECLARE(char *)get_body(void);
+ SWITCH_DECLARE(bool) add_body(const char *value);
+ SWITCH_DECLARE(bool) add_header(const char *header_name, const char *value);
+ SWITCH_DECLARE(bool) del_header(const char *header_name);
+ SWITCH_DECLARE(bool) fire(void);
};
Modified: freeswitch/trunk/src/switch_cpp.cpp
==============================================================================
--- freeswitch/trunk/src/switch_cpp.cpp (original)
+++ freeswitch/trunk/src/switch_cpp.cpp Wed Apr 30 13:19:07 2008
@@ -38,7 +38,7 @@
#endif
-Event::Event(const char *type, const char *subclass_name)
+SWITCH_DECLARE_CONSTRUCTOR Event::Event(const char *type, const char *subclass_name)
{
switch_event_types_t event_id;
@@ -51,14 +51,14 @@
mine = 1;
}
-Event::Event(switch_event_t *wrap_me, int free_me)
+SWITCH_DECLARE_CONSTRUCTOR Event::Event(switch_event_t *wrap_me, int free_me)
{
event = wrap_me;
mine = free_me;
serialized_string = NULL;
}
-Event::~Event()
+SWITCH_DECLARE_CONSTRUCTOR Event::~Event()
{
if (serialized_string) {
@@ -71,7 +71,7 @@
}
-const char *Event::serialize(const char *format)
+SWITCH_DECLARE(const char *)Event::serialize(const char *format)
{
int isxml = 0;
@@ -106,7 +106,7 @@
}
-bool Event::fire(void)
+SWITCH_DECLARE(bool) Event::fire(void)
{
if (!mine) {
switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "Not My event!\n");
@@ -120,7 +120,7 @@
return false;
}
-bool Event::set_priority(switch_priority_t priority)
+SWITCH_DECLARE(bool) Event::set_priority(switch_priority_t priority)
{
if (event) {
switch_event_set_priority(event, priority);
@@ -129,7 +129,7 @@
return false;
}
-char *Event::get_header(char *header_name)
+SWITCH_DECLARE(char *)Event::get_header(char *header_name)
{
if (event) {
return switch_event_get_header(event, header_name);
@@ -137,7 +137,7 @@
return NULL;
}
-bool Event::add_header(const char *header_name, const char *value)
+SWITCH_DECLARE(bool) Event::add_header(const char *header_name, const char *value)
{
if (event) {
return switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, header_name, value) == SWITCH_STATUS_SUCCESS ? true : false;
@@ -146,7 +146,7 @@
return false;
}
-bool Event::del_header(const char *header_name)
+SWITCH_DECLARE(bool) Event::del_header(const char *header_name)
{
if (event) {
return switch_event_del_header(event, header_name) == SWITCH_STATUS_SUCCESS ? true : false;
@@ -156,7 +156,7 @@
}
-bool Event::add_body(const char *value)
+SWITCH_DECLARE(bool) Event::add_body(const char *value)
{
if (event) {
return switch_event_add_body(event, "%s", value) == SWITCH_STATUS_SUCCESS ? true : false;
@@ -165,7 +165,7 @@
return false;
}
-char *Event::get_body(void)
+SWITCH_DECLARE(char *)Event::get_body(void)
{
if (event) {
return switch_event_get_body(event);
@@ -174,33 +174,33 @@
return NULL;
}
-Stream::Stream()
+SWITCH_DECLARE_CONSTRUCTOR Stream::Stream()
{
SWITCH_STANDARD_STREAM(mystream);
stream_p = &mystream;
mine = 1;
}
-Stream::Stream(switch_stream_handle_t *sp)
+SWITCH_DECLARE_CONSTRUCTOR Stream::Stream(switch_stream_handle_t *sp)
{
stream_p = sp;
mine = 0;
}
-Stream::~Stream()
+SWITCH_DECLARE_CONSTRUCTOR Stream::~Stream()
{
if (mine) {
switch_safe_free(mystream.data);
}
}
-void Stream::write(const char *data)
+SWITCH_DECLARE(void) Stream::write(const char *data)
{
stream_p->write_function(stream_p, "%s", data);
}
-const char *Stream::get_data()
+SWITCH_DECLARE(const char *)Stream::get_data()
{
return stream_p ? (const char *)stream_p->data : NULL;
}
1
0
[Freeswitch-svn] [commit] r8219 - in freeswitch/trunk: . src src/include src/mod/languages/mod_lua w32/Library
by Freeswitch SVN 30 Apr '08
by Freeswitch SVN 30 Apr '08
30 Apr '08
Author: mikej
Date: Wed Apr 30 10:20:31 2008
New Revision: 8219
Modified:
freeswitch/trunk/Freeswitch.2008.sln
freeswitch/trunk/src/include/switch_cpp.h
freeswitch/trunk/src/include/switch_platform.h
freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.h
freeswitch/trunk/src/switch_cpp.cpp
freeswitch/trunk/w32/Library/FreeSwitchCore.2008.vcproj
Log:
start of msvc build
Modified: freeswitch/trunk/Freeswitch.2008.sln
==============================================================================
--- freeswitch/trunk/Freeswitch.2008.sln (original)
+++ freeswitch/trunk/Freeswitch.2008.sln Wed Apr 30 10:20:31 2008
@@ -866,6 +866,11 @@
{204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_lua", "src\mod\languages\mod_lua\mod_lua.2008.vcproj", "{7B077E7F-1BE7-4291-AB86-55E527B25CAC}"
+ ProjectSection(ProjectDependencies) = postProject
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -1446,6 +1451,12 @@
{36E854E3-CE12-4348-A125-CCF3F9D74813}.Release|Win32.ActiveCfg = Release|Win32
{36E854E3-CE12-4348-A125-CCF3F9D74813}.Release|Win32.Build.0 = Release|Win32
{36E854E3-CE12-4348-A125-CCF3F9D74813}.Release|x64.ActiveCfg = Release|Win32
+ {7B077E7F-1BE7-4291-AB86-55E527B25CAC}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7B077E7F-1BE7-4291-AB86-55E527B25CAC}.Debug|Win32.Build.0 = Debug|Win32
+ {7B077E7F-1BE7-4291-AB86-55E527B25CAC}.Debug|x64.ActiveCfg = Debug|Win32
+ {7B077E7F-1BE7-4291-AB86-55E527B25CAC}.Release|Win32.ActiveCfg = Release|Win32
+ {7B077E7F-1BE7-4291-AB86-55E527B25CAC}.Release|Win32.Build.0 = Release|Win32
+ {7B077E7F-1BE7-4291-AB86-55E527B25CAC}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1493,6 +1504,7 @@
{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{028C7278-05D7-4E18-82FE-BE231B844F41} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{36E854E3-CE12-4348-A125-CCF3F9D74813} = {0C808854-54D1-4230-BFF5-77B5FD905000}
+ {7B077E7F-1BE7-4291-AB86-55E527B25CAC} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{692F6330-4D87-4C82-81DF-40DB5892636E} = {4CF6A6AC-07DE-4B9E-ABE1-7F98B64E0BB0}
{E7116F50-2B10-472F-92BD-C8667AA9C1AE} = {4CF6A6AC-07DE-4B9E-ABE1-7F98B64E0BB0}
{1C453396-D912-4213-89FD-9B489162B7B5} = {A7AB4405-FDB7-4853-9FBB-1516B1C3D80A}
Modified: freeswitch/trunk/src/include/switch_cpp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_cpp.h (original)
+++ freeswitch/trunk/src/include/switch_cpp.h Wed Apr 30 10:20:31 2008
@@ -61,12 +61,6 @@
*/
-void console_log(char *level_str, char *msg);
-void console_clean_log(char *msg);
-char *api_execute(char *cmd, char *arg);
-void api_reply_delete(char *reply);
-
-
typedef struct input_callback_state {
void *function; // pointer to the language specific callback function
// eg, PyObject *pyfunc
@@ -130,12 +124,12 @@
void *on_hangup; // language specific callback function, cast as void *
switch_file_handle_t local_fh;
switch_file_handle_t *fhp;
- switch_status_t process_callback_result(char *ret);
+ SWITCH_DECLARE(switch_status_t) process_callback_result(char *ret);
public:
- CoreSession();
- CoreSession(char *uuid);
- CoreSession(switch_core_session_t *new_session);
- virtual ~CoreSession();
+ SWITCH_DECLARE_CONSTRUCTOR CoreSession();
+ SWITCH_DECLARE_CONSTRUCTOR CoreSession(char *uuid);
+ SWITCH_DECLARE_CONSTRUCTOR CoreSession(switch_core_session_t *new_session);
+ virtual SWITCH_DECLARE_CONSTRUCTOR ~CoreSession();
switch_core_session_t *session;
switch_channel_t *channel;
unsigned int flags;
@@ -144,13 +138,13 @@
// field in this->args
switch_channel_state_t hook_state; // store hookstate for on_hangup callback
- int answer();
- int preAnswer();
- virtual void hangup(char *cause = "normal_clearing");
- void setVariable(char *var, char *val);
- void setPrivate(char *var, void *val);
- void *getPrivate(char *var);
- const char *getVariable(char *var);
+ SWITCH_DECLARE(int) answer();
+ SWITCH_DECLARE(int) preAnswer();
+ virtual SWITCH_DECLARE(void) hangup(char *cause = "normal_clearing");
+ SWITCH_DECLARE(void) setVariable(char *var, char *val);
+ SWITCH_DECLARE(void) setPrivate(char *var, void *val);
+ SWITCH_DECLARE(void *)getPrivate(char *var);
+ SWITCH_DECLARE(const char *)getVariable(char *var);
/** \brief Record to a file
@@ -160,14 +154,14 @@
* to be considered silence (500 is a good starting point).
* \param <[silence_secs]> seconds of silence to interrupt the record.
*/
- int recordFile(char *file_name, int max_len=0, int silence_threshold=0, int silence_secs=0);
+ SWITCH_DECLARE(int) recordFile(char *file_name, int max_len=0, int silence_threshold=0, int silence_secs=0);
/** \brief Set attributes of caller data for purposes of outgoing calls
* \param var - the variable name, eg, "caller_id_name"
* \param val - the data to set, eg, "bob"
*/
- void setCallerData(char *var, char *val);
+ SWITCH_DECLARE(void) setCallerData(char *var, char *val);
/** \brief Originate a call to a destination
*
@@ -178,7 +172,7 @@
* \return an int status code indicating success or failure
*
*/
- int originate(CoreSession *a_leg_session,
+ SWITCH_DECLARE(int) originate(CoreSession *a_leg_session,
char *dest,
int timeout=60);
@@ -191,16 +185,16 @@
* certain other methods are executing.
*
*/
- void setDTMFCallback(void *cbfunc, char *funcargs);
+ SWITCH_DECLARE(void) setDTMFCallback(void *cbfunc, char *funcargs);
- int speak(char *text);
- void set_tts_parms(char *tts_name, char *voice_name);
+ SWITCH_DECLARE(int) speak(char *text);
+ SWITCH_DECLARE(void) set_tts_parms(char *tts_name, char *voice_name);
/**
* For timeout milliseconds, call the dtmf function set previously
* by setDTMFCallback whenever a dtmf or event is received
*/
- int collectDigits(int timeout);
+ SWITCH_DECLARE(int) collectDigits(int timeout);
/**
* Collect up to maxdigits digits worth of digits
@@ -209,14 +203,14 @@
* (see mod_python.i). This does NOT call any callbacks upon
* receiving dtmf digits. For that, use collectDigits.
*/
- int getDigits(char *dtmf_buf,
+ SWITCH_DECLARE(int) getDigits(char *dtmf_buf,
switch_size_t buflen,
switch_size_t maxdigits,
char *terminators,
char *terminator,
int timeout);
- int transfer(char *extensions, char *dialplan, char *context);
+ SWITCH_DECLARE(int) transfer(char *extensions, char *dialplan, char *context);
/** \brief Play a file into channel and collect dtmfs
*
@@ -226,7 +220,7 @@
* setDTMFCallback(..) as it uses its own internal callback
* handler.
*/
- int playAndGetDigits(int min_digits,
+ SWITCH_DECLARE(int) playAndGetDigits(int min_digits,
int max_digits,
int max_tries,
int timeout,
@@ -244,28 +238,28 @@
* \return an int status code indicating success or failure
*
*/
- int streamFile(char *file, int starting_sample_count=0);
+ SWITCH_DECLARE(int) streamFile(char *file, int starting_sample_count=0);
/** \brief flush any pending events
*/
- int flushEvents();
+ SWITCH_DECLARE(int) flushEvents();
/** \brief flush any pending digits
*/
- int flushDigits();
+ SWITCH_DECLARE(int) flushDigits();
- int setAutoHangup(bool val);
+ SWITCH_DECLARE(int) setAutoHangup(bool val);
/** \brief Set the hangup callback function
* \param hangup_func - language specific function ptr cast into void *
*/
- void setHangupHook(void *hangup_func);
+ SWITCH_DECLARE(void) setHangupHook(void *hangup_func);
- bool ready();
+ SWITCH_DECLARE(bool) ready();
- void execute(char *app, char *data);
+ SWITCH_DECLARE(void) execute(char *app, char *data);
- void sendEvent(Event *sendME);
+ SWITCH_DECLARE(void) sendEvent(Event *sendME);
virtual bool begin_allow_threads() = 0;
virtual bool end_allow_threads() = 0;
@@ -292,26 +286,26 @@
/* ---- functions not bound to CoreSession instance ----- */
-void console_log(char *level_str, char *msg);
-void console_clean_log(char *msg);
-char *api_execute(char *cmd, char *arg);
-void api_reply_delete(char *reply);
+SWITCH_DECLARE(void) console_log(char *level_str, char *msg);
+SWITCH_DECLARE(void) console_clean_log(char *msg);
+SWITCH_DECLARE(char *)api_execute(char *cmd, char *arg);
+SWITCH_DECLARE(void) api_reply_delete(char *reply);
/** \brief bridge the audio of session_b into session_a
*
* NOTE: the stuff regarding the dtmf callback might be completely
* wrong and has not been reviewed or tested
*/
-void bridge(CoreSession &session_a, CoreSession &session_b);
+SWITCH_DECLARE(void) bridge(CoreSession &session_a, CoreSession &session_b);
/** \brief the actual hangup hook called back by freeswitch core
* which in turn gets the session and calls the appropriate
* instance method to complete the callback.
*/
-switch_status_t hanguphook(switch_core_session_t *session);
+SWITCH_DECLARE_NONSTD(switch_status_t) hanguphook(switch_core_session_t *session);
-switch_status_t dtmf_callback(switch_core_session_t *session,
+SWITCH_DECLARE_NONSTD(switch_status_t) dtmf_callback(switch_core_session_t *session,
void *input,
switch_input_type_t itype,
void *buf,
Modified: freeswitch/trunk/src/include/switch_platform.h
==============================================================================
--- freeswitch/trunk/src/include/switch_platform.h (original)
+++ freeswitch/trunk/src/include/switch_platform.h Wed Apr 30 10:20:31 2008
@@ -175,6 +175,7 @@
#define SWITCH_MOD_DECLARE_DATA
#define SWITCH_THREAD_FUNC
#endif
+#define SWITCH_DECLARE_CONSTRUCTOR SWITCH_DECLARE_DATA
#ifdef DOXYGEN
#define DoxyDefine(x) x
#else
Modified: freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.h
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.h (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.h Wed Apr 30 10:20:31 2008
@@ -3,12 +3,6 @@
#include <switch_cpp.h>
-void console_log(char *level_str, char *msg);
-void console_clean_log(char *msg);
-char *api_execute(char *cmd, char *arg);
-void api_reply_delete(char *reply);
-
-
class Session : public CoreSession {
public:
Session();
Modified: freeswitch/trunk/src/switch_cpp.cpp
==============================================================================
--- freeswitch/trunk/src/switch_cpp.cpp (original)
+++ freeswitch/trunk/src/switch_cpp.cpp Wed Apr 30 10:20:31 2008
@@ -206,7 +206,7 @@
}
-CoreSession::CoreSession()
+SWITCH_DECLARE_CONSTRUCTOR CoreSession::CoreSession()
{
session = NULL;
channel = NULL;
@@ -232,7 +232,7 @@
}
-CoreSession::CoreSession(char *nuuid)
+SWITCH_DECLARE_CONSTRUCTOR CoreSession::CoreSession(char *nuuid)
{
memset(&caller_profile, 0, sizeof(caller_profile));
init_vars();
@@ -252,7 +252,7 @@
}
}
-CoreSession::CoreSession(switch_core_session_t *new_session)
+SWITCH_DECLARE_CONSTRUCTOR CoreSession::CoreSession(switch_core_session_t *new_session)
{
memset(&caller_profile, 0, sizeof(caller_profile));
init_vars();
@@ -264,7 +264,7 @@
}
}
-CoreSession::~CoreSession()
+SWITCH_DECLARE_CONSTRUCTOR CoreSession::~CoreSession()
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CoreSession::~CoreSession desctructor\n");
switch_channel_t *channel = NULL;
@@ -282,7 +282,7 @@
switch_safe_free(voice_name);
}
-int CoreSession::answer()
+SWITCH_DECLARE(int) CoreSession::answer()
{
switch_status_t status;
@@ -291,7 +291,7 @@
return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
}
-int CoreSession::preAnswer()
+SWITCH_DECLARE(int) CoreSession::preAnswer()
{
switch_status_t status;
sanity_check(-1);
@@ -299,38 +299,38 @@
return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
}
-void CoreSession::hangup(char *cause)
+SWITCH_DECLARE(void) CoreSession::hangup(char *cause)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CoreSession::hangup\n");
sanity_check_noreturn;
switch_channel_hangup(channel, switch_channel_str2cause(cause));
}
-void CoreSession::setPrivate(char *var, void *val)
+SWITCH_DECLARE(void) CoreSession::setPrivate(char *var, void *val)
{
sanity_check_noreturn;
switch_channel_set_private(channel, var, val);
}
-void *CoreSession::getPrivate(char *var)
+SWITCH_DECLARE(void *)CoreSession::getPrivate(char *var)
{
sanity_check(NULL);
return switch_channel_get_private(channel, var);
}
-void CoreSession::setVariable(char *var, char *val)
+SWITCH_DECLARE(void) CoreSession::setVariable(char *var, char *val)
{
sanity_check_noreturn;
switch_channel_set_variable(channel, var, val);
}
-const char *CoreSession::getVariable(char *var)
+SWITCH_DECLARE(const char *)CoreSession::getVariable(char *var)
{
sanity_check(NULL);
return switch_channel_get_variable(channel, var);
}
-void CoreSession::execute(char *app, char *data)
+SWITCH_DECLARE(void) CoreSession::execute(char *app, char *data)
{
const switch_application_interface_t *application_interface;
sanity_check_noreturn;
@@ -343,7 +343,7 @@
}
}
-void CoreSession::setDTMFCallback(void *cbfunc, char *funcargs) {
+SWITCH_DECLARE(void) CoreSession::setDTMFCallback(void *cbfunc, char *funcargs) {
sanity_check_noreturn;
@@ -365,7 +365,7 @@
}
-void CoreSession::sendEvent(Event *sendME)
+SWITCH_DECLARE(void) CoreSession::sendEvent(Event *sendME)
{
if (sendME->mine) {
switch_core_session_receive_event(session, &sendME->event);
@@ -374,7 +374,7 @@
}
}
-int CoreSession::speak(char *text)
+SWITCH_DECLARE(int) CoreSession::speak(char *text)
{
switch_status_t status;
@@ -402,7 +402,7 @@
return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
}
-void CoreSession::set_tts_parms(char *tts_name_p, char *voice_name_p)
+SWITCH_DECLARE(void) CoreSession::set_tts_parms(char *tts_name_p, char *voice_name_p)
{
sanity_check_noreturn;
switch_safe_free(tts_name);
@@ -413,7 +413,7 @@
-int CoreSession::collectDigits(int timeout) {
+SWITCH_DECLARE(int) CoreSession::collectDigits(int timeout) {
sanity_check(-1);
begin_allow_threads();
switch_ivr_collect_digits_callback(session, ap, timeout);
@@ -421,7 +421,7 @@
return SWITCH_STATUS_SUCCESS;
}
-int CoreSession::getDigits(char *dtmf_buf,
+SWITCH_DECLARE(int) CoreSession::getDigits(char *dtmf_buf,
switch_size_t buflen,
switch_size_t maxdigits,
char *terminators,
@@ -445,7 +445,7 @@
return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
}
-int CoreSession::transfer(char *extension, char *dialplan, char *context)
+SWITCH_DECLARE(int) CoreSession::transfer(char *extension, char *dialplan, char *context)
{
switch_status_t status;
sanity_check(-1);
@@ -456,7 +456,7 @@
return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
}
-int CoreSession::playAndGetDigits(int min_digits,
+SWITCH_DECLARE(int) CoreSession::playAndGetDigits(int min_digits,
int max_digits,
int max_tries,
int timeout,
@@ -487,7 +487,7 @@
return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
}
-int CoreSession::streamFile(char *file, int starting_sample_count) {
+SWITCH_DECLARE(int) CoreSession::streamFile(char *file, int starting_sample_count) {
switch_status_t status;
//switch_file_handle_t fh = { 0 };
@@ -518,7 +518,7 @@
}
-bool CoreSession::ready() {
+SWITCH_DECLARE(bool) CoreSession::ready() {
switch_channel_t *channel;
@@ -532,7 +532,7 @@
return switch_channel_ready(channel) != 0;
}
-int CoreSession::originate(CoreSession *a_leg_session,
+SWITCH_DECLARE(int) CoreSession::originate(CoreSession *a_leg_session,
char *dest,
int timeout)
{
@@ -585,7 +585,7 @@
return SWITCH_STATUS_FALSE;
}
-int CoreSession::recordFile(char *file_name, int max_len, int silence_threshold, int silence_secs)
+SWITCH_DECLARE(int) CoreSession::recordFile(char *file_name, int max_len, int silence_threshold, int silence_secs)
{
switch_file_handle_t fh = { 0 };
switch_status_t status;
@@ -600,7 +600,7 @@
}
-int CoreSession::flushEvents()
+SWITCH_DECLARE(int) CoreSession::flushEvents()
{
switch_event_t *event;
switch_channel_t *channel;
@@ -616,13 +616,13 @@
return SWITCH_STATUS_SUCCESS;
}
-int CoreSession::flushDigits()
+SWITCH_DECLARE(int) CoreSession::flushDigits()
{
switch_channel_flush_dtmf(switch_core_session_get_channel(session));
return SWITCH_STATUS_SUCCESS;
}
-int CoreSession::setAutoHangup(bool val)
+SWITCH_DECLARE(int) CoreSession::setAutoHangup(bool val)
{
if (!session) {
return SWITCH_STATUS_FALSE;
@@ -635,7 +635,7 @@
return SWITCH_STATUS_SUCCESS;
}
-void CoreSession::setCallerData(char *var, char *val) {
+SWITCH_DECLARE(void) CoreSession::setCallerData(char *var, char *val) {
if (strcmp(var, "dialplan") == 0) {
caller_profile.dialplan = val;
@@ -667,7 +667,7 @@
}
-void CoreSession::setHangupHook(void *hangup_func) {
+SWITCH_DECLARE(void) CoreSession::setHangupHook(void *hangup_func) {
sanity_check_noreturn;
@@ -699,7 +699,7 @@
/* ---- methods not bound to CoreSession instance ---- */
-void console_log(char *level_str, char *msg)
+SWITCH_DECLARE(void) console_log(char *level_str, char *msg)
{
switch_log_level_t level = SWITCH_LOG_DEBUG;
if (level_str) {
@@ -711,13 +711,13 @@
switch_log_printf(SWITCH_CHANNEL_LOG, level, "%s", switch_str_nil(msg));
}
-void console_clean_log(char *msg)
+SWITCH_DECLARE(void) console_clean_log(char *msg)
{
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN,SWITCH_LOG_DEBUG, "%s", switch_str_nil(msg));
}
-char *api_execute(char *cmd, char *arg)
+SWITCH_DECLARE(char *)api_execute(char *cmd, char *arg)
{
switch_stream_handle_t stream = { 0 };
SWITCH_STANDARD_STREAM(stream);
@@ -725,7 +725,7 @@
return (char *) stream.data;
}
-void api_reply_delete(char *reply)
+SWITCH_DECLARE(void) api_reply_delete(char *reply)
{
if (!switch_strlen_zero(reply)) {
free(reply);
@@ -733,7 +733,7 @@
}
-void bridge(CoreSession &session_a, CoreSession &session_b)
+SWITCH_DECLARE(void) bridge(CoreSession &session_a, CoreSession &session_b)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "bridge called, session_a uuid: %s\n", session_a.get_uuid());
switch_input_callback_function_t dtmf_func = NULL;
@@ -748,7 +748,7 @@
}
-switch_status_t hanguphook(switch_core_session_t *session_hungup)
+SWITCH_DECLARE_NONSTD(switch_status_t) hanguphook(switch_core_session_t *session_hungup)
{
switch_channel_t *channel = switch_core_session_get_channel(session_hungup);
CoreSession *coresession = NULL;
@@ -768,7 +768,7 @@
}
-switch_status_t dtmf_callback(switch_core_session_t *session_cb,
+SWITCH_DECLARE_NONSTD(switch_status_t) dtmf_callback(switch_core_session_t *session_cb,
void *input,
switch_input_type_t itype,
void *buf,
@@ -800,7 +800,7 @@
-switch_status_t CoreSession::process_callback_result(char *ret)
+SWITCH_DECLARE(switch_status_t) CoreSession::process_callback_result(char *ret)
{
switch_file_handle_t *fh = NULL;
Modified: freeswitch/trunk/w32/Library/FreeSwitchCore.2008.vcproj
==============================================================================
--- freeswitch/trunk/w32/Library/FreeSwitchCore.2008.vcproj (original)
+++ freeswitch/trunk/w32/Library/FreeSwitchCore.2008.vcproj Wed Apr 30 10:20:31 2008
@@ -389,8 +389,6 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
- PrecompiledHeaderThrough=""
- PrecompiledHeaderFile=""
/>
</FileConfiguration>
<FileConfiguration
@@ -399,8 +397,6 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
- PrecompiledHeaderThrough=""
- PrecompiledHeaderFile=""
/>
</FileConfiguration>
</File>
1
0
[Freeswitch-svn] [commit] r8218 - freeswitch/trunk/src/mod/languages/mod_lua
by Freeswitch SVN 30 Apr '08
by Freeswitch SVN 30 Apr '08
30 Apr '08
Author: mikej
Date: Tue Apr 29 23:55:38 2008
New Revision: 8218
Modified:
freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.c
freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_extra.c
Log:
tweaks
Modified: freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.c Tue Apr 29 23:55:38 2008
@@ -116,9 +116,9 @@
char *args = strchr(input_code, ' ');
if (args) {
char *code = NULL;
- *args++ = '\0';
int x, argc;
char *argv[128] = { 0 };
+ *args++ = '\0';
if ((argc = switch_separate_string(args, ' ', argv, (sizeof(argv) / sizeof(argv[0]))))) {
switch_stream_handle_t stream = { 0 };
Modified: freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_extra.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_extra.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_extra.c Tue Apr 29 23:55:38 2008
@@ -1,7 +1,7 @@
SWITCH_BEGIN_EXTERN_C
-int mod_lua_conjure_event(lua_State *L, switch_event_t *event, const char *name, int destroy_me)
+void mod_lua_conjure_event(lua_State *L, switch_event_t *event, const char *name, int destroy_me)
{
Event *result = new Event(event);
SWIG_NewPointerObj(L,result,SWIGTYPE_p_Event, destroy_me);
@@ -9,7 +9,7 @@
}
-int mod_lua_conjure_stream(lua_State *L, switch_stream_handle_t *stream, const char *name, int destroy_me)
+void mod_lua_conjure_stream(lua_State *L, switch_stream_handle_t *stream, const char *name, int destroy_me)
{
Stream *result = new Stream(stream);
SWIG_NewPointerObj(L,result,SWIGTYPE_p_Stream, destroy_me);
1
0
Author: mikej
Date: Tue Apr 29 22:29:06 2008
New Revision: 8217
Modified:
freeswitch/trunk/src/switch_cpp.cpp
Log:
unused var.
Modified: freeswitch/trunk/src/switch_cpp.cpp
==============================================================================
--- freeswitch/trunk/src/switch_cpp.cpp (original)
+++ freeswitch/trunk/src/switch_cpp.cpp Tue Apr 29 22:29:06 2008
@@ -89,7 +89,6 @@
if (isxml) {
switch_xml_t xml;
- char *xmlstr;
if ((xml = switch_event_xmlize(event, SWITCH_VA_NONE))) {
serialized_string = switch_xml_toxml(xml, SWITCH_FALSE);
switch_xml_free(xml);
1
0
[Freeswitch-svn] [commit] r8216 - freeswitch/trunk/src/mod/languages/mod_python
by Freeswitch SVN 30 Apr '08
by Freeswitch SVN 30 Apr '08
30 Apr '08
Author: greenlizard
Date: Tue Apr 29 20:37:52 2008
New Revision: 8216
Modified:
freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py
freeswitch/trunk/src/mod/languages/mod_python/freeswitch_python.cpp
freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp
Log:
fix and reswig after switch_cpp updates
Modified: freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py (original)
+++ freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py Tue Apr 29 20:37:52 2008
@@ -52,7 +52,6 @@
console_clean_log = _freeswitch.console_clean_log
api_execute = _freeswitch.api_execute
api_reply_delete = _freeswitch.api_reply_delete
-process_callback_result = _freeswitch.process_callback_result
class input_callback_state_t(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, input_callback_state_t, name, value)
@@ -106,12 +105,22 @@
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Event, name)
__repr__ = _swig_repr
+ __swig_setmethods__["event"] = _freeswitch.Event_event_set
+ __swig_getmethods__["event"] = _freeswitch.Event_event_get
+ if _newclass:event = _swig_property(_freeswitch.Event_event_get, _freeswitch.Event_event_set)
+ __swig_setmethods__["serialized_string"] = _freeswitch.Event_serialized_string_set
+ __swig_getmethods__["serialized_string"] = _freeswitch.Event_serialized_string_get
+ if _newclass:serialized_string = _swig_property(_freeswitch.Event_serialized_string_get, _freeswitch.Event_serialized_string_set)
+ __swig_setmethods__["mine"] = _freeswitch.Event_mine_set
+ __swig_getmethods__["mine"] = _freeswitch.Event_mine_get
+ if _newclass:mine = _swig_property(_freeswitch.Event_mine_get, _freeswitch.Event_mine_set)
def __init__(self, *args):
this = _freeswitch.new_Event(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _freeswitch.delete_Event
__del__ = lambda self : None;
+ def serialize(*args): return _freeswitch.Event_serialize(*args)
def set_priority(*args): return _freeswitch.Event_set_priority(*args)
def get_header(*args): return _freeswitch.Event_get_header(*args)
def get_body(*args): return _freeswitch.Event_get_body(*args)
@@ -153,6 +162,8 @@
def preAnswer(*args): return _freeswitch.CoreSession_preAnswer(*args)
def hangup(*args): return _freeswitch.CoreSession_hangup(*args)
def setVariable(*args): return _freeswitch.CoreSession_setVariable(*args)
+ def setPrivate(*args): return _freeswitch.CoreSession_setPrivate(*args)
+ def getPrivate(*args): return _freeswitch.CoreSession_getPrivate(*args)
def getVariable(*args): return _freeswitch.CoreSession_getVariable(*args)
def recordFile(*args): return _freeswitch.CoreSession_recordFile(*args)
def setCallerData(*args): return _freeswitch.CoreSession_setCallerData(*args)
@@ -171,6 +182,7 @@
def setHangupHook(*args): return _freeswitch.CoreSession_setHangupHook(*args)
def ready(*args): return _freeswitch.CoreSession_ready(*args)
def execute(*args): return _freeswitch.CoreSession_execute(*args)
+ def sendEvent(*args): return _freeswitch.CoreSession_sendEvent(*args)
def begin_allow_threads(*args): return _freeswitch.CoreSession_begin_allow_threads(*args)
def end_allow_threads(*args): return _freeswitch.CoreSession_end_allow_threads(*args)
def get_uuid(*args): return _freeswitch.CoreSession_get_uuid(*args)
Modified: freeswitch/trunk/src/mod/languages/mod_python/freeswitch_python.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_python/freeswitch_python.cpp (original)
+++ freeswitch/trunk/src/mod/languages/mod_python/freeswitch_python.cpp Tue Apr 29 20:37:52 2008
@@ -201,7 +201,7 @@
if (pyresult && pyresult != Py_None) {
resultStr = (char *) PyString_AsString(pyresult);
- switch_status_t cbresult = process_callback_result(resultStr, &cb_state, session);
+ switch_status_t cbresult = process_callback_result(resultStr);
return cbresult;
}
else {
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 Tue Apr 29 20:37:52 2008
@@ -2476,15 +2476,16 @@
#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_input_args_t swig_types[11]
-#define SWIGTYPE_p_switch_input_type_t swig_types[12]
-#define SWIGTYPE_p_switch_priority_t swig_types[13]
-#define SWIGTYPE_p_switch_size_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_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_size_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)
@@ -2680,13 +2681,6 @@
}
-SWIGINTERNINLINE PyObject*
- SWIG_From_bool (bool value)
-{
- return PyBool_FromLong(value ? 1 : 0);
-}
-
-
#include <limits.h>
#ifndef LLONG_MIN
# define LLONG_MIN LONG_LONG_MIN
@@ -2780,18 +2774,13 @@
SWIGINTERN int
-SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
+SWIG_AsVal_long (PyObject *obj, long* val)
{
if (PyInt_Check(obj)) {
- long v = PyInt_AsLong(obj);
- if (v >= 0) {
- if (val) *val = v;
- return SWIG_OK;
- } else {
- return SWIG_OverflowError;
- }
+ if (val) *val = PyInt_AsLong(obj);
+ return SWIG_OK;
} else if (PyLong_Check(obj)) {
- unsigned long v = PyLong_AsUnsignedLong(obj);
+ long v = PyLong_AsLong(obj);
if (!PyErr_Occurred()) {
if (val) *val = v;
return SWIG_OK;
@@ -2802,7 +2791,7 @@
#ifdef SWIG_PYTHON_CAST_MODE
{
int dispatch = 0;
- unsigned long v = PyLong_AsUnsignedLong(obj);
+ long v = PyInt_AsLong(obj);
if (!PyErr_Occurred()) {
if (val) *val = v;
return SWIG_AddCast(SWIG_OK);
@@ -2812,8 +2801,8 @@
if (!dispatch) {
double d;
int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
- if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
- if (val) *val = (unsigned long)(d);
+ if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
+ if (val) *val = (long)(d);
return res;
}
}
@@ -2824,44 +2813,41 @@
SWIGINTERN int
-SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
+SWIG_AsVal_int (PyObject * obj, int *val)
{
- unsigned long v;
- int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
+ long v;
+ int res = SWIG_AsVal_long (obj, &v);
if (SWIG_IsOK(res)) {
- if ((v > UINT_MAX)) {
+ if ((v < INT_MIN || v > INT_MAX)) {
return SWIG_OverflowError;
} else {
- if (val) *val = static_cast< unsigned int >(v);
+ if (val) *val = static_cast< int >(v);
}
}
return res;
}
-SWIGINTERNINLINE PyObject*
-SWIG_From_unsigned_SS_long (unsigned long value)
+SWIGINTERNINLINE PyObject*
+ SWIG_From_bool (bool value)
{
- return (value > LONG_MAX) ?
- PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
-}
-
-
-SWIGINTERNINLINE PyObject *
-SWIG_From_unsigned_SS_int (unsigned int value)
-{
- return SWIG_From_unsigned_SS_long (value);
+ return PyBool_FromLong(value ? 1 : 0);
}
SWIGINTERN int
-SWIG_AsVal_long (PyObject *obj, long* val)
+SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
{
if (PyInt_Check(obj)) {
- if (val) *val = PyInt_AsLong(obj);
- return SWIG_OK;
+ long v = PyInt_AsLong(obj);
+ if (v >= 0) {
+ if (val) *val = v;
+ return SWIG_OK;
+ } else {
+ return SWIG_OverflowError;
+ }
} else if (PyLong_Check(obj)) {
- long v = PyLong_AsLong(obj);
+ unsigned long v = PyLong_AsUnsignedLong(obj);
if (!PyErr_Occurred()) {
if (val) *val = v;
return SWIG_OK;
@@ -2872,7 +2858,7 @@
#ifdef SWIG_PYTHON_CAST_MODE
{
int dispatch = 0;
- long v = PyInt_AsLong(obj);
+ unsigned long v = PyLong_AsUnsignedLong(obj);
if (!PyErr_Occurred()) {
if (val) *val = v;
return SWIG_AddCast(SWIG_OK);
@@ -2882,8 +2868,8 @@
if (!dispatch) {
double d;
int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
- if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
- if (val) *val = (long)(d);
+ if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
+ if (val) *val = (unsigned long)(d);
return res;
}
}
@@ -2894,21 +2880,36 @@
SWIGINTERN int
-SWIG_AsVal_int (PyObject * obj, int *val)
+SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
{
- long v;
- int res = SWIG_AsVal_long (obj, &v);
+ unsigned long v;
+ int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
if (SWIG_IsOK(res)) {
- if ((v < INT_MIN || v > INT_MAX)) {
+ if ((v > UINT_MAX)) {
return SWIG_OverflowError;
} else {
- if (val) *val = static_cast< int >(v);
+ if (val) *val = static_cast< unsigned int >(v);
}
}
return res;
}
+SWIGINTERNINLINE PyObject*
+SWIG_From_unsigned_SS_long (unsigned long value)
+{
+ return (value > LONG_MAX) ?
+ PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
+}
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_unsigned_SS_int (unsigned int value)
+{
+ return SWIG_From_unsigned_SS_long (value);
+}
+
+
SWIGINTERN int
SWIG_AsVal_bool (PyObject *obj, bool *val)
{
@@ -3050,49 +3051,6 @@
}
-SWIGINTERN PyObject *_wrap_process_callback_result(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
- PyObject *resultobj = 0;
- char *arg1 = (char *) 0 ;
- input_callback_state *arg2 = (input_callback_state *) 0 ;
- switch_core_session_t *arg3 = (switch_core_session_t *) 0 ;
- switch_status_t result;
- int res1 ;
- char *buf1 = 0 ;
- int alloc1 = 0 ;
- void *argp2 = 0 ;
- int res2 = 0 ;
- void *argp3 = 0 ;
- int res3 = 0 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- PyObject * obj2 = 0 ;
-
- if (!PyArg_ParseTuple(args,(char *)"OOO:process_callback_result",&obj0,&obj1,&obj2)) SWIG_fail;
- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "process_callback_result" "', argument " "1"" of type '" "char *""'");
- }
- arg1 = reinterpret_cast< char * >(buf1);
- res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_input_callback_state, 0 | 0 );
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "process_callback_result" "', argument " "2"" of type '" "input_callback_state *""'");
- }
- arg2 = reinterpret_cast< input_callback_state * >(argp2);
- res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_switch_core_session_t, 0 | 0 );
- if (!SWIG_IsOK(res3)) {
- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "process_callback_result" "', argument " "3"" of type '" "switch_core_session_t *""'");
- }
- arg3 = reinterpret_cast< switch_core_session_t * >(argp3);
- result = process_callback_result(arg1,arg2,arg3);
- resultobj = SWIG_NewPointerObj((new switch_status_t(static_cast< const switch_status_t& >(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN | 0 );
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- return resultobj;
-fail:
- if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
- return NULL;
-}
-
-
SWIGINTERN PyObject *_wrap_input_callback_state_t_function_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
@@ -3497,7 +3455,174 @@
return SWIG_Py_Void();
}
-SWIGINTERN PyObject *_wrap_new_Event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Event_event_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ Event *arg1 = (Event *) 0 ;
+ switch_event_t *arg2 = (switch_event_t *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:Event_event_set",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_event_set" "', argument " "1"" of type '" "Event *""'");
+ }
+ arg1 = reinterpret_cast< Event * >(argp1);
+ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_switch_event_t, SWIG_POINTER_DISOWN | 0 );
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_event_set" "', argument " "2"" of type '" "switch_event_t *""'");
+ }
+ arg2 = reinterpret_cast< switch_event_t * >(argp2);
+ if (arg1) (arg1)->event = arg2;
+
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_Event_event_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ Event *arg1 = (Event *) 0 ;
+ switch_event_t *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:Event_event_get",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_event_get" "', argument " "1"" of type '" "Event *""'");
+ }
+ arg1 = reinterpret_cast< Event * >(argp1);
+ result = (switch_event_t *) ((arg1)->event);
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_switch_event_t, 0 | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_Event_serialized_string_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ Event *arg1 = (Event *) 0 ;
+ char *arg2 = (char *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:Event_serialized_string_set",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialized_string_set" "', argument " "1"" of type '" "Event *""'");
+ }
+ arg1 = reinterpret_cast< Event * >(argp1);
+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_serialized_string_set" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ if (arg1->serialized_string) delete[] arg1->serialized_string;
+ if (arg2) {
+ size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1;
+ arg1->serialized_string = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size)));
+ } else {
+ arg1->serialized_string = 0;
+ }
+ resultobj = SWIG_Py_Void();
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return resultobj;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_Event_serialized_string_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ Event *arg1 = (Event *) 0 ;
+ char *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:Event_serialized_string_get",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialized_string_get" "', argument " "1"" of type '" "Event *""'");
+ }
+ arg1 = reinterpret_cast< Event * >(argp1);
+ result = (char *) ((arg1)->serialized_string);
+ resultobj = SWIG_FromCharPtr((const char *)result);
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_Event_mine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ Event *arg1 = (Event *) 0 ;
+ int arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:Event_mine_set",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_mine_set" "', argument " "1"" of type '" "Event *""'");
+ }
+ arg1 = reinterpret_cast< Event * >(argp1);
+ ecode2 = SWIG_AsVal_int(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Event_mine_set" "', argument " "2"" of type '" "int""'");
+ }
+ arg2 = static_cast< int >(val2);
+ if (arg1) (arg1)->mine = arg2;
+
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_Event_mine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ Event *arg1 = (Event *) 0 ;
+ int result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:Event_mine_get",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_mine_get" "', argument " "1"" of type '" "Event *""'");
+ }
+ arg1 = reinterpret_cast< Event * >(argp1);
+ result = (int) ((arg1)->mine);
+ resultobj = SWIG_From_int(static_cast< int >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_Event__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
char *arg1 = (char *) 0 ;
char *arg2 = (char *) NULL ;
@@ -3536,6 +3661,89 @@
}
+SWIGINTERN PyObject *_wrap_new_Event__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ switch_event_t *arg1 = (switch_event_t *) 0 ;
+ int arg2 = (int) 0 ;
+ Event *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O|O:new_Event",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_switch_event_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "switch_event_t *""'");
+ }
+ arg1 = reinterpret_cast< switch_event_t * >(argp1);
+ if (obj1) {
+ ecode2 = SWIG_AsVal_int(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Event" "', argument " "2"" of type '" "int""'");
+ }
+ arg2 = static_cast< int >(val2);
+ }
+ result = (Event *)new Event(arg1,arg2);
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_NEW | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_Event(PyObject *self, PyObject *args) {
+ int argc;
+ PyObject *argv[3];
+ int ii;
+
+ if (!PyTuple_Check(args)) SWIG_fail;
+ argc = PyObject_Length(args);
+ for (ii = 0; (ii < argc) && (ii < 2); ii++) {
+ argv[ii] = PyTuple_GET_ITEM(args,ii);
+ }
+ if ((argc >= 1) && (argc <= 2)) {
+ int _v;
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_switch_event_t, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ if (argc <= 1) {
+ return _wrap_new_Event__SWIG_1(self, args);
+ }
+ {
+ int res = SWIG_AsVal_int(argv[1], NULL);
+ _v = SWIG_CheckState(res);
+ }
+ if (_v) {
+ return _wrap_new_Event__SWIG_1(self, args);
+ }
+ }
+ }
+ if ((argc >= 1) && (argc <= 2)) {
+ int _v;
+ int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ if (argc <= 1) {
+ return _wrap_new_Event__SWIG_0(self, args);
+ }
+ int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_new_Event__SWIG_0(self, args);
+ }
+ }
+ }
+
+fail:
+ SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Event'.\n Possible C/C++ prototypes are:\n Event(char const *,char const *)\n Event(switch_event_t *,int)\n");
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_delete_Event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
Event *arg1 = (Event *) 0 ;
@@ -3558,6 +3766,42 @@
}
+SWIGINTERN PyObject *_wrap_Event_serialize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ Event *arg1 = (Event *) 0 ;
+ char *arg2 = (char *) NULL ;
+ char *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O|O:Event_serialize",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialize" "', argument " "1"" of type '" "Event *""'");
+ }
+ arg1 = reinterpret_cast< Event * >(argp1);
+ if (obj1) {
+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_serialize" "', argument " "2"" of type '" "char const *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ }
+ result = (char *)(arg1)->serialize((char const *)arg2);
+ resultobj = SWIG_FromCharPtr((const char *)result);
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return resultobj;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_Event_set_priority(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
Event *arg1 = (Event *) 0 ;
@@ -4270,6 +4514,80 @@
}
+SWIGINTERN PyObject *_wrap_CoreSession_setPrivate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ void *arg3 = (void *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int res3 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:CoreSession_setPrivate",&obj0,&obj1,&obj2)) 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_setPrivate" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ 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_setPrivate" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setPrivate" "', argument " "3"" of type '" "void *""'");
+ }
+ (arg1)->setPrivate(arg2,arg3);
+ resultobj = SWIG_Py_Void();
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return resultobj;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_CoreSession_getPrivate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ void *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_getPrivate",&obj0,&obj1)) 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_getPrivate" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ 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_getPrivate" "', argument " "2"" of type '" "char *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ result = (void *)(arg1)->getPrivate(arg2);
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return resultobj;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_CoreSession_getVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -5130,6 +5448,36 @@
}
+SWIGINTERN PyObject *_wrap_CoreSession_sendEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ Event *arg2 = (Event *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_sendEvent",&obj0,&obj1)) 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_sendEvent" "', argument " "1"" of type '" "CoreSession *""'");
+ }
+ arg1 = reinterpret_cast< CoreSession * >(argp1);
+ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Event, 0 | 0 );
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_sendEvent" "', argument " "2"" of type '" "Event *""'");
+ }
+ arg2 = reinterpret_cast< Event * >(argp2);
+ (arg1)->sendEvent(arg2);
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_CoreSession_begin_allow_threads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
@@ -5750,7 +6098,6 @@
{ (char *)"console_clean_log", _wrap_console_clean_log, METH_VARARGS, NULL},
{ (char *)"api_execute", _wrap_api_execute, METH_VARARGS, NULL},
{ (char *)"api_reply_delete", _wrap_api_reply_delete, METH_VARARGS, NULL},
- { (char *)"process_callback_result", _wrap_process_callback_result, METH_VARARGS, NULL},
{ (char *)"input_callback_state_t_function_set", _wrap_input_callback_state_t_function_set, METH_VARARGS, NULL},
{ (char *)"input_callback_state_t_function_get", _wrap_input_callback_state_t_function_get, METH_VARARGS, NULL},
{ (char *)"input_callback_state_t_threadState_set", _wrap_input_callback_state_t_threadState_set, METH_VARARGS, NULL},
@@ -5767,8 +6114,15 @@
{ (char *)"Stream_write", _wrap_Stream_write, METH_VARARGS, NULL},
{ (char *)"Stream_get_data", _wrap_Stream_get_data, METH_VARARGS, NULL},
{ (char *)"Stream_swigregister", Stream_swigregister, METH_VARARGS, NULL},
+ { (char *)"Event_event_set", _wrap_Event_event_set, METH_VARARGS, NULL},
+ { (char *)"Event_event_get", _wrap_Event_event_get, METH_VARARGS, NULL},
+ { (char *)"Event_serialized_string_set", _wrap_Event_serialized_string_set, METH_VARARGS, NULL},
+ { (char *)"Event_serialized_string_get", _wrap_Event_serialized_string_get, METH_VARARGS, NULL},
+ { (char *)"Event_mine_set", _wrap_Event_mine_set, METH_VARARGS, NULL},
+ { (char *)"Event_mine_get", _wrap_Event_mine_get, METH_VARARGS, NULL},
{ (char *)"new_Event", _wrap_new_Event, METH_VARARGS, NULL},
{ (char *)"delete_Event", _wrap_delete_Event, METH_VARARGS, NULL},
+ { (char *)"Event_serialize", _wrap_Event_serialize, METH_VARARGS, NULL},
{ (char *)"Event_set_priority", _wrap_Event_set_priority, METH_VARARGS, NULL},
{ (char *)"Event_get_header", _wrap_Event_get_header, METH_VARARGS, NULL},
{ (char *)"Event_get_body", _wrap_Event_get_body, METH_VARARGS, NULL},
@@ -5794,6 +6148,8 @@
{ (char *)"CoreSession_preAnswer", _wrap_CoreSession_preAnswer, METH_VARARGS, NULL},
{ (char *)"CoreSession_hangup", _wrap_CoreSession_hangup, METH_VARARGS, NULL},
{ (char *)"CoreSession_setVariable", _wrap_CoreSession_setVariable, METH_VARARGS, NULL},
+ { (char *)"CoreSession_setPrivate", _wrap_CoreSession_setPrivate, METH_VARARGS, NULL},
+ { (char *)"CoreSession_getPrivate", _wrap_CoreSession_getPrivate, METH_VARARGS, NULL},
{ (char *)"CoreSession_getVariable", _wrap_CoreSession_getVariable, METH_VARARGS, NULL},
{ (char *)"CoreSession_recordFile", _wrap_CoreSession_recordFile, METH_VARARGS, NULL},
{ (char *)"CoreSession_setCallerData", _wrap_CoreSession_setCallerData, METH_VARARGS, NULL},
@@ -5812,6 +6168,7 @@
{ (char *)"CoreSession_setHangupHook", _wrap_CoreSession_setHangupHook, METH_VARARGS, NULL},
{ (char *)"CoreSession_ready", _wrap_CoreSession_ready, METH_VARARGS, NULL},
{ (char *)"CoreSession_execute", _wrap_CoreSession_execute, METH_VARARGS, NULL},
+ { (char *)"CoreSession_sendEvent", _wrap_CoreSession_sendEvent, METH_VARARGS, NULL},
{ (char *)"CoreSession_begin_allow_threads", _wrap_CoreSession_begin_allow_threads, METH_VARARGS, NULL},
{ (char *)"CoreSession_end_allow_threads", _wrap_CoreSession_end_allow_threads, METH_VARARGS, NULL},
{ (char *)"CoreSession_get_uuid", _wrap_CoreSession_get_uuid, METH_VARARGS, NULL},
@@ -5852,6 +6209,7 @@
static swig_type_info _swigt__p_switch_channel_state_t = {"_p_switch_channel_state_t", "switch_channel_state_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_switch_channel_t = {"_p_switch_channel_t", "switch_channel_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_switch_core_session_t = {"_p_switch_core_session_t", "switch_core_session_t *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_switch_event_t = {"_p_switch_event_t", "switch_event_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_switch_input_args_t = {"_p_switch_input_args_t", "switch_input_args_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_switch_input_type_t = {"_p_switch_input_type_t", "switch_input_type_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_switch_priority_t = {"_p_switch_priority_t", "switch_priority_t *", 0, 0, (void*)0, 0};
@@ -5872,6 +6230,7 @@
&_swigt__p_switch_channel_state_t,
&_swigt__p_switch_channel_t,
&_swigt__p_switch_core_session_t,
+ &_swigt__p_switch_event_t,
&_swigt__p_switch_input_args_t,
&_swigt__p_switch_input_type_t,
&_swigt__p_switch_priority_t,
@@ -5892,6 +6251,7 @@
static swig_cast_info _swigc__p_switch_channel_state_t[] = { {&_swigt__p_switch_channel_state_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_switch_channel_t[] = { {&_swigt__p_switch_channel_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_switch_core_session_t[] = { {&_swigt__p_switch_core_session_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_switch_event_t[] = { {&_swigt__p_switch_event_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_switch_input_args_t[] = { {&_swigt__p_switch_input_args_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_switch_input_type_t[] = { {&_swigt__p_switch_input_type_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_switch_priority_t[] = { {&_swigt__p_switch_priority_t, 0, 0, 0},{0, 0, 0, 0}};
@@ -5912,6 +6272,7 @@
_swigc__p_switch_channel_state_t,
_swigc__p_switch_channel_t,
_swigc__p_switch_core_session_t,
+ _swigc__p_switch_event_t,
_swigc__p_switch_input_args_t,
_swigc__p_switch_input_type_t,
_swigc__p_switch_priority_t,
1
0