This commit is contained in:
Anthony Minessale 2013-06-20 11:40:56 -05:00
parent 904189a485
commit ad5f689fb7
10 changed files with 179 additions and 0 deletions

View File

@ -313,4 +313,8 @@ public class CoreSession {
return new SWIGTYPE_p_switch_status_t(freeswitchJNI.CoreSession_run_dtmf_callback(swigCPtr, this, SWIGTYPE_p_void.getCPtr(input), SWIGTYPE_p_switch_input_type_t.getCPtr(itype)), true);
}
public void consoleLog(String level_str, String msg) {
freeswitchJNI.CoreSession_consoleLog(swigCPtr, this, level_str, msg);
}
}

View File

@ -157,6 +157,7 @@ class freeswitchJNI {
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 CoreSession_consoleLog(long jarg1, CoreSession jarg1_, String jarg2, String 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);

View File

@ -3091,6 +3091,31 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1run
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1consoleLog(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;
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 ;
}
(arg1)->consoleLog(arg2,arg3);
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
}
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 ;

View File

@ -6140,6 +6140,36 @@ fail:
}
static int _wrap_CoreSession_consoleLog(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
SWIG_check_num_args("consoleLog",3,3)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("consoleLog",1,"CoreSession *");
if(!lua_isstring(L,2)) SWIG_fail_arg("consoleLog",2,"char *");
if(!lua_isstring(L,3)) SWIG_fail_arg("consoleLog",3,"char *");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
SWIG_fail_ptr("CoreSession_consoleLog",1,SWIGTYPE_p_CoreSession);
}
arg2 = (char *)lua_tostring(L, 2);
arg3 = (char *)lua_tostring(L, 3);
(arg1)->consoleLog(arg2,arg3);
SWIG_arg=0;
return SWIG_arg;
if(0) SWIG_fail;
fail:
lua_error(L);
return SWIG_arg;
}
static void swig_delete_CoreSession(void *obj) {
CoreSession *arg1 = (CoreSession *) obj;
delete arg1;
@ -6192,6 +6222,7 @@ static swig_lua_method swig_CoreSession_methods[] = {
{"get_cb_args", _wrap_CoreSession_get_cb_args},
{"check_hangup_hook", _wrap_CoreSession_check_hangup_hook},
{"run_dtmf_callback", _wrap_CoreSession_run_dtmf_callback},
{"consoleLog", _wrap_CoreSession_consoleLog},
{0,0}
};
static swig_lua_attribute swig_CoreSession_attributes[] = {

View File

@ -40635,6 +40635,18 @@ SWIGEXPORT void SWIGSTDCALL CSharp_CoreSession_check_hangup_hook(void * jarg1) {
}
SWIGEXPORT void SWIGSTDCALL CSharp_CoreSession_consoleLog(void * jarg1, char * jarg2, char * jarg3) {
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
arg1 = (CoreSession *)jarg1;
arg2 = (char *)jarg2;
arg3 = (char *)jarg3;
(arg1)->consoleLog(arg2,arg3);
}
SWIGEXPORT void SWIGSTDCALL CSharp_console_log(char * jarg1, char * jarg2) {
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;

View File

@ -416,6 +416,10 @@ public class CoreSession : IDisposable {
freeswitchPINVOKE.CoreSession_check_hangup_hook(swigCPtr);
}
public void consoleLog(string level_str, string msg) {
freeswitchPINVOKE.CoreSession_consoleLog(swigCPtr, level_str, msg);
}
}
}
@ -22047,6 +22051,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_CoreSession_check_hangup_hook")]
public static extern void CoreSession_check_hangup_hook(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_CoreSession_consoleLog")]
public static extern void CoreSession_consoleLog(HandleRef jarg1, string jarg2, string jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_console_log")]
public static extern void console_log(string jarg1, string jarg2);
@ -25004,6 +25011,7 @@ public enum switch_channel_flag_t {
CF_EARLY_OK,
CF_MEDIA_TRANS,
CF_HOLD_ON_BRIDGE,
CF_NOVIDEO,
CF_FLAG_MAX
}

View File

@ -458,6 +458,7 @@ sub DESTROY {
*get_cb_args = *freeswitchc::CoreSession_get_cb_args;
*check_hangup_hook = *freeswitchc::CoreSession_check_hangup_hook;
*run_dtmf_callback = *freeswitchc::CoreSession_run_dtmf_callback;
*consoleLog = *freeswitchc::CoreSession_consoleLog;
sub DISOWN {
my $self = shift;
my $ptr = tied(%$self);

View File

@ -8040,6 +8040,55 @@ XS(_wrap_CoreSession_run_dtmf_callback) {
}
XS(_wrap_CoreSession_consoleLog) {
{
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_consoleLog(self,level_str,msg);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_consoleLog" "', 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_consoleLog" "', 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_consoleLog" "', argument " "3"" of type '" "char *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
(arg1)->consoleLog(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_console_log) {
{
char *arg1 = (char *) 0 ;
@ -9873,6 +9922,7 @@ static swig_command_info swig_commands[] = {
{"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::CoreSession_consoleLog", _wrap_CoreSession_consoleLog},
{"freeswitchc::console_log", _wrap_console_log},
{"freeswitchc::console_clean_log", _wrap_console_clean_log},
{"freeswitchc::msleep", _wrap_msleep},

View File

@ -317,6 +317,7 @@ class CoreSession(_object):
def get_cb_args(*args): return _freeswitch.CoreSession_get_cb_args(*args)
def check_hangup_hook(*args): return _freeswitch.CoreSession_check_hangup_hook(*args)
def run_dtmf_callback(*args): return _freeswitch.CoreSession_run_dtmf_callback(*args)
def consoleLog(*args): return _freeswitch.CoreSession_consoleLog(*args)
CoreSession_swigregister = _freeswitch.CoreSession_swigregister
CoreSession_swigregister(CoreSession)

View File

@ -8250,6 +8250,51 @@ fail:
}
SWIGINTERN PyObject *_wrap_CoreSession_consoleLog(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
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 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OOO:CoreSession_consoleLog",&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_consoleLog" "', 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_consoleLog" "', argument " "2"" of type '" "char *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_consoleLog" "', argument " "3"" of type '" "char *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
(arg1)->consoleLog(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 *CoreSession_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
@ -9392,6 +9437,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"CoreSession_get_cb_args", _wrap_CoreSession_get_cb_args, METH_VARARGS, NULL},
{ (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_consoleLog", _wrap_CoreSession_consoleLog, 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},