mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 04:31:50 +00:00
FS-2962
This commit is contained in:
@@ -90,6 +90,7 @@ class Dbh {
|
||||
bool release();
|
||||
bool connected();
|
||||
bool query(char *sql, SWIGLUA_FN lua_fun);
|
||||
int affected_rows();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -384,3 +384,11 @@ bool Dbh::query(char *sql, SWIGLUA_FN lua_fun)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int Dbh::affected_rows()
|
||||
{
|
||||
if (m_connected) {
|
||||
return switch_cache_db_affected_rows(dbh);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -63,6 +63,7 @@ namespace LUA {
|
||||
bool release();
|
||||
bool connected();
|
||||
bool query(char *sql, SWIGLUA_FN lua_fun);
|
||||
int affected_rows();
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -7296,6 +7296,31 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_Dbh_affected_rows(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
LUA::Dbh *arg1 = (LUA::Dbh *) 0 ;
|
||||
int result;
|
||||
|
||||
SWIG_check_num_args("affected_rows",1,1)
|
||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("affected_rows",1,"LUA::Dbh *");
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Dbh,0))){
|
||||
SWIG_fail_ptr("Dbh_affected_rows",1,SWIGTYPE_p_LUA__Dbh);
|
||||
}
|
||||
|
||||
result = (int)(arg1)->affected_rows();
|
||||
SWIG_arg=0;
|
||||
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
||||
return SWIG_arg;
|
||||
|
||||
if(0) SWIG_fail;
|
||||
|
||||
fail:
|
||||
lua_error(L);
|
||||
return SWIG_arg;
|
||||
}
|
||||
|
||||
|
||||
static void swig_delete_Dbh(void *obj) {
|
||||
LUA::Dbh *arg1 = (LUA::Dbh *) obj;
|
||||
delete arg1;
|
||||
@@ -7304,6 +7329,7 @@ static swig_lua_method swig_LUA_Dbh_methods[] = {
|
||||
{"release", _wrap_Dbh_release},
|
||||
{"connected", _wrap_Dbh_connected},
|
||||
{"query", _wrap_Dbh_query},
|
||||
{"affected_rows", _wrap_Dbh_affected_rows},
|
||||
{0,0}
|
||||
};
|
||||
static swig_lua_attribute swig_LUA_Dbh_attributes[] = {
|
||||
|
||||
@@ -10688,6 +10688,18 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_cache_db_execute_sql_callback(void * ja
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_cache_db_affected_rows(void * jarg1) {
|
||||
int jresult ;
|
||||
switch_cache_db_handle_t *arg1 = (switch_cache_db_handle_t *) 0 ;
|
||||
int result;
|
||||
|
||||
arg1 = (switch_cache_db_handle_t *)jarg1;
|
||||
result = (int)switch_cache_db_affected_rows(arg1);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_cache_db_status(void * jarg1) {
|
||||
switch_stream_handle_t *arg1 = (switch_stream_handle_t *) 0 ;
|
||||
|
||||
|
||||
@@ -2333,6 +2333,11 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static int switch_cache_db_affected_rows(switch_cache_db_handle_t dbh) {
|
||||
int ret = freeswitchPINVOKE.switch_cache_db_affected_rows(switch_cache_db_handle_t.getCPtr(dbh));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void switch_cache_db_status(switch_stream_handle stream) {
|
||||
freeswitchPINVOKE.switch_cache_db_status(switch_stream_handle.getCPtr(stream));
|
||||
}
|
||||
@@ -8209,6 +8214,9 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_cache_db_execute_sql_callback")]
|
||||
public static extern int switch_cache_db_execute_sql_callback(HandleRef jarg1, string jarg2, HandleRef jarg3, HandleRef jarg4, ref string jarg5);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_cache_db_affected_rows")]
|
||||
public static extern int switch_cache_db_affected_rows(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_cache_db_status")]
|
||||
public static extern void switch_cache_db_status(HandleRef jarg1);
|
||||
|
||||
|
||||
@@ -9793,17 +9793,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/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
|
||||
/*@SWIG:/usr/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/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
|
||||
/*@SWIG:/usr/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/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
|
||||
/*@SWIG:/usr/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);
|
||||
|
||||
Reference in New Issue
Block a user