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.

172 lines
3.2 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. smsg.hxx
  5. Abstract:
  6. The STREAM_MESSAGE class offers a STREAM implementation of the
  7. MESSAGE class. The messages are output to the STREAM to which
  8. the object is initialized to.
  9. Author:
  10. Norbert P. Kusters (norbertk) 1-Apr-91
  11. --*/
  12. #if !defined(STREAM_MESSAGE_DEFN)
  13. #define STREAM_MESSAGE_DEFN
  14. #include "message.hxx"
  15. DECLARE_CLASS( STREAM_MESSAGE );
  16. DECLARE_CLASS( STREAM );
  17. class STREAM_MESSAGE : public MESSAGE {
  18. public:
  19. ULIB_EXPORT
  20. DECLARE_CONSTRUCTOR( STREAM_MESSAGE );
  21. VIRTUAL
  22. ULIB_EXPORT
  23. ~STREAM_MESSAGE(
  24. );
  25. NONVIRTUAL
  26. ULIB_EXPORT
  27. BOOLEAN
  28. Initialize(
  29. IN OUT PSTREAM OutputStream,
  30. IN OUT PSTREAM InputStream,
  31. IN OUT PSTREAM ErrorStream DEFAULT NULL
  32. );
  33. VIRTUAL
  34. ULIB_EXPORT
  35. BOOLEAN
  36. Set(
  37. IN MSGID MsgId,
  38. IN MESSAGE_TYPE MessageType DEFAULT NORMAL_MESSAGE,
  39. IN ULONG MessageVisual DEFAULT NORMAL_VISUAL
  40. );
  41. VIRTUAL
  42. BOOLEAN
  43. DisplayV(
  44. IN PCSTR Format,
  45. IN va_list VarPointer
  46. );
  47. VIRTUAL
  48. ULIB_EXPORT
  49. BOOLEAN
  50. IsYesResponse(
  51. IN BOOLEAN Default DEFAULT TRUE
  52. );
  53. VIRTUAL
  54. BOOLEAN
  55. QueryStringInput(
  56. OUT PWSTRING String
  57. );
  58. VIRTUAL
  59. BOOLEAN
  60. WaitForUserSignal(
  61. );
  62. VIRTUAL
  63. MSGID
  64. SelectResponse(
  65. IN ULONG NumberOfSelections ...
  66. );
  67. NONVIRTUAL
  68. VOID
  69. SetInputCaseSensitivity(
  70. IN BOOLEAN CaseSensitive
  71. );
  72. VIRTUAL
  73. PMESSAGE
  74. Dup(
  75. );
  76. private:
  77. NONVIRTUAL
  78. VOID
  79. Construct(
  80. );
  81. NONVIRTUAL
  82. VOID
  83. Destroy(
  84. );
  85. NONVIRTUAL
  86. BOOLEAN
  87. ReadLine(
  88. OUT PWSTRING String
  89. );
  90. NONVIRTUAL
  91. BOOLEAN
  92. Flush(
  93. );
  94. NONVIRTUAL
  95. BOOLEAN
  96. DisplayString(
  97. );
  98. MESSAGE_TYPE _msgtype;
  99. ULONG _msgvisual;
  100. PSTREAM _out_stream;
  101. PSTREAM _in_stream;
  102. PSTREAM _err_stream;
  103. BOOLEAN _case_sensitive;
  104. BOOLEAN _copy_input;
  105. DSTRING _display_string;
  106. };
  107. typedef STREAM_MESSAGE* PSTREAM_MESSAGE;
  108. INLINE
  109. VOID
  110. STREAM_MESSAGE::SetInputCaseSensitivity(
  111. IN BOOLEAN CaseSensitive
  112. )
  113. /*++
  114. Routine Description:
  115. This routine sets whether or not to be case sensitive on input.
  116. The class defaults this value to FALSE when it is initialized.
  117. Arguments:
  118. CaseSensitive - Supplies whether or not to be case sensitive on input.
  119. Return Value:
  120. None.
  121. --*/
  122. {
  123. _case_sensitive = CaseSensitive;
  124. }
  125. #endif // STREAM_MESSAGE_DEFN