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.

295 lines
6.3 KiB

  1. /*++
  2. Copyright (c) 1994-1998 Microsoft Corporation
  3. Module Name :
  4. vdir.h
  5. Abstract:
  6. WWW Directory Properties Page Definitions
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Project:
  10. Internet Services Manager
  11. Revision History:
  12. --*/
  13. #ifndef __WVDIR_H__
  14. #define __WVDIR__H_
  15. //{{AFX_INCLUDES()
  16. //#include "apps.h"
  17. //}}AFX_INCLUDES
  18. class CW3DirectoryPage : public CInetPropertyPage
  19. /*++
  20. Class Description:
  21. WWW Virtual Directory Page.
  22. Public Interface:
  23. CW3DirectoryPage : Constructor
  24. ~CW3DirectoryPage : Destructor
  25. --*/
  26. {
  27. DECLARE_DYNCREATE(CW3DirectoryPage)
  28. //
  29. // Constructor/Destructor
  30. //
  31. public:
  32. CW3DirectoryPage(
  33. IN CInetPropertySheet * pSheet = NULL,
  34. IN BOOL fHome = FALSE,
  35. IN DWORD dwAttributes = FILE_ATTRIBUTE_VIRTUAL_DIRECTORY
  36. );
  37. ~CW3DirectoryPage();
  38. int BrowseForFolderCallback(HWND hwnd, UINT uMsg, LPARAM lParam);
  39. //
  40. // Dialog Data
  41. //
  42. protected:
  43. enum
  44. {
  45. RADIO_DIRECTORY,
  46. RADIO_NETDIRECTORY,
  47. RADIO_REDIRECT,
  48. };
  49. enum
  50. {
  51. COMBO_NONE,
  52. COMBO_SCRIPT,
  53. COMBO_EXECUTE,
  54. };
  55. //{{AFX_DATA(CW3DirectoryPage)
  56. enum { IDD = IDD_WEB_DIRECTORY_PROPERTIES };
  57. CStatic m_static_ProtectionPrompt;
  58. CStatic m_static_PermissionsPrompt;
  59. int m_nPathType;
  60. int m_nPermissions;
  61. BOOL m_fBrowsingAllowed;
  62. BOOL m_fRead;
  63. BOOL m_fWrite;
  64. BOOL m_fAuthor;
  65. BOOL m_fLogAccess;
  66. BOOL m_fIndexed;
  67. BOOL m_fChild;
  68. BOOL m_fExact;
  69. BOOL m_fPermanent;
  70. CString m_strPath;
  71. CString m_strRedirectPath;
  72. CString m_strAppFriendlyName;
  73. CEdit m_edit_Footer;
  74. CEdit m_edit_Path;
  75. CEdit m_edit_Redirect;
  76. CEdit m_edit_AppFriendlyName;
  77. CStatic m_static_AppPrompt;
  78. CStatic m_static_Path;
  79. CStatic m_static_PathPrompt;
  80. CStatic m_static_AliasPrompt;
  81. CStatic m_static_Alias;
  82. CStatic m_static_StartingPoint;
  83. CButton m_button_Unload;
  84. CButton m_button_CreateRemove;
  85. CButton m_button_Browse;
  86. CButton m_button_ConnectAs;
  87. CButton m_button_Configuration;
  88. CButton m_radio_Dir;
  89. CButton m_check_Author;
  90. CButton m_check_Child;
  91. CButton m_check_DirBrowse;
  92. CButton m_check_Index;
  93. CButton m_check_Write;
  94. CButton m_check_Read;
  95. CComboBox m_combo_Permissions;
  96. CComboBox m_combo_Process;
  97. //}}AFX_DATA
  98. BOOL m_fOriginallyUNC;
  99. BOOL m_fLoaded;
  100. DWORD m_dwAppState;
  101. DWORD m_dwAppProtection;
  102. DWORD m_dwAccessPermissions;
  103. DWORD m_dwDirBrowsing;
  104. DWORD m_dwBitRangePermissions;
  105. DWORD m_dwAccessPerms;
  106. DWORD m_dwBitRangeDirBrowsing;
  107. CString m_strAlias;
  108. CString m_strAppRoot;
  109. CButton m_radio_Unc;
  110. CButton m_radio_Redirect;
  111. //
  112. // Overrides
  113. //
  114. protected:
  115. virtual HRESULT FetchLoadedValues();
  116. virtual HRESULT SaveInfo();
  117. //{{AFX_VIRTUAL(CW3DirectoryPage)
  118. public:
  119. virtual BOOL OnSetActive();
  120. protected:
  121. virtual void DoDataExchange(CDataExchange * pDX);
  122. //}}AFX_VIRTUAL
  123. //
  124. // Implementation
  125. //
  126. protected:
  127. //{{AFX_MSG(CW3DirectoryPage)
  128. afx_msg void OnButtonBrowse();
  129. afx_msg void OnButtonConnectAs();
  130. afx_msg void OnButtonCreateRemoveApp();
  131. afx_msg void OnButtonUnloadApp();
  132. afx_msg void OnButtonConfiguration();
  133. afx_msg void OnChangeEditPath();
  134. afx_msg void OnCheckRead();
  135. afx_msg void OnCheckWrite();
  136. afx_msg void OnCheckAuthor();
  137. afx_msg void OnRadioDir();
  138. afx_msg void OnRadioRedirect();
  139. afx_msg void OnRadioUnc();
  140. afx_msg void OnSelchangeComboPermissions();
  141. afx_msg void OnSelchangeComboProcess();
  142. afx_msg void OnDestroy();
  143. virtual BOOL OnInitDialog();
  144. //}}AFX_MSG
  145. afx_msg void OnItemChanged();
  146. DECLARE_MESSAGE_MAP()
  147. void ShowControl(
  148. IN CWnd * pWnd,
  149. IN BOOL fShow
  150. );
  151. void ShowControl(
  152. IN UINT nID,
  153. IN BOOL fShow
  154. );
  155. int AddStringToComboBox(
  156. IN CComboBox & combo,
  157. IN UINT nID
  158. );
  159. int SetComboSelectionFromAppState(DWORD dwAppState);
  160. DWORD GetAppStateFromComboSelection() const;
  161. BOOL ShowProcOptionsForThisAppState(
  162. IN DWORD dwAppProtection
  163. ) const;
  164. void SetStateByType();
  165. void SetPathType();
  166. void SetPathType(LPCTSTR lpstrPath);
  167. void SetApplicationState();
  168. void SetState();
  169. void SetAuthoringState(BOOL fAlterReadAndWrite = TRUE);
  170. void RefreshAppState();
  171. void ChangeTypeTo(int nNewType);
  172. BOOL BrowseUser();
  173. BOOL CheckWriteAndExecWarning();
  174. LPCTSTR QueryMetaPath();
  175. CString & FriendlyAppRoot(
  176. IN LPCTSTR lpAppRoot,
  177. OUT CString & strStartingPoint
  178. );
  179. BOOL IsHome() const { return m_fHome; }
  180. //
  181. // Sheet Data Access
  182. //
  183. protected:
  184. BOOL IsVroot() const { return IS_VROOT(m_dwAttributes); }
  185. BOOL IsDir() const { return IS_DIR(m_dwAttributes); }
  186. BOOL IsFile() const { return IS_FILE(m_dwAttributes); }
  187. protected:
  188. //
  189. // Remember/restore settings.
  190. //
  191. void SaveAuthoringState();
  192. void RestoreAuthoringState();
  193. private:
  194. int m_nSelInProc;
  195. int m_nSelPooledProc;
  196. int m_nSelOutOfProc;
  197. BOOL m_fHome;
  198. BOOL m_fRecordChanges;
  199. BOOL m_fAppEnabled;
  200. BOOL m_fIsAppRoot;
  201. BOOL m_fParentEnabled;
  202. BOOL m_fOriginalBrowsingAllowed;
  203. BOOL m_fOriginalRead;
  204. BOOL m_fOriginalWrite;
  205. BOOL m_fCompatibilityMode;
  206. DWORD m_dwAttributes;
  207. CString m_strMetaRoot;
  208. CString m_strOldPath;
  209. CString m_strUserName;
  210. CString m_strPassword;
  211. CString m_strRemove;
  212. CString m_strCreate;
  213. CString m_strEnable;
  214. CString m_strDisable;
  215. CString m_strWebFmt;
  216. CString m_strPrompt[3];
  217. CIISApplication * m_pApplication;
  218. LPTSTR m_pPathTemp;
  219. CString m_strBrowseTitle;
  220. };
  221. //
  222. // Inline Expansion
  223. //
  224. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  225. inline void CW3DirectoryPage::ShowControl(
  226. IN UINT nID,
  227. IN BOOL fShow
  228. )
  229. {
  230. ASSERT(nID > 0);
  231. ShowControl(GetDlgItem(nID), fShow);
  232. }
  233. inline LPCTSTR CW3DirectoryPage::QueryMetaPath()
  234. {
  235. return ((CW3Sheet *)GetSheet())->GetDirectoryProperties().QueryMetaRoot();
  236. }
  237. inline BOOL CW3DirectoryPage::ShowProcOptionsForThisAppState(
  238. IN DWORD dwAppProtection
  239. ) const
  240. {
  241. return dwAppProtection == CWamInterface::APP_OUTOFPROC
  242. || IsMasterInstance();
  243. }
  244. #endif // __WVDIR__H_