mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-13 06:44:14 +00:00
P/Invoke should do all the work for us
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9797 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
b66e1bad4c
commit
657a0c9ac0
4 files changed
+21
-15
No files matched your search
@@ -452,8 +452,7 @@ struct dotnet_conf_t {
|
||||
// Sets up delegates (and anything else needed) on the ManagedSession object
|
||||
// Called from ManagedSession.Initialize Managed -> this is Unmanaged code so all pointers are marshalled and prevented from GC
|
||||
// Exported method.
|
||||
|
||||
SWITCH_MOD_DECLARE(void) InitManagedSession(ManagedSession *session, void *dtmfDelegate, void *hangupDelegate)
|
||||
SWITCH_MOD_DECLARE(void) InitManagedSession(ManagedSession *session, inputFunction dtmfDelegate, hangupFunction hangupDelegate)
|
||||
{
|
||||
switch_assert(session);
|
||||
if (!session) {
|
||||
@@ -461,8 +460,8 @@ SWITCH_MOD_DECLARE(void) InitManagedSession(ManagedSession *session, void *dtmfD
|
||||
}
|
||||
session->setDTMFCallback(NULL, "");
|
||||
session->setHangupHook(NULL);
|
||||
session->dtmfDelegateHandle = GCHandle::Alloc(Marshal::GetDelegateForFunctionPointer(IntPtr(dtmfDelegate), InputDelegate::typeid));
|
||||
session->hangupDelegateHandle = GCHandle::Alloc(Marshal::GetDelegateForFunctionPointer(IntPtr(hangupDelegate), HangupDelegate::typeid));
|
||||
session->dtmfDelegate = dtmfDelegate;
|
||||
session->hangupDelegate = hangupDelegate;
|
||||
}
|
||||
|
||||
switch_status_t loadModDotnetManaged()
|
||||
|
||||
Reference in new issue
Block a user