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.

426 lines
7.3 KiB

  1. /*++
  2. Copyright (c) 1994-2000 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. BOOL m_fNewSite;
  39. BOOL m_fLocal;
  40. BOOL m_fUNC;
  41. BOOL m_fRead;
  42. BOOL m_fWrite;
  43. DWORD m_dwInstance; // site instance number
  44. CString m_strParent;
  45. CString m_strServerName; // machine name
  46. CString m_strDescription;
  47. CString m_strBinding;
  48. CString m_strAlias;
  49. CString m_strPath;
  50. CString m_strUserName;
  51. CString m_strPassword;
  52. HRESULT m_hrResult;
  53. CMetaKey * m_pKey;
  54. };
  55. //
  56. // New Virtual Server Wizard Description Page
  57. //
  58. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  59. class CFtpWizDescription : public CIISWizardPage
  60. {
  61. DECLARE_DYNCREATE(CFtpWizDescription)
  62. //
  63. // Construction
  64. //
  65. public:
  66. CFtpWizDescription(CFtpWizSettings * pwsSettings = NULL);
  67. ~CFtpWizDescription();
  68. //
  69. // Dialog Data
  70. //
  71. protected:
  72. enum { IDD = IDD_FTP_NEW_INST_DESCRIPTION };
  73. //{{AFX_DATA(CFtpWizDescription)
  74. CEdit m_edit_Description;
  75. //}}AFX_DATA
  76. //
  77. // Overrides
  78. //
  79. protected:
  80. //{{AFX_VIRTUAL(CFtpWizDescription)
  81. public:
  82. virtual BOOL OnSetActive();
  83. virtual LRESULT OnWizardNext();
  84. protected:
  85. virtual void DoDataExchange(CDataExchange * pDX);
  86. //}}AFX_VIRTUAL
  87. //
  88. // Implementation
  89. //
  90. protected:
  91. //{{AFX_MSG(CFtpWizDescription)
  92. afx_msg void OnChangeEditDescription();
  93. //}}AFX_MSG
  94. DECLARE_MESSAGE_MAP()
  95. void SetControlStates();
  96. private:
  97. CFtpWizSettings * m_pSettings;
  98. };
  99. //
  100. // New Virtual Server Wizard Bindings Page
  101. //
  102. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  103. class CFtpWizBindings : public CIISWizardPage
  104. {
  105. DECLARE_DYNCREATE(CFtpWizBindings)
  106. //
  107. // Construction
  108. //
  109. public:
  110. CFtpWizBindings(CFtpWizSettings * pSettings = NULL);
  111. ~CFtpWizBindings();
  112. //
  113. // Dialog Data
  114. //
  115. protected:
  116. //{{AFX_DATA(CFtpWizBindings)
  117. enum { IDD = IDD_FTP_NEW_INST_BINDINGS };
  118. int m_nIpAddressSel;
  119. UINT m_nTCPPort;
  120. CComboBox m_combo_IpAddresses;
  121. //}}AFX_DATA
  122. CIPAddress m_iaIpAddress;
  123. CObListPlus m_oblIpAddresses;
  124. //
  125. // Overrides
  126. //
  127. protected:
  128. //{{AFX_VIRTUAL(CFtpWizBindings)
  129. public:
  130. virtual BOOL OnSetActive();
  131. protected:
  132. virtual void DoDataExchange(CDataExchange * pDX);
  133. //}}AFX_VIRTUAL
  134. //
  135. // Implementation
  136. //
  137. protected:
  138. //{{AFX_MSG(CFtpWizBindings)
  139. virtual BOOL OnInitDialog();
  140. //}}AFX_MSG
  141. DECLARE_MESSAGE_MAP()
  142. void SetControlStates();
  143. private:
  144. CFtpWizSettings * m_pSettings;
  145. };
  146. //
  147. // New Virtual Directory Wizard Alias Page
  148. //
  149. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  150. class CFtpWizAlias : public CIISWizardPage
  151. {
  152. DECLARE_DYNCREATE(CFtpWizAlias)
  153. //
  154. // Construction
  155. //
  156. public:
  157. CFtpWizAlias(CFtpWizSettings * pwsSettings = NULL);
  158. ~CFtpWizAlias();
  159. //
  160. // Dialog Data
  161. //
  162. protected:
  163. //{{AFX_DATA(CFtpWizAlias)
  164. enum { IDD = IDD_FTP_NEW_DIR_ALIAS };
  165. CEdit m_edit_Alias;
  166. //}}AFX_DATA
  167. //
  168. // Overrides
  169. //
  170. protected:
  171. //{{AFX_VIRTUAL(CFtpWizAlias)
  172. public:
  173. virtual BOOL OnSetActive();
  174. virtual LRESULT OnWizardNext();
  175. protected:
  176. virtual void DoDataExchange(CDataExchange * pDX);
  177. //}}AFX_VIRTUAL
  178. //
  179. // Implementation
  180. //
  181. protected:
  182. //{{AFX_MSG(CFtpWizAlias)
  183. afx_msg void OnChangeEditAlias();
  184. //}}AFX_MSG
  185. DECLARE_MESSAGE_MAP()
  186. void SetControlStates();
  187. private:
  188. CFtpWizSettings * m_pSettings;
  189. };
  190. //
  191. // Wizard Path Page
  192. //
  193. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  194. class CFtpWizPath : public CIISWizardPage
  195. {
  196. DECLARE_DYNCREATE(CFtpWizPath)
  197. //
  198. // Construction
  199. //
  200. public:
  201. CFtpWizPath(
  202. CFtpWizSettings * pwsSettings = NULL,
  203. BOOL bVDir = TRUE
  204. );
  205. ~CFtpWizPath();
  206. int BrowseForFolderCallback(HWND hwnd, UINT uMsg, LPARAM lParam);
  207. //
  208. // Dialog Data
  209. //
  210. protected:
  211. //{{AFX_DATA(CFtpWizPath)
  212. enum { IDD = -1 };
  213. CEdit m_edit_Path;
  214. CButton m_button_Browse;
  215. //}}AFX_DATA
  216. //
  217. // Overrides
  218. //
  219. protected:
  220. //{{AFX_VIRTUAL(CFtpWizPath)
  221. public:
  222. virtual BOOL OnSetActive();
  223. virtual LRESULT OnWizardNext();
  224. protected:
  225. virtual void DoDataExchange(CDataExchange * pDX);
  226. //}}AFX_VIRTUAL
  227. //
  228. // Implementation
  229. //
  230. protected:
  231. //{{AFX_MSG(CFtpWizPath)
  232. afx_msg void OnChangeEditPath();
  233. afx_msg void OnButtonBrowse();
  234. virtual BOOL OnInitDialog();
  235. //}}AFX_MSG
  236. DECLARE_MESSAGE_MAP()
  237. void SetControlStates();
  238. private:
  239. CFtpWizSettings * m_pSettings;
  240. LPTSTR m_pPathTemp;
  241. CString m_strBrowseTitle;
  242. };
  243. //
  244. // Wizard User/Password Page
  245. //
  246. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  247. class CFtpWizUserName : public CIISWizardPage
  248. {
  249. DECLARE_DYNCREATE(CFtpWizUserName)
  250. //
  251. // Construction
  252. //
  253. public:
  254. CFtpWizUserName(
  255. IN CFtpWizSettings * pSettings = NULL,
  256. IN BOOL bVDir = TRUE
  257. );
  258. ~CFtpWizUserName();
  259. //
  260. // Dialog Data
  261. //
  262. protected:
  263. //{{AFX_DATA(CFtpWizUserName)
  264. enum { IDD = IDD_FTP_NEW_USER_PASSWORD };
  265. CEdit m_edit_Password;
  266. CEdit m_edit_UserName;
  267. //}}AFX_DATA
  268. //
  269. // Overrides
  270. //
  271. protected:
  272. //{{AFX_VIRTUAL(CFtpWizUserName)
  273. public:
  274. virtual BOOL OnSetActive();
  275. virtual LRESULT OnWizardNext();
  276. protected:
  277. virtual void DoDataExchange(CDataExchange * pDX);
  278. //}}AFX_VIRTUAL
  279. //
  280. // Implementation
  281. //
  282. protected:
  283. //{{AFX_MSG(CFtpWizUserName)
  284. virtual BOOL OnInitDialog();
  285. afx_msg void OnButtonBrowseUsers();
  286. afx_msg void OnChangeEditUsername();
  287. afx_msg void OnButtonCheckPassword();
  288. //}}AFX_MSG
  289. DECLARE_MESSAGE_MAP()
  290. void SetControlStates();
  291. private:
  292. CFtpWizSettings * m_pSettings;
  293. };
  294. //
  295. // Wizard Permissions Page
  296. //
  297. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  298. class CFtpWizPermissions : public CIISWizardPage
  299. {
  300. DECLARE_DYNCREATE(CFtpWizPermissions)
  301. //
  302. // Construction
  303. //
  304. public:
  305. CFtpWizPermissions(
  306. IN CFtpWizSettings * pwsSettings = NULL,
  307. IN BOOL bVDir = TRUE
  308. );
  309. ~CFtpWizPermissions();
  310. //
  311. // Dialog Data
  312. //
  313. protected:
  314. //{{AFX_DATA(CFtpWizPermissions)
  315. enum { IDD = IDD_FTP_NEW_PERMS };
  316. //}}AFX_DATA
  317. //
  318. // Overrides
  319. //
  320. protected:
  321. //{{AFX_VIRTUAL(CFtpWizPermissions)
  322. public:
  323. virtual BOOL OnSetActive();
  324. virtual LRESULT OnWizardNext();
  325. protected:
  326. virtual void DoDataExchange(CDataExchange * pDX);
  327. //}}AFX_VIRTUAL
  328. //
  329. // Implementation
  330. //
  331. protected:
  332. //{{AFX_MSG(CFtpWizPermissions)
  333. //}}AFX_MSG
  334. DECLARE_MESSAGE_MAP()
  335. void SetControlStates();
  336. private:
  337. CFtpWizSettings * m_pSettings;
  338. BOOL m_bVDir;
  339. };
  340. #endif //_FTP_NEW_WIZARD_H