add getGlobalVariable and setGlobalVariable to swig stuff
This commit is contained in:
parent
8fde25ccfa
commit
2faaee0e6e
|
@ -65,6 +65,10 @@ Note that the first parameter to the new operator is implicitly handled by c++..
|
|||
|
||||
*/
|
||||
|
||||
|
||||
SWITCH_DECLARE(void) setGlobalVariable(char *var_name, char *var_val);
|
||||
SWITCH_DECLARE(char *) getGlobalVariable(char *var_name);
|
||||
|
||||
SWITCH_DECLARE(void) consoleLog(char *level_str, char *msg);
|
||||
SWITCH_DECLARE(void) consoleCleanLog(char *msg);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
%module freeswitch
|
||||
|
||||
%include ../../../../swig_common.i
|
||||
/** insert the following includes into generated code so it compiles */
|
||||
%{
|
||||
#include "switch_cpp.h"
|
||||
|
|
|
@ -9,6 +9,14 @@
|
|||
package org.freeswitch.swig;
|
||||
|
||||
public class freeswitch {
|
||||
public static void setGlobalVariable(String var_name, String var_val) {
|
||||
freeswitchJNI.setGlobalVariable(var_name, var_val);
|
||||
}
|
||||
|
||||
public static String getGlobalVariable(String var_name) {
|
||||
return freeswitchJNI.getGlobalVariable(var_name);
|
||||
}
|
||||
|
||||
public static void consoleLog(String level_str, String msg) {
|
||||
freeswitchJNI.consoleLog(level_str, msg);
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
package org.freeswitch.swig;
|
||||
|
||||
class freeswitchJNI {
|
||||
public final static native void setGlobalVariable(String jarg1, String jarg2);
|
||||
public final static native String getGlobalVariable(String jarg1);
|
||||
public final static native void consoleLog(String jarg1, String jarg2);
|
||||
public final static native void consoleCleanLog(String jarg1);
|
||||
public final static native boolean email(String jarg1, String jarg2, String jarg3, String jarg4, String jarg5, String jarg6, String jarg7);
|
||||
|
|
|
@ -207,6 +207,48 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_setGlobalVariable(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 ;
|
||||
}
|
||||
setGlobalVariable(arg1,arg2);
|
||||
if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
|
||||
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_getGlobalVariable(JNIEnv *jenv, jclass jcls, jstring jarg1) {
|
||||
jstring jresult = 0 ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
arg1 = 0;
|
||||
if (jarg1) {
|
||||
arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
|
||||
if (!arg1) return 0;
|
||||
}
|
||||
result = (char *)getGlobalVariable(arg1);
|
||||
if(result) jresult = jenv->NewStringUTF((const char *)result);
|
||||
if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
|
||||
free(result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
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 ;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
%module freeswitch
|
||||
%include ../../../../swig_common.i
|
||||
//%include "cstring.i"
|
||||
|
||||
/**
|
||||
|
|
|
@ -1539,6 +1539,51 @@ typedef struct{} LANGUAGE_OBJ;
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
static int _wrap_setGlobalVariable(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
char *arg1 = (char *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
|
||||
SWIG_check_num_args("setGlobalVariable",2,2)
|
||||
if(!lua_isstring(L,1)) SWIG_fail_arg("setGlobalVariable",1,"char *");
|
||||
if(!lua_isstring(L,2)) SWIG_fail_arg("setGlobalVariable",2,"char *");
|
||||
arg1 = (char *)lua_tostring(L, 1);
|
||||
arg2 = (char *)lua_tostring(L, 2);
|
||||
setGlobalVariable(arg1,arg2);
|
||||
SWIG_arg=0;
|
||||
|
||||
return SWIG_arg;
|
||||
|
||||
if(0) SWIG_fail;
|
||||
|
||||
fail:
|
||||
lua_error(L);
|
||||
return SWIG_arg;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_getGlobalVariable(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
char *arg1 = (char *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
SWIG_check_num_args("getGlobalVariable",1,1)
|
||||
if(!lua_isstring(L,1)) SWIG_fail_arg("getGlobalVariable",1,"char *");
|
||||
arg1 = (char *)lua_tostring(L, 1);
|
||||
result = (char *)getGlobalVariable(arg1);
|
||||
SWIG_arg=0;
|
||||
lua_pushstring(L,(const char*)result); SWIG_arg++;
|
||||
free(result);
|
||||
return SWIG_arg;
|
||||
|
||||
if(0) SWIG_fail;
|
||||
|
||||
fail:
|
||||
lua_error(L);
|
||||
return SWIG_arg;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_consoleLog(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
char *arg1 = (char *) 0 ;
|
||||
|
@ -7642,6 +7687,8 @@ static swig_lua_class _wrap_class_LUA_Dbh = { "Dbh", &SWIGTYPE_p_LUA__Dbh,_wrap_
|
|||
#endif
|
||||
|
||||
static const struct luaL_reg swig_commands[] = {
|
||||
{ "setGlobalVariable", _wrap_setGlobalVariable},
|
||||
{ "getGlobalVariable", _wrap_getGlobalVariable},
|
||||
{ "consoleLog", _wrap_consoleLog},
|
||||
{ "consoleCleanLog", _wrap_consoleCleanLog},
|
||||
{ "email", _wrap_email},
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
%module freeswitch
|
||||
|
||||
%include ../../../../swig_common.i
|
||||
|
||||
/** String fix - copied from csharphead.swg with fix for multiple appdomains **/
|
||||
/* Must pass -DSWIG_CSHARP_NO_STRING_HELPER to swig */
|
||||
|
||||
|
|
|
@ -1136,6 +1136,17 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_TRANSFER_HISTORY_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
|
||||
result = (char *) "transfer_history";
|
||||
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
|
@ -4047,6 +4058,35 @@ SWIGEXPORT unsigned short SWIGSTDCALL CSharp_switch_t38_options_t_local_port_get
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_t38_options_t_sdp_o_line_set(void * jarg1, char * jarg2) {
|
||||
switch_t38_options_t *arg1 = (switch_t38_options_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
|
||||
arg1 = (switch_t38_options_t *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
{
|
||||
if (arg2) {
|
||||
arg1->sdp_o_line = (char const *) (new char[strlen((const char *)arg2)+1]);
|
||||
strcpy((char *)arg1->sdp_o_line, (const char *)arg2);
|
||||
} else {
|
||||
arg1->sdp_o_line = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_t38_options_t_sdp_o_line_get(void * jarg1) {
|
||||
char * jresult ;
|
||||
switch_t38_options_t *arg1 = (switch_t38_options_t *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_t38_options_t *)jarg1;
|
||||
result = (char *) ((arg1)->sdp_o_line);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_t38_options_t() {
|
||||
void * jresult ;
|
||||
switch_t38_options_t *result = 0 ;
|
||||
|
@ -7195,6 +7235,16 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_perform_new_memory_pool(void * jar
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_sync_clock() {
|
||||
int jresult ;
|
||||
int result;
|
||||
|
||||
result = (int)switch_core_session_sync_clock();
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_perform_destroy_memory_pool(void * jarg1, char * jarg2, char * jarg3, int jarg4) {
|
||||
int jresult ;
|
||||
switch_memory_pool_t **arg1 = (switch_memory_pool_t **) 0 ;
|
||||
|
@ -13203,6 +13253,20 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_clean_name_string(char * jarg1) {
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_safe_atoi(char * jarg1, int jarg2) {
|
||||
int jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
int arg2 ;
|
||||
int result;
|
||||
|
||||
arg1 = (char *)jarg1;
|
||||
arg2 = (int)jarg2;
|
||||
result = (int)switch_safe_atoi((char const *)arg1,arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_safe_strdup(char * jarg1) {
|
||||
char * jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
|
@ -13883,6 +13947,26 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_split_user_domain(char * jarg1, void *
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_uuid_str(char * jarg1, void * jarg2) {
|
||||
char * jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
switch_size_t arg2 ;
|
||||
char *result = 0 ;
|
||||
switch_size_t *argp2 ;
|
||||
|
||||
arg1 = (char *)jarg1;
|
||||
argp2 = (switch_size_t *)jarg2;
|
||||
if (!argp2) {
|
||||
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_size_t", 0);
|
||||
return 0;
|
||||
}
|
||||
arg2 = *argp2;
|
||||
result = (char *)switch_uuid_str(arg1,arg2);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_profile_node_t_var_set(void * jarg1, char * jarg2) {
|
||||
profile_node_t *arg1 = (profile_node_t *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
|
@ -14889,6 +14973,96 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_caller_profile_soft_get(void * jarg1
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_caller_profile_uuid_str_set(void * jarg1, char * jarg2) {
|
||||
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
|
||||
arg1 = (switch_caller_profile *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
{
|
||||
if (arg1->uuid_str) delete [] arg1->uuid_str;
|
||||
if (arg2) {
|
||||
arg1->uuid_str = (char *) (new char[strlen((const char *)arg2)+1]);
|
||||
strcpy((char *)arg1->uuid_str, (const char *)arg2);
|
||||
} else {
|
||||
arg1->uuid_str = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_caller_profile_uuid_str_get(void * jarg1) {
|
||||
char * jresult ;
|
||||
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_caller_profile *)jarg1;
|
||||
result = (char *) ((arg1)->uuid_str);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_caller_profile_clone_of_set(void * jarg1, char * jarg2) {
|
||||
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
|
||||
arg1 = (switch_caller_profile *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
{
|
||||
if (arg1->clone_of) delete [] arg1->clone_of;
|
||||
if (arg2) {
|
||||
arg1->clone_of = (char *) (new char[strlen((const char *)arg2)+1]);
|
||||
strcpy((char *)arg1->clone_of, (const char *)arg2);
|
||||
} else {
|
||||
arg1->clone_of = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_caller_profile_clone_of_get(void * jarg1) {
|
||||
char * jresult ;
|
||||
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_caller_profile *)jarg1;
|
||||
result = (char *) ((arg1)->clone_of);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_caller_profile_transfer_source_set(void * jarg1, char * jarg2) {
|
||||
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
|
||||
arg1 = (switch_caller_profile *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
{
|
||||
if (arg1->transfer_source) delete [] arg1->transfer_source;
|
||||
if (arg2) {
|
||||
arg1->transfer_source = (char *) (new char[strlen((const char *)arg2)+1]);
|
||||
strcpy((char *)arg1->transfer_source, (const char *)arg2);
|
||||
} else {
|
||||
arg1->transfer_source = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_caller_profile_transfer_source_get(void * jarg1) {
|
||||
char * jresult ;
|
||||
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_caller_profile *)jarg1;
|
||||
result = (char *) ((arg1)->transfer_source);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_caller_profile() {
|
||||
void * jresult ;
|
||||
switch_caller_profile *result = 0 ;
|
||||
|
@ -29922,6 +30096,18 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_uuid_exists(char * jarg1) {
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_ivr_dmachine_get_name(void * jarg1) {
|
||||
char * jresult ;
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_ivr_dmachine_t *)jarg1;
|
||||
result = (char *)switch_ivr_dmachine_get_name(arg1);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_ivr_dmachine_set_match_callback(void * jarg1, void * jarg2) {
|
||||
switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ;
|
||||
switch_ivr_dmachine_callback_t arg2 = (switch_ivr_dmachine_callback_t) 0 ;
|
||||
|
@ -34772,6 +34958,29 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_config_next_pair(void * jarg1, void * j
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_setGlobalVariable(char * jarg1, char * jarg2) {
|
||||
char *arg1 = (char *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
|
||||
arg1 = (char *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
setGlobalVariable(arg1,arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_getGlobalVariable(char * jarg1) {
|
||||
char * jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (char *)jarg1;
|
||||
result = (char *)getGlobalVariable(arg1);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
free(result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_consoleLog(char * jarg1, char * jarg2) {
|
||||
char *arg1 = (char *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
|
|
|
@ -1212,6 +1212,11 @@ public class freeswitch {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public static int switch_core_session_sync_clock() {
|
||||
int ret = freeswitchPINVOKE.switch_core_session_sync_clock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_perform_destroy_memory_pool(SWIGTYPE_p_p_apr_pool_t pool, string file, string func, int line) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_perform_destroy_memory_pool(SWIGTYPE_p_p_apr_pool_t.getCPtr(pool), file, func, line);
|
||||
return ret;
|
||||
|
@ -3079,6 +3084,11 @@ public class freeswitch {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public static int switch_safe_atoi(string nptr, int dft) {
|
||||
int ret = freeswitchPINVOKE.switch_safe_atoi(nptr, dft);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_safe_strdup(string it) {
|
||||
string ret = freeswitchPINVOKE.switch_safe_strdup(it);
|
||||
return ret;
|
||||
|
@ -3301,6 +3311,12 @@ public class freeswitch {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_uuid_str(string buf, SWIGTYPE_p_switch_size_t len) {
|
||||
string ret = freeswitchPINVOKE.switch_uuid_str(buf, SWIGTYPE_p_switch_size_t.getCPtr(len));
|
||||
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_caller_extension switch_caller_extension_new(SWIGTYPE_p_switch_core_session session, string extension_name, string extension_number) {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_caller_extension_new(SWIGTYPE_p_switch_core_session.getCPtr(session), extension_name, extension_number);
|
||||
switch_caller_extension ret = (cPtr == IntPtr.Zero) ? null : new switch_caller_extension(cPtr, false);
|
||||
|
@ -4809,6 +4825,11 @@ public class freeswitch {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_ivr_dmachine_get_name(SWIGTYPE_p_switch_ivr_dmachine dmachine) {
|
||||
string ret = freeswitchPINVOKE.switch_ivr_dmachine_get_name(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_ivr_dmachine_set_match_callback(SWIGTYPE_p_switch_ivr_dmachine dmachine, SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t match_callback) {
|
||||
freeswitchPINVOKE.switch_ivr_dmachine_set_match_callback(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine), SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t.getCPtr(match_callback));
|
||||
}
|
||||
|
@ -5685,6 +5706,15 @@ public class freeswitch {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public static void setGlobalVariable(string var_name, string var_val) {
|
||||
freeswitchPINVOKE.setGlobalVariable(var_name, var_val);
|
||||
}
|
||||
|
||||
public static string getGlobalVariable(string var_name) {
|
||||
string ret = freeswitchPINVOKE.getGlobalVariable(var_name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void consoleLog(string level_str, string msg) {
|
||||
freeswitchPINVOKE.consoleLog(level_str, msg);
|
||||
}
|
||||
|
@ -5801,6 +5831,7 @@ public class freeswitch {
|
|||
public static readonly string SWITCH_READ_RESULT_VARIABLE = freeswitchPINVOKE.SWITCH_READ_RESULT_VARIABLE_get();
|
||||
public static readonly string SWITCH_COPY_XML_CDR_VARIABLE = freeswitchPINVOKE.SWITCH_COPY_XML_CDR_VARIABLE_get();
|
||||
public static readonly string SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE = freeswitchPINVOKE.SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE_get();
|
||||
public static readonly string SWITCH_TRANSFER_HISTORY_VARIABLE = freeswitchPINVOKE.SWITCH_TRANSFER_HISTORY_VARIABLE_get();
|
||||
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE_get();
|
||||
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_PRE_ANSWER_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_PRE_ANSWER_VARIABLE_get();
|
||||
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_MEDIA_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_MEDIA_VARIABLE_get();
|
||||
|
@ -6346,6 +6377,9 @@ class freeswitchPINVOKE {
|
|||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE_get")]
|
||||
public static extern string SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_TRANSFER_HISTORY_VARIABLE_get")]
|
||||
public static extern string SWITCH_TRANSFER_HISTORY_VARIABLE_get();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE_get")]
|
||||
public static extern string SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE_get();
|
||||
|
||||
|
@ -7078,6 +7112,12 @@ class freeswitchPINVOKE {
|
|||
[DllImport("mod_managed", EntryPoint="CSharp_switch_t38_options_t_local_port_get")]
|
||||
public static extern ushort switch_t38_options_t_local_port_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_t38_options_t_sdp_o_line_set")]
|
||||
public static extern void switch_t38_options_t_sdp_o_line_set(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_t38_options_t_sdp_o_line_get")]
|
||||
public static extern string switch_t38_options_t_sdp_o_line_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_new_switch_t38_options_t")]
|
||||
public static extern IntPtr new_switch_t38_options_t();
|
||||
|
||||
|
@ -7849,6 +7889,9 @@ class freeswitchPINVOKE {
|
|||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_perform_new_memory_pool")]
|
||||
public static extern int switch_core_perform_new_memory_pool(HandleRef jarg1, string jarg2, string jarg3, int jarg4);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_sync_clock")]
|
||||
public static extern int switch_core_session_sync_clock();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_perform_destroy_memory_pool")]
|
||||
public static extern int switch_core_perform_destroy_memory_pool(HandleRef jarg1, string jarg2, string jarg3, int jarg4);
|
||||
|
||||
|
@ -9193,6 +9236,9 @@ class freeswitchPINVOKE {
|
|||
[DllImport("mod_managed", EntryPoint="CSharp_switch_clean_name_string")]
|
||||
public static extern string switch_clean_name_string(string jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_safe_atoi")]
|
||||
public static extern int switch_safe_atoi(string jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_safe_strdup")]
|
||||
public static extern string switch_safe_strdup(string jarg1);
|
||||
|
||||
|
@ -9325,6 +9371,9 @@ class freeswitchPINVOKE {
|
|||
[DllImport("mod_managed", EntryPoint="CSharp_switch_split_user_domain")]
|
||||
public static extern int switch_split_user_domain(string jarg1, ref string jarg2, ref string jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_uuid_str")]
|
||||
public static extern string switch_uuid_str(string jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_profile_node_t_var_set")]
|
||||
public static extern void profile_node_t_var_set(HandleRef jarg1, string jarg2);
|
||||
|
||||
|
@ -9559,6 +9608,24 @@ class freeswitchPINVOKE {
|
|||
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_soft_get")]
|
||||
public static extern IntPtr switch_caller_profile_soft_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_uuid_str_set")]
|
||||
public static extern void switch_caller_profile_uuid_str_set(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_uuid_str_get")]
|
||||
public static extern string switch_caller_profile_uuid_str_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_clone_of_set")]
|
||||
public static extern void switch_caller_profile_clone_of_set(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_clone_of_get")]
|
||||
public static extern string switch_caller_profile_clone_of_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_transfer_source_set")]
|
||||
public static extern void switch_caller_profile_transfer_source_set(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_transfer_source_get")]
|
||||
public static extern string switch_caller_profile_transfer_source_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_new_switch_caller_profile")]
|
||||
public static extern IntPtr new_switch_caller_profile();
|
||||
|
||||
|
@ -13099,6 +13166,9 @@ class freeswitchPINVOKE {
|
|||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_uuid_exists")]
|
||||
public static extern int switch_ivr_uuid_exists(string jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_get_name")]
|
||||
public static extern string switch_ivr_dmachine_get_name(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_set_match_callback")]
|
||||
public static extern void switch_ivr_dmachine_set_match_callback(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
|
@ -14245,6 +14315,12 @@ class freeswitchPINVOKE {
|
|||
[DllImport("mod_managed", EntryPoint="CSharp_switch_config_next_pair")]
|
||||
public static extern int switch_config_next_pair(HandleRef jarg1, ref string jarg2, ref string jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_setGlobalVariable")]
|
||||
public static extern void setGlobalVariable(string jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_getGlobalVariable")]
|
||||
public static extern string getGlobalVariable(string jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_consoleLog")]
|
||||
public static extern void consoleLog(string jarg1, string jarg2);
|
||||
|
||||
|
@ -22475,6 +22551,36 @@ public class switch_caller_profile : IDisposable {
|
|||
}
|
||||
}
|
||||
|
||||
public string uuid_str {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_caller_profile_uuid_str_set(swigCPtr, value);
|
||||
}
|
||||
get {
|
||||
string ret = freeswitchPINVOKE.switch_caller_profile_uuid_str_get(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public string clone_of {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_caller_profile_clone_of_set(swigCPtr, value);
|
||||
}
|
||||
get {
|
||||
string ret = freeswitchPINVOKE.switch_caller_profile_clone_of_get(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public string transfer_source {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_caller_profile_transfer_source_set(swigCPtr, value);
|
||||
}
|
||||
get {
|
||||
string ret = freeswitchPINVOKE.switch_caller_profile_transfer_source_get(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public switch_caller_profile() : this(freeswitchPINVOKE.new_switch_caller_profile(), true) {
|
||||
}
|
||||
|
||||
|
@ -22513,7 +22619,8 @@ public enum switch_channel_app_flag_t {
|
|||
CF_APP_TAGGED = (1 << 0),
|
||||
CF_APP_T38 = (1 << 1),
|
||||
CF_APP_T38_REQ = (1 << 2),
|
||||
CF_APP_T38_FAIL = (1 << 3)
|
||||
CF_APP_T38_FAIL = (1 << 3),
|
||||
CF_APP_T38_NEGOTIATED = (1 << 4)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -24213,7 +24320,9 @@ namespace FreeSWITCH.Native {
|
|||
SCF_MINIMAL = (1 << 14),
|
||||
SCF_USE_NAT_MAPPING = (1 << 15),
|
||||
SCF_CLEAR_SQL = (1 << 16),
|
||||
SCF_THREADED_SYSTEM_EXEC = (1 << 17)
|
||||
SCF_THREADED_SYSTEM_EXEC = (1 << 17),
|
||||
SCF_SYNC_CLOCK_REQUESTED = (1 << 18),
|
||||
SCF_CORE_ODBC_REQ = (1 << 19)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -29730,7 +29839,8 @@ public enum switch_rtp_bug_flag_t {
|
|||
RTP_BUG_START_SEQ_AT_ZERO = (1 << 4),
|
||||
RTP_BUG_NEVER_SEND_MARKER = (1 << 5),
|
||||
RTP_BUG_IGNORE_DTMF_DURATION = (1 << 6),
|
||||
RTP_BUG_ACCEPT_ANY_PACKETS = (1 << 7)
|
||||
RTP_BUG_ACCEPT_ANY_PACKETS = (1 << 7),
|
||||
RTP_BUG_GEN_ONE_GEN_ALL = (1 << 8)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -30769,7 +30879,8 @@ public enum switch_session_ctl_t {
|
|||
SCSC_SHUTDOWN_CHECK,
|
||||
SCSC_PAUSE_CHECK,
|
||||
SCSC_READY_CHECK,
|
||||
SCSC_THREADED_SYSTEM_EXEC
|
||||
SCSC_THREADED_SYSTEM_EXEC,
|
||||
SCSC_SYNC_CLOCK_WHEN_IDLE
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -31955,6 +32066,16 @@ public class switch_t38_options_t : IDisposable {
|
|||
}
|
||||
}
|
||||
|
||||
public string sdp_o_line {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_t38_options_t_sdp_o_line_set(swigCPtr, value);
|
||||
}
|
||||
get {
|
||||
string ret = freeswitchPINVOKE.switch_t38_options_t_sdp_o_line_get(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public switch_t38_options_t() : this(freeswitchPINVOKE.new_switch_t38_options_t(), true) {
|
||||
}
|
||||
|
||||
|
@ -32820,6 +32941,7 @@ namespace FreeSWITCH.Native {
|
|||
SWITCH_XML_SECTION_DIRECTORY = (1 << 1),
|
||||
SWITCH_XML_SECTION_DIALPLAN = (1 << 2),
|
||||
SWITCH_XML_SECTION_PHRASES = (1 << 3),
|
||||
SWITCH_XML_SECTION_CHATPLAN = (1 << 4),
|
||||
SWITCH_XML_SECTION_MAX = (1 << 4)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// MANUALLY GENERATED
|
||||
%include ../../../../swig_common.i
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned long uint32_t;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
%module freeswitch
|
||||
%include ../../../../swig_common.i
|
||||
//%include "cstring.i"
|
||||
|
||||
/**
|
||||
|
|
|
@ -48,6 +48,8 @@ sub this {
|
|||
|
||||
package freeswitch;
|
||||
|
||||
*setGlobalVariable = *freeswitchc::setGlobalVariable;
|
||||
*getGlobalVariable = *freeswitchc::getGlobalVariable;
|
||||
*consoleLog = *freeswitchc::consoleLog;
|
||||
*consoleCleanLog = *freeswitchc::consoleCleanLog;
|
||||
*email = *freeswitchc::email;
|
||||
|
|
|
@ -1566,6 +1566,26 @@ SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
|
|||
|
||||
|
||||
|
||||
SWIGINTERNINLINE SV *
|
||||
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
|
||||
{
|
||||
SV *obj = sv_newmortal();
|
||||
if (carray) {
|
||||
sv_setpvn(obj, carray, size);
|
||||
} else {
|
||||
sv_setsv(obj, &PL_sv_undef);
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE SV *
|
||||
SWIG_FromCharPtr(const char *cptr)
|
||||
{
|
||||
return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE SV *
|
||||
SWIG_From_bool SWIG_PERL_DECL_ARGS_1(bool value)
|
||||
{
|
||||
|
@ -1707,26 +1727,6 @@ SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
|
|||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE SV *
|
||||
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
|
||||
{
|
||||
SV *obj = sv_newmortal();
|
||||
if (carray) {
|
||||
sv_setpvn(obj, carray, size);
|
||||
} else {
|
||||
sv_setsv(obj, &PL_sv_undef);
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE SV *
|
||||
SWIG_FromCharPtr(const char *cptr)
|
||||
{
|
||||
return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE SV *
|
||||
SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value)
|
||||
{
|
||||
|
@ -1915,6 +1915,75 @@ SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SW
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
XS(_wrap_setGlobalVariable) {
|
||||
{
|
||||
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: setGlobalVariable(var_name,var_val);");
|
||||
}
|
||||
res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setGlobalVariable" "', 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 '" "setGlobalVariable" "', argument " "2"" of type '" "char *""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
setGlobalVariable(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_getGlobalVariable) {
|
||||
{
|
||||
char *arg1 = (char *) 0 ;
|
||||
char *result = 0 ;
|
||||
int res1 ;
|
||||
char *buf1 = 0 ;
|
||||
int alloc1 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 1) || (items > 1)) {
|
||||
SWIG_croak("Usage: getGlobalVariable(var_name);");
|
||||
}
|
||||
res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getGlobalVariable" "', argument " "1"" of type '" "char *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< char * >(buf1);
|
||||
result = (char *)getGlobalVariable(arg1);
|
||||
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
|
||||
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
||||
free(result);
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_consoleLog) {
|
||||
{
|
||||
char *arg1 = (char *) 0 ;
|
||||
|
@ -9545,6 +9614,8 @@ static swig_variable_info swig_variables[] = {
|
|||
{0,0,0,0}
|
||||
};
|
||||
static swig_command_info swig_commands[] = {
|
||||
{"freeswitchc::setGlobalVariable", _wrap_setGlobalVariable},
|
||||
{"freeswitchc::getGlobalVariable", _wrap_getGlobalVariable},
|
||||
{"freeswitchc::consoleLog", _wrap_consoleLog},
|
||||
{"freeswitchc::consoleCleanLog", _wrap_consoleCleanLog},
|
||||
{"freeswitchc::email", _wrap_email},
|
||||
|
|
|
@ -48,6 +48,8 @@ except AttributeError:
|
|||
del types
|
||||
|
||||
|
||||
setGlobalVariable = _freeswitch.setGlobalVariable
|
||||
getGlobalVariable = _freeswitch.getGlobalVariable
|
||||
consoleLog = _freeswitch.consoleLog
|
||||
consoleCleanLog = _freeswitch.consoleCleanLog
|
||||
email = _freeswitch.email
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
%module freeswitch
|
||||
%include "cstring.i"
|
||||
|
||||
%include ../../../../swig_common.i
|
||||
/**
|
||||
* tell swig to treat these variables as mutable so they
|
||||
* can be used to return values.
|
||||
|
|
|
@ -2687,6 +2687,30 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
|
|||
|
||||
|
||||
|
||||
SWIGINTERNINLINE PyObject *
|
||||
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
|
||||
{
|
||||
if (carray) {
|
||||
if (size > INT_MAX) {
|
||||
swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
|
||||
return pchar_descriptor ?
|
||||
SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
|
||||
} else {
|
||||
return PyString_FromStringAndSize(carray, static_cast< int >(size));
|
||||
}
|
||||
} else {
|
||||
return SWIG_Py_Void();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE PyObject *
|
||||
SWIG_FromCharPtr(const char *cptr)
|
||||
{
|
||||
return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE PyObject*
|
||||
SWIG_From_bool (bool value)
|
||||
{
|
||||
|
@ -2839,30 +2863,6 @@ SWIG_AsVal_int (PyObject * obj, int *val)
|
|||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE PyObject *
|
||||
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
|
||||
{
|
||||
if (carray) {
|
||||
if (size > INT_MAX) {
|
||||
swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
|
||||
return pchar_descriptor ?
|
||||
SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
|
||||
} else {
|
||||
return PyString_FromStringAndSize(carray, static_cast< int >(size));
|
||||
}
|
||||
} else {
|
||||
return SWIG_Py_Void();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE PyObject *
|
||||
SWIG_FromCharPtr(const char *cptr)
|
||||
{
|
||||
return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
|
||||
}
|
||||
|
||||
|
||||
#define SWIG_From_long PyInt_FromLong
|
||||
|
||||
|
||||
|
@ -3011,6 +3011,68 @@ SWIG_AsVal_bool (PyObject *obj, bool *val)
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SWIGINTERN PyObject *_wrap_setGlobalVariable(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:setGlobalVariable",&obj0,&obj1)) SWIG_fail;
|
||||
res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setGlobalVariable" "', 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 '" "setGlobalVariable" "', argument " "2"" of type '" "char *""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
setGlobalVariable(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_getGlobalVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
char *arg1 = (char *) 0 ;
|
||||
char *result = 0 ;
|
||||
int res1 ;
|
||||
char *buf1 = 0 ;
|
||||
int alloc1 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
|
||||
if (!PyArg_ParseTuple(args,(char *)"O:getGlobalVariable",&obj0)) SWIG_fail;
|
||||
res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getGlobalVariable" "', argument " "1"" of type '" "char *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< char * >(buf1);
|
||||
result = (char *)getGlobalVariable(arg1);
|
||||
resultobj = SWIG_FromCharPtr((const char *)result);
|
||||
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
||||
free(result);
|
||||
return resultobj;
|
||||
fail:
|
||||
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_consoleLog(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
char *arg1 = (char *) 0 ;
|
||||
|
@ -9081,6 +9143,8 @@ SWIGINTERN PyObject *Session_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObje
|
|||
}
|
||||
|
||||
static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"setGlobalVariable", _wrap_setGlobalVariable, METH_VARARGS, NULL},
|
||||
{ (char *)"getGlobalVariable", _wrap_getGlobalVariable, METH_VARARGS, NULL},
|
||||
{ (char *)"consoleLog", _wrap_consoleLog, METH_VARARGS, NULL},
|
||||
{ (char *)"consoleCleanLog", _wrap_consoleCleanLog, METH_VARARGS, NULL},
|
||||
{ (char *)"email", _wrap_email, METH_VARARGS, NULL},
|
||||
|
|
|
@ -1190,6 +1190,17 @@ SWITCH_DECLARE(int) globalSetVariable(const char *var, const char *val, const ch
|
|||
}
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) setGlobalVariable(char *var_name, char *var_val)
|
||||
{
|
||||
switch_core_set_variable(var_name, var_val);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(char *) getGlobalVariable(char *var_name)
|
||||
{
|
||||
return switch_core_get_variable_dup(var_name);
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(void) consoleLog(char *level_str, char *msg)
|
||||
{
|
||||
return console_log(level_str, msg);
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
%module fs_elmoscript
|
||||
%typemap(newfree) char * "free($1);";
|
||||
%newobject getGlobalVariable;
|
||||
%{
|
||||
#include "switch.h"
|
||||
%}
|
||||
|
|
Loading…
Reference in New Issue