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.

449 lines
11 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved.
  3. Module Name:
  4. WzQStart.h
  5. Abstract:
  6. Setup Wizard implementation.
  7. Author:
  8. Rohde Wakefield [rohde] 12-Aug-1997
  9. Revision History:
  10. --*/
  11. #ifndef _WZQSTART_H
  12. #define _WZQSTART_H
  13. #pragma once
  14. #include <mstask.h>
  15. #include "SakVlLs.h"
  16. class CQuickStartWizard;
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CQuickStartIntro dialog
  19. class CQuickStartIntro : public CSakWizardPage
  20. {
  21. // Construction
  22. public:
  23. CQuickStartIntro();
  24. ~CQuickStartIntro();
  25. virtual LRESULT OnWizardNext();
  26. public:
  27. // Dialog Data
  28. //{{AFX_DATA(CQuickStartIntro)
  29. enum { IDD = IDD_WIZ_QSTART_INTRO };
  30. // NOTE - ClassWizard will add data members here.
  31. // DO NOT EDIT what you see in these blocks of generated code !
  32. //}}AFX_DATA
  33. // Overrides
  34. // ClassWizard generate virtual function overrides
  35. //{{AFX_VIRTUAL(CQuickStartIntro)
  36. public:
  37. virtual BOOL OnSetActive();
  38. protected:
  39. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  40. //}}AFX_VIRTUAL
  41. // Implementation
  42. protected:
  43. // Generated message map functions
  44. //{{AFX_MSG(CQuickStartIntro)
  45. virtual BOOL OnInitDialog();
  46. //}}AFX_MSG
  47. DECLARE_MESSAGE_MAP()
  48. private:
  49. enum LAD_STATE {
  50. LAD_ENABLED,
  51. LAD_DISABLED,
  52. LAD_UNSET
  53. };
  54. HRESULT IsDriverRunning();
  55. HRESULT CheckLastAccessDateState( LAD_STATE* );
  56. };
  57. /////////////////////////////////////////////////////////////////////////////
  58. // CQuickStartCheck dialog
  59. class CQuickStartCheck : public CSakWizardPage
  60. {
  61. // Construction
  62. public:
  63. CQuickStartCheck();
  64. ~CQuickStartCheck();
  65. // Dialog Data
  66. //{{AFX_DATA(CQuickStartCheck)
  67. enum { IDD = IDD_WIZ_QSTART_CHECK };
  68. //}}AFX_DATA
  69. // Overrides
  70. // ClassWizard generate virtual function overrides
  71. //{{AFX_VIRTUAL(CQuickStartCheck)
  72. public:
  73. virtual BOOL OnSetActive();
  74. virtual BOOL OnKillActive();
  75. protected:
  76. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  77. //}}AFX_VIRTUAL
  78. // Implementation
  79. CString m_ExString, m_CheckString;
  80. BOOL m_TimerStarted;
  81. void StartTimer( );
  82. void StopTimer( );
  83. protected:
  84. // Generated message map functions
  85. //{{AFX_MSG(CQuickStartCheck)
  86. virtual BOOL OnInitDialog();
  87. afx_msg void OnTimer(UINT nIDEvent);
  88. //}}AFX_MSG
  89. DECLARE_MESSAGE_MAP()
  90. };
  91. /////////////////////////////////////////////////////////////////////////////
  92. // CQuickStartFinish dialog
  93. class CQuickStartFinish : public CSakWizardPage
  94. {
  95. // Construction
  96. public:
  97. CQuickStartFinish();
  98. ~CQuickStartFinish();
  99. // Dialog Data
  100. //{{AFX_DATA(CQuickStartFinish)
  101. enum { IDD = IDD_WIZ_QSTART_FINISH };
  102. // NOTE - ClassWizard will add data members here.
  103. // DO NOT EDIT what you see in these blocks of generated code !
  104. //}}AFX_DATA
  105. // Overrides
  106. // ClassWizard generate virtual function overrides
  107. //{{AFX_VIRTUAL(CQuickStartFinish)
  108. public:
  109. virtual BOOL OnSetActive();
  110. protected:
  111. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  112. //}}AFX_VIRTUAL
  113. // Implementation
  114. protected:
  115. // Generated message map functions
  116. //{{AFX_MSG(CQuickStartFinish)
  117. virtual BOOL OnInitDialog();
  118. afx_msg void OnSetFocusFinalText();
  119. //}}AFX_MSG
  120. DECLARE_MESSAGE_MAP()
  121. };
  122. /////////////////////////////////////////////////////////////////////////////
  123. // CQuickStartInitialValues dialog
  124. class CQuickStartInitialValues : public CSakWizardPage
  125. {
  126. // Construction
  127. public:
  128. CQuickStartInitialValues();
  129. ~CQuickStartInitialValues();
  130. // Dialog Data
  131. //{{AFX_DATA(CQuickStartInitialValues)
  132. enum { IDD = IDD_WIZ_QSTART_INITIAL_VAL };
  133. CEdit m_MinSizeEdit;
  134. CEdit m_FreeSpaceEdit;
  135. CEdit m_AccessEdit;
  136. CSpinButtonCtrl m_MinSizeSpinner;
  137. CSpinButtonCtrl m_FreeSpaceSpinner;
  138. CSpinButtonCtrl m_AccessSpinner;
  139. //}}AFX_DATA
  140. // Overrides
  141. // ClassWizard generate virtual function overrides
  142. //{{AFX_VIRTUAL(CQuickStartInitialValues)
  143. public:
  144. virtual BOOL OnSetActive();
  145. virtual BOOL OnKillActive();
  146. protected:
  147. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  148. //}}AFX_VIRTUAL
  149. // Implementation
  150. protected:
  151. // Generated message map functions
  152. //{{AFX_MSG(CQuickStartInitialValues)
  153. virtual BOOL OnInitDialog();
  154. //}}AFX_MSG
  155. DECLARE_MESSAGE_MAP()
  156. };
  157. /////////////////////////////////////////////////////////////////////////////
  158. // CQuickStartManageRes dialog
  159. class CQuickStartManageRes : public CSakWizardPage
  160. {
  161. // Construction
  162. public:
  163. CQuickStartManageRes();
  164. ~CQuickStartManageRes();
  165. // Dialog Data
  166. //{{AFX_DATA(CQuickStartManageRes)
  167. enum { IDD = IDD_WIZ_QSTART_MANRES_SEL };
  168. CSakVolList m_ListBox;
  169. CButton m_RadioSelect;
  170. //}}AFX_DATA
  171. // Overrides
  172. // ClassWizard generate virtual function overrides
  173. //{{AFX_VIRTUAL(CQuickStartManageRes)
  174. public:
  175. virtual BOOL OnSetActive();
  176. protected:
  177. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  178. //}}AFX_VIRTUAL
  179. // Implementation
  180. void SetButtons( );
  181. protected:
  182. // Generated message map functions
  183. //{{AFX_MSG(CQuickStartManageRes)
  184. virtual BOOL OnInitDialog();
  185. afx_msg void OnDestroy();
  186. afx_msg void OnDblclkSelect();
  187. afx_msg void OnRadioQsManageAll();
  188. afx_msg void OnQsRadioSelect();
  189. afx_msg void OnItemchanged(NMHDR* pNMHDR, LRESULT* pResult);
  190. //}}AFX_MSG
  191. DECLARE_MESSAGE_MAP()
  192. private:
  193. BOOL m_ListBoxSelected[HSMADMIN_MAX_VOLUMES];
  194. };
  195. /////////////////////////////////////////////////////////////////////////////
  196. // CQuickStartManageRes dialog
  197. class CQuickStartManageResX : public CSakWizardPage
  198. {
  199. // Construction
  200. public:
  201. CQuickStartManageResX();
  202. ~CQuickStartManageResX();
  203. // Dialog Data
  204. //{{AFX_DATA(CQuickStartManageResX)
  205. enum { IDD = IDD_WIZ_QSTART_MANRES_SELX };
  206. //}}AFX_DATA
  207. // Overrides
  208. // ClassWizard generate virtual function overrides
  209. //{{AFX_VIRTUAL(CQuickStartManageResX)
  210. public:
  211. virtual BOOL OnSetActive();
  212. protected:
  213. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  214. //}}AFX_VIRTUAL
  215. // Implementation
  216. protected:
  217. // Generated message map functions
  218. //{{AFX_MSG(CQuickStartManageResX)
  219. //}}AFX_MSG
  220. DECLARE_MESSAGE_MAP()
  221. };
  222. /////////////////////////////////////////////////////////////////////////////
  223. // CQuickStartMediaSel dialog
  224. class CQuickStartMediaSel : public CSakWizardPage
  225. {
  226. // Construction
  227. public:
  228. CQuickStartMediaSel();
  229. ~CQuickStartMediaSel();
  230. // Dialog Data
  231. //{{AFX_DATA(CQuickStartMediaSel)
  232. enum { IDD = IDD_WIZ_QSTART_MEDIA_SEL };
  233. CComboBox m_ListMediaSel;
  234. //}}AFX_DATA
  235. // Overrides
  236. // ClassWizard generate virtual function overrides
  237. //{{AFX_VIRTUAL(CQuickStartMediaSel)
  238. public:
  239. virtual BOOL OnSetActive();
  240. protected:
  241. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  242. //}}AFX_VIRTUAL
  243. // Implementation
  244. protected:
  245. // Generated message map functions
  246. //{{AFX_MSG(CQuickStartMediaSel)
  247. virtual BOOL OnInitDialog();
  248. afx_msg void OnDestroy();
  249. afx_msg void OnSelchangeMediaSel();
  250. //}}AFX_MSG
  251. DECLARE_MESSAGE_MAP()
  252. private:
  253. void SetButtons( );
  254. };
  255. /////////////////////////////////////////////////////////////////////////////
  256. // CQuickStartSchedule dialog
  257. class CQuickStartSchedule : public CSakWizardPage
  258. {
  259. // Construction
  260. public:
  261. CQuickStartSchedule();
  262. ~CQuickStartSchedule();
  263. // Dialog Data
  264. //{{AFX_DATA(CQuickStartSchedule)
  265. enum { IDD = IDD_WIZ_QSTART_SCHEDULE };
  266. // NOTE - ClassWizard will add data members here.
  267. // DO NOT EDIT what you see in these blocks of generated code !
  268. //}}AFX_DATA
  269. // Overrides
  270. // ClassWizard generate virtual function overrides
  271. //{{AFX_VIRTUAL(CQuickStartSchedule)
  272. public:
  273. virtual BOOL OnSetActive();
  274. protected:
  275. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  276. //}}AFX_VIRTUAL
  277. // Implementation
  278. HRESULT UpdateDescription( );
  279. protected:
  280. // Generated message map functions
  281. //{{AFX_MSG(CQuickStartSchedule)
  282. afx_msg void OnChangeSchedule();
  283. //}}AFX_MSG
  284. DECLARE_MESSAGE_MAP()
  285. };
  286. /////////////////////////////////////////////////////////////////////////////
  287. /////////////////////////////////////////////////////////////////////////////
  288. // CQuickStartWizard
  289. // Enumeration of states of checking system worker thread
  290. enum CST_STATE {
  291. CST_NOT_STARTED,
  292. CST_ACCOUNT,
  293. CST_NTMS_INSTALL,
  294. CST_SUPP_MEDIA,
  295. CST_DONE,
  296. };
  297. class CQuickStartWizard : public CSakWizardSheet
  298. {
  299. // Construction
  300. public:
  301. CQuickStartWizard( );
  302. // Attributes
  303. public:
  304. CQuickStartIntro m_IntroPage;
  305. CQuickStartCheck m_CheckPage;
  306. CQuickStartManageRes m_ManageRes;
  307. CQuickStartManageResX m_ManageResX;
  308. CQuickStartInitialValues m_InitialValues;
  309. CQuickStartSchedule m_SchedulePage;
  310. CQuickStartMediaSel m_MediaSel;
  311. CQuickStartFinish m_FinishPage;
  312. // Operations
  313. public:
  314. // Implementation
  315. public:
  316. virtual ~CQuickStartWizard();
  317. public:
  318. ///////////////////////////////
  319. // Used across multiple pages:
  320. CWsbStringPtr m_ComputerName;
  321. HRESULT GetHsmServer( CComPtr<IHsmServer> &pServ );
  322. HRESULT GetFsaServer( CComPtr<IFsaServer> &pServ );
  323. HRESULT GetRmsServer( CComPtr<IRmsServer> &pServ );
  324. HRESULT ReleaseServers( void );
  325. virtual HRESULT OnCancel( void );
  326. virtual HRESULT OnFinish( void );
  327. STDMETHOD( AddWizardPages ) ( IN RS_PCREATE_HANDLE Handle, IN IUnknown* pPropSheetCallback, IN ISakSnapAsk* pSakSnapAsk );
  328. HRESULT InitTask( void );
  329. CComPtr<ISchedulingAgent> m_pSchedAgent;
  330. CComPtr<ITask> m_pTask;
  331. CComPtr<ITaskTrigger> m_pTrigger;
  332. CWsbStringPtr m_HsmServiceName;
  333. CWsbStringPtr m_FsaServiceName;
  334. CWsbStringPtr m_RmsServiceName;
  335. HANDLE m_hCheckSysThread;
  336. CST_STATE m_CheckSysState;
  337. HRESULT m_hrCheckSysResult;
  338. static DWORD WINAPI CheckSysThreadStart( LPVOID pv );
  339. private:
  340. CComPtr<IHsmServer> m_pHsmServer;
  341. CComPtr<IFsaServer> m_pFsaServer;
  342. CComPtr<IRmsServer> m_pRmsServer;
  343. };
  344. //{{AFX_INSERT_LOCATION}}
  345. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  346. //}}AFX
  347. #endif