This commit is contained in:
Anthony Minessale 2011-12-16 14:24:34 -06:00
parent 6dd5e59b05
commit 5ed0152dd1
8 changed files with 146 additions and 36 deletions

View File

@ -99,8 +99,8 @@ public class EventConsumer {
return freeswitchJNI.EventConsumer_bind(swigCPtr, this, event_name, subclass_name);
}
public Event pop(int block) {
long cPtr = freeswitchJNI.EventConsumer_pop(swigCPtr, this, block);
public Event pop(int block, int timeout) {
long cPtr = freeswitchJNI.EventConsumer_pop(swigCPtr, this, block, timeout);
return (cPtr == 0) ? null : new Event(cPtr, true);
}

View File

@ -84,7 +84,7 @@ class freeswitchJNI {
public final static native long new_EventConsumer(String jarg1, String jarg2);
public final static native void delete_EventConsumer(long jarg1);
public final static native int EventConsumer_bind(long jarg1, EventConsumer jarg1_, String jarg2, String jarg3);
public final static native long EventConsumer_pop(long jarg1, EventConsumer jarg1_, int jarg2);
public final static native long EventConsumer_pop(long jarg1, EventConsumer jarg1_, int jarg2, int jarg3);
public final static native void delete_CoreSession(long jarg1);
public final static native void CoreSession_session_set(long jarg1, CoreSession jarg1_, long jarg2);
public final static native long CoreSession_session_get(long jarg1, CoreSession jarg1_);

View File

@ -1653,10 +1653,11 @@ SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1bi
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1pop(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1pop(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3) {
jlong jresult = 0 ;
EventConsumer *arg1 = (EventConsumer *) 0 ;
int arg2 = (int) 0 ;
int arg3 = (int) 0 ;
Event *result = 0 ;
(void)jenv;
@ -1664,7 +1665,8 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1p
(void)jarg1_;
arg1 = *(EventConsumer **)&jarg1;
arg2 = (int)jarg2;
result = (Event *)(arg1)->pop(arg2);
arg3 = (int)jarg3;
result = (Event *)(arg1)->pop(arg2,arg3);
*(Event **)&jresult = result;
return jresult;
}

View File

@ -3791,11 +3791,13 @@ static int _wrap_EventConsumer_pop(lua_State* L) {
int SWIG_arg = -1;
EventConsumer *arg1 = (EventConsumer *) 0 ;
int arg2 = (int) 0 ;
int arg3 = (int) 0 ;
Event *result = 0 ;
SWIG_check_num_args("pop",1,2)
SWIG_check_num_args("pop",1,3)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("pop",1,"EventConsumer *");
if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("pop",2,"int");
if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("pop",3,"int");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_EventConsumer,0))){
SWIG_fail_ptr("EventConsumer_pop",1,SWIGTYPE_p_EventConsumer);
@ -3804,7 +3806,10 @@ static int _wrap_EventConsumer_pop(lua_State* L) {
if(lua_gettop(L)>=2){
arg2 = (int)lua_tonumber(L, 2);
}
result = (Event *)(arg1)->pop(arg2);
if(lua_gettop(L)>=3){
arg3 = (int)lua_tonumber(L, 3);
}
result = (Event *)(arg1)->pop(arg2,arg3);
SWIG_arg=0;
SWIG_NewPointerObj(L,result,SWIGTYPE_p_Event,1); SWIG_arg++;
return SWIG_arg;

View File

@ -1146,6 +1146,17 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_TRANSFER_HISTORY_VARIABLE_get() {
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_TRANSFER_SOURCE_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
result = (char *) "transfer_source";
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE_get() {
char * jresult ;
char *result = 0 ;
@ -9995,6 +10006,26 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_ready() {
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_ready_inbound() {
int jresult ;
switch_bool_t result;
result = (switch_bool_t)switch_core_ready_inbound();
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_ready_outbound() {
int jresult ;
switch_bool_t result;
result = (switch_bool_t)switch_core_ready_outbound();
jresult = result;
return jresult;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_core_flags() {
unsigned long jresult ;
switch_core_flag_t result;
@ -25392,6 +25423,16 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_set_state_flag(void * jarg1, i
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_clear_state_flag(void * jarg1, int jarg2) {
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
switch_channel_flag_t arg2 ;
arg1 = (switch_channel_t *)jarg1;
arg2 = (switch_channel_flag_t)jarg2;
switch_channel_clear_state_flag(arg1,arg2);
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_clear_flag(void * jarg1, int jarg2) {
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
switch_channel_flag_t arg2 ;

View File

@ -2186,6 +2186,16 @@ public class freeswitch {
return ret;
}
public static switch_bool_t switch_core_ready_inbound() {
switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_core_ready_inbound();
return ret;
}
public static switch_bool_t switch_core_ready_outbound() {
switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_core_ready_outbound();
return ret;
}
public static uint switch_core_flags() {
uint ret = freeswitchPINVOKE.switch_core_flags();
return ret;
@ -3685,6 +3695,10 @@ public class freeswitch {
freeswitchPINVOKE.switch_channel_set_state_flag(SWIGTYPE_p_switch_channel.getCPtr(channel), (int)flag);
}
public static void switch_channel_clear_state_flag(SWIGTYPE_p_switch_channel channel, switch_channel_flag_t flag) {
freeswitchPINVOKE.switch_channel_clear_state_flag(SWIGTYPE_p_switch_channel.getCPtr(channel), (int)flag);
}
public static void switch_channel_clear_flag(SWIGTYPE_p_switch_channel channel, switch_channel_flag_t flag) {
freeswitchPINVOKE.switch_channel_clear_flag(SWIGTYPE_p_switch_channel.getCPtr(channel), (int)flag);
}
@ -5852,6 +5866,7 @@ public class freeswitch {
public static readonly string SWITCH_COPY_XML_CDR_VARIABLE = freeswitchPINVOKE.SWITCH_COPY_XML_CDR_VARIABLE_get();
public static readonly string SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE = freeswitchPINVOKE.SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE_get();
public static readonly string SWITCH_TRANSFER_HISTORY_VARIABLE = freeswitchPINVOKE.SWITCH_TRANSFER_HISTORY_VARIABLE_get();
public static readonly string SWITCH_TRANSFER_SOURCE_VARIABLE = freeswitchPINVOKE.SWITCH_TRANSFER_SOURCE_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_PRE_ANSWER_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_PRE_ANSWER_VARIABLE_get();
public static readonly string SWITCH_CHANNEL_EXECUTE_ON_MEDIA_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_MEDIA_VARIABLE_get();
@ -6400,6 +6415,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_TRANSFER_HISTORY_VARIABLE_get")]
public static extern string SWITCH_TRANSFER_HISTORY_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_TRANSFER_SOURCE_VARIABLE_get")]
public static extern string SWITCH_TRANSFER_SOURCE_VARIABLE_get();
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE_get")]
public static extern string SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE_get();
@ -8497,6 +8515,12 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_ready")]
public static extern int switch_core_ready();
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_ready_inbound")]
public static extern int switch_core_ready_inbound();
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_ready_outbound")]
public static extern int switch_core_ready_outbound();
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_flags")]
public static extern uint switch_core_flags();
@ -12214,6 +12238,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_set_state_flag")]
public static extern void switch_channel_set_state_flag(HandleRef jarg1, int jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_clear_state_flag")]
public static extern void switch_channel_clear_state_flag(HandleRef jarg1, int jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_clear_flag")]
public static extern void switch_channel_clear_flag(HandleRef jarg1, int jarg2);
@ -21952,7 +21979,11 @@ public enum switch_call_cause_t {
SWITCH_CAUSE_MEDIA_TIMEOUT = 604,
SWITCH_CAUSE_PICKED_OFF = 605,
SWITCH_CAUSE_USER_NOT_REGISTERED = 606,
SWITCH_CAUSE_PROGRESS_TIMEOUT = 607
SWITCH_CAUSE_PROGRESS_TIMEOUT = 607,
SWITCH_CAUSE_INVALID_GATEWAY = 608,
SWITCH_CAUSE_GATEWAY_DOWN = 609,
SWITCH_CAUSE_INVALID_URL = 610,
SWITCH_CAUSE_INVALID_PROFILE = 611
}
}
@ -24339,25 +24370,27 @@ namespace FreeSWITCH.Native {
[System.Flags] public enum switch_core_flag_enum_t {
SCF_NONE = 0,
SCF_USE_SQL = (1 << 0),
SCF_NO_NEW_SESSIONS = (1 << 1),
SCF_SHUTTING_DOWN = (1 << 2),
SCF_VG = (1 << 3),
SCF_RESTART = (1 << 4),
SCF_SHUTDOWN_REQUESTED = (1 << 5),
SCF_USE_AUTO_NAT = (1 << 6),
SCF_EARLY_HANGUP = (1 << 7),
SCF_CALIBRATE_CLOCK = (1 << 8),
SCF_USE_HEAVY_TIMING = (1 << 9),
SCF_USE_CLOCK_RT = (1 << 10),
SCF_VERBOSE_EVENTS = (1 << 11),
SCF_USE_WIN32_MONOTONIC = (1 << 12),
SCF_AUTO_SCHEMAS = (1 << 13),
SCF_MINIMAL = (1 << 14),
SCF_USE_NAT_MAPPING = (1 << 15),
SCF_CLEAR_SQL = (1 << 16),
SCF_THREADED_SYSTEM_EXEC = (1 << 17),
SCF_SYNC_CLOCK_REQUESTED = (1 << 18),
SCF_CORE_ODBC_REQ = (1 << 19)
SCF_NO_NEW_OUTBOUND_SESSIONS = (1 << 1),
SCF_NO_NEW_INBOUND_SESSIONS = (1 << 2),
SCF_NO_NEW_SESSIONS = (SCF_NO_NEW_OUTBOUND_SESSIONS|SCF_NO_NEW_INBOUND_SESSIONS),
SCF_SHUTTING_DOWN = (1 << 3),
SCF_VG = (1 << 4),
SCF_RESTART = (1 << 5),
SCF_SHUTDOWN_REQUESTED = (1 << 6),
SCF_USE_AUTO_NAT = (1 << 7),
SCF_EARLY_HANGUP = (1 << 8),
SCF_CALIBRATE_CLOCK = (1 << 9),
SCF_USE_HEAVY_TIMING = (1 << 10),
SCF_USE_CLOCK_RT = (1 << 11),
SCF_VERBOSE_EVENTS = (1 << 12),
SCF_USE_WIN32_MONOTONIC = (1 << 13),
SCF_AUTO_SCHEMAS = (1 << 14),
SCF_MINIMAL = (1 << 15),
SCF_USE_NAT_MAPPING = (1 << 16),
SCF_CLEAR_SQL = (1 << 17),
SCF_THREADED_SYSTEM_EXEC = (1 << 18),
SCF_SYNC_CLOCK_REQUESTED = (1 << 19),
SCF_CORE_ODBC_REQ = (1 << 20)
}
}
@ -24665,6 +24698,7 @@ public enum switch_core_session_message_types_t {
SWITCH_MESSAGE_INDICATE_RECOVERY_REFRESH,
SWITCH_MESSAGE_INDICATE_SIGNAL_DATA,
SWITCH_MESSAGE_INDICATE_INFO,
SWITCH_MESSAGE_INDICATE_AUDIO_DATA,
SWITCH_MESSAGE_INVALID
}
@ -29548,7 +29582,8 @@ namespace FreeSWITCH.Native {
SMBF_ANSWER_REQ = (1 << 6),
SMBF_THREAD_LOCK = (1 << 7),
SMBF_PRUNE = (1 << 8),
SMBF_NO_PAUSE = (1 << 9)
SMBF_NO_PAUSE = (1 << 9),
SMBF_STEREO_SWAP = (1 << 10)
}
}
@ -30889,6 +30924,8 @@ namespace FreeSWITCH.Native {
public enum switch_session_ctl_t {
SCSC_PAUSE_INBOUND,
SCSC_PAUSE_OUTBOUND,
SCSC_PAUSE_ALL,
SCSC_HUPALL,
SCSC_SHUTDOWN,
SCSC_CHECK_RUNNING,
@ -30914,6 +30951,8 @@ public enum switch_session_ctl_t {
SCSC_MIN_IDLE_CPU,
SCSC_VERBOSE_EVENTS,
SCSC_SHUTDOWN_CHECK,
SCSC_PAUSE_INBOUND_CHECK,
SCSC_PAUSE_OUTBOUND_CHECK,
SCSC_PAUSE_CHECK,
SCSC_READY_CHECK,
SCSC_THREADED_SYSTEM_EXEC,

View File

@ -4799,16 +4799,19 @@ XS(_wrap_EventConsumer_pop) {
{
EventConsumer *arg1 = (EventConsumer *) 0 ;
int arg2 = (int) 0 ;
int arg3 = (int) 0 ;
Event *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int val3 ;
int ecode3 = 0 ;
int argvi = 0;
dXSARGS;
if ((items < 1) || (items > 2)) {
SWIG_croak("Usage: EventConsumer_pop(self,block);");
if ((items < 1) || (items > 3)) {
SWIG_croak("Usage: EventConsumer_pop(self,block,timeout);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EventConsumer, 0 | 0 );
if (!SWIG_IsOK(res1)) {
@ -4822,14 +4825,23 @@ XS(_wrap_EventConsumer_pop) {
}
arg2 = static_cast< int >(val2);
}
result = (Event *)(arg1)->pop(arg2);
if (items > 2) {
ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "EventConsumer_pop" "', argument " "3"" of type '" "int""'");
}
arg3 = static_cast< int >(val3);
}
result = (Event *)(arg1)->pop(arg2,arg3);
ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
XSRETURN(argvi);
fail:
SWIG_croak_null();
}
}
@ -10078,17 +10090,17 @@ XS(SWIG_init) {
SWIG_TypeClientData(SWIGTYPE_p_IVRMenu, (void*) "freeswitch::IVRMenu");
SWIG_TypeClientData(SWIGTYPE_p_API, (void*) "freeswitch::API");
SWIG_TypeClientData(SWIGTYPE_p_input_callback_state, (void*) "freeswitch::input_callback_state_t");
/*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
/*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "S_HUP", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_HUP)));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
/*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
/*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "S_FREE", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_FREE)));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
/*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
/*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "S_RDLOCK", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_RDLOCK)));
SvREADONLY_on(sv);

View File

@ -5517,15 +5517,19 @@ SWIGINTERN PyObject *_wrap_EventConsumer_pop(PyObject *SWIGUNUSEDPARM(self), PyO
PyObject *resultobj = 0;
EventConsumer *arg1 = (EventConsumer *) 0 ;
int arg2 = (int) 0 ;
int arg3 = (int) 0 ;
Event *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int val3 ;
int ecode3 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O|O:EventConsumer_pop",&obj0,&obj1)) SWIG_fail;
if (!PyArg_ParseTuple(args,(char *)"O|OO:EventConsumer_pop",&obj0,&obj1,&obj2)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EventConsumer, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EventConsumer_pop" "', argument " "1"" of type '" "EventConsumer *""'");
@ -5538,7 +5542,14 @@ SWIGINTERN PyObject *_wrap_EventConsumer_pop(PyObject *SWIGUNUSEDPARM(self), PyO
}
arg2 = static_cast< int >(val2);
}
result = (Event *)(arg1)->pop(arg2);
if (obj2) {
ecode3 = SWIG_AsVal_int(obj2, &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "EventConsumer_pop" "', argument " "3"" of type '" "int""'");
}
arg3 = static_cast< int >(val3);
}
result = (Event *)(arg1)->pop(arg2,arg3);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_OWN | 0 );
return resultobj;
fail: