mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-16 00:04:13 +00:00
add unsetInputCallback method
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9296 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
6efa5bdf0d
commit
23c0d9ebbf
11 files changed
+119
No files matched your search
@@ -481,6 +481,7 @@ sub DESTROY {
|
||||
*run_dtmf_callback = *freeswitchc::Session_run_dtmf_callback;
|
||||
*setME = *freeswitchc::Session_setME;
|
||||
*setInputCallback = *freeswitchc::Session_setInputCallback;
|
||||
*unsetInputCallback = *freeswitchc::Session_unsetInputCallback;
|
||||
*setHangupHook = *freeswitchc::Session_setHangupHook;
|
||||
*ready = *freeswitchc::Session_ready;
|
||||
*swig_suuid_get = *freeswitchc::Session_suuid_get;
|
||||
|
||||
@@ -166,6 +166,17 @@ void Session::setHangupHook(char *func, char *arg)
|
||||
}
|
||||
}
|
||||
|
||||
void Session::unsetInputCallback(void)
|
||||
{
|
||||
sanity_check_noreturn;
|
||||
switch_safe_free(cb_function);
|
||||
switch_safe_free(cb_arg);
|
||||
switch_channel_set_private(channel, "CoreSession", NULL);
|
||||
args.input_callback = NULL;
|
||||
ap = NULL;
|
||||
|
||||
}
|
||||
|
||||
void Session::setInputCallback(char *cbfunc, char *funcargs)
|
||||
{
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ class Session : public CoreSession {
|
||||
virtual switch_status_t run_dtmf_callback(void *input, switch_input_type_t itype);
|
||||
void setME(SV *p);
|
||||
void setInputCallback(char *cbfunc = "on_input", char *funcargs = NULL);
|
||||
void unsetInputCallback(void);
|
||||
void setHangupHook(char *func, char *arg=NULL);
|
||||
bool ready();
|
||||
char *suuid;
|
||||
|
||||
@@ -9738,6 +9738,33 @@ XS(_wrap_Session_setInputCallback) {
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_Session_unsetInputCallback) {
|
||||
{
|
||||
PERL::Session *arg1 = (PERL::Session *) 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 1) || (items > 1)) {
|
||||
SWIG_croak("Usage: Session_unsetInputCallback(self);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_unsetInputCallback" "', argument " "1"" of type '" "PERL::Session *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< PERL::Session * >(argp1);
|
||||
(arg1)->unsetInputCallback();
|
||||
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_Session_setHangupHook__SWIG_0) {
|
||||
{
|
||||
PERL::Session *arg1 = (PERL::Session *) 0 ;
|
||||
@@ -10602,6 +10629,7 @@ static swig_command_info swig_commands[] = {
|
||||
{"freeswitchc::Session_run_dtmf_callback", _wrap_Session_run_dtmf_callback},
|
||||
{"freeswitchc::Session_setME", _wrap_Session_setME},
|
||||
{"freeswitchc::Session_setInputCallback", _wrap_Session_setInputCallback},
|
||||
{"freeswitchc::Session_unsetInputCallback", _wrap_Session_unsetInputCallback},
|
||||
{"freeswitchc::Session_setHangupHook", _wrap_Session_setHangupHook},
|
||||
{"freeswitchc::Session_ready", _wrap_Session_ready},
|
||||
{"freeswitchc::Session_suuid_set", _wrap_Session_suuid_set},
|
||||
|
||||
Reference in new issue
Block a user