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.

212 lines
4.7 KiB

  1. /*++
  2. Copyright (c) 1994-2001 Microsoft Corporation
  3. Module Name :
  4. wdir.h
  5. Abstract:
  6. WWW Directory (non-virtual) Properties Page Definitions
  7. Author:
  8. Sergei Antonov (sergeia)
  9. Project:
  10. Internet Services Manager
  11. Revision History:
  12. --*/
  13. #ifndef __WDIR_H__
  14. #define __WDIR__H_
  15. class CW3DirPage : public CInetPropertyPage
  16. {
  17. DECLARE_DYNCREATE(CW3DirPage)
  18. //
  19. // Constructor/Destructor
  20. //
  21. public:
  22. CW3DirPage(CInetPropertySheet * pSheet = NULL);
  23. ~CW3DirPage();
  24. //
  25. // Dialog Data
  26. //
  27. protected:
  28. enum
  29. {
  30. RADIO_DIRECTORY,
  31. RADIO_REDIRECT,
  32. };
  33. enum
  34. {
  35. COMBO_NONE,
  36. COMBO_SCRIPT,
  37. COMBO_EXECUTE,
  38. };
  39. //{{AFX_DATA(CW3DirectoryPage)
  40. enum { IDD = IDD_WEB_DIRECTORY_PROPERTIES };
  41. // Path type
  42. int m_nPathType;
  43. CButton m_radio_Dir;
  44. CButton m_radio_Redirect;
  45. // Local path
  46. CEdit m_edit_Path;
  47. // permissions flags
  48. BOOL m_fAuthor;
  49. BOOL m_fRead;
  50. BOOL m_fWrite;
  51. BOOL m_fBrowsingAllowed;
  52. BOOL m_fLogAccess;
  53. BOOL m_fIndexed;
  54. // permission buttons
  55. CButton m_check_Author;
  56. CButton m_check_Read;
  57. CButton m_check_Write;
  58. CButton m_check_DirBrowse;
  59. CButton m_check_LogAccess;
  60. CButton m_check_Index;
  61. // Redirection
  62. CEdit m_edit_Redirect;
  63. CString m_strRedirectPath;
  64. // permissions
  65. BOOL m_fChild;
  66. BOOL m_fExact;
  67. BOOL m_fPermanent;
  68. // permission buttons
  69. CButton m_check_Child;
  70. // CStatic m_static_Path;
  71. CStatic m_static_PathPrompt;
  72. // Application config controls
  73. CButton m_button_Unload;
  74. CButton m_button_CreateRemove;
  75. CButton m_button_Configuration;
  76. CString m_strAppFriendlyName;
  77. CEdit m_edit_AppFriendlyName;
  78. CString m_strAppRoot;
  79. CString m_strAlias;
  80. int m_nPermissions;
  81. CComboBox m_combo_Permissions;
  82. CComboBox m_combo_Process;
  83. CStatic m_static_ProtectionPrompt;
  84. //}}AFX_DATA
  85. // DWORD m_dwAccessPermissions;
  86. DWORD m_dwBitRangePermissions;
  87. DWORD m_dwBitRangeDirBrowsing;
  88. DWORD m_dwAccessPerms;
  89. DWORD m_dwDirBrowsing;
  90. DWORD m_dwAppProtection;
  91. //
  92. // Overrides
  93. //
  94. protected:
  95. virtual HRESULT FetchLoadedValues();
  96. virtual HRESULT SaveInfo();
  97. //{{AFX_VIRTUAL(CW3DirPage)
  98. protected:
  99. virtual void DoDataExchange(CDataExchange * pDX);
  100. //}}AFX_VIRTUAL
  101. //
  102. // Implementation
  103. //
  104. protected:
  105. //{{AFX_MSG(CW3DirPage)
  106. afx_msg void OnChangeEditPath();
  107. afx_msg void OnCheckRead();
  108. afx_msg void OnCheckWrite();
  109. afx_msg void OnCheckAuthor();
  110. afx_msg void OnRadioDir();
  111. afx_msg void OnRadioRedirect();
  112. afx_msg void OnButtonCreateRemoveApp();
  113. afx_msg void OnButtonUnloadApp();
  114. afx_msg void OnButtonConfiguration();
  115. afx_msg void OnSelchangeComboPermissions();
  116. afx_msg void OnSelchangeComboProcess();
  117. afx_msg void OnDestroy();
  118. virtual BOOL OnInitDialog();
  119. //}}AFX_MSG
  120. afx_msg void OnItemChanged();
  121. DECLARE_MESSAGE_MAP()
  122. void ShowControl(CWnd * pWnd, BOOL fShow);
  123. void ShowControl(UINT nID, BOOL fShow);
  124. void SetStateByType();
  125. void SetPathType();
  126. void SetAuthoringState(BOOL fAlterReadAndWrite = TRUE);
  127. void RefreshAppState();
  128. void ChangeTypeTo(int nNewType);
  129. int AddStringToComboBox(CComboBox & combo, UINT nID);
  130. BOOL CheckWriteAndExecWarning();
  131. DWORD GetAppStateFromComboSelection() const;
  132. protected:
  133. //
  134. // Remember/restore settings.
  135. //
  136. void SaveAuthoringState();
  137. void RestoreAuthoringState();
  138. void SetApplicationState();
  139. CString& FriendlyAppRoot(LPCTSTR lpAppRoot, CString& strStartingPoint);
  140. private:
  141. BOOL m_fCompatibilityMode;
  142. BOOL m_fOriginalRead;
  143. BOOL m_fOriginalWrite;
  144. BOOL m_fRecordChanges;
  145. BOOL m_fAppEnabled;
  146. BOOL m_fIsAppRoot;
  147. DWORD m_dwAppState;
  148. CString m_strRemove;
  149. CString m_strCreate;
  150. CString m_strEnable;
  151. CString m_strDisable;
  152. CString m_strWebFmt;
  153. CString m_strFullMetaPath;
  154. CString m_strPrompt[2];
  155. CString m_strUserName;
  156. CStrPassword m_strPassword;
  157. CIISApplication * m_pApplication;
  158. int m_nSelInProc;
  159. int m_nSelPooledProc;
  160. int m_nSelOutOfProc;
  161. };
  162. //
  163. // Inline Expansion
  164. //
  165. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  166. inline void
  167. CW3DirPage::ShowControl(UINT nID, BOOL fShow)
  168. {
  169. ASSERT(nID > 0);
  170. ShowControl(GetDlgItem(nID), fShow);
  171. }
  172. inline int
  173. CW3DirPage::AddStringToComboBox(CComboBox & combo, UINT nID)
  174. {
  175. CString str;
  176. VERIFY(str.LoadString(nID));
  177. return combo.AddString(str);
  178. }
  179. #endif // __WFILE__H_