Leaked source code of windows server 2003
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.

112 lines
2.1 KiB

  1. #ifndef _STREAMCONTEXT_HXX_
  2. #define _STREAMCONTEXT_HXX_
  3. /*++
  4. Copyright (c) 1998 Microsoft Corporation
  5. Module Name :
  6. streamcontext.hxx
  7. Abstract:
  8. Implementation of STREAM_CONTEXT. One such object for every connection
  9. Author:
  10. Bilal Alam (BAlam) 29-March-2000
  11. Environment:
  12. Win32 - User Mode
  13. Project:
  14. Stream Filter Worker Process
  15. --*/
  16. #include "ulcontext.hxx"
  17. #define STREAM_CONTEXT_SIGNATURE (DWORD)'XTCS'
  18. #define STREAM_CONTEXT_SIGNATURE_FREE (DWORD)'xtcs'
  19. class STREAM_CONTEXT
  20. {
  21. public:
  22. STREAM_CONTEXT( FILTER_CHANNEL_CONTEXT * ulContext );
  23. virtual ~STREAM_CONTEXT();
  24. BOOL
  25. CheckSignature(
  26. VOID
  27. ) const
  28. {
  29. return _dwSignature == STREAM_CONTEXT_SIGNATURE;
  30. }
  31. virtual
  32. HRESULT
  33. ProcessRawReadData(
  34. RAW_STREAM_INFO * pRawStreamInfo,
  35. BOOL * pfReadMore,
  36. BOOL * pfComplete
  37. ) = 0;
  38. virtual
  39. HRESULT
  40. ProcessRawWriteData(
  41. RAW_STREAM_INFO * pRawStreamInfo,
  42. BOOL * pfComplete
  43. ) = 0;
  44. virtual
  45. HRESULT
  46. ProcessNewConnection(
  47. CONNECTION_INFO * pConnectionInfo,
  48. ENDPOINT_CONFIG * pEndpointConfig
  49. ) = 0;
  50. virtual
  51. HRESULT
  52. SendDataBack(
  53. RAW_STREAM_INFO * /*pRawStreamInfo*/
  54. )
  55. {
  56. return NO_ERROR;
  57. }
  58. virtual
  59. VOID
  60. ProcessConnectionClose(
  61. VOID
  62. )
  63. {
  64. }
  65. static
  66. HRESULT
  67. Initialize(
  68. VOID
  69. );
  70. static
  71. VOID
  72. Terminate(
  73. VOID
  74. );
  75. FILTER_CHANNEL_CONTEXT *
  76. QueryFiltChannelContext(
  77. VOID
  78. ) const
  79. {
  80. DBG_ASSERT( _pFiltChannelContext != NULL );
  81. return _pFiltChannelContext;
  82. }
  83. private:
  84. DWORD _dwSignature;
  85. FILTER_CHANNEL_CONTEXT * _pFiltChannelContext;
  86. };
  87. #endif