]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
reswig
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 4 Nov 2009 23:58:26 +0000 (23:58 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 4 Nov 2009 23:58:26 +0000 (23:58 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15361 d0543943-73ff-0310-b7d9-9358b9ac24b2

12 files changed:
src/include/switch_cpp.h
src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java
src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java
src/mod/languages/mod_java/switch_swig_wrap.cpp
src/mod/languages/mod_lua/mod_lua_wrap.cpp
src/mod/languages/mod_managed/freeswitch_wrap.cxx
src/mod/languages/mod_managed/managed/swig.cs
src/mod/languages/mod_perl/freeswitch.pm
src/mod/languages/mod_perl/mod_perl_wrap.cpp
src/mod/languages/mod_python/freeswitch.py
src/mod/languages/mod_python/mod_python_wrap.cpp
src/switch_cpp.cpp

index 67c86c1e90b952bb7f38ac4f6b0affd374844292..5a0b55447d468a32a04f8a123c2ba354b0e60a10 100644 (file)
@@ -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);
index 03e7908d0e4bc4dec7dd8f497f75c19453ad4bab..0927adb6b88a8b4302a81b249a2d1d6f1f7dd3da 100644 (file)
@@ -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);
   }
index be31fc08643ca6ec56a315f662d4ecdbb509f21a..84f7794ad3d89044b57e98f22a3d2a0d57d065aa 100644 (file)
@@ -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);
index 40604d6f008cfab03c7fd6b6f0d3d3fa213be5c3..cb030727ec1786d97945a3a1fb9a3a70515add93 100644 (file)
@@ -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 ;
index 98178817c8ce000d7804e1a934ebeb2ef73fce9a..626b22c33db400d25e53b5801f0ace362bf1eb8f 100644 (file)
@@ -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}, 
index 956ea89fb8cf4d5d7f4cf9fd0c41079142035b84..34bfb0da8a6e5f6ddc1ca64635f76e8dcfd46735 100644 (file)
@@ -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 ;
index 35056ca8bcf90e80cc488596a2a2312668b2e500..5465215c27122c707545b8e8c2a18a2937ef86bc 100644 (file)
@@ -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);
 
index ac3b42eaa4f88ff257f4e5083d57cd7c01dea71c..d2f06edee73578e8f6cb421828593c70df0de68b 100644 (file)
@@ -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;
index 72280857f0dfa0b79fffa479e5584799b8340be3..c807de8fe3645f69f0514d2688e96be2abb42914 100644 (file)
@@ -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},
index ce45b6ecee4be65ffc0856450ac5bdee461f9226..2c777c84f326817704e5f5ff2b03e6622dd0cdc1 100644 (file)
@@ -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)
index a74fd39643db0370fff3a37bfe8884d6368fd11c..1997314d079add332eefe77bd8986fd6d45757ca 100644 (file)
@@ -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},
index 094513dac8a6d71fd05466fb578ff580873716aa..b52815128e90972fb1ef24097a41438609677142 100644 (file)
@@ -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();