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.

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