Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
1.7 KiB

  1. #include "stdafx.h"
  2. #include "t3test.h"
  3. #include "t3testD.h"
  4. #include "externs.h"
  5. void
  6. CT3testDlg::HandleCallHubEvent( IDispatch * pEvent )
  7. {
  8. HRESULT hr;
  9. ITCallHubEvent * pCallHubEvent;
  10. CALLHUB_EVENT che;
  11. hr = pEvent->QueryInterface(
  12. IID_ITCallHubEvent,
  13. (void **)&pCallHubEvent
  14. );
  15. if (!SUCCEEDED(hr))
  16. {
  17. return;
  18. }
  19. hr = pCallHubEvent->get_Event( &che );
  20. if (!SUCCEEDED(hr))
  21. {
  22. return;
  23. }
  24. switch ( che )
  25. {
  26. case CHE_CALLHUBNEW:
  27. break;
  28. case CHE_CALLHUBIDLE:
  29. break;
  30. default:
  31. break;
  32. }
  33. pCallHubEvent->Release();
  34. }
  35. void
  36. CT3testDlg::HandleTapiObjectMessage( IDispatch * pEvent )
  37. {
  38. ITTAPIObjectEvent * pte;
  39. HRESULT hr;
  40. TAPIOBJECT_EVENT te;
  41. hr = pEvent->QueryInterface(
  42. IID_ITTAPIObjectEvent,
  43. (void**)&pte
  44. );
  45. if ( !SUCCEEDED(hr) )
  46. {
  47. return;
  48. }
  49. pte->get_Event( &te );
  50. switch (te)
  51. {
  52. case TE_ADDRESSCREATE:
  53. case TE_ADDRESSREMOVE:
  54. ReleaseMediaTypes();
  55. ReleaseTerminals();
  56. ReleaseCalls();
  57. ReleaseSelectedTerminals();
  58. ReleaseCreatedTerminals();
  59. ReleaseTerminalClasses();
  60. ReleaseListen();
  61. ReleaseAddresses();
  62. InitializeAddressTree();
  63. break;
  64. default:
  65. break;
  66. }
  67. pte->Release();
  68. }