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.

248 lines
4.2 KiB

  1. /*++
  2. Copyright (c) 1994-2001 Microsoft Corporation
  3. Module Name :
  4. ftpsht.h
  5. Abstract:
  6. FTP Property sheet definitions
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Sergei Antonov (sergeia)
  10. Project:
  11. Internet Services Manager (cluster edition)
  12. Revision History:
  13. --*/
  14. #ifndef __FTPSHT_H__
  15. #define __FTPSHT_H__
  16. #include "shts.h"
  17. #ifndef LOGGING_ENABLED
  18. #define LOGGING_ENABLED
  19. inline BOOL LoggingEnabled(
  20. IN DWORD dwLogType
  21. )
  22. {
  23. return (dwLogType == MD_LOG_TYPE_ENABLED);
  24. }
  25. #endif
  26. #ifndef ENABLE_LOGGING
  27. #define ENABLE_LOGGING
  28. inline void EnableLogging(
  29. OUT DWORD & dwLogType,
  30. IN BOOL fEnabled = TRUE
  31. )
  32. {
  33. dwLogType = fEnabled ? MD_LOG_TYPE_ENABLED : MD_LOG_TYPE_DISABLED;
  34. }
  35. #endif
  36. class CFTPInstanceProps : public CInstanceProps
  37. /*++
  38. Class Description:
  39. FTP Properties
  40. Public Interface:
  41. CFTPInstanceProps : Constructor
  42. --*/
  43. {
  44. public:
  45. //
  46. // Constructor
  47. //
  48. CFTPInstanceProps(
  49. IN CComAuthInfo * pAuthInfo,
  50. IN LPCTSTR lpszMDPath
  51. );
  52. public:
  53. //
  54. // Write Data if dirty
  55. //
  56. virtual HRESULT WriteDirtyProps();
  57. protected:
  58. //
  59. // Break out GetAllData() data to data fields
  60. //
  61. virtual void ParseFields();
  62. public:
  63. //
  64. // Service Page
  65. //
  66. MP_CILong m_nMaxConnections;
  67. MP_CILong m_nConnectionTimeOut;
  68. MP_DWORD m_dwLogType;
  69. //
  70. // Accounts Page
  71. //
  72. MP_CString m_strUserName;
  73. MP_CString m_strPassword;
  74. MP_BOOL m_fAllowAnonymous;
  75. MP_BOOL m_fOnlyAnonymous;
  76. MP_BOOL m_fPasswordSync;
  77. MP_CBlob m_acl;
  78. //
  79. // Message Page
  80. //
  81. MP_CString m_strExitMessage;
  82. MP_CString m_strMaxConMsg;
  83. MP_CStringListEx m_strlWelcome;
  84. MP_CStringListEx m_strlBanner;
  85. //
  86. // Directory Properties Page
  87. //
  88. MP_BOOL m_fDosDirOutput;
  89. //
  90. // Default Site page
  91. //
  92. MP_DWORD m_dwDownlevelInstance;
  93. MP_DWORD m_dwMaxBandwidth;
  94. };
  95. class CFTPDirProps : public CChildNodeProps
  96. /*++
  97. Class Description:
  98. FTP Directory properties
  99. Public Interface:
  100. CFTPDirProps : Constructor
  101. --*/
  102. {
  103. public:
  104. CFTPDirProps(
  105. IN CComAuthInfo * pAuthInfo,
  106. IN LPCTSTR lpszMDPath
  107. );
  108. public:
  109. //
  110. // Write Data if dirty
  111. //
  112. virtual HRESULT WriteDirtyProps();
  113. protected:
  114. //
  115. // Break out GetAllData() data to data fields
  116. //
  117. virtual void ParseFields();
  118. public:
  119. //
  120. // Directory properties page
  121. //
  122. MP_CString m_strUserName;
  123. MP_CString m_strPassword;
  124. MP_BOOL m_fDontLog;
  125. MP_CBlob m_ipl;
  126. };
  127. class CFtpSheet : public CInetPropertySheet
  128. /*++
  129. Class Description:
  130. Ftp Property sheet
  131. Public Interface:
  132. CFtpSheet : Constructor
  133. Initialize : Initialize config data
  134. --*/
  135. {
  136. public:
  137. //
  138. // Constructor
  139. //
  140. CFtpSheet(
  141. IN CComAuthInfo * pAuthInfo,
  142. IN LPCTSTR lpszMetaPath,
  143. IN CWnd * pParentWnd = NULL,
  144. IN LPARAM lParam = 0L,
  145. IN LONG_PTR handle = 0L,
  146. IN UINT iSelectPage = 0
  147. );
  148. ~CFtpSheet();
  149. public:
  150. HRESULT QueryInstanceResult() const;
  151. HRESULT QueryDirectoryResult() const;
  152. CFTPInstanceProps & GetInstanceProperties() { return *m_ppropInst; }
  153. CFTPDirProps & GetDirectoryProperties() { return *m_ppropDir; }
  154. virtual HRESULT LoadConfigurationParameters();
  155. virtual void FreeConfigurationParameters();
  156. protected:
  157. virtual void WinHelp(DWORD dwData, UINT nCmd = HELP_CONTEXT);
  158. //{{AFX_MSG(CFtpSheet)
  159. //}}AFX_MSG
  160. DECLARE_MESSAGE_MAP()
  161. private:
  162. CFTPInstanceProps * m_ppropInst;
  163. CFTPDirProps * m_ppropDir;
  164. };
  165. //
  166. // Inline Expansion
  167. //
  168. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  169. inline HRESULT CFtpSheet::QueryInstanceResult() const
  170. {
  171. //
  172. // BUGBUG: S_OK if object not yet instantiated
  173. //
  174. return m_ppropInst ? m_ppropInst->QueryResult() : S_OK;
  175. }
  176. inline HRESULT CFtpSheet::QueryDirectoryResult() const
  177. {
  178. //
  179. // BUGBUG: S_OK if object not yet instantiated
  180. //
  181. return m_ppropDir ? m_ppropDir->QueryResult() : S_OK;
  182. }
  183. #endif // __FTPSHT_H__