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.

83 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. iohandler.h
  5. Abstract:
  6. This module implements the IoHandler class.
  7. The IoHandler class defines a wrapper interface for constructing
  8. filter read/write handlers for SAC channel I/O.
  9. Author:
  10. Brian Guarraci (briangu), 2001
  11. Revision History:
  12. --*/
  13. #if !defined( _IOHANDLER_H_ )
  14. #define _IOHANDLER_H_
  15. #include <nt.h>
  16. #include <ntrtl.h>
  17. #include <nturtl.h>
  18. #include <windows.h>
  19. class CIoHandler
  20. {
  21. protected:
  22. //
  23. // Prevent this class from begin instantiated directly
  24. //
  25. CIoHandler();
  26. public:
  27. virtual ~CIoHandler();
  28. //
  29. // Send BufferSize bytes
  30. //
  31. virtual BOOL
  32. Write(
  33. PBYTE Buffer,
  34. ULONG BufferSize
  35. ) = 0;
  36. //
  37. // Flush any unsent data
  38. //
  39. virtual BOOL
  40. Flush(
  41. VOID
  42. ) = 0;
  43. //
  44. // Read BufferSize bytes
  45. //
  46. virtual BOOL
  47. Read(
  48. PBYTE Buffer,
  49. ULONG BufferSize,
  50. PULONG ByteCount
  51. ) = 0;
  52. //
  53. // Determine if the ioHandler has new data to read
  54. //
  55. virtual BOOL
  56. HasNewData(
  57. PBOOL InputWaiting
  58. ) = 0;
  59. };
  60. #endif