Revision
15361
Author
anthm
Date
2009-11-04 17:58:26 -0600 (Wed, 04 Nov 2009)

Log Message

reswig

Modified Paths

Diff

Modified: freeswitch/trunk/src/include/switch_cpp.h (15360 => 15361)


--- freeswitch/trunk/src/include/switch_cpp.h	2009-11-04 23:30:40 UTC (rev 15360)
+++ freeswitch/trunk/src/include/switch_cpp.h	2009-11-04 23:58:26 UTC (rev 15361)
@@ -216,6 +216,7 @@
 		 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);

Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java (15360 => 15361)


--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java	2009-11-04 23:30:40 UTC (rev 15360)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java	2009-11-04 23:58:26 UTC (rev 15361)
@@ -132,6 +132,10 @@
     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);
   }

Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java (15360 => 15361)


--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java	2009-11-04 23:30:40 UTC (rev 15360)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java	2009-11-04 23:58:26 UTC (rev 15361)
@@ -110,6 +110,7 @@
   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);

Modified: freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp (15360 => 15361)


--- freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp	2009-11-04 23:30:40 UTC (rev 15360)
+++ freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp	2009-11-04 23:58:26 UTC (rev 15361)
@@ -1990,6 +1990,17 @@
 }
 
 
+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 ;

Modified: freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp (15360 => 15361)


--- freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp	2009-11-04 23:30:40 UTC (rev 15360)
+++ freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp	2009-11-04 23:58:26 UTC (rev 15361)
@@ -4802,6 +4802,30 @@
 }
 
 
+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 @@
     {"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}, 

Modified: freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_wrap.cxx (15360 => 15361)


--- freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_wrap.cxx	2009-11-04 23:30:40 UTC (rev 15360)
+++ freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_wrap.cxx	2009-11-04 23:58:26 UTC (rev 15361)
@@ -29114,6 +29114,14 @@
 }
 
 
+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 ;

Modified: freeswitch/trunk/src/mod/languages/mod_managed/managed/swig.cs (15360 => 15361)


--- freeswitch/trunk/src/mod/languages/mod_managed/managed/swig.cs	2009-11-04 23:30:40 UTC (rev 15360)
+++ freeswitch/trunk/src/mod/languages/mod_managed/managed/swig.cs	2009-11-04 23:58:26 UTC (rev 15361)
@@ -218,6 +218,10 @@
     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 @@
   [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);
 

Modified: freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm (15360 => 15361)


--- freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm	2009-11-04 23:30:40 UTC (rev 15360)
+++ freeswitch/trunk/src/mod/languages/mod_perl/freeswitch.pm	2009-11-04 23:58:26 UTC (rev 15361)
@@ -404,6 +404,7 @@
 *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;

Modified: freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp (15360 => 15361)


--- freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp	2009-11-04 23:30:40 UTC (rev 15360)
+++ freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp	2009-11-04 23:58:26 UTC (rev 15361)
@@ -6045,6 +6045,33 @@
 }
 
 
+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 @@
 {"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},

Modified: freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py (15360 => 15361)


--- freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py	2009-11-04 23:30:40 UTC (rev 15360)
+++ freeswitch/trunk/src/mod/languages/mod_python/freeswitch.py	2009-11-04 23:58:26 UTC (rev 15361)
@@ -262,6 +262,7 @@
     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)

Modified: freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp (15360 => 15361)


--- freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp	2009-11-04 23:30:40 UTC (rev 15360)
+++ freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp	2009-11-04 23:58:26 UTC (rev 15361)
@@ -6368,6 +6368,27 @@
 }
 
 
+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 @@
 	 { (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},

Modified: freeswitch/trunk/src/switch_cpp.cpp (15360 => 15361)


--- freeswitch/trunk/src/switch_cpp.cpp	2009-11-04 23:30:40 UTC (rev 15360)
+++ freeswitch/trunk/src/switch_cpp.cpp	2009-11-04 23:58:26 UTC (rev 15361)
@@ -564,6 +564,14 @@
     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();