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.

193 lines
4.7 KiB

  1. /*++
  2. Copyright (c) 1994-1999 Microsoft Corporation
  3. Module Name :
  4. machsht.h
  5. Abstract:
  6. IIS Machine Property sheet definitions
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Project:
  10. Internet Services Manager (cluster edition)
  11. Revision History:
  12. --*/
  13. #ifndef __MACHSHT_H__
  14. #define __MACHSHT_H__
  15. #include "shts.h"
  16. #define BEGIN_META_MACHINE_READ(sheet)\
  17. { \
  18. sheet * pSheet = (sheet *)GetSheet(); \
  19. do \
  20. { \
  21. if (FAILED(pSheet->QueryMachineResult())) \
  22. { \
  23. break; \
  24. }
  25. #define FETCH_MACHINE_DATA_FROM_SHEET(value)\
  26. value = pSheet->GetMachineProperties().value; \
  27. TRACEEOLID(value);
  28. #define END_META_MACHINE_READ(err)\
  29. \
  30. } \
  31. while(FALSE); \
  32. }
  33. #define BEGIN_META_MACHINE_WRITE(sheet)\
  34. { \
  35. sheet * pSheet = (sheet *)GetSheet(); \
  36. \
  37. do \
  38. { \
  39. #define STORE_MACHINE_DATA_ON_SHEET(value)\
  40. pSheet->GetMachineProperties().value = value;
  41. #define STORE_MACHINE_DATA_ON_SHEET_REMEMBER(value, dirty)\
  42. pSheet->GetMachineProperties().value = value; \
  43. dirty = MP_D(pSheet->GetMachineProperties().value);
  44. #define END_META_MACHINE_WRITE(err)\
  45. \
  46. } \
  47. while(FALSE); \
  48. \
  49. err = pSheet->GetMachineProperties().WriteDirtyProps(); \
  50. }
  51. class CIISMachineSheet : public CInetPropertySheet
  52. /*++
  53. Class Description:
  54. IIS Machine Property sheet
  55. Public Interface:
  56. CFtpSheet : Constructor
  57. Initialize : Initialize config data
  58. --*/
  59. {
  60. public:
  61. //
  62. // Constructor
  63. //
  64. CIISMachineSheet(
  65. IN CComAuthInfo * pAuthInfo,
  66. IN LPCTSTR lpszMetaPath,
  67. IN CWnd * pParentWnd = NULL,
  68. IN LPARAM lParam = 0L,
  69. IN LPARAM lParamParent = 0L,
  70. IN UINT iSelectPage = 0
  71. );
  72. ~CIISMachineSheet();
  73. public:
  74. HRESULT QueryMachineResult() const;
  75. CMachineProps & GetMachineProperties() { return *m_ppropMachine; }
  76. virtual HRESULT LoadConfigurationParameters();
  77. virtual void FreeConfigurationParameters();
  78. //{{AFX_MSG(CIISMachineSheet)
  79. //}}AFX_MSG
  80. DECLARE_MESSAGE_MAP()
  81. private:
  82. CMachineProps * m_ppropMachine;
  83. };
  84. class CIISMachinePage : public CInetPropertyPage
  85. /*++
  86. Class Description:
  87. Machine properties page
  88. --*/
  89. {
  90. DECLARE_DYNCREATE(CIISMachinePage)
  91. //
  92. // Construction
  93. //
  94. public:
  95. CIISMachinePage(CIISMachineSheet * pSheet = NULL);
  96. ~CIISMachinePage();
  97. //
  98. // Dialog Data
  99. //
  100. protected:
  101. //{{AFX_DATA(CIISMachinePage)
  102. enum { IDD = IDD_IIS_MACHINE };
  103. BOOL m_fEnableMetabaseEdit;
  104. CButton m_EnableMetabaseEdit;
  105. BOOL m_fUTF8Web;
  106. CButton m_UTF8Web;
  107. CButton m_button_FileTypes;
  108. //}}AFX_DATA
  109. BOOL m_fUTF8Web_Init;
  110. //
  111. // Overrides
  112. //
  113. protected:
  114. virtual HRESULT FetchLoadedValues();
  115. virtual HRESULT SaveInfo();
  116. //{{AFX_VIRTUAL(CIISMachinePage)
  117. protected:
  118. virtual void DoDataExchange(CDataExchange * pDX);
  119. //}}AFX_VIRTUAL
  120. //
  121. // Implementation
  122. //
  123. protected:
  124. //{{AFX_MSG(CIISMachinePage)
  125. virtual BOOL OnInitDialog();
  126. afx_msg void OnCheckEnableEdit();
  127. afx_msg void OnCheckUTF8();
  128. afx_msg void OnButtonFileTypes();
  129. //}}AFX_MSG
  130. DECLARE_MESSAGE_MAP()
  131. private:
  132. CStringListEx m_strlMimeTypes;
  133. CMimeTypes * m_ppropMimeTypes;
  134. };
  135. inline HRESULT CIISMachineSheet::QueryMachineResult() const
  136. {
  137. return m_ppropMachine ? m_ppropMachine->QueryResult() : E_POINTER;
  138. }
  139. #endif // __MACHSHT_H__