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.

92 lines
1.5 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. sacio.h
  5. Abstract:
  6. This module implements a SAC channel IoHandler.
  7. The purpose of this IoHandler is to provide an
  8. interface for doing buffered channel I/O.
  9. Author:
  10. Brian Guarraci (briangu), 2001
  11. Revision History:
  12. --*/
  13. #if !defined( _SAC_IO_H_ )
  14. #define _SAC_IO_H_
  15. #include "iohandler.h"
  16. #include <emsapi.h>
  17. class CSacIoHandler : public CIoHandler
  18. {
  19. EMSCmdChannel* mySacChannel;
  20. //
  21. // Prevent this class from being instantiated directly
  22. //
  23. CSacIoHandler();
  24. //
  25. // Write buffer attributes
  26. //
  27. PBYTE mySendBuffer;
  28. ULONG mySendBufferIndex;
  29. public:
  30. static CSacIoHandler*
  31. CSacIoHandler::Construct(
  32. IN SAC_CHANNEL_OPEN_ATTRIBUTES Attributes
  33. );
  34. //
  35. // Write BufferSize bytes
  36. //
  37. inline virtual BOOL
  38. Write(
  39. IN PBYTE Buffer,
  40. IN ULONG BufferSize
  41. );
  42. //
  43. // Flush any unsent data
  44. //
  45. inline virtual BOOL
  46. Flush(
  47. VOID
  48. );
  49. //
  50. // Write BufferSize bytes
  51. //
  52. inline virtual BOOL
  53. Read(
  54. OUT PBYTE Buffer,
  55. IN ULONG BufferSize,
  56. OUT PULONG ByteCount
  57. );
  58. //
  59. // Determine if the ioHandler has new data to read
  60. //
  61. inline virtual BOOL
  62. HasNewData(
  63. OUT PBOOL InputWaiting
  64. );
  65. virtual ~CSacIoHandler();
  66. };
  67. #endif