Source code of Windows XP (NT5)
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.

223 lines
3.5 KiB

  1. /*++
  2. Copyright (c) 1994-1999 Microsoft Corporation
  3. Module Name :
  4. shutdown.h
  5. Abstract:
  6. IIS Shutdown/restart dialog definitions
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Project:
  10. Internet Services Manager (cluster edition)
  11. Revision History:
  12. --*/
  13. #ifndef __SHUTDOWN_H__
  14. #define __SHUTDOWN_H__
  15. //
  16. // IIS Service Command
  17. //
  18. typedef struct tagIISCOMMAND
  19. {
  20. //TCHAR szServer[MAX_PATH + 1];
  21. BOOL fFinished;
  22. HRESULT hReturn;
  23. DWORD dwMilliseconds;
  24. CWnd * pParent;
  25. CIISMachine * pMachine;
  26. CRITICAL_SECTION cs;
  27. }
  28. IISCOMMAND;
  29. //
  30. // Shutdown progress dialog
  31. //
  32. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  33. class CShutProgressDlg : public CDialog
  34. /*++
  35. Class Description:
  36. Shutdown progress indicator dialog. Displays a progress bar, and gives
  37. the opportunity to kill immediately.
  38. Public Interface:
  39. CShutProgressDlg Constructor
  40. Notes:
  41. This dialog displays a progress bar with the number of seconds for shutdown.
  42. The return value is IDOK if Kill() should be executed, or if no further action
  43. is required.
  44. --*/
  45. {
  46. //
  47. // Construction
  48. //
  49. public:
  50. CShutProgressDlg(
  51. IN IISCOMMAND * pCommand
  52. );
  53. //
  54. // Dialog Data
  55. //
  56. protected:
  57. //{{AFX_DATA(CShutProgressDlg)
  58. enum { IDD = IDD_SD_PROGRESS };
  59. CStatic m_static_ProgressMsg;
  60. CProgressCtrl m_prgShutdown;
  61. //}}AFX_DATA
  62. //
  63. // Overrides
  64. //
  65. protected:
  66. //{{AFX_VIRTUAL(CShutProgressDlg)
  67. protected:
  68. virtual void DoDataExchange(CDataExchange * pDX);
  69. //}}AFX_VIRTUAL
  70. //
  71. // Implementation
  72. //
  73. protected:
  74. //{{AFX_MSG(CShutProgressDlg)
  75. afx_msg void OnTimer(UINT nIDEvent);
  76. afx_msg void OnDestroy();
  77. virtual void OnOK();
  78. virtual void OnCancel();
  79. virtual BOOL OnInitDialog();
  80. //}}AFX_MSG
  81. DECLARE_MESSAGE_MAP()
  82. private:
  83. int m_nProgress;
  84. UINT m_uTimeoutSec;
  85. IISCOMMAND * m_pCommand;
  86. CString m_strProgress;
  87. };
  88. //
  89. // Shutdown dialog
  90. //
  91. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  92. enum
  93. {
  94. //
  95. // Note: make sure that associated resource IDs remain
  96. // sequential.
  97. //
  98. ISC_START,
  99. ISC_STOP,
  100. ISC_SHUTDOWN,
  101. ISC_RESTART,
  102. /**/
  103. NUM_ISC_ITEMS
  104. };
  105. class CIISShutdownDlg : public CDialog
  106. /*++
  107. Class Description:
  108. IIS Shutdown/Restart dialog
  109. Public Interface:
  110. CIISShutdownDlg - Constructor
  111. ServicesWereRestarted Returns true if the services were restarted
  112. --*/
  113. {
  114. //
  115. // Construction
  116. //
  117. public:
  118. CIISShutdownDlg(
  119. IN CIISMachine * pMachine,
  120. IN CWnd * pParent = NULL
  121. );
  122. //
  123. // Access
  124. //
  125. public:
  126. BOOL ServicesWereRestarted() const { return m_fServicesRestarted; }
  127. HRESULT PerformCommand(int iCmd);
  128. //
  129. // Dialog Data
  130. //
  131. protected:
  132. //{{AFX_DATA(CIISShutdownDlg)
  133. enum { IDD = IDD_SHUTDOWN };
  134. CStatic m_static_Details;
  135. CComboBox m_combo_Restart;
  136. //}}AFX_DATA
  137. CString m_strDetails[NUM_ISC_ITEMS];
  138. //
  139. // Overrides
  140. //
  141. protected:
  142. //{{AFX_VIRTUAL(CIISShutdownDlg)
  143. protected:
  144. virtual void DoDataExchange(CDataExchange * pDX);
  145. //}}AFX_VIRTUAL
  146. //
  147. // Implementation
  148. //
  149. protected:
  150. //{{AFX_MSG(CIISShutdownDlg)
  151. afx_msg void OnSelchangeComboRestart();
  152. afx_msg void OnDblclkComboRestart();
  153. virtual void OnOK();
  154. virtual BOOL OnInitDialog();
  155. //}}AFX_MSG
  156. DECLARE_MESSAGE_MAP()
  157. void SetDetailsText();
  158. private:
  159. CIISMachine * m_pMachine;
  160. BOOL m_fServicesRestarted;
  161. };
  162. #endif // __SHUTDOWN_H__