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.

152 lines
5.4 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. callback.h
  5. Abstract:
  6. Definitions for callback routines for Intel Call Control Module.
  7. Environment:
  8. User Mode - Win32
  9. Revision History:
  10. --*/
  11. #ifndef _INC_CALLBACK
  12. #define _INC_CALLBACK
  13. ///////////////////////////////////////////////////////////////////////////////
  14. // //
  15. // Window message definitions //
  16. // //
  17. ///////////////////////////////////////////////////////////////////////////////
  18. #define H323_MSG_WINSOCK (WM_USER+1) // H245ws component uses this
  19. #define H323_MSG_PLACE_CALL (WM_USER+10)
  20. #define H323_MSG_ACCEPT_CALL (WM_USER+11)
  21. #define H323_MSG_CLOSE_CALL (WM_USER+12)
  22. #define H323_MSG_DROP_CALL (WM_USER+13)
  23. #define H323_MSG_CALL_LISTEN (WM_USER+14)
  24. #define H323_MSG_TERMINATION (WM_USER+15)
  25. ///////////////////////////////////////////////////////////////////////////////
  26. // //
  27. // Global variables //
  28. // //
  29. ///////////////////////////////////////////////////////////////////////////////
  30. extern DWORD g_dwCallbackThreadID;
  31. ///////////////////////////////////////////////////////////////////////////////
  32. // //
  33. // Private definitions //
  34. // //
  35. ///////////////////////////////////////////////////////////////////////////////
  36. #define WAIT_OBJECT_REGISTRY_CHANGE (WAIT_OBJECT_0)
  37. #define WAIT_OBJECT_TERMINATE_EVENT (WAIT_OBJECT_REGISTRY_CHANGE + 1)
  38. #define WAIT_OBJECT_INCOMING_MESSAGE (WAIT_OBJECT_TERMINATE_EVENT + 1)
  39. #define NUM_WAITABLE_OBJECTS 2
  40. ///////////////////////////////////////////////////////////////////////////////
  41. // //
  42. // Macros //
  43. // //
  44. ///////////////////////////////////////////////////////////////////////////////
  45. #define H323IsTerminationMessage(_msg_) \
  46. ((_msg_)->message == H323_MSG_TERMINATION)
  47. #define H323IsPlaceCallMessage(_msg_) \
  48. ((_msg_)->message == H323_MSG_PLACE_CALL)
  49. #define H323IsAcceptCallMessage(_msg_) \
  50. ((_msg_)->message == H323_MSG_ACCEPT_CALL)
  51. #define H323IsCloseCallMessage(_msg_) \
  52. ((_msg_)->message == H323_MSG_CLOSE_CALL)
  53. #define H323IsDropCallMessage(_msg_) \
  54. ((_msg_)->message == H323_MSG_DROP_CALL)
  55. #define H323IsCallListenMessage(_msg_) \
  56. ((_msg_)->message == H323_MSG_CALL_LISTEN)
  57. #define H323PostTerminationMessage() \
  58. (PostThreadMessage(g_dwCallbackThreadID, \
  59. H323_MSG_TERMINATION, \
  60. (WPARAM)0, \
  61. (LPARAM)0))
  62. #define H323PostPlaceCallMessage(_hdCall_) \
  63. (PostThreadMessage(g_dwCallbackThreadID, \
  64. H323_MSG_PLACE_CALL, \
  65. (WPARAM)(_hdCall_), \
  66. (LPARAM)(0)))
  67. #define H323PostAcceptCallMessage(_hdCall_) \
  68. (PostThreadMessage(g_dwCallbackThreadID, \
  69. H323_MSG_ACCEPT_CALL, \
  70. (WPARAM)(_hdCall_), \
  71. (LPARAM)(0)))
  72. #define H323PostCloseCallMessage(_hdCall_) \
  73. (PostThreadMessage(g_dwCallbackThreadID, \
  74. H323_MSG_CLOSE_CALL, \
  75. (WPARAM)(_hdCall_), \
  76. (LPARAM)(0)))
  77. #define H323PostDropCallMessage(_hdCall_,_dwDisconnectMode_) \
  78. (PostThreadMessage(g_dwCallbackThreadID, \
  79. H323_MSG_DROP_CALL, \
  80. (WPARAM)(_hdCall_), \
  81. (LPARAM)(_dwDisconnectMode_)))
  82. #define H323PostCallListenMessage(_hdLine_) \
  83. (PostThreadMessage(g_dwCallbackThreadID, \
  84. H323_MSG_CALL_LISTEN, \
  85. (WPARAM)(_hdLine_), \
  86. (LPARAM)(0)))
  87. #define H323IsValidU2U(_pNS_) \
  88. (((_pNS_)->bCountryCode == H221_COUNTRY_CODE_USA) && \
  89. ((_pNS_)->bExtension == H221_COUNTRY_EXT_USA) && \
  90. ((_pNS_)->wManufacturerCode == H221_MFG_CODE_MICROSOFT))
  91. ///////////////////////////////////////////////////////////////////////////////
  92. // //
  93. // Public prototypes //
  94. // //
  95. ///////////////////////////////////////////////////////////////////////////////
  96. HRESULT
  97. H323ConferenceCallback(
  98. BYTE bIndication,
  99. HRESULT hStatus,
  100. CC_HCONFERENCE hConference,
  101. DWORD dwConferenceToken,
  102. PCC_CONFERENCE_CALLBACK_PARAMS pConferenceCallbackParams
  103. );
  104. VOID
  105. H323ListenCallback(
  106. HRESULT hStatus,
  107. PCC_LISTEN_CALLBACK_PARAMS pListenCallbackParams
  108. );
  109. BOOL
  110. H323StartCallbackThread(
  111. );
  112. BOOL
  113. H323StopCallbackThread(
  114. );
  115. #endif // _INC_CALLBACK