diff --git a/src/mod/languages/mod_java/src/org/freeswitch/swig/API.java b/src/mod/languages/mod_java/src/org/freeswitch/swig/API.java index 283518f1d6..1c2e19ba9d 100644 --- a/src/mod/languages/mod_java/src/org/freeswitch/swig/API.java +++ b/src/mod/languages/mod_java/src/org/freeswitch/swig/API.java @@ -38,7 +38,11 @@ public class API { } public String execute(String command, String data) { - return freeswitchJNI.API_execute(swigCPtr, this, command, data); + return freeswitchJNI.API_execute__SWIG_0(swigCPtr, this, command, data); + } + + public String execute(String command) { + return freeswitchJNI.API_execute__SWIG_1(swigCPtr, this, command); } public String executeString(String command) { diff --git a/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java b/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java index 1b0be05cd3..9064908a79 100644 --- a/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java +++ b/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java @@ -17,7 +17,8 @@ class freeswitchJNI { public final static native void IVRMenu_execute(long jarg1, IVRMenu jarg1_, long jarg2, CoreSession jarg2_, String jarg3); public final static native long new_API(); public final static native void delete_API(long jarg1); - public final static native String API_execute(long jarg1, API jarg1_, String jarg2, String jarg3); + public final static native String API_execute__SWIG_0(long jarg1, API jarg1_, String jarg2, String jarg3); + public final static native String API_execute__SWIG_1(long jarg1, API jarg1_, String jarg2); public final static native String API_executeString(long jarg1, API jarg1_, String jarg2); public final static native String API_getTime(long jarg1, API jarg1_); public final static native void input_callback_state_t_function_set(long jarg1, input_callback_state_t jarg1_, long jarg2); diff --git a/src/mod/languages/mod_java/switch_swig_wrap.cpp b/src/mod/languages/mod_java/switch_swig_wrap.cpp index 3cf546f846..8d59b37630 100644 --- a/src/mod/languages/mod_java/switch_swig_wrap.cpp +++ b/src/mod/languages/mod_java/switch_swig_wrap.cpp @@ -421,7 +421,7 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1API(JNIEn } -SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_API_1execute(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) { +SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_API_1execute_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) { jstring jresult = 0 ; API *arg1 = (API *) 0 ; char *arg2 = (char *) 0 ; @@ -450,6 +450,28 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_API_1execute(J } +SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_API_1execute_1_1SWIG_11(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)->execute((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_API_1executeString(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { jstring jresult = 0 ; API *arg1 = (API *) 0 ; diff --git a/src/mod/languages/mod_managed/freeswitch_wrap.cxx b/src/mod/languages/mod_managed/freeswitch_wrap.cxx index 090e9f0bcd..6f460be9ce 100644 --- a/src/mod/languages/mod_managed/freeswitch_wrap.cxx +++ b/src/mod/languages/mod_managed/freeswitch_wrap.cxx @@ -2101,6 +2101,36 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_directories_log_dir_get(void * jarg1 } +SWIGEXPORT void SWIGSTDCALL CSharp_switch_directories_run_dir_set(void * jarg1, char * jarg2) { + switch_directories *arg1 = (switch_directories *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_directories *)jarg1; + arg2 = (char *)jarg2; + { + if (arg1->run_dir) delete [] arg1->run_dir; + if (arg2) { + arg1->run_dir = (char *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->run_dir, (const char *)arg2); + } else { + arg1->run_dir = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_directories_run_dir_get(void * jarg1) { + char * jresult ; + switch_directories *arg1 = (switch_directories *) 0 ; + char *result = 0 ; + + arg1 = (switch_directories *)jarg1; + result = (char *) ((arg1)->run_dir); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_switch_directories_db_dir_set(void * jarg1, char * jarg2) { switch_directories *arg1 = (switch_directories *) 0 ; char *arg2 = (char *) 0 ; @@ -23516,6 +23546,22 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtp_release_port(char * jarg1, unsigne } +SWIGEXPORT int SWIGSTDCALL CSharp_switch_rtp_set_interval(void * jarg1, unsigned long jarg2, unsigned long jarg3) { + int jresult ; + switch_rtp_t *arg1 = (switch_rtp_t *) 0 ; + uint32_t arg2 ; + uint32_t arg3 ; + switch_status_t result; + + arg1 = (switch_rtp_t *)jarg1; + arg2 = (uint32_t)jarg2; + arg3 = (uint32_t)jarg3; + result = (switch_status_t)switch_rtp_set_interval(arg1,arg2,arg3); + jresult = result; + return jresult; +} + + SWIGEXPORT int SWIGSTDCALL CSharp_switch_rtp_change_interval(void * jarg1, unsigned long jarg2, unsigned long jarg3) { int jresult ; switch_rtp_t *arg1 = (switch_rtp_t *) 0 ; @@ -23782,16 +23828,6 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_rtp_get_rtp_socket(void * jarg1) { } -SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtp_set_default_samples_per_interval(void * jarg1, unsigned long jarg2) { - switch_rtp_t *arg1 = (switch_rtp_t *) 0 ; - uint32_t arg2 ; - - arg1 = (switch_rtp_t *)jarg1; - arg2 = (uint32_t)jarg2; - switch_rtp_set_default_samples_per_interval(arg1,arg2); -} - - SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_rtp_get_default_samples_per_interval(void * jarg1) { unsigned long jresult ; switch_rtp_t *arg1 = (switch_rtp_t *) 0 ; diff --git a/src/mod/languages/mod_managed/managed/swig.cs b/src/mod/languages/mod_managed/managed/swig.cs index 6682d6c54c..4a4cdcbbd4 100644 --- a/src/mod/languages/mod_managed/managed/swig.cs +++ b/src/mod/languages/mod_managed/managed/swig.cs @@ -3543,6 +3543,11 @@ public class freeswitch { freeswitchPINVOKE.switch_rtp_release_port(ip, port); } + public static switch_status_t switch_rtp_set_interval(SWIGTYPE_p_switch_rtp rtp_session, uint ms_per_packet, uint samples_per_interval) { + switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_rtp_set_interval(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), ms_per_packet, samples_per_interval); + return ret; + } + public static switch_status_t switch_rtp_change_interval(SWIGTYPE_p_switch_rtp rtp_session, uint ms_per_packet, uint samples_per_interval) { switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_rtp_change_interval(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), ms_per_packet, samples_per_interval); return ret; @@ -3633,10 +3638,6 @@ public class freeswitch { return ret; } - public static void switch_rtp_set_default_samples_per_interval(SWIGTYPE_p_switch_rtp rtp_session, uint samples_per_interval) { - freeswitchPINVOKE.switch_rtp_set_default_samples_per_interval(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), samples_per_interval); - } - public static uint switch_rtp_get_default_samples_per_interval(SWIGTYPE_p_switch_rtp rtp_session) { uint ret = freeswitchPINVOKE.switch_rtp_get_default_samples_per_interval(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session)); return ret; @@ -5065,6 +5066,12 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_directories_log_dir_get")] public static extern string switch_directories_log_dir_get(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_directories_run_dir_set")] + public static extern void switch_directories_run_dir_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_directories_run_dir_get")] + public static extern string switch_directories_run_dir_get(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_directories_db_dir_set")] public static extern void switch_directories_db_dir_set(HandleRef jarg1, string jarg2); @@ -10084,6 +10091,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_release_port")] public static extern void switch_rtp_release_port(string jarg1, ushort jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_set_interval")] + public static extern int switch_rtp_set_interval(HandleRef jarg1, uint jarg2, uint jarg3); + [DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_change_interval")] public static extern int switch_rtp_change_interval(HandleRef jarg1, uint jarg2, uint jarg3); @@ -10141,9 +10151,6 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_get_rtp_socket")] public static extern IntPtr switch_rtp_get_rtp_socket(HandleRef jarg1); - [DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_set_default_samples_per_interval")] - public static extern void switch_rtp_set_default_samples_per_interval(HandleRef jarg1, uint jarg2); - [DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_get_default_samples_per_interval")] public static extern uint switch_rtp_get_default_samples_per_interval(HandleRef jarg1); @@ -19821,6 +19828,16 @@ public class switch_directories : IDisposable { } } + public string run_dir { + set { + freeswitchPINVOKE.switch_directories_run_dir_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_directories_run_dir_get(swigCPtr); + return ret; + } + } + public string db_dir { set { freeswitchPINVOKE.switch_directories_db_dir_set(swigCPtr, value); diff --git a/src/mod/languages/mod_perl/mod_perl_wrap.cpp b/src/mod/languages/mod_perl/mod_perl_wrap.cpp index 4953475e80..9a4e1400d7 100644 --- a/src/mod/languages/mod_perl/mod_perl_wrap.cpp +++ b/src/mod/languages/mod_perl/mod_perl_wrap.cpp @@ -2349,7 +2349,7 @@ XS(_wrap_delete_API) { } -XS(_wrap_API_execute) { +XS(_wrap_API_execute__SWIG_0) { { API *arg1 = (API *) 0 ; char *arg2 = (char *) 0 ; @@ -2399,6 +2399,131 @@ XS(_wrap_API_execute) { } +XS(_wrap_API_execute__SWIG_1) { + { + 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_execute(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_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); + result = (char *)(arg1)->execute((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_API_execute) { + 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_API, 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_API, 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_AsCharPtrAndSize(ST(2), 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_API_execute__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_API_execute__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'API_execute'"); + XSRETURN(0); +} + + XS(_wrap_API_executeString) { { API *arg1 = (API *) 0 ; diff --git a/src/mod/languages/mod_python/mod_python_wrap.cpp b/src/mod/languages/mod_python/mod_python_wrap.cpp index eb91762f28..3abb13d987 100644 --- a/src/mod/languages/mod_python/mod_python_wrap.cpp +++ b/src/mod/languages/mod_python/mod_python_wrap.cpp @@ -3416,7 +3416,7 @@ fail: } -SWIGINTERN PyObject *_wrap_API_execute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_API_execute__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; API *arg1 = (API *) 0 ; char *arg2 = (char *) 0 ; @@ -3462,6 +3462,90 @@ fail: } +SWIGINTERN PyObject *_wrap_API_execute__SWIG_1(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_execute",&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_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); + result = (char *)(arg1)->execute((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_API_execute(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_API, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_API_execute__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_API, 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_AsCharPtrAndSize(argv[2], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_API_execute__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'API_execute'.\n" + " Possible C/C++ prototypes are:\n" + " execute(API *,char const *,char const *)\n" + " execute(API *,char const *)\n"); + return NULL; +} + + SWIGINTERN PyObject *_wrap_API_executeString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; API *arg1 = (API *) 0 ;