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.

49 lines
865 B

  1. /*
  2. *
  3. * NOTES:
  4. *
  5. * REVISIONS:
  6. * ash12Dec95: Redesigned the class
  7. */
  8. #ifndef __STREAM_H
  9. #define __STREAM_H
  10. #include "apc.h"
  11. #include "update.h"
  12. _CLASSDEF(Stream)
  13. _CLASSDEF(AddressType)
  14. _CLASSDEF(NetAddr)
  15. const ULONG READ_TIMEOUT = ULONG_MAX;
  16. enum StreamState { OPEN, CLOSED };
  17. class Stream : public UpdateObj
  18. {
  19. private:
  20. StreamState theState;
  21. public:
  22. Stream();
  23. virtual ~Stream();
  24. enum StreamState GetState();
  25. VOID SetState(const StreamState aNewState);
  26. virtual INT Initialize() = 0;
  27. virtual INT Open() = 0;
  28. virtual INT Write(PCHAR aBuffer) = 0;
  29. virtual INT Close() = 0;
  30. virtual INT Read(PCHAR aBuffer, USHORT* aBufferSize, ULONG aTimeout = 4000) = 0;
  31. virtual VOID SetWaitTime(ULONG );
  32. virtual VOID SetRequestCode(INT );
  33. };
  34. #endif