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 __VDIR_H__
  14. #define __VDIR__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. //
  39. // Dialog Data
  40. //
  41. protected:
  42. enum
  43. {
  44. RADIO_DIRECTORY,
  45. RADIO_NETDIRECTORY,
  46. RADIO_REDIRECT,
  47. };
  48. enum
  49. {
  50. COMBO_NONE,
  51. COMBO_SCRIPT,
  52. COMBO_EXECUTE,
  53. };
  54. //{{AFX_DATA(CW3DirectoryPage)
  55. enum { IDD = IDD_DIRECTORY_PROPERTIES };
  56. CStatic m_static_ProtectionPrompt;
  57. CStatic m_static_PermissionsPrompt;
  58. int m_nPathType;
  59. int m_nPermissions;
  60. BOOL m_fBrowsingAllowed;
  61. BOOL m_fRead;
  62. BOOL m_fWrite;
  63. BOOL m_fAuthor;
  64. BOOL m_fLogAccess;
  65. BOOL m_fIndexed;
  66. BOOL m_fChild;
  67. BOOL m_fExact;
  68. BOOL m_fPermanent;
  69. CString m_strDisplayAlias;
  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_DisplayAlias;
  76. CEdit m_edit_Redirect;
  77. CEdit m_edit_AppFriendlyName;
  78. CStatic m_static_AppPrompt;
  79. CStatic m_static_Path;
  80. CStatic m_static_PathPrompt;
  81. CStatic m_static_AliasPrompt;
  82. CStatic m_static_Alias;
  83. CStatic m_static_StartingPoint;
  84. CButton m_button_Unload;
  85. CButton m_button_CreateRemove;
  86. CButton m_button_Browse;
  87. CButton m_button_ConnectAs;
  88. CButton m_button_Configuration;
  89. CButton m_radio_Dir;
  90. CButton m_check_Author;
  91. CButton m_check_Child;
  92. CButton m_check_DirBrowse;
  93. CButton m_check_Index;
  94. CButton m_check_Write;
  95. CButton m_check_Read;
  96. CComboBox m_combo_Permissions;
  97. CComboBox m_combo_Process;
  98. //}}AFX_DATA
  99. BOOL m_fOriginallyUNC;
  100. BOOL m_fLoaded;
  101. DWORD m_dwAppState;
  102. DWORD m_dwAppProtection;
  103. DWORD m_dwAccessPermissions;
  104. DWORD m_dwDirBrowsing;
  105. DWORD m_dwBitRangePermissions;
  106. DWORD m_dwAccessPerms;
  107. DWORD m_dwBitRangeDirBrowsing;
  108. CString m_strAlias;
  109. CString m_strAppRoot;
  110. CButton m_radio_Unc;
  111. CButton m_radio_Redirect;
  112. //
  113. // Overrides
  114. //
  115. protected:
  116. virtual HRESULT FetchLoadedValues();
  117. virtual HRESULT SaveInfo();
  118. //{{AFX_VIRTUAL(CW3DirectoryPage)
  119. public:
  120. virtual BOOL OnSetActive();
  121. protected:
  122. virtual void DoDataExchange(CDataExchange * pDX);
  123. //}}AFX_VIRTUAL
  124. //
  125. // Implementation
  126. //
  127. protected:
  128. //{{AFX_MSG(CW3DirectoryPage)
  129. afx_msg void OnButtonBrowse();
  130. afx_msg void OnButtonConnectAs();
  131. afx_msg void OnButtonCreateRemoveApp();
  132. afx_msg void OnButtonUnloadApp();
  133. afx_msg void OnButtonConfiguration();
  134. afx_msg void OnChangeEditPath();
  135. afx_msg void OnCheckRead();
  136. afx_msg void OnCheckWrite();
  137. afx_msg void OnCheckAuthor();
  138. afx_msg void OnRadioDir();
  139. afx_msg void OnRadioRedirect();
  140. afx_msg void OnRadioUnc();
  141. afx_msg void OnSelchangeComboPermissions();
  142. afx_msg void OnSelchangeComboProcess();
  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 MakeDisplayAlias();
  172. void ChangeTypeTo(int nNewType);
  173. BOOL BrowseUser();
  174. BOOL CheckWriteAndExecWarning();
  175. LPCTSTR QueryMetaPath();
  176. CString & FriendlyAppRoot(
  177. IN LPCTSTR lpAppRoot,
  178. OUT CString & strStartingPoint
  179. );
  180. BOOL IsHome() const { return m_fHome; }
  181. //
  182. // Sheet Data Access
  183. //
  184. protected:
  185. BOOL IsVroot() const { return IS_VROOT(m_dwAttributes); }
  186. BOOL IsDir() const { return IS_DIR(m_dwAttributes); }
  187. BOOL IsFile() const { return IS_FILE(m_dwAttributes); }
  188. protected:
  189. //
  190. // Remember/restore settings.
  191. //
  192. void SaveAuthoringState();
  193. void RestoreAuthoringState();
  194. private:
  195. int m_nSelInProc;
  196. int m_nSelPooledProc;
  197. int m_nSelOutOfProc;
  198. BOOL m_fHome;
  199. BOOL m_fRecordChanges;
  200. BOOL m_fAppEnabled;
  201. BOOL m_fIsAppRoot;
  202. BOOL m_fParentEnabled;
  203. BOOL m_fOriginalBrowsingAllowed;
  204. BOOL m_fOriginalRead;
  205. BOOL m_fOriginalWrite;
  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_strWebMaster;
  217. CString m_strPrompt[3];
  218. CIISApplication * m_pApplication;
  219. };
  220. //
  221. // Inline Expansion
  222. //
  223. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  224. inline void CW3DirectoryPage::ShowControl(
  225. IN UINT nID,
  226. IN BOOL fShow
  227. )
  228. {
  229. ASSERT(nID > 0);
  230. ShowControl(GetDlgItem(nID), fShow);
  231. }
  232. inline LPCTSTR CW3DirectoryPage::QueryMetaPath()
  233. {
  234. return ((CW3Sheet *)GetSheet())->GetDirectoryProperties().QueryMetaRoot();
  235. }
  236. inline BOOL CW3DirectoryPage::ShowProcOptionsForThisAppState(
  237. IN DWORD dwAppProtection
  238. ) const
  239. {
  240. return dwAppProtection == CWamInterface::APP_OUTOFPROC
  241. || IsMasterInstance();
  242. }
  243. #endif // __VDIR__H_