Skip to content

Commit

Permalink
swigall
Browse files Browse the repository at this point in the history
  • Loading branch information
andywolk committed Mar 23, 2021
1 parent e3a6ec8 commit 877102d
Show file tree
Hide file tree
Showing 10 changed files with 539 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/mod/languages/mod_java/src/org/freeswitch/swig/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,8 @@ public boolean fire() {
return freeswitchJNI.Event_fire(swigCPtr, this);
}

public boolean merge(Event to_merge) {
return freeswitchJNI.Event_merge(swigCPtr, this, Event.getCPtr(to_merge), to_merge);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public class freeswitchJNI {
public final static native boolean Event_addHeader(long jarg1, Event jarg1_, String jarg2, String jarg3);
public final static native boolean Event_delHeader(long jarg1, Event jarg1_, String jarg2);
public final static native boolean Event_fire(long jarg1, Event jarg1_);
public final static native boolean Event_merge(long jarg1, Event jarg1_, long jarg2, Event jarg2_);
public final static native void EventConsumer_events_set(long jarg1, EventConsumer jarg1_, long jarg2);
public final static native long EventConsumer_events_get(long jarg1, EventConsumer jarg1_);
public final static native void EventConsumer_e_event_id_set(long jarg1, EventConsumer jarg1_, long jarg2);
Expand Down
18 changes: 18 additions & 0 deletions src/mod/languages/mod_java/switch_swig_wrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1450,6 +1450,24 @@ SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1fire(J
}


SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1merge(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
jboolean jresult = 0 ;
Event *arg1 = (Event *) 0 ;
Event *arg2 = (Event *) 0 ;
bool result;

(void)jenv;
(void)jcls;
(void)jarg1_;
(void)jarg2_;
arg1 = *(Event **)&jarg1;
arg2 = *(Event **)&jarg2;
result = (bool)(arg1)->merge(arg2);
jresult = (jboolean)result;
return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1events_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
EventConsumer *arg1 = (EventConsumer *) 0 ;
switch_queue_t *arg2 = (switch_queue_t *) 0 ;
Expand Down
32 changes: 32 additions & 0 deletions src/mod/languages/mod_lua/mod_lua_wrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4961,6 +4961,37 @@ static int _wrap_Event_fire(lua_State* L) {
}


static int _wrap_Event_merge(lua_State* L) {
int SWIG_arg = 0;
Event *arg1 = (Event *) 0 ;
Event *arg2 = (Event *) 0 ;
bool result;

SWIG_check_num_args("Event::merge",2,2)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Event::merge",1,"Event *");
if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Event::merge",2,"Event *");

if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){
SWIG_fail_ptr("Event_merge",1,SWIGTYPE_p_Event);
}


if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Event,0))){
SWIG_fail_ptr("Event_merge",2,SWIGTYPE_p_Event);
}

result = (bool)(arg1)->merge(arg2);
lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
return SWIG_arg;

if(0) SWIG_fail;

fail:
lua_error(L);
return SWIG_arg;
}


static void swig_delete_Event(void *obj) {
Event *arg1 = (Event *) obj;
delete arg1;
Expand Down Expand Up @@ -4991,6 +5022,7 @@ static swig_lua_method swig_Event_methods[]= {
{ "addHeader", _wrap_Event_addHeader},
{ "delHeader", _wrap_Event_delHeader},
{ "fire", _wrap_Event_fire},
{ "merge", _wrap_Event_merge},
{0,0}
};
static swig_lua_method swig_Event_meta[] = {
Expand Down
229 changes: 227 additions & 2 deletions src/mod/languages/mod_managed/freeswitch_wrap.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14551,6 +14551,22 @@ SWIGEXPORT void SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_core_session_reset__
}


SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_core_session_try_reset___(void * jarg1, int jarg2, int jarg3) {
int jresult ;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
switch_bool_t arg2 ;
switch_bool_t arg3 ;
switch_status_t result;

arg1 = (switch_core_session_t *)jarg1;
arg2 = (switch_bool_t)jarg2;
arg3 = (switch_bool_t)jarg3;
result = (switch_status_t)switch_core_session_try_reset(arg1,arg2,arg3);
jresult = (int)result;
return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_core_session_write_frame___(void * jarg1, void * jarg2, unsigned long jarg3, int jarg4) {
int jresult ;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
Expand Down Expand Up @@ -15736,6 +15752,22 @@ SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_core_file_pre_close__
}


SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_core_file_handle_dup___(void * jarg1, void * jarg2, void * jarg3) {
int jresult ;
switch_file_handle_t *arg1 = (switch_file_handle_t *) 0 ;
switch_file_handle_t **arg2 = (switch_file_handle_t **) 0 ;
switch_memory_pool_t *arg3 = (switch_memory_pool_t *) 0 ;
switch_status_t result;

arg1 = (switch_file_handle_t *)jarg1;
arg2 = (switch_file_handle_t **)jarg2;
arg3 = (switch_memory_pool_t *)jarg3;
result = (switch_status_t)switch_core_file_handle_dup(arg1,arg2,arg3);
jresult = (int)result;
return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_core_file_close___(void * jarg1) {
int jresult ;
switch_file_handle_t *arg1 = (switch_file_handle_t *) 0 ;
Expand Down Expand Up @@ -18554,6 +18586,18 @@ SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_core_gen_certs___(cha
}


SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_core_check_dtls_pem___(char * jarg1) {
int jresult ;
char *arg1 = (char *) 0 ;
switch_bool_t result;

arg1 = (char *)jarg1;
result = (switch_bool_t)switch_core_check_dtls_pem((char const *)arg1);
jresult = (int)result;
return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_core_cert_gen_fingerprint___(char * jarg1, void * jarg2) {
int jresult ;
char *arg1 = (char *) 0 ;
Expand Down Expand Up @@ -41895,7 +41939,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_ivr_originate___(void
}


SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_ivr_enterprise_originate___(void * jarg1, void * jarg2, void * jarg3, char * jarg4, unsigned long jarg5, void * jarg6, char * jarg7, char * jarg8, void * jarg9, void * jarg10, unsigned long jarg11, void * jarg12) {
SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_ivr_enterprise_originate___(void * jarg1, void * jarg2, void * jarg3, char * jarg4, unsigned long jarg5, void * jarg6, char * jarg7, char * jarg8, void * jarg9, void * jarg10, unsigned long jarg11, void * jarg12, void * jarg13) {
int jresult ;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
switch_core_session_t **arg2 = (switch_core_session_t **) 0 ;
Expand All @@ -41909,6 +41953,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_ivr_enterprise_origin
switch_event_t *arg10 = (switch_event_t *) 0 ;
switch_originate_flag_t arg11 ;
switch_call_cause_t *arg12 = (switch_call_cause_t *) 0 ;
switch_dial_handle_list_t *arg13 = (switch_dial_handle_list_t *) 0 ;
switch_status_t result;

arg1 = (switch_core_session_t *)jarg1;
Expand All @@ -41923,7 +41968,8 @@ SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_ivr_enterprise_origin
arg10 = (switch_event_t *)jarg10;
arg11 = (switch_originate_flag_t)jarg11;
arg12 = (switch_call_cause_t *)jarg12;
result = (switch_status_t)switch_ivr_enterprise_originate(arg1,arg2,arg3,(char const *)arg4,arg5,(switch_state_handler_table const *)arg6,(char const *)arg7,(char const *)arg8,arg9,arg10,arg11,arg12);
arg13 = (switch_dial_handle_list_t *)jarg13;
result = (switch_status_t)switch_ivr_enterprise_originate(arg1,arg2,arg3,(char const *)arg4,arg5,(switch_state_handler_table const *)arg6,(char const *)arg7,(char const *)arg8,arg9,arg10,arg11,arg12,arg13);
jresult = (int)result;
return jresult;
}
Expand Down Expand Up @@ -43694,6 +43740,139 @@ SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_dial_handle_get_total
}


SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_dial_handle_list_serialize_json_obj___(void * jarg1, void * jarg2) {
int jresult ;
switch_dial_handle_list_t *arg1 = (switch_dial_handle_list_t *) 0 ;
cJSON **arg2 = (cJSON **) 0 ;
switch_status_t result;

arg1 = (switch_dial_handle_list_t *)jarg1;
arg2 = (cJSON **)jarg2;
result = (switch_status_t)switch_dial_handle_list_serialize_json_obj(arg1,arg2);
jresult = (int)result;
return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_dial_handle_list_serialize_json___(void * jarg1, void * jarg2) {
int jresult ;
switch_dial_handle_list_t *arg1 = (switch_dial_handle_list_t *) 0 ;
char **arg2 = (char **) 0 ;
switch_status_t result;

arg1 = (switch_dial_handle_list_t *)jarg1;
arg2 = (char **)jarg2;
result = (switch_status_t)switch_dial_handle_list_serialize_json(arg1,arg2);
jresult = (int)result;
return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_dial_handle_list_create_json_obj___(void * jarg1, void * jarg2) {
int jresult ;
switch_dial_handle_list_t **arg1 = (switch_dial_handle_list_t **) 0 ;
cJSON *arg2 = (cJSON *) 0 ;
switch_status_t result;

arg1 = (switch_dial_handle_list_t **)jarg1;
arg2 = (cJSON *)jarg2;
result = (switch_status_t)switch_dial_handle_list_create_json_obj(arg1,arg2);
jresult = (int)result;
return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_dial_handle_list_create_json___(void * jarg1, char * jarg2) {
int jresult ;
switch_dial_handle_list_t **arg1 = (switch_dial_handle_list_t **) 0 ;
char *arg2 = (char *) 0 ;
switch_status_t result;

arg1 = (switch_dial_handle_list_t **)jarg1;
arg2 = (char *)jarg2;
result = (switch_status_t)switch_dial_handle_list_create_json(arg1,(char const *)arg2);
jresult = (int)result;
return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_dial_handle_list_create___(void * jarg1) {
int jresult ;
switch_dial_handle_list_t **arg1 = (switch_dial_handle_list_t **) 0 ;
switch_status_t result;

arg1 = (switch_dial_handle_list_t **)jarg1;
result = (switch_status_t)switch_dial_handle_list_create(arg1);
jresult = (int)result;
return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_dial_handle_list_create_handle___(void * jarg1, void * jarg2) {
int jresult ;
switch_dial_handle_list_t *arg1 = (switch_dial_handle_list_t *) 0 ;
switch_dial_handle_t **arg2 = (switch_dial_handle_t **) 0 ;
switch_status_t result;

arg1 = (switch_dial_handle_list_t *)jarg1;
arg2 = (switch_dial_handle_t **)jarg2;
result = (switch_status_t)switch_dial_handle_list_create_handle(arg1,arg2);
jresult = (int)result;
return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_dial_handle_list_destroy___(void * jarg1) {
switch_dial_handle_list_t **arg1 = (switch_dial_handle_list_t **) 0 ;

arg1 = (switch_dial_handle_list_t **)jarg1;
switch_dial_handle_list_destroy(arg1);
}


SWIGEXPORT void SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_dial_handle_list_add_global_var___(void * jarg1, char * jarg2, char * jarg3) {
switch_dial_handle_list_t *arg1 = (switch_dial_handle_list_t *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;

arg1 = (switch_dial_handle_list_t *)jarg1;
arg2 = (char *)jarg2;
arg3 = (char *)jarg3;
switch_dial_handle_list_add_global_var(arg1,(char const *)arg2,(char const *)arg3);
}


SWIGEXPORT void SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_dial_handle_list_add_global_var_printf___(void * jarg1, char * jarg2, char * jarg3) {
switch_dial_handle_list_t *arg1 = (switch_dial_handle_list_t *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
void *arg4 = 0 ;

arg1 = (switch_dial_handle_list_t *)jarg1;
arg2 = (char *)jarg2;
arg3 = (char *)jarg3;
switch_dial_handle_list_add_global_var_printf(arg1,(char const *)arg2,(char const *)arg3,arg4);
}


SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_ivr_enterprise_orig_and_bridge___(void * jarg1, char * jarg2, void * jarg3, void * jarg4) {
int jresult ;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
char *arg2 = (char *) 0 ;
switch_dial_handle_list_t *arg3 = (switch_dial_handle_list_t *) 0 ;
switch_call_cause_t *arg4 = (switch_call_cause_t *) 0 ;
switch_status_t result;

arg1 = (switch_core_session_t *)jarg1;
arg2 = (char *)jarg2;
arg3 = (switch_dial_handle_list_t *)jarg3;
arg4 = (switch_call_cause_t *)jarg4;
result = (switch_status_t)switch_ivr_enterprise_orig_and_bridge(arg1,(char const *)arg2,arg3,arg4);
jresult = (int)result;
return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_ivr_orig_and_bridge___(void * jarg1, char * jarg2, void * jarg3, void * jarg4) {
int jresult ;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
Expand Down Expand Up @@ -49740,6 +49919,38 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_scheduler_a
}


SWIGEXPORT unsigned long SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_scheduler_add_task_ex___(void * jarg1, void * jarg2, char * jarg3, char * jarg4, unsigned long jarg5, void * jarg6, unsigned long jarg7, void * jarg8) {
unsigned long jresult ;
time_t arg1 ;
switch_scheduler_func_t arg2 = (switch_scheduler_func_t) 0 ;
char *arg3 = (char *) 0 ;
char *arg4 = (char *) 0 ;
uint32_t arg5 ;
void *arg6 = (void *) 0 ;
switch_scheduler_flag_t arg7 ;
uint32_t *arg8 = (uint32_t *) 0 ;
time_t *argp1 ;
uint32_t result;

argp1 = (time_t *)jarg1;
if (!argp1) {
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null time_t", 0);
return 0;
}
arg1 = *argp1;
arg2 = (switch_scheduler_func_t)jarg2;
arg3 = (char *)jarg3;
arg4 = (char *)jarg4;
arg5 = (uint32_t)jarg5;
arg6 = (void *)jarg6;
arg7 = (switch_scheduler_flag_t)jarg7;
arg8 = (uint32_t *)jarg8;
result = (uint32_t)switch_scheduler_add_task_ex(arg1,arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7,arg8);
jresult = (unsigned long)result;
return jresult;
}


SWIGEXPORT unsigned long SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_scheduler_del_task_id___(unsigned long jarg1) {
unsigned long jresult ;
uint32_t arg1 ;
Expand Down Expand Up @@ -50809,6 +51020,20 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_FreeSWITCHfNative_Event_Fire___(void
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_FreeSWITCHfNative_Event_merge___(void * jarg1, void * jarg2) {
unsigned int jresult ;
Event *arg1 = (Event *) 0 ;
Event *arg2 = (Event *) 0 ;
bool result;

arg1 = (Event *)jarg1;
arg2 = (Event *)jarg2;
result = (bool)(arg1)->merge(arg2);
jresult = result;
return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FreeSWITCHfNative_EventConsumer_events_set___(void * jarg1, void * jarg2) {
EventConsumer *arg1 = (EventConsumer *) 0 ;
switch_queue_t *arg2 = (switch_queue_t *) 0 ;
Expand Down

0 comments on commit 877102d

Please sign in to comment.