提交 41b81623 authored 作者: Michael Giagnocavo's avatar Michael Giagnocavo

Actually USE the saved references....

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10133 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 a61cdc9a
...@@ -47,7 +47,7 @@ namespace FreeSWITCH.Native ...@@ -47,7 +47,7 @@ namespace FreeSWITCH.Native
{ {
// SWITCH_DECLARE(void) InitManagedSession(ManagedSession *session, MonoObject *dtmfDelegate, MonoObject *hangupDelegate) // SWITCH_DECLARE(void) InitManagedSession(ManagedSession *session, MonoObject *dtmfDelegate, MonoObject *hangupDelegate)
[DllImport("mod_managed.dll", CharSet = CharSet.Ansi, CallingConvention=CallingConvention.Cdecl)] [DllImport("mod_managed.dll", CharSet = CharSet.Ansi, CallingConvention=CallingConvention.Cdecl)]
static extern void InitManagedSession(IntPtr sessionPtr, DtmfCallback dtmfDelegate, Action hangupDelegate); static extern void InitManagedSession(IntPtr sessionPtr, DtmfCallback dtmfDelegate, CdeclAction hangupDelegate);
/// <summary>Initializes the native ManagedSession. Must be called after Originate.</summary> /// <summary>Initializes the native ManagedSession. Must be called after Originate.</summary>
public void Initialize() public void Initialize()
...@@ -57,11 +57,11 @@ namespace FreeSWITCH.Native ...@@ -57,11 +57,11 @@ namespace FreeSWITCH.Native
// So we don't need to worry about GCHandles and all that.... // So we don't need to worry about GCHandles and all that....
// Info here: http://blogs.msdn.com/cbrumme/archive/2003/05/06/51385.aspx // Info here: http://blogs.msdn.com/cbrumme/archive/2003/05/06/51385.aspx
this._inputCallbackRef = inputCallback; this._inputCallbackRef = inputCallback;
this._hangupCallback = hangupCallback; this._hangupCallbackRef = hangupCallback;
InitManagedSession(ManagedSession.getCPtr(this).Handle, inputCallback, hangupCallback); InitManagedSession(ManagedSession.getCPtr(this).Handle, this._inputCallbackRef, this._hangupCallbackRef);
} }
DtmfCallback _inputCallbackRef; DtmfCallback _inputCallbackRef;
CdeclAction _hangupCallback; CdeclAction _hangupCallbackRef;
/// <summary>Function to execute when this session hangs up.</summary> /// <summary>Function to execute when this session hangs up.</summary>
public Action HangupFunction { get; set; } public Action HangupFunction { get; set; }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论