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.

539 lines
10 KiB

  1. /*++
  2. Copyright (c) 1994-2001 Microsoft Corporation
  3. Module Name :
  4. FtpAddNew.cpp
  5. Abstract:
  6. Classes for new FTP site and virtual directory creation
  7. Author:
  8. Sergei Antonov (sergeia)
  9. Project:
  10. Internet Services Manager
  11. Revision History:
  12. 11/8/2000 sergeia Initial creation
  13. --*/
  14. #ifndef _FTP_NEW_WIZARD_H
  15. #define _FTP_NEW_WIZARD_H
  16. class CFtpWizSettings : public CObjectPlus
  17. /*++
  18. Class Description:
  19. FTP Wizard settings intended to pass along from page
  20. to page
  21. --*/
  22. {
  23. //
  24. // Constructor/Destructor
  25. //
  26. public:
  27. CFtpWizSettings(
  28. CMetaKey * pMetaKey,
  29. LPCTSTR lpszServerName,
  30. BOOL fNewSite,
  31. DWORD dwInstance = MASTER_INSTANCE,
  32. LPCTSTR lpszParent = NULL
  33. );
  34. //
  35. // Public Properties
  36. //
  37. public:
  38. DWORD m_VersionMajor;
  39. BOOL m_fNewSite;
  40. BOOL m_fLocal;
  41. BOOL m_fUNC;
  42. BOOL m_fRead;
  43. BOOL m_fWrite;
  44. BOOL m_fDelegation;
  45. DWORD m_dwInstance; // site instance number
  46. CString m_strParent;
  47. CString m_strServerName; // machine name
  48. CString m_strDescription;
  49. CString m_strBinding;
  50. CString m_strAlias;
  51. CString m_strPath;
  52. CString m_strUserName;
  53. CStrPassword m_strPassword;
  54. int m_UserIsolation;
  55. CString m_strIsolationUserName;
  56. CStrPassword m_strIsolationUserPassword;
  57. CString m_strIsolationDomain;
  58. HRESULT m_hrResult;
  59. CMetaKey * m_pKey;
  60. };
  61. //
  62. // New Virtual Server Wizard Description Page
  63. //
  64. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  65. class CFtpWizDescription : public CIISWizardPage
  66. {
  67. DECLARE_DYNCREATE(CFtpWizDescription)
  68. //
  69. // Construction
  70. //
  71. public:
  72. CFtpWizDescription(CFtpWizSettings * pwsSettings = NULL);
  73. ~CFtpWizDescription();
  74. //
  75. // Dialog Data
  76. //
  77. protected:
  78. enum { IDD = IDD_FTP_NEW_INST_DESCRIPTION };
  79. //{{AFX_DATA(CFtpWizDescription)
  80. CEdit m_edit_Description;
  81. //}}AFX_DATA
  82. //
  83. // Overrides
  84. //
  85. protected:
  86. //{{AFX_VIRTUAL(CFtpWizDescription)
  87. public:
  88. virtual BOOL OnSetActive();
  89. virtual LRESULT OnWizardNext();
  90. protected:
  91. virtual void DoDataExchange(CDataExchange * pDX);
  92. //}}AFX_VIRTUAL
  93. //
  94. // Implementation
  95. //
  96. protected:
  97. //{{AFX_MSG(CFtpWizDescription)
  98. afx_msg void OnChangeEditDescription();
  99. //}}AFX_MSG
  100. DECLARE_MESSAGE_MAP()
  101. void SetControlStates();
  102. private:
  103. CFtpWizSettings * m_pSettings;
  104. };
  105. //
  106. // New Virtual Server Wizard Bindings Page
  107. //
  108. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  109. class CFtpWizBindings : public CIISWizardPage
  110. {
  111. DECLARE_DYNCREATE(CFtpWizBindings)
  112. //
  113. // Construction
  114. //
  115. public:
  116. CFtpWizBindings(CFtpWizSettings * pSettings = NULL);
  117. ~CFtpWizBindings();
  118. //
  119. // Dialog Data
  120. //
  121. protected:
  122. //{{AFX_DATA(CFtpWizBindings)
  123. enum { IDD = IDD_FTP_NEW_INST_BINDINGS };
  124. int m_nIpAddressSel;
  125. UINT m_nTCPPort;
  126. CComboBox m_combo_IpAddresses;
  127. //}}AFX_DATA
  128. CIPAddress m_iaIpAddress;
  129. CObListPlus m_oblIpAddresses;
  130. //
  131. // Overrides
  132. //
  133. protected:
  134. //{{AFX_VIRTUAL(CFtpWizBindings)
  135. public:
  136. virtual BOOL OnSetActive();
  137. protected:
  138. virtual void DoDataExchange(CDataExchange * pDX);
  139. //}}AFX_VIRTUAL
  140. //
  141. // Implementation
  142. //
  143. protected:
  144. //{{AFX_MSG(CFtpWizBindings)
  145. virtual BOOL OnInitDialog();
  146. //}}AFX_MSG
  147. DECLARE_MESSAGE_MAP()
  148. void SetControlStates();
  149. private:
  150. CFtpWizSettings * m_pSettings;
  151. };
  152. //
  153. // New Virtual Directory Wizard Alias Page
  154. //
  155. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  156. class CFtpWizAlias : public CIISWizardPage
  157. {
  158. DECLARE_DYNCREATE(CFtpWizAlias)
  159. //
  160. // Construction
  161. //
  162. public:
  163. CFtpWizAlias(CFtpWizSettings * pwsSettings = NULL);
  164. ~CFtpWizAlias();
  165. //
  166. // Dialog Data
  167. //
  168. protected:
  169. //{{AFX_DATA(CFtpWizAlias)
  170. enum { IDD = IDD_FTP_NEW_DIR_ALIAS };
  171. CEdit m_edit_Alias;
  172. //}}AFX_DATA
  173. //
  174. // Overrides
  175. //
  176. protected:
  177. //{{AFX_VIRTUAL(CFtpWizAlias)
  178. public:
  179. virtual BOOL OnSetActive();
  180. virtual LRESULT OnWizardNext();
  181. protected:
  182. virtual void DoDataExchange(CDataExchange * pDX);
  183. //}}AFX_VIRTUAL
  184. //
  185. // Implementation
  186. //
  187. protected:
  188. //{{AFX_MSG(CFtpWizAlias)
  189. afx_msg void OnChangeEditAlias();
  190. //}}AFX_MSG
  191. DECLARE_MESSAGE_MAP()
  192. void SetControlStates();
  193. private:
  194. CFtpWizSettings * m_pSettings;
  195. };
  196. //
  197. // Wizard Path Page
  198. //
  199. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  200. class CFtpWizPath : public CIISWizardPage
  201. {
  202. DECLARE_DYNCREATE(CFtpWizPath)
  203. //
  204. // Construction
  205. //
  206. public:
  207. CFtpWizPath(
  208. CFtpWizSettings * pwsSettings = NULL,
  209. BOOL bVDir = TRUE
  210. );
  211. ~CFtpWizPath();
  212. int BrowseForFolderCallback(HWND hwnd, UINT uMsg, LPARAM lParam);
  213. //
  214. // Dialog Data
  215. //
  216. protected:
  217. //{{AFX_DATA(CFtpWizPath)
  218. enum { IDD = -1 };
  219. CEdit m_edit_Path;
  220. CButton m_button_Browse;
  221. //}}AFX_DATA
  222. //
  223. // Overrides
  224. //
  225. protected:
  226. //{{AFX_VIRTUAL(CFtpWizPath)
  227. public:
  228. virtual BOOL OnSetActive();
  229. virtual LRESULT OnWizardNext();
  230. protected:
  231. virtual void DoDataExchange(CDataExchange * pDX);
  232. //}}AFX_VIRTUAL
  233. //
  234. // Implementation
  235. //
  236. protected:
  237. //{{AFX_MSG(CFtpWizPath)
  238. afx_msg void OnChangeEditPath();
  239. afx_msg void OnButtonBrowse();
  240. virtual BOOL OnInitDialog();
  241. //}}AFX_MSG
  242. DECLARE_MESSAGE_MAP()
  243. void SetControlStates();
  244. private:
  245. CFtpWizSettings * m_pSettings;
  246. LPTSTR m_pPathTemp;
  247. CString m_strBrowseTitle;
  248. };
  249. //
  250. // Wizard User/Password Page
  251. //
  252. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  253. class CFtpWizUserName : public CIISWizardPage
  254. {
  255. DECLARE_DYNCREATE(CFtpWizUserName)
  256. //
  257. // Construction
  258. //
  259. public:
  260. CFtpWizUserName(
  261. IN CFtpWizSettings * pSettings = NULL,
  262. IN BOOL bVDir = TRUE
  263. );
  264. ~CFtpWizUserName();
  265. //
  266. // Dialog Data
  267. //
  268. protected:
  269. //{{AFX_DATA(CFtpWizUserName)
  270. enum { IDD = IDD_FTP_NEW_USER_PASSWORD };
  271. CEdit m_edit_Password;
  272. CEdit m_edit_UserName;
  273. CButton m_chk_Delegation;
  274. //}}AFX_DATA
  275. //
  276. // Overrides
  277. //
  278. protected:
  279. //{{AFX_VIRTUAL(CFtpWizUserName)
  280. public:
  281. virtual BOOL OnSetActive();
  282. virtual LRESULT OnWizardNext();
  283. virtual LRESULT OnWizardBack();
  284. protected:
  285. virtual void DoDataExchange(CDataExchange * pDX);
  286. //}}AFX_VIRTUAL
  287. //
  288. // Implementation
  289. //
  290. protected:
  291. //{{AFX_MSG(CFtpWizUserName)
  292. virtual BOOL OnInitDialog();
  293. afx_msg void OnButtonBrowseUsers();
  294. afx_msg void OnChangeEditUsername();
  295. afx_msg void OnButtonCheckPassword();
  296. afx_msg void OnCheckDelegation();
  297. //}}AFX_MSG
  298. DECLARE_MESSAGE_MAP()
  299. void SetControlStates();
  300. private:
  301. CFtpWizSettings * m_pSettings;
  302. BOOL m_fMovingBack;
  303. };
  304. //
  305. // Wizard Permissions Page
  306. //
  307. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  308. class CFtpWizPermissions : public CIISWizardPage
  309. {
  310. DECLARE_DYNCREATE(CFtpWizPermissions)
  311. //
  312. // Construction
  313. //
  314. public:
  315. CFtpWizPermissions(
  316. IN CFtpWizSettings * pwsSettings = NULL,
  317. IN BOOL bVDir = TRUE
  318. );
  319. ~CFtpWizPermissions();
  320. //
  321. // Dialog Data
  322. //
  323. //{{AFX_DATA(CFtpWizPermissions)
  324. enum { IDD = IDD_FTP_NEW_PERMS };
  325. //}}AFX_DATA
  326. //
  327. // Overrides
  328. //
  329. protected:
  330. //{{AFX_VIRTUAL(CFtpWizPermissions)
  331. public:
  332. virtual BOOL OnSetActive();
  333. virtual LRESULT OnWizardNext();
  334. protected:
  335. virtual void DoDataExchange(CDataExchange * pDX);
  336. //}}AFX_VIRTUAL
  337. //
  338. // Implementation
  339. //
  340. protected:
  341. //{{AFX_MSG(CFtpWizPermissions)
  342. //}}AFX_MSG
  343. DECLARE_MESSAGE_MAP()
  344. void SetControlStates();
  345. private:
  346. CFtpWizSettings * m_pSettings;
  347. BOOL m_bVDir;
  348. };
  349. class CFtpWizUserIsolation : public CIISWizardPage
  350. {
  351. DECLARE_DYNCREATE(CFtpWizUserIsolation)
  352. //
  353. // Construction
  354. //
  355. public:
  356. CFtpWizUserIsolation(
  357. IN CFtpWizSettings * pwsSettings = NULL,
  358. IN BOOL bVDir = FALSE
  359. );
  360. ~CFtpWizUserIsolation();
  361. //
  362. // Dialog Data
  363. //
  364. //{{AFX_DATA(CFtpWizUserIsolation)
  365. enum { IDD = IDD_FTP_NEW_USER_ISOLATION };
  366. //}}AFX_DATA
  367. //
  368. // Overrides
  369. //
  370. protected:
  371. //{{AFX_VIRTUAL(CFtpWizUserIsolation)
  372. public:
  373. virtual BOOL OnSetActive();
  374. virtual LRESULT OnWizardNext();
  375. protected:
  376. virtual void DoDataExchange(CDataExchange * pDX);
  377. //}}AFX_VIRTUAL
  378. //
  379. // Implementation
  380. //
  381. protected:
  382. //{{AFX_MSG(CFtpWizUserIsolation)
  383. //}}AFX_MSG
  384. DECLARE_MESSAGE_MAP()
  385. void SetControlStates();
  386. private:
  387. CFtpWizSettings * m_pSettings;
  388. BOOL m_bVDir;
  389. };
  390. class CFtpWizUserIsolationAD : public CIISWizardPage
  391. {
  392. DECLARE_DYNCREATE(CFtpWizUserIsolationAD)
  393. //
  394. // Construction
  395. //
  396. public:
  397. CFtpWizUserIsolationAD(
  398. IN CFtpWizSettings * pwsSettings = NULL,
  399. IN BOOL bVDir = FALSE
  400. );
  401. ~CFtpWizUserIsolationAD();
  402. //
  403. // Dialog Data
  404. //
  405. CEdit m_edit_UserName;
  406. //{{AFX_DATA(CFtpWizUserIsolationAD)
  407. enum { IDD = IDD_FTP_NEW_USER_ISOLATION_AD };
  408. //}}AFX_DATA
  409. //
  410. // Overrides
  411. //
  412. protected:
  413. //{{AFX_VIRTUAL(CFtpWizUserIsolationAD)
  414. public:
  415. virtual BOOL OnSetActive();
  416. virtual LRESULT OnWizardNext();
  417. virtual LRESULT OnWizardBack();
  418. protected:
  419. virtual void DoDataExchange(CDataExchange * pDX);
  420. //}}AFX_VIRTUAL
  421. //
  422. // Implementation
  423. //
  424. protected:
  425. //{{AFX_MSG(CFtpWizUserIsolationAD)
  426. virtual BOOL OnInitDialog();
  427. afx_msg void OnBrowseUsers();
  428. afx_msg void OnBrowseDomains();
  429. afx_msg void OnControlsChanged();
  430. afx_msg void OnChangeUserName();
  431. //}}AFX_MSG
  432. DECLARE_MESSAGE_MAP()
  433. void SetControlStates();
  434. private:
  435. CFtpWizSettings * m_pSettings;
  436. BOOL m_bVDir;
  437. BOOL m_fInDomain;
  438. BOOL m_fOnBack;
  439. BOOL m_fOnNext;
  440. };
  441. #endif //_FTP_NEW_WIZARD_H