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.

151 lines
3.5 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. H323call.h
  5. Abstract:
  6. Declaration of the CH323MSPCall
  7. Author:
  8. Mu Han (muhan) 5-September-1998
  9. --*/
  10. #ifndef __CONFCALL_H_
  11. #define __CONFCALL_H_
  12. #if _MSC_VER >= 1000
  13. #pragma once
  14. #endif // _MSC_VER >= 1000
  15. #include <H323pdu.h>
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CH323MSPCall
  18. /////////////////////////////////////////////////////////////////////////////
  19. class CH323MSPCall :
  20. public CMSPCallMultiGraph,
  21. public CMSPObjectSafetyImpl
  22. {
  23. public:
  24. BEGIN_COM_MAP(CH323MSPCall)
  25. COM_INTERFACE_ENTRY(IObjectSafety)
  26. COM_INTERFACE_ENTRY_CHAIN(CMSPCallMultiGraph)
  27. END_COM_MAP()
  28. // ITStreamControl methods, called by the app.
  29. STDMETHOD (CreateStream) (
  30. IN long lMediaType,
  31. IN TERMINAL_DIRECTION Direction,
  32. IN OUT ITStream ** ppStream
  33. );
  34. STDMETHOD (RemoveStream) (
  35. IN ITStream * pStream
  36. );
  37. // methods called by the MSPAddress object.
  38. virtual HRESULT Init(
  39. IN CMSPAddress * pMSPAddress,
  40. IN MSP_HANDLE htCall,
  41. IN DWORD dwReserved,
  42. IN DWORD dwMediaType
  43. );
  44. virtual HRESULT ReceiveTSPCallData(
  45. IN PBYTE pBuffer,
  46. IN DWORD dwSize
  47. );
  48. HRESULT ShutDown();
  49. // method called by the worker thread.
  50. static DWORD WINAPI WorkerCallbackDispatcher(VOID *pContext);
  51. DWORD ProcessWorkerCallBack(
  52. IN PBYTE pBuffer,
  53. IN DWORD dwSize
  54. );
  55. HRESULT InternalShutDown();
  56. DWORD MSPCallAddRef()
  57. {
  58. return MSPAddRefHelper(this);
  59. }
  60. DWORD MSPCallRelease()
  61. {
  62. return MSPReleaseHelper(this);
  63. }
  64. // method called by the stream.
  65. HRESULT SendTSPMessage(
  66. IN H323MSP_MESSAGE_TYPE Type,
  67. IN ITStream * hmChannel,
  68. IN HANDLE htChannel = NULL,
  69. IN MEDIATYPE MediaType = MEDIA_AUDIO,
  70. IN DWORD dwReason = 0,
  71. IN DWORD dwBitRate = 0
  72. ) const;
  73. protected:
  74. virtual HRESULT CreateStreamObject(
  75. IN DWORD dwMediaType,
  76. IN TERMINAL_DIRECTION Direction,
  77. IN IMediaEvent * pGraph,
  78. IN ITStream ** ppStream
  79. );
  80. void ProcessNewCallIndication(void);
  81. void ProcessOpenChannelResponse(
  82. IN H323MSG_OPEN_CHANNEL_RESPONSE * pOpenChannelResponse
  83. );
  84. void ProcessAcceptChannelRequest(
  85. IN H323MSG_ACCEPT_CHANNEL_REQUEST * pAcceptChannelRequest
  86. );
  87. void ProcessCloseChannelCommand(
  88. IN H323MSG_CLOSE_CHANNEL_COMMAND * pCloseChannelCommand
  89. );
  90. void ProcessIFrameRequest(
  91. IN H323MSG_VIDEO_FAST_UPDATE_PICTURE_COMMAND * pIFrameRequest
  92. );
  93. void ProcessFlowControlCommand(
  94. IN H323MSG_FLOW_CONTROL_COMMAND * pFlowControlCommand
  95. );
  96. private:
  97. HRESULT SendTAPIStreamEvent(
  98. IN ITStream * pITStream,
  99. IN MSP_CALL_EVENT Type,
  100. IN MSP_CALL_EVENT_CAUSE Cause
  101. );
  102. private:
  103. BOOL m_fCallConnected;
  104. BOOL m_fShutDown;
  105. };
  106. typedef struct _CALLWORKITEM
  107. {
  108. CH323MSPCall *pCall;
  109. DWORD dwLen;
  110. BYTE Buffer[1];
  111. } CALLWORKITEM, *PCALLWORKITEM;
  112. #endif //__CONFCALL_H_