windows-nt/Source/XPSP1/NT/net/tapi/skywalker/apps/t3test/event.cpp

92 lines
1.7 KiB
C++
Raw Normal View History

2020-09-26 03:20:57 -05:00
#include "stdafx.h"
#include "t3test.h"
#include "t3testD.h"
#include "externs.h"
void
CT3testDlg::HandleCallHubEvent( IDispatch * pEvent )
{
HRESULT hr;
ITCallHubEvent * pCallHubEvent;
CALLHUB_EVENT che;
hr = pEvent->QueryInterface(
IID_ITCallHubEvent,
(void **)&pCallHubEvent
);
if (!SUCCEEDED(hr))
{
return;
}
hr = pCallHubEvent->get_Event( &che );
if (!SUCCEEDED(hr))
{
return;
}
switch ( che )
{
case CHE_CALLHUBNEW:
break;
case CHE_CALLHUBIDLE:
break;
default:
break;
}
pCallHubEvent->Release();
}
void
CT3testDlg::HandleTapiObjectMessage( IDispatch * pEvent )
{
ITTAPIObjectEvent * pte;
HRESULT hr;
TAPIOBJECT_EVENT te;
hr = pEvent->QueryInterface(
IID_ITTAPIObjectEvent,
(void**)&pte
);
if ( !SUCCEEDED(hr) )
{
return;
}
pte->get_Event( &te );
switch (te)
{
case TE_ADDRESSCREATE:
case TE_ADDRESSREMOVE:
ReleaseMediaTypes();
ReleaseTerminals();
ReleaseCalls();
ReleaseSelectedTerminals();
ReleaseCreatedTerminals();
ReleaseTerminalClasses();
ReleaseListen();
ReleaseAddresses();
InitializeAddressTree();
break;
default:
break;
}
pte->Release();
}