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.

98 lines
2.4 KiB

  1. /*
  2. * The main use of this class is to get or set the state of the port,
  3. * which is either open or closed.
  4. *
  5. * REFERENCES:
  6. *
  7. * NOTES:
  8. *
  9. * REVISIONS:
  10. * ash11Dec95: Redesigned the class
  11. * pcy10May96: Initialize theAddress to NULL
  12. */
  13. #include "cdefine.h"
  14. #ifdef SMARTHEAP
  15. #define DEFINE_NEW_MACRO 1
  16. #define MEM_DEBUG 1
  17. #include <smrtheap.hpp>
  18. #endif
  19. #include <stdlib.h>
  20. #include <string.h>
  21. #include "stream.h"
  22. #include "err.h"
  23. /* -------------------------------------------------------------------------
  24. Stream class constructor
  25. ------------------------------------------------------------------------- */
  26. Stream::Stream() : UpdateObj()
  27. {
  28. theState = CLOSED;
  29. }
  30. /* -------------------------------------------------------------------------
  31. Stream destructor
  32. ------------------------------------------------------------------------- */
  33. Stream::~Stream()
  34. {
  35. }
  36. /* -------------------------------------------------------------------------
  37. Stream::GetState()
  38. ------------------------------------------------------------------------- */
  39. enum StreamState Stream::GetState()
  40. {
  41. return theState;
  42. }
  43. /* -------------------------------------------------------------------------
  44. Stream::SetState()
  45. Set the state of the stream. It can be OPEN or CLOSED.
  46. ------------------------------------------------------------------------- */
  47. VOID Stream::SetState(const StreamState aNewState)
  48. {
  49. theState = aNewState;
  50. }
  51. /* -------------------------------------------------------------------------
  52. Stream::SetWaitTime()
  53. These next 2 functions are here because of serport. Smart and Simple
  54. ports inherit from Stream, and thePort used in Upsdev is a PStream
  55. variable, and Serport has these methods. SetRequestCode is over -
  56. ridden. And as far as I could tell, SetWaitTIme is not used, so I
  57. am assuming that since Upsdev is common code, another platform uses
  58. it, so I am not going to remove the call to SetWaitTime from Upsdev.
  59. ------------------------------------------------------------------------- */
  60. VOID Stream::SetWaitTime(ULONG )
  61. {
  62. };
  63. /* -------------------------------------------------------------------------
  64. Stream::SetRequestCode()
  65. See above text.
  66. ------------------------------------------------------------------------- */
  67. VOID Stream::SetRequestCode(INT )
  68. {
  69. };