class API {
protected:
char *last_data;
+ char time_buf[64];
public:
SWITCH_DECLARE_CONSTRUCTOR API(void);
virtual SWITCH_DECLARE_CONSTRUCTOR ~ API();
SWITCH_DECLARE(const char *) execute(const char *command, const char *data);
SWITCH_DECLARE(const char *) executeString(const char *command);
+ SWITCH_DECLARE(char *) getTime(void);
};
void *input, switch_input_type_t itype, void *buf, unsigned int buflen);
+
#ifdef __cplusplus
}
#endif
return freeswitchJNI.API_executeString(swigCPtr, this, command);
}
+ public String getTime() {
+ return freeswitchJNI.API_getTime(swigCPtr, this);
+ }
+
}
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 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);
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);
}
+SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_API_1getTime(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
+ jstring jresult = 0 ;
+ API *arg1 = (API *) 0 ;
+ char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ (void)jarg1_;
+ arg1 = *(API **)&jarg1;
+ result = (char *)(arg1)->getTime();
+ if(result) jresult = jenv->NewStringUTF((const char *)result);
+ 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 ;
}
+static int _wrap_API_getTime(lua_State* L) {
+ int SWIG_arg = -1;
+ API *arg1 = (API *) 0 ;
+ char *result = 0 ;
+
+ SWIG_check_num_args("getTime",1,1)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getTime",1,"API *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_API,0))){
+ SWIG_fail_ptr("API_getTime",1,SWIGTYPE_p_API);
+ }
+
+ result = (char *)(arg1)->getTime();
+ 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},
+ {"getTime", _wrap_API_getTime},
{0,0}
};
static swig_lua_attribute swig_API_attributes[] = {
}
-SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_speech_read_tts(void * jarg1, void * jarg2, void * jarg3, void * jarg4, void * jarg5) {
+SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_speech_read_tts(void * jarg1, void * jarg2, void * jarg3, void * jarg4) {
int jresult ;
switch_speech_handle_t *arg1 = (switch_speech_handle_t *) 0 ;
void *arg2 = (void *) 0 ;
switch_size_t *arg3 = (switch_size_t *) 0 ;
- uint32_t *arg4 = (uint32_t *) 0 ;
- switch_speech_flag_t *arg5 = (switch_speech_flag_t *) 0 ;
+ switch_speech_flag_t *arg4 = (switch_speech_flag_t *) 0 ;
switch_status_t result;
arg1 = (switch_speech_handle_t *)jarg1;
arg2 = (void *)jarg2;
arg3 = (switch_size_t *)jarg3;
- arg4 = (uint32_t *)jarg4;
- arg5 = (switch_speech_flag_t *)jarg5;
- result = (switch_status_t)switch_core_speech_read_tts(arg1,arg2,arg3,arg4,arg5);
+ arg4 = (switch_speech_flag_t *)jarg4;
+ result = (switch_status_t)switch_core_speech_read_tts(arg1,arg2,arg3,arg4);
jresult = result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_speech_interface_speech_read_tts_set(void * jarg1, void * jarg2) {
switch_speech_interface *arg1 = (switch_speech_interface *) 0 ;
- switch_status_t (*arg2)(switch_speech_handle_t *,void *,switch_size_t *,uint32_t *,switch_speech_flag_t *) = (switch_status_t (*)(switch_speech_handle_t *,void *,switch_size_t *,uint32_t *,switch_speech_flag_t *)) 0 ;
+ switch_status_t (*arg2)(switch_speech_handle_t *,void *,switch_size_t *,switch_speech_flag_t *) = (switch_status_t (*)(switch_speech_handle_t *,void *,switch_size_t *,switch_speech_flag_t *)) 0 ;
arg1 = (switch_speech_interface *)jarg1;
- arg2 = (switch_status_t (*)(switch_speech_handle_t *,void *,switch_size_t *,uint32_t *,switch_speech_flag_t *))jarg2;
+ arg2 = (switch_status_t (*)(switch_speech_handle_t *,void *,switch_size_t *,switch_speech_flag_t *))jarg2;
if (arg1) (arg1)->speech_read_tts = arg2;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_speech_interface_speech_read_tts_get(void * jarg1) {
void * jresult ;
switch_speech_interface *arg1 = (switch_speech_interface *) 0 ;
- switch_status_t (*result)(switch_speech_handle_t *,void *,switch_size_t *,uint32_t *,switch_speech_flag_t *) = 0 ;
+ switch_status_t (*result)(switch_speech_handle_t *,void *,switch_size_t *,switch_speech_flag_t *) = 0 ;
arg1 = (switch_speech_interface *)jarg1;
- result = (switch_status_t (*)(switch_speech_handle_t *,void *,switch_size_t *,uint32_t *,switch_speech_flag_t *)) ((arg1)->speech_read_tts);
+ result = (switch_status_t (*)(switch_speech_handle_t *,void *,switch_size_t *,switch_speech_flag_t *)) ((arg1)->speech_read_tts);
jresult = (void *)result;
return jresult;
}
}
+SWIGEXPORT void SWIGSTDCALL CSharp_switch_speech_handle_resampler_set(void * jarg1, void * jarg2) {
+ switch_speech_handle *arg1 = (switch_speech_handle *) 0 ;
+ switch_audio_resampler_t *arg2 = (switch_audio_resampler_t *) 0 ;
+
+ arg1 = (switch_speech_handle *)jarg1;
+ arg2 = (switch_audio_resampler_t *)jarg2;
+ if (arg1) (arg1)->resampler = arg2;
+
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_switch_speech_handle_resampler_get(void * jarg1) {
+ void * jresult ;
+ switch_speech_handle *arg1 = (switch_speech_handle *) 0 ;
+ switch_audio_resampler_t *result = 0 ;
+
+ arg1 = (switch_speech_handle *)jarg1;
+ result = (switch_audio_resampler_t *) ((arg1)->resampler);
+ jresult = (void *)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_switch_speech_handle_buffer_set(void * jarg1, void * jarg2) {
+ switch_speech_handle *arg1 = (switch_speech_handle *) 0 ;
+ switch_buffer_t *arg2 = (switch_buffer_t *) 0 ;
+
+ arg1 = (switch_speech_handle *)jarg1;
+ arg2 = (switch_buffer_t *)jarg2;
+ if (arg1) (arg1)->buffer = arg2;
+
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_switch_speech_handle_buffer_get(void * jarg1) {
+ void * jresult ;
+ switch_speech_handle *arg1 = (switch_speech_handle *) 0 ;
+ switch_buffer_t *result = 0 ;
+
+ arg1 = (switch_speech_handle *)jarg1;
+ result = (switch_buffer_t *) ((arg1)->buffer);
+ jresult = (void *)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_switch_speech_handle_dbuf_set(void * jarg1, void * jarg2) {
+ switch_speech_handle *arg1 = (switch_speech_handle *) 0 ;
+ switch_byte_t *arg2 = (switch_byte_t *) 0 ;
+
+ arg1 = (switch_speech_handle *)jarg1;
+ arg2 = (switch_byte_t *)jarg2;
+ if (arg1) (arg1)->dbuf = arg2;
+
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_switch_speech_handle_dbuf_get(void * jarg1) {
+ void * jresult ;
+ switch_speech_handle *arg1 = (switch_speech_handle *) 0 ;
+ switch_byte_t *result = 0 ;
+
+ arg1 = (switch_speech_handle *)jarg1;
+ result = (switch_byte_t *) ((arg1)->dbuf);
+ jresult = (void *)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_switch_speech_handle_dbuflen_set(void * jarg1, void * jarg2) {
+ switch_speech_handle *arg1 = (switch_speech_handle *) 0 ;
+ switch_size_t arg2 ;
+ switch_size_t *argp2 ;
+
+ arg1 = (switch_speech_handle *)jarg1;
+ argp2 = (switch_size_t *)jarg2;
+ if (!argp2) {
+ SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_size_t", 0);
+ return ;
+ }
+ arg2 = *argp2;
+ if (arg1) (arg1)->dbuflen = arg2;
+
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_switch_speech_handle_dbuflen_get(void * jarg1) {
+ void * jresult ;
+ switch_speech_handle *arg1 = (switch_speech_handle *) 0 ;
+ switch_size_t result;
+
+ arg1 = (switch_speech_handle *)jarg1;
+ result = ((arg1)->dbuflen);
+ jresult = new switch_size_t((switch_size_t &)result);
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_switch_speech_handle_samplerate_set(void * jarg1, unsigned long jarg2) {
+ switch_speech_handle *arg1 = (switch_speech_handle *) 0 ;
+ uint32_t arg2 ;
+
+ arg1 = (switch_speech_handle *)jarg1;
+ arg2 = (uint32_t)jarg2;
+ if (arg1) (arg1)->samplerate = arg2;
+
+}
+
+
+SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_speech_handle_samplerate_get(void * jarg1) {
+ unsigned long jresult ;
+ switch_speech_handle *arg1 = (switch_speech_handle *) 0 ;
+ uint32_t result;
+
+ arg1 = (switch_speech_handle *)jarg1;
+ result = (uint32_t) ((arg1)->samplerate);
+ jresult = (unsigned long)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_switch_speech_handle_native_rate_set(void * jarg1, unsigned long jarg2) {
+ switch_speech_handle *arg1 = (switch_speech_handle *) 0 ;
+ uint32_t arg2 ;
+
+ arg1 = (switch_speech_handle *)jarg1;
+ arg2 = (uint32_t)jarg2;
+ if (arg1) (arg1)->native_rate = arg2;
+
+}
+
+
+SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_speech_handle_native_rate_get(void * jarg1) {
+ unsigned long jresult ;
+ switch_speech_handle *arg1 = (switch_speech_handle *) 0 ;
+ uint32_t result;
+
+ arg1 = (switch_speech_handle *)jarg1;
+ result = (uint32_t) ((arg1)->native_rate);
+ jresult = (unsigned long)result;
+ return jresult;
+}
+
+
SWIGEXPORT void SWIGSTDCALL CSharp_switch_speech_handle_private_info_set(void * jarg1, void * jarg2) {
switch_speech_handle *arg1 = (switch_speech_handle *) 0 ;
void *arg2 = (void *) 0 ;
}
+SWIGEXPORT char * SWIGSTDCALL CSharp_Api_getTime(void * jarg1) {
+ char * jresult ;
+ API *arg1 = (API *) 0 ;
+ char *result = 0 ;
+
+ arg1 = (API *)jarg1;
+ result = (char *)(arg1)->getTime();
+ jresult = SWIG_csharp_string_callback((const char *)result);
+ return jresult;
+}
+
+
SWIGEXPORT void SWIGSTDCALL CSharp_input_callback_state_t_function_set(void * jarg1, void * jarg2) {
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
void *arg2 = (void *) 0 ;
return ret;
}
+ public string getTime() {
+ string ret = freeswitchPINVOKE.Api_getTime(swigCPtr);
+ return ret;
+ }
+
}
}
freeswitchPINVOKE.switch_core_speech_float_param_tts(switch_speech_handle.getCPtr(sh), param, val);
}
- public static switch_status_t switch_core_speech_read_tts(switch_speech_handle sh, SWIGTYPE_p_void data, SWIGTYPE_p_switch_size_t datalen, SWIGTYPE_p_unsigned_long rate, SWIGTYPE_p_unsigned_long flags) {
- switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_speech_read_tts(switch_speech_handle.getCPtr(sh), SWIGTYPE_p_void.getCPtr(data), SWIGTYPE_p_switch_size_t.getCPtr(datalen), SWIGTYPE_p_unsigned_long.getCPtr(rate), SWIGTYPE_p_unsigned_long.getCPtr(flags));
+ public static switch_status_t switch_core_speech_read_tts(switch_speech_handle sh, SWIGTYPE_p_void data, SWIGTYPE_p_switch_size_t datalen, SWIGTYPE_p_unsigned_long flags) {
+ switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_speech_read_tts(switch_speech_handle.getCPtr(sh), SWIGTYPE_p_void.getCPtr(data), SWIGTYPE_p_switch_size_t.getCPtr(datalen), SWIGTYPE_p_unsigned_long.getCPtr(flags));
return ret;
}
public static extern void switch_core_speech_float_param_tts(HandleRef jarg1, string jarg2, double jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_speech_read_tts")]
- public static extern int switch_core_speech_read_tts(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3, HandleRef jarg4, HandleRef jarg5);
+ public static extern int switch_core_speech_read_tts(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3, HandleRef jarg4);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_speech_close")]
public static extern int switch_core_speech_close(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_speech_handle_memory_pool_get")]
public static extern IntPtr switch_speech_handle_memory_pool_get(HandleRef jarg1);
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_speech_handle_resampler_set")]
+ public static extern void switch_speech_handle_resampler_set(HandleRef jarg1, HandleRef jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_speech_handle_resampler_get")]
+ public static extern IntPtr switch_speech_handle_resampler_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_speech_handle_buffer_set")]
+ public static extern void switch_speech_handle_buffer_set(HandleRef jarg1, HandleRef jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_speech_handle_buffer_get")]
+ public static extern IntPtr switch_speech_handle_buffer_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_speech_handle_dbuf_set")]
+ public static extern void switch_speech_handle_dbuf_set(HandleRef jarg1, HandleRef jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_speech_handle_dbuf_get")]
+ public static extern IntPtr switch_speech_handle_dbuf_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_speech_handle_dbuflen_set")]
+ public static extern void switch_speech_handle_dbuflen_set(HandleRef jarg1, HandleRef jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_speech_handle_dbuflen_get")]
+ public static extern IntPtr switch_speech_handle_dbuflen_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_speech_handle_samplerate_set")]
+ public static extern void switch_speech_handle_samplerate_set(HandleRef jarg1, uint jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_speech_handle_samplerate_get")]
+ public static extern uint switch_speech_handle_samplerate_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_speech_handle_native_rate_set")]
+ public static extern void switch_speech_handle_native_rate_set(HandleRef jarg1, uint jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_speech_handle_native_rate_get")]
+ public static extern uint switch_speech_handle_native_rate_get(HandleRef jarg1);
+
[DllImport("mod_managed", EntryPoint="CSharp_switch_speech_handle_private_info_set")]
public static extern void switch_speech_handle_private_info_set(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_Api_ExecuteString")]
public static extern string Api_ExecuteString(HandleRef jarg1, string jarg2);
+ [DllImport("mod_managed", EntryPoint="CSharp_Api_getTime")]
+ public static extern string Api_getTime(HandleRef jarg1);
+
[DllImport("mod_managed", EntryPoint="CSharp_input_callback_state_t_function_set")]
public static extern void input_callback_state_t_function_set(HandleRef jarg1, HandleRef jarg2);
using System;
using System.Runtime.InteropServices;
-public class SWIGTYPE_p_CoreSession {
- private HandleRef swigCPtr;
-
- internal SWIGTYPE_p_CoreSession(IntPtr cPtr, bool futureUse) {
- swigCPtr = new HandleRef(this, cPtr);
- }
-
- protected SWIGTYPE_p_CoreSession() {
- swigCPtr = new HandleRef(null, IntPtr.Zero);
- }
-
- internal static HandleRef getCPtr(SWIGTYPE_p_CoreSession obj) {
- return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
- }
-}
-
-}
-/* ----------------------------------------------------------------------------
- * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.35
- *
- * Do not make changes to this file unless you know what you are doing--modify
- * the SWIG interface file instead.
- * ----------------------------------------------------------------------------- */
-
-namespace FreeSWITCH.Native {
-
-using System;
-using System.Runtime.InteropServices;
-
public class SWIGTYPE_p_FILE {
private HandleRef swigCPtr;
using System;
using System.Runtime.InteropServices;
-public class SWIGTYPE_p_f_p_switch_speech_handle_p_void_p_switch_size_t_p_unsigned_long_p_unsigned_long__switch_status_t {
+public class SWIGTYPE_p_f_p_switch_speech_handle_p_void_p_switch_size_t_p_unsigned_long__switch_status_t {
private HandleRef swigCPtr;
- internal SWIGTYPE_p_f_p_switch_speech_handle_p_void_p_switch_size_t_p_unsigned_long_p_unsigned_long__switch_status_t(IntPtr cPtr, bool futureUse) {
+ internal SWIGTYPE_p_f_p_switch_speech_handle_p_void_p_switch_size_t_p_unsigned_long__switch_status_t(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
- protected SWIGTYPE_p_f_p_switch_speech_handle_p_void_p_switch_size_t_p_unsigned_long_p_unsigned_long__switch_status_t() {
+ protected SWIGTYPE_p_f_p_switch_speech_handle_p_void_p_switch_size_t_p_unsigned_long__switch_status_t() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
- internal static HandleRef getCPtr(SWIGTYPE_p_f_p_switch_speech_handle_p_void_p_switch_size_t_p_unsigned_long_p_unsigned_long__switch_status_t obj) {
+ internal static HandleRef getCPtr(SWIGTYPE_p_f_p_switch_speech_handle_p_void_p_switch_size_t_p_unsigned_long__switch_status_t obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
using System;
using System.Runtime.InteropServices;
-public class SWIGTYPE_p_SWITCH_DECLARE_CLASS {
- private HandleRef swigCPtr;
-
- internal SWIGTYPE_p_SWITCH_DECLARE_CLASS(IntPtr cPtr, bool futureUse) {
- swigCPtr = new HandleRef(this, cPtr);
- }
-
- protected SWIGTYPE_p_SWITCH_DECLARE_CLASS() {
- swigCPtr = new HandleRef(null, IntPtr.Zero);
- }
-
- internal static HandleRef getCPtr(SWIGTYPE_p_SWITCH_DECLARE_CLASS obj) {
- return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
- }
-}
-
-}
-/* ----------------------------------------------------------------------------
- * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.35
- *
- * Do not make changes to this file unless you know what you are doing--modify
- * the SWIG interface file instead.
- * ----------------------------------------------------------------------------- */
-
-namespace FreeSWITCH.Native {
-
-using System;
-using System.Runtime.InteropServices;
-
public class SWIGTYPE_p_switch_event_node {
private HandleRef swigCPtr;
SWITCH_SPEECH_FLAG_PEEK = (1 << 1),
SWITCH_SPEECH_FLAG_FREE_POOL = (1 << 2),
SWITCH_SPEECH_FLAG_BLOCKING = (1 << 3),
- SWITCH_SPEECH_FLAG_PAUSE = (1 << 4)
+ SWITCH_SPEECH_FLAG_PAUSE = (1 << 4),
+ SWITCH_SPEECH_FLAG_OPEN = (1 << 5),
+ SWITCH_SPEECH_FLAG_DONE = (1 << 6)
}
}
}
}
+ public switch_audio_resampler_t resampler {
+ set {
+ freeswitchPINVOKE.switch_speech_handle_resampler_set(swigCPtr, switch_audio_resampler_t.getCPtr(value));
+ }
+ get {
+ IntPtr cPtr = freeswitchPINVOKE.switch_speech_handle_resampler_get(swigCPtr);
+ switch_audio_resampler_t ret = (cPtr == IntPtr.Zero) ? null : new switch_audio_resampler_t(cPtr, false);
+ return ret;
+ }
+ }
+
+ public SWIGTYPE_p_switch_buffer buffer {
+ set {
+ freeswitchPINVOKE.switch_speech_handle_buffer_set(swigCPtr, SWIGTYPE_p_switch_buffer.getCPtr(value));
+ }
+ get {
+ IntPtr cPtr = freeswitchPINVOKE.switch_speech_handle_buffer_get(swigCPtr);
+ SWIGTYPE_p_switch_buffer ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_switch_buffer(cPtr, false);
+ return ret;
+ }
+ }
+
+ public SWIGTYPE_p_unsigned_char dbuf {
+ set {
+ freeswitchPINVOKE.switch_speech_handle_dbuf_set(swigCPtr, SWIGTYPE_p_unsigned_char.getCPtr(value));
+ }
+ get {
+ IntPtr cPtr = freeswitchPINVOKE.switch_speech_handle_dbuf_get(swigCPtr);
+ SWIGTYPE_p_unsigned_char ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
+ return ret;
+ }
+ }
+
+ public SWIGTYPE_p_switch_size_t dbuflen {
+ set {
+ freeswitchPINVOKE.switch_speech_handle_dbuflen_set(swigCPtr, SWIGTYPE_p_switch_size_t.getCPtr(value));
+ if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
+ }
+ get {
+ SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_speech_handle_dbuflen_get(swigCPtr), true);
+ if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+
+ public uint samplerate {
+ set {
+ freeswitchPINVOKE.switch_speech_handle_samplerate_set(swigCPtr, value);
+ }
+ get {
+ uint ret = freeswitchPINVOKE.switch_speech_handle_samplerate_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public uint native_rate {
+ set {
+ freeswitchPINVOKE.switch_speech_handle_native_rate_set(swigCPtr, value);
+ }
+ get {
+ uint ret = freeswitchPINVOKE.switch_speech_handle_native_rate_get(swigCPtr);
+ return ret;
+ }
+ }
+
public SWIGTYPE_p_void private_info {
set {
freeswitchPINVOKE.switch_speech_handle_private_info_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value));
}
}
- public SWIGTYPE_p_f_p_switch_speech_handle_p_void_p_switch_size_t_p_unsigned_long_p_unsigned_long__switch_status_t speech_read_tts {
+ public SWIGTYPE_p_f_p_switch_speech_handle_p_void_p_switch_size_t_p_unsigned_long__switch_status_t speech_read_tts {
set {
- freeswitchPINVOKE.switch_speech_interface_speech_read_tts_set(swigCPtr, SWIGTYPE_p_f_p_switch_speech_handle_p_void_p_switch_size_t_p_unsigned_long_p_unsigned_long__switch_status_t.getCPtr(value));
+ freeswitchPINVOKE.switch_speech_interface_speech_read_tts_set(swigCPtr, SWIGTYPE_p_f_p_switch_speech_handle_p_void_p_switch_size_t_p_unsigned_long__switch_status_t.getCPtr(value));
}
get {
IntPtr cPtr = freeswitchPINVOKE.switch_speech_interface_speech_read_tts_get(swigCPtr);
- SWIGTYPE_p_f_p_switch_speech_handle_p_void_p_switch_size_t_p_unsigned_long_p_unsigned_long__switch_status_t ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_f_p_switch_speech_handle_p_void_p_switch_size_t_p_unsigned_long_p_unsigned_long__switch_status_t(cPtr, false);
+ SWIGTYPE_p_f_p_switch_speech_handle_p_void_p_switch_size_t_p_unsigned_long__switch_status_t ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_f_p_switch_speech_handle_p_void_p_switch_size_t_p_unsigned_long__switch_status_t(cPtr, false);
return ret;
}
}
*execute = *freeswitchc::API_execute;
*executeString = *freeswitchc::API_executeString;
+*getTime = *freeswitchc::API_getTime;
sub DISOWN {
my $self = shift;
my $ptr = tied(%$self);
}
+XS(_wrap_API_getTime) {
+ {
+ API *arg1 = (API *) 0 ;
+ char *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: API_getTime(self);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_API, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "API_getTime" "', argument " "1"" of type '" "API *""'");
+ }
+ arg1 = reinterpret_cast< API * >(argp1);
+ result = (char *)(arg1)->getTime();
+ ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
+
+ XSRETURN(argvi);
+ fail:
+
+ SWIG_croak_null();
+ }
+}
+
+
XS(_wrap_input_callback_state_t_function_set) {
{
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
{"freeswitchc::delete_API", _wrap_delete_API},
{"freeswitchc::API_execute", _wrap_API_execute},
{"freeswitchc::API_executeString", _wrap_API_executeString},
+{"freeswitchc::API_getTime", _wrap_API_getTime},
{"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},
SWIG_TypeClientData(SWIGTYPE_p_IVRMenu, (void*) "freeswitch::IVRMenu");
SWIG_TypeClientData(SWIGTYPE_p_API, (void*) "freeswitch::API");
SWIG_TypeClientData(SWIGTYPE_p_input_callback_state, (void*) "freeswitch::input_callback_state_t");
- /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
+ /*@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);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_HUP)));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
- /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
+ /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "S_FREE", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_FREE)));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
- /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
+ /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "S_RDLOCK", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_RDLOCK)));
SvREADONLY_on(sv);
__del__ = lambda self : None;
def execute(*args): return _freeswitch.API_execute(*args)
def executeString(*args): return _freeswitch.API_executeString(*args)
+ def getTime(*args): return _freeswitch.API_getTime(*args)
API_swigregister = _freeswitch.API_swigregister
API_swigregister(API)
}
+SWIGINTERN PyObject *_wrap_API_getTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ API *arg1 = (API *) 0 ;
+ char *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:API_getTime",&obj0)) 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_getTime" "', argument " "1"" of type '" "API *""'");
+ }
+ arg1 = reinterpret_cast< API * >(argp1);
+ result = (char *)(arg1)->getTime();
+ resultobj = SWIG_FromCharPtr((const char *)result);
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
SWIGINTERN PyObject *API_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return 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_getTime", _wrap_API_getTime, 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},
return last_data;
}
+
+/* we have to do this as a string because swig and languages can't find an embedded way to pass a big int */
+SWITCH_DECLARE_NONSTD(char *) API::getTime(void)
+{
+ switch_time_t now = switch_micro_time_now() / 1000;
+ snprintf(time_buf, sizeof(time_buf), "%" SWITCH_TIME_T_FMT, now);
+ return time_buf;
+}
+
+
+
SWITCH_DECLARE(const char *) API::executeString(const char *cmd)
{
char *arg;