]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix build prob
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 12 May 2008 16:58:44 +0000 (16:58 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 12 May 2008 16:58:44 +0000 (16:58 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8366 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_cpp.h
src/include/switch_event.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_python/freeswitch.py
src/mod/languages/mod_python/mod_python_wrap.cpp
src/switch_cpp.cpp
src/switch_event.c

index ab7d43295e715c269014e1baea79ebf48962930d..3663157f82186c8e41b2c3b0fb175284372ca957 100644 (file)
@@ -144,7 +144,7 @@ class Event {
        SWITCH_DECLARE(bool) setPriority(switch_priority_t priority = SWITCH_PRIORITY_NORMAL);
        SWITCH_DECLARE(char *)getHeader(char *header_name);
        SWITCH_DECLARE(char *)getBody(void);
-       SWITCH_DECLARE(char *)getType(void);
+       SWITCH_DECLARE(const char *)getType(void);
        SWITCH_DECLARE(bool) addBody(const char *value);
        SWITCH_DECLARE(bool) addHeader(const char *header_name, const char *value);
        SWITCH_DECLARE(bool) delHeader(const char *header_name);
index 937a5e0d5108ccd06a5c4308f20187980736e66f..827fa9fb0c46bb786eb0d4640c62ff7de434c975 100644 (file)
@@ -232,7 +232,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_bind(const char *id, switch_event_t
   \param event the event id to render the name of
   \return the rendered name
 */
-SWITCH_DECLARE(char *) switch_event_name(switch_event_types_t event);
+SWITCH_DECLARE(const char *) switch_event_name(switch_event_types_t event);
 
 /*!
   \brief return the event id that matches a given event name
index cf8fcb1f47240958e0935fb8f071836cfc30061d..8c774e3aa9f54abd71c0afb25d6b077ef0544b0c 100644 (file)
@@ -117,6 +117,10 @@ public class CoreSession {
     return freeswitchJNI.CoreSession_getVariable(swigCPtr, this, var);
   }
 
+  public SWIGTYPE_p_switch_status_t process_callback_result(String ret) {
+    return new SWIGTYPE_p_switch_status_t(freeswitchJNI.CoreSession_process_callback_result(swigCPtr, this, ret), true);
+  }
+
   public int recordFile(String file_name, int max_len, int silence_threshold, int silence_secs) {
     return freeswitchJNI.CoreSession_recordFile__SWIG_0(swigCPtr, this, file_name, max_len, silence_threshold, silence_secs);
   }
index a1fecf5a0bf577122e02d4161c5464193b128de8..b9d1c37ebf0ba4adf14827bc2d93eb9ac002e31a 100644 (file)
@@ -80,6 +80,7 @@ class freeswitchJNI {
   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);
   public final static native String CoreSession_getVariable(long jarg1, CoreSession jarg1_, String jarg2);
+  public final static native long CoreSession_process_callback_result(long jarg1, CoreSession jarg1_, String jarg2);
   public final static native int CoreSession_recordFile__SWIG_0(long jarg1, CoreSession jarg1_, String jarg2, int jarg3, int jarg4, int jarg5);
   public final static native int CoreSession_recordFile__SWIG_1(long jarg1, CoreSession jarg1_, String jarg2, int jarg3, int jarg4);
   public final static native int CoreSession_recordFile__SWIG_2(long jarg1, CoreSession jarg1_, String jarg2, int jarg3);
index 04dd6b8cef9200076dd4843f226ef2684f4c50a6..d5128c1ca1e1ca493e5a04ae894e43206a62a7b2 100644 (file)
@@ -1453,6 +1453,28 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1g
 }
 
 
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1process_1callback_1result(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+  jlong jresult = 0 ;
+  CoreSession *arg1 = (CoreSession *) 0 ;
+  char *arg2 = (char *) 0 ;
+  switch_status_t result;
+  
+  (void)jenv;
+  (void)jcls;
+  (void)jarg1_;
+  arg1 = *(CoreSession **)&jarg1; 
+  arg2 = 0;
+  if (jarg2) {
+    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+    if (!arg2) return 0;
+  }
+  result = (arg1)->process_callback_result(arg2);
+  *(switch_status_t **)&jresult = new switch_status_t((switch_status_t &)result); 
+  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+  return jresult;
+}
+
+
 SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1recordFile_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3, jint jarg4, jint jarg5) {
   jint jresult = 0 ;
   CoreSession *arg1 = (CoreSession *) 0 ;
index e09ed673d8a7588633f3acbe239c2be5dc09a95b..4717f554e1c5d503db37de057bbb8b75d0e20570 100644 (file)
@@ -198,6 +198,7 @@ class CoreSession(_object):
     def setPrivate(*args): return _freeswitch.CoreSession_setPrivate(*args)
     def getPrivate(*args): return _freeswitch.CoreSession_getPrivate(*args)
     def getVariable(*args): return _freeswitch.CoreSession_getVariable(*args)
+    def process_callback_result(*args): return _freeswitch.CoreSession_process_callback_result(*args)
     def recordFile(*args): return _freeswitch.CoreSession_recordFile(*args)
     def setCallerData(*args): return _freeswitch.CoreSession_setCallerData(*args)
     def originate(*args): return _freeswitch.CoreSession_originate(*args)
index 898e2cef25f70633d4e639c787f32037cf167bfb..6befd3be19c2a80a285d6cc52160865c27b7b3d3 100644 (file)
@@ -5255,6 +5255,40 @@ fail:
 }
 
 
+SWIGINTERN PyObject *_wrap_CoreSession_process_callback_result(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  CoreSession *arg1 = (CoreSession *) 0 ;
+  char *arg2 = (char *) 0 ;
+  switch_status_t result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_process_callback_result",&obj0,&obj1)) 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_process_callback_result" "', 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_process_callback_result" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = reinterpret_cast< char * >(buf2);
+  result = (arg1)->process_callback_result(arg2);
+  resultobj = SWIG_NewPointerObj((new switch_status_t(static_cast< const switch_status_t& >(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN |  0 );
+  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+  return NULL;
+}
+
+
 SWIGINTERN PyObject *_wrap_CoreSession_recordFile__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   CoreSession *arg1 = (CoreSession *) 0 ;
@@ -7323,6 +7357,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"CoreSession_setPrivate", _wrap_CoreSession_setPrivate, METH_VARARGS, NULL},
         { (char *)"CoreSession_getPrivate", _wrap_CoreSession_getPrivate, METH_VARARGS, NULL},
         { (char *)"CoreSession_getVariable", _wrap_CoreSession_getVariable, METH_VARARGS, NULL},
+        { (char *)"CoreSession_process_callback_result", _wrap_CoreSession_process_callback_result, METH_VARARGS, NULL},
         { (char *)"CoreSession_recordFile", _wrap_CoreSession_recordFile, METH_VARARGS, NULL},
         { (char *)"CoreSession_setCallerData", _wrap_CoreSession_setCallerData, METH_VARARGS, NULL},
         { (char *)"CoreSession_originate", _wrap_CoreSession_originate, METH_VARARGS, NULL},
index 302e602db8e9a22fd7d6e25bfeae103e3c43278a..79af801dd90361f829bbdfafb30e9fd6d45ea65c 100644 (file)
@@ -270,13 +270,13 @@ SWITCH_DECLARE(char *)Event::getBody(void)
        return NULL;
 }
 
-SWITCH_DECLARE(char *)Event::getType(void)
+SWITCH_DECLARE(const char *)Event::getType(void)
 {
        if (event) {
                return switch_event_name(event->event_id);
        }
        
-       return "invalid";
+       return (char *) "invalid";
 }
 
 SWITCH_DECLARE_CONSTRUCTOR Stream::Stream()
@@ -393,7 +393,7 @@ SWITCH_DECLARE(char *) CoreSession::getXMLCDR()
        
        switch_xml_t cdr;
        
-       sanity_check("");
+       sanity_check((char *)"");
 
        switch_safe_free(xml_cdr_text);
 
@@ -561,7 +561,7 @@ SWITCH_DECLARE(char *) CoreSession::getDigits(int maxdigits,
                                                                                          int timeout)
 {
     switch_status_t status;
-       sanity_check("");
+       sanity_check((char *)"");
        begin_allow_threads();
        char terminator;
 
@@ -623,7 +623,7 @@ SWITCH_DECLARE(char *) CoreSession::playAndGetDigits(int min_digits,
                                                                                                  char *digits_regex)
 {
     switch_status_t status;
-       sanity_check("");
+       sanity_check((char *)"");
        begin_allow_threads();
        memset(dtmf_buf, 0, sizeof(dtmf_buf));
     status = switch_play_and_get_digits( session, 
index 1506095bd7aa61836424315330130d0f9a6addca..50bab12d5ebcab03f19ddb5288154856774e1359 100644 (file)
@@ -297,7 +297,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_running(void)
        return SYSTEM_RUNNING ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
 }
 
-SWITCH_DECLARE(char *) switch_event_name(switch_event_types_t event)
+SWITCH_DECLARE(const char *) switch_event_name(switch_event_types_t event)
 {
        switch_assert(BLOCK != NULL);
        switch_assert(RUNTIME_POOL != NULL);