Rename setAutoHangup. Remove CoreSession channelvar in MonoSession destructor.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8790 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Giagnocavo 2008-06-09 16:55:51 +00:00
parent e5233533b3
commit ce07c5b233
6 changed files with 992 additions and 986 deletions

View File

@ -74,6 +74,10 @@
%rename (GetUuid) CoreSession::get_uuid; %rename (GetUuid) CoreSession::get_uuid;
%rename (HookState) CoreSession::hook_state; %rename (HookState) CoreSession::hook_state;
%rename (InternalSession) CoreSession::session; %rename (InternalSession) CoreSession::session;
%rename (Speak) CoreSession::speak;
%rename (SetTtsParameters) CoreSession::set_tts_parms;
%rename (SetAutoHangup) CoreSession::setAutoHangup;
%rename (Serialize) Event::serialize; %rename (Serialize) Event::serialize;
%rename (SetPriority) Event::setPriority; %rename (SetPriority) Event::setPriority;

View File

@ -74,6 +74,8 @@ MonoSession::~MonoSession()
switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING); switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
setAutoHangup(0); setAutoHangup(0);
} }
// Don't let any callbacks use this CoreSession anymore
switch_channel_set_private(channel, "CoreSession", NULL);
} }
} }

View File

@ -64,7 +64,7 @@ public:
MonoSession(); MonoSession();
MonoSession(char *uuid); MonoSession(char *uuid);
MonoSession(switch_core_session_t *session); MonoSession(switch_core_session_t *session);
~MonoSession(); virtual ~MonoSession();
virtual bool begin_allow_threads(); virtual bool begin_allow_threads();
virtual bool end_allow_threads(); virtual bool end_allow_threads();

View File

@ -227,7 +227,7 @@ namespace FreeSWITCH
if (fType == null) return false; if (fType == null) return false;
using (var session = new Native.MonoSession(new Native.SWIGTYPE_p_switch_core_session(sessionHandle, false))) { using (var session = new Native.MonoSession(new Native.SWIGTYPE_p_switch_core_session(sessionHandle, false))) {
session.setAutoHangup(false); session.SetAutoHangup(false);
try { try {
var f = (AppFunction)Activator.CreateInstance(fType); var f = (AppFunction)Activator.CreateInstance(fType);
f.RunInternal(session, args); f.RunInternal(session, args);

View File

@ -157,13 +157,13 @@ public class CoreSession : IDisposable {
return ret; return ret;
} }
public int speak(string text) { public int Speak(string text) {
int ret = freeswitchPINVOKE.CoreSession_speak(swigCPtr, text); int ret = freeswitchPINVOKE.CoreSession_Speak(swigCPtr, text);
return ret; return ret;
} }
public void set_tts_parms(string tts_name, string voice_name) { public void SetTtsParameters(string tts_name, string voice_name) {
freeswitchPINVOKE.CoreSession_set_tts_parms(swigCPtr, tts_name, voice_name); freeswitchPINVOKE.CoreSession_SetTtsParameters(swigCPtr, tts_name, voice_name);
} }
public int CollectDigits(int timeout) { public int CollectDigits(int timeout) {
@ -206,8 +206,8 @@ public class CoreSession : IDisposable {
return ret; return ret;
} }
public int setAutoHangup(bool val) { public int SetAutoHangup(bool val) {
int ret = freeswitchPINVOKE.CoreSession_setAutoHangup(swigCPtr, val); int ret = freeswitchPINVOKE.CoreSession_SetAutoHangup(swigCPtr, val);
return ret; return ret;
} }