reswig
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15361 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
0c54152402
commit
f4239d9500
|
@ -216,6 +216,7 @@ SWITCH_DECLARE(void) consoleCleanLog(char *msg);
|
|||
SWITCH_DECLARE(int) answer();
|
||||
SWITCH_DECLARE(int) preAnswer();
|
||||
SWITCH_DECLARE(void) hangup(const char *cause = "normal_clearing");
|
||||
SWITCH_DECLARE(void) hangupState(void);
|
||||
SWITCH_DECLARE(void) setVariable(char *var, char *val);
|
||||
SWITCH_DECLARE(void) setPrivate(char *var, void *val);
|
||||
SWITCH_DECLARE(void *) getPrivate(char *var);
|
||||
|
|
|
@ -132,6 +132,10 @@ public class CoreSession {
|
|||
freeswitchJNI.CoreSession_hangup__SWIG_1(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void hangupState() {
|
||||
freeswitchJNI.CoreSession_hangupState(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setVariable(String var, String val) {
|
||||
freeswitchJNI.CoreSession_setVariable(swigCPtr, this, var, val);
|
||||
}
|
||||
|
|
|
@ -110,6 +110,7 @@ class freeswitchJNI {
|
|||
public final static native int CoreSession_preAnswer(long jarg1, CoreSession jarg1_);
|
||||
public final static native void CoreSession_hangup__SWIG_0(long jarg1, CoreSession jarg1_, String jarg2);
|
||||
public final static native void CoreSession_hangup__SWIG_1(long jarg1, CoreSession jarg1_);
|
||||
public final static native void CoreSession_hangupState(long jarg1, CoreSession jarg1_);
|
||||
public final static native void CoreSession_setVariable(long jarg1, CoreSession jarg1_, String jarg2, String jarg3);
|
||||
public final static native void CoreSession_setPrivate(long jarg1, CoreSession jarg1_, String jarg2, long jarg3);
|
||||
public final static native long CoreSession_getPrivate(long jarg1, CoreSession jarg1_, String jarg2);
|
||||
|
|
|
@ -1990,6 +1990,17 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hang
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hangupState(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
CoreSession *arg1 = (CoreSession *) 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(CoreSession **)&jarg1;
|
||||
(arg1)->hangupState();
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1setVariable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
|
||||
CoreSession *arg1 = (CoreSession *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
|
|
|
@ -4802,6 +4802,30 @@ static int _wrap_CoreSession_hangup(lua_State* L) {
|
|||
}
|
||||
|
||||
|
||||
static int _wrap_CoreSession_hangupState(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
CoreSession *arg1 = (CoreSession *) 0 ;
|
||||
|
||||
SWIG_check_num_args("hangupState",1,1)
|
||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangupState",1,"CoreSession *");
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
|
||||
SWIG_fail_ptr("CoreSession_hangupState",1,SWIGTYPE_p_CoreSession);
|
||||
}
|
||||
|
||||
(arg1)->hangupState();
|
||||
SWIG_arg=0;
|
||||
|
||||
return SWIG_arg;
|
||||
|
||||
if(0) SWIG_fail;
|
||||
|
||||
fail:
|
||||
lua_error(L);
|
||||
return SWIG_arg;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_CoreSession_setVariable(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
CoreSession *arg1 = (CoreSession *) 0 ;
|
||||
|
@ -7332,6 +7356,7 @@ static swig_lua_method swig_CoreSession_methods[] = {
|
|||
{"answer", _wrap_CoreSession_answer},
|
||||
{"preAnswer", _wrap_CoreSession_preAnswer},
|
||||
{"hangup", _wrap_CoreSession_hangup},
|
||||
{"hangupState", _wrap_CoreSession_hangupState},
|
||||
{"setVariable", _wrap_CoreSession_setVariable},
|
||||
{"setPrivate", _wrap_CoreSession_setPrivate},
|
||||
{"getPrivate", _wrap_CoreSession_getPrivate},
|
||||
|
|
|
@ -29114,6 +29114,14 @@ SWIGEXPORT void SWIGSTDCALL CSharp_CoreSession_Hangup(void * jarg1, char * jarg2
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_CoreSession_hangupState(void * jarg1) {
|
||||
CoreSession *arg1 = (CoreSession *) 0 ;
|
||||
|
||||
arg1 = (CoreSession *)jarg1;
|
||||
(arg1)->hangupState();
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_CoreSession_SetVariable(void * jarg1, char * jarg2, char * jarg3) {
|
||||
CoreSession *arg1 = (CoreSession *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
|
|
|
@ -218,6 +218,10 @@ public class CoreSession : IDisposable {
|
|||
freeswitchPINVOKE.CoreSession_Hangup(swigCPtr, cause);
|
||||
}
|
||||
|
||||
public void hangupState() {
|
||||
freeswitchPINVOKE.CoreSession_hangupState(swigCPtr);
|
||||
}
|
||||
|
||||
public void SetVariable(string var, string val) {
|
||||
freeswitchPINVOKE.CoreSession_SetVariable(swigCPtr, var, val);
|
||||
}
|
||||
|
@ -11558,6 +11562,9 @@ class freeswitchPINVOKE {
|
|||
[DllImport("mod_managed", EntryPoint="CSharp_CoreSession_Hangup")]
|
||||
public static extern void CoreSession_Hangup(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_CoreSession_hangupState")]
|
||||
public static extern void CoreSession_hangupState(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_CoreSession_SetVariable")]
|
||||
public static extern void CoreSession_SetVariable(HandleRef jarg1, string jarg2, string jarg3);
|
||||
|
||||
|
|
|
@ -404,6 +404,7 @@ sub DESTROY {
|
|||
*answer = *freeswitchc::CoreSession_answer;
|
||||
*preAnswer = *freeswitchc::CoreSession_preAnswer;
|
||||
*hangup = *freeswitchc::CoreSession_hangup;
|
||||
*hangupState = *freeswitchc::CoreSession_hangupState;
|
||||
*setVariable = *freeswitchc::CoreSession_setVariable;
|
||||
*setPrivate = *freeswitchc::CoreSession_setPrivate;
|
||||
*getPrivate = *freeswitchc::CoreSession_getPrivate;
|
||||
|
|
|
@ -6045,6 +6045,33 @@ XS(_wrap_CoreSession_hangup) {
|
|||
}
|
||||
|
||||
|
||||
XS(_wrap_CoreSession_hangupState) {
|
||||
{
|
||||
CoreSession *arg1 = (CoreSession *) 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 1) || (items > 1)) {
|
||||
SWIG_croak("Usage: CoreSession_hangupState(self);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hangupState" "', argument " "1"" of type '" "CoreSession *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< CoreSession * >(argp1);
|
||||
(arg1)->hangupState();
|
||||
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_CoreSession_setVariable) {
|
||||
{
|
||||
CoreSession *arg1 = (CoreSession *) 0 ;
|
||||
|
@ -11679,6 +11706,7 @@ static swig_command_info swig_commands[] = {
|
|||
{"freeswitchc::CoreSession_answer", _wrap_CoreSession_answer},
|
||||
{"freeswitchc::CoreSession_preAnswer", _wrap_CoreSession_preAnswer},
|
||||
{"freeswitchc::CoreSession_hangup", _wrap_CoreSession_hangup},
|
||||
{"freeswitchc::CoreSession_hangupState", _wrap_CoreSession_hangupState},
|
||||
{"freeswitchc::CoreSession_setVariable", _wrap_CoreSession_setVariable},
|
||||
{"freeswitchc::CoreSession_setPrivate", _wrap_CoreSession_setPrivate},
|
||||
{"freeswitchc::CoreSession_getPrivate", _wrap_CoreSession_getPrivate},
|
||||
|
|
|
@ -262,6 +262,7 @@ class CoreSession(_object):
|
|||
def answer(*args): return _freeswitch.CoreSession_answer(*args)
|
||||
def preAnswer(*args): return _freeswitch.CoreSession_preAnswer(*args)
|
||||
def hangup(*args): return _freeswitch.CoreSession_hangup(*args)
|
||||
def hangupState(*args): return _freeswitch.CoreSession_hangupState(*args)
|
||||
def setVariable(*args): return _freeswitch.CoreSession_setVariable(*args)
|
||||
def setPrivate(*args): return _freeswitch.CoreSession_setPrivate(*args)
|
||||
def getPrivate(*args): return _freeswitch.CoreSession_getPrivate(*args)
|
||||
|
|
|
@ -6368,6 +6368,27 @@ fail:
|
|||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_CoreSession_hangupState(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
CoreSession *arg1 = (CoreSession *) 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
|
||||
if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_hangupState",&obj0)) 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_hangupState" "', argument " "1"" of type '" "CoreSession *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< CoreSession * >(argp1);
|
||||
(arg1)->hangupState();
|
||||
resultobj = SWIG_Py_Void();
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_CoreSession_setVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
CoreSession *arg1 = (CoreSession *) 0 ;
|
||||
|
@ -10419,6 +10440,7 @@ static PyMethodDef SwigMethods[] = {
|
|||
{ (char *)"CoreSession_answer", _wrap_CoreSession_answer, METH_VARARGS, NULL},
|
||||
{ (char *)"CoreSession_preAnswer", _wrap_CoreSession_preAnswer, METH_VARARGS, NULL},
|
||||
{ (char *)"CoreSession_hangup", _wrap_CoreSession_hangup, METH_VARARGS, NULL},
|
||||
{ (char *)"CoreSession_hangupState", _wrap_CoreSession_hangupState, METH_VARARGS, NULL},
|
||||
{ (char *)"CoreSession_setVariable", _wrap_CoreSession_setVariable, METH_VARARGS, NULL},
|
||||
{ (char *)"CoreSession_setPrivate", _wrap_CoreSession_setPrivate, METH_VARARGS, NULL},
|
||||
{ (char *)"CoreSession_getPrivate", _wrap_CoreSession_getPrivate, METH_VARARGS, NULL},
|
||||
|
|
|
@ -564,6 +564,14 @@ SWITCH_DECLARE(int) CoreSession::preAnswer()
|
|||
return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) CoreSession::hangupState(void)
|
||||
{
|
||||
sanity_check_noreturn;
|
||||
this->begin_allow_threads();
|
||||
switch_core_session_hangup_state(session);
|
||||
this->end_allow_threads();
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) CoreSession::hangup(const char *cause)
|
||||
{
|
||||
this_check_void();
|
||||
|
|
Loading…
Reference in New Issue