git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10485 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-11-20 23:12:15 +00:00
parent 369e606564
commit ec5c366f30
10 changed files with 127 additions and 0 deletions

View File

@ -25,6 +25,10 @@ public class freeswitch {
freeswitchJNI.console_clean_log(msg);
}
public static void msleep(SWIGTYPE_p_uint32_t ms) {
freeswitchJNI.msleep(SWIGTYPE_p_uint32_t.getCPtr(ms));
}
public static void bridge(CoreSession session_a, CoreSession session_b) {
freeswitchJNI.bridge(CoreSession.getCPtr(session_a), session_a, CoreSession.getCPtr(session_b), session_b);
}

View File

@ -158,6 +158,7 @@ class freeswitchJNI {
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 void msleep(long 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);

View File

@ -3032,6 +3032,22 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_console_1clean_1l
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_msleep(JNIEnv *jenv, jclass jcls, jlong jarg1) {
uint32_t arg1 ;
uint32_t *argp1 ;
(void)jenv;
(void)jcls;
argp1 = *(uint32_t **)&jarg1;
if (!argp1) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null uint32_t");
return ;
}
arg1 = *argp1;
msleep(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 ;

View File

@ -6791,6 +6791,32 @@ fail:
}
static int _wrap_msleep(lua_State* L) {
int SWIG_arg = -1;
uint32_t arg1 ;
uint32_t *argp1 ;
SWIG_check_num_args("msleep",1,1)
if(!lua_isuserdata(L,1)) SWIG_fail_arg("msleep",1,"uint32_t");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&argp1,SWIGTYPE_p_uint32_t,0))){
SWIG_fail_ptr("msleep",1,SWIGTYPE_p_uint32_t);
}
arg1 = *argp1;
msleep(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 ;
@ -7801,6 +7827,7 @@ static const struct luaL_reg swig_commands[] = {
{ "consoleCleanLog", _wrap_consoleCleanLog},
{ "console_log", _wrap_console_log},
{ "console_clean_log", _wrap_console_clean_log},
{ "msleep", _wrap_msleep},
{ "bridge", _wrap_bridge},
{ "hanguphook", _wrap_hanguphook},
{ "dtmf_callback", _wrap_dtmf_callback},

View File

@ -26839,6 +26839,14 @@ SWIGEXPORT void SWIGSTDCALL CSharp_console_clean_log(char * jarg1) {
}
SWIGEXPORT void SWIGSTDCALL CSharp_msleep(unsigned long jarg1) {
uint32_t arg1 ;
arg1 = (uint32_t)jarg1;
msleep(arg1);
}
SWIGEXPORT void SWIGSTDCALL CSharp_bridge(void * jarg1, void * jarg2) {
CoreSession *arg1 = 0 ;
CoreSession *arg2 = 0 ;

View File

@ -3856,6 +3856,10 @@ public class freeswitch {
freeswitchPINVOKE.console_clean_log(msg);
}
public static void msleep(uint ms) {
freeswitchPINVOKE.msleep(ms);
}
public static void bridge(CoreSession session_a, CoreSession session_b) {
freeswitchPINVOKE.bridge(CoreSession.getCPtr(session_a), CoreSession.getCPtr(session_b));
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
@ -10507,6 +10511,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_console_clean_log")]
public static extern void console_clean_log(string jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_msleep")]
public static extern void msleep(uint jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_bridge")]
public static extern void bridge(HandleRef jarg1, HandleRef jarg2);

View File

@ -52,6 +52,7 @@ package freeswitch;
*consoleCleanLog = *freeswitchc::consoleCleanLog;
*console_log = *freeswitchc::console_log;
*console_clean_log = *freeswitchc::console_clean_log;
*msleep = *freeswitchc::msleep;
*bridge = *freeswitchc::bridge;
*hanguphook = *freeswitchc::hanguphook;
*dtmf_callback = *freeswitchc::dtmf_callback;

View File

@ -8968,6 +8968,37 @@ XS(_wrap_console_clean_log) {
}
XS(_wrap_msleep) {
{
uint32_t arg1 ;
void *argp1 ;
int res1 = 0 ;
int argvi = 0;
dXSARGS;
if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: msleep(ms);");
}
{
res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_uint32_t, 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "msleep" "', argument " "1"" of type '" "uint32_t""'");
}
if (!argp1) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "msleep" "', argument " "1"" of type '" "uint32_t""'");
} else {
arg1 = *(reinterpret_cast< uint32_t * >(argp1));
}
}
msleep(arg1);
XSRETURN(argvi);
fail:
SWIG_croak_null();
}
}
XS(_wrap_bridge) {
{
CoreSession *arg1 = 0 ;
@ -10656,6 +10687,7 @@ static swig_command_info swig_commands[] = {
{"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::msleep", _wrap_msleep},
{"freeswitchc::bridge", _wrap_bridge},
{"freeswitchc::hanguphook", _wrap_hanguphook},
{"freeswitchc::dtmf_callback", _wrap_dtmf_callback},

View File

@ -302,6 +302,7 @@ CoreSession_swigregister(CoreSession)
console_log = _freeswitch.console_log
console_clean_log = _freeswitch.console_clean_log
msleep = _freeswitch.msleep
bridge = _freeswitch.bridge
hanguphook = _freeswitch.hanguphook
dtmf_callback = _freeswitch.dtmf_callback

View File

@ -8683,6 +8683,35 @@ fail:
}
SWIGINTERN PyObject *_wrap_msleep(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
uint32_t arg1 ;
void *argp1 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:msleep",&obj0)) SWIG_fail;
{
res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_uint32_t, 0 | 0);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "msleep" "', argument " "1"" of type '" "uint32_t""'");
}
if (!argp1) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "msleep" "', argument " "1"" of type '" "uint32_t""'");
} else {
uint32_t * temp = reinterpret_cast< uint32_t * >(argp1);
arg1 = *temp;
if (SWIG_IsNewObj(res1)) delete temp;
}
}
msleep(arg1);
resultobj = SWIG_Py_Void();
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_bridge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = 0 ;
@ -9701,6 +9730,7 @@ static PyMethodDef SwigMethods[] = {
{ (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 *)"msleep", _wrap_msleep, 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},