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.

185 lines
3.6 KiB

  1. /*++
  2. Copyright (c) 1999-2001 Microsoft Corporation
  3. Module Name:
  4. conmgr.h
  5. Abstract:
  6. Routines for managing channels.
  7. Author:
  8. Brian Guarraci (briangu) March, 2001.
  9. Revision History:
  10. --*/
  11. #ifndef CON_MGR_H
  12. #define CON_MGR_H
  13. //
  14. //
  15. //
  16. typedef enum {
  17. Nothing,
  18. Shutdown,
  19. CloseChannel,
  20. Reboot
  21. } EXECUTE_POST_CONSUMER_COMMAND_ENUM;
  22. extern EXECUTE_POST_CONSUMER_COMMAND_ENUM ExecutePostConsumerCommand;
  23. extern PVOID ExecutePostConsumerCommandData;
  24. //
  25. // Commands
  26. //
  27. #define HELP1_COMMAND_STRING "?"
  28. #define HELP2_COMMAND_STRING "help"
  29. #define EXTENDED_HELP_SUBCOMMAND "-?"
  30. #define CRASH_COMMAND_STRING "crashdump"
  31. #define CHANNEL_COMMAND_STRING "ch"
  32. #define CHANNEL_CLOSE_NAME_COMMAND_STRING "-cn"
  33. #define CHANNEL_CLOSE_INDEX_COMMAND_STRING "-ci"
  34. #if ENABLE_KILL_COMMAND
  35. #define CHANNEL_KILL_COMMAND_STRING "-k"
  36. #endif
  37. #define CHANNEL_SWITCH_NAME_COMMAND_STRING "-sn"
  38. #define CHANNEL_SWITCH_INDEX_COMMAND_STRING "-si"
  39. #define CHANNEL_LIST_COMMAND_STRING "-l"
  40. #define CMD_COMMAND_STRING "cmd"
  41. #define DUMP_COMMAND_STRING "d"
  42. #define FULLINFO_COMMAND_STRING "f"
  43. #define SETIP_COMMAND_STRING "i"
  44. #define INFORMATION_COMMAND_STRING "id"
  45. #define KILL_COMMAND_STRING "k"
  46. #define LOWER_COMMAND_STRING "l"
  47. #define LOCK_COMMAND_STRING "lock"
  48. #define LOWER_COMMAND_STRING "l"
  49. #define LIMIT_COMMAND_STRING "m"
  50. #define PAGING_COMMAND_STRING "p"
  51. #define RAISE_COMMAND_STRING "r"
  52. #define REBOOT_COMMAND_STRING "restart"
  53. #define TIME_COMMAND_STRING "s"
  54. #define SHUTDOWN_COMMAND_STRING "shutdown"
  55. #define TLIST_COMMAND_STRING "t"
  56. //
  57. // prototypes
  58. //
  59. NTSTATUS
  60. ConMgrInitialize(
  61. VOID
  62. );
  63. NTSTATUS
  64. ConMgrShutdown(
  65. VOID
  66. );
  67. NTSTATUS
  68. ConMgrSetCurrentChannel(
  69. IN PSAC_CHANNEL CurrentChannel
  70. );
  71. NTSTATUS
  72. ConMgrAdvanceCurrentChannel(
  73. VOID
  74. );
  75. NTSTATUS
  76. ConMgrDisplayCurrentChannel(
  77. VOID
  78. );
  79. BOOLEAN
  80. ConMgrIsWriteEnabled(
  81. PSAC_CHANNEL Channel
  82. );
  83. BOOLEAN
  84. SacPutSimpleMessage(
  85. ULONG MessageId
  86. );
  87. VOID
  88. SacPutString(
  89. PCWSTR String
  90. );
  91. VOID
  92. ConMgrTimerDpcRoutine(
  93. IN struct _KDPC *Dpc,
  94. IN PVOID DeferredContext,
  95. IN PVOID SystemArgument1,
  96. IN PVOID SystemArgument2
  97. );
  98. VOID
  99. ConMgrWorkerProcessEvents(
  100. IN PSAC_DEVICE_CONTEXT DeviceContext
  101. );
  102. NTSTATUS
  103. ConMgrHandleEvent(
  104. IN IO_MGR_EVENT Event,
  105. IN PSAC_CHANNEL Channel,
  106. IN PVOID Data
  107. );
  108. VOID
  109. ConMgrEventMessageHaveLock(
  110. IN PCWSTR String
  111. );
  112. VOID
  113. ConMgrEventMessage(
  114. IN PCWSTR String,
  115. IN BOOLEAN HaveCurrentChannelLock
  116. );
  117. BOOLEAN
  118. ConMgrSimpleEventMessage(
  119. IN ULONG MessageId,
  120. IN BOOLEAN HaveCurrentChannelLock
  121. );
  122. NTSTATUS
  123. ConMgrChannelClose(
  124. IN PSAC_CHANNEL Channel
  125. );
  126. NTSTATUS
  127. ConMgrGetChannelCloseMessage(
  128. IN PSAC_CHANNEL Channel,
  129. IN NTSTATUS CloseStatus,
  130. OUT PWSTR* OutputBuffer
  131. );
  132. NTSTATUS
  133. ConMgrWriteData(
  134. IN PSAC_CHANNEL Channel,
  135. IN PCUCHAR Buffer,
  136. IN ULONG BufferSize
  137. );
  138. NTSTATUS
  139. ConMgrFlushData(
  140. IN PSAC_CHANNEL Channel
  141. );
  142. BOOLEAN
  143. ConMgrIsSacChannel(
  144. IN PSAC_CHANNEL Channel
  145. );
  146. NTSTATUS
  147. ConMgrDisplayFastChannelSwitchingInterface(
  148. PSAC_CHANNEL Channel
  149. );
  150. #endif