fix build prob

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8366 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-05-12 16:58:44 +00:00
parent 1ed11fdc00
commit d5e4046daf
9 changed files with 71 additions and 8 deletions

View 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);

View 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

View 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);
}

View 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);

View 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 ;

View 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)

View 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},

View 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,

View 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);