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.

213 lines
4.7 KiB

  1. /*++
  2. Module Name:
  3. NewFrs.h
  4. Abstract:
  5. This module contains the declaration for CNewReplicaSet wizard pages.
  6. These classes implement pages in the Create Replica Set wizard.
  7. --*/
  8. #ifndef _NEWFRS_H_
  9. #define _NEWFRS_H_
  10. #include "dfscore.h"
  11. #include "QWizPage.h"
  12. #include "mmcroot.h"
  13. #include <list>
  14. using namespace std;
  15. class CAlternateReplicaInfo
  16. {
  17. public:
  18. CComBSTR m_bstrDisplayName;
  19. CComBSTR m_bstrDnsHostName;
  20. CComBSTR m_bstrRootPath;
  21. CComBSTR m_bstrStagingPath;
  22. FRSSHARE_TYPE m_nFRSShareType;
  23. HRESULT m_hrFRS;
  24. DWORD m_dwServiceStartType;
  25. DWORD m_dwServiceState;
  26. CAlternateReplicaInfo() { Reset(); }
  27. void Reset();
  28. };
  29. typedef list<CAlternateReplicaInfo *> AltRepList;
  30. void FreeAltRepList(AltRepList* pList);
  31. class CNewReplicaSet
  32. {
  33. public:
  34. CComBSTR m_bstrDomain;
  35. CComBSTR m_bstrReplicaSetDN;
  36. CComBSTR m_bstrPrimaryServer;
  37. CComBSTR m_bstrTopologyPref;
  38. CComBSTR m_bstrHubServer;
  39. CComBSTR m_bstrFileFilter;
  40. CComBSTR m_bstrDirFilter;
  41. HRESULT m_hr;
  42. AltRepList m_AltRepList;
  43. CComPtr<IReplicaSet> m_piReplicaSet;
  44. HRESULT Initialize(
  45. BSTR i_bstrDomain,
  46. BSTR i_bstrReplicaSetDN,
  47. DFS_REPLICA_LIST* i_pMmcRepList
  48. );
  49. private:
  50. BOOL _InsertList(CAlternateReplicaInfo* pInfo);
  51. void _Reset();
  52. };
  53. class CNewReplicaSetPage0:
  54. public CQWizardPageImpl<CNewReplicaSetPage0>
  55. {
  56. BEGIN_MSG_MAP(CNewReplicaSetPage0)
  57. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  58. CHAIN_MSG_MAP(CQWizardPageImpl<CNewReplicaSetPage0>)
  59. END_MSG_MAP()
  60. public:
  61. enum { IDD = IDD_NEWFRSWIZ_PAGE0 };
  62. CNewReplicaSetPage0();
  63. ~CNewReplicaSetPage0();
  64. BOOL OnSetActive();
  65. LRESULT OnInitDialog(
  66. IN UINT i_uMsg,
  67. IN WPARAM i_wParam,
  68. IN LPARAM i_lParam,
  69. IN OUT BOOL& io_bHandled
  70. );
  71. private:
  72. HFONT m_hBigBoldFont;
  73. };
  74. class CNewReplicaSetPage1:
  75. public CQWizardPageImpl<CNewReplicaSetPage1>
  76. {
  77. BEGIN_MSG_MAP(CNewReplicaSetPage1)
  78. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  79. MESSAGE_HANDLER(WM_NOTIFY, OnNotify)
  80. CHAIN_MSG_MAP(CQWizardPageImpl<CNewReplicaSetPage1>)
  81. END_MSG_MAP()
  82. public:
  83. enum { IDD = IDD_NEWFRSWIZ_PAGE1 };
  84. CNewReplicaSetPage1(CNewReplicaSet* i_pRepSet);
  85. BOOL OnSetActive();
  86. BOOL OnWizardBack();
  87. BOOL OnWizardNext();
  88. LRESULT OnInitDialog(
  89. IN UINT i_uMsg,
  90. IN WPARAM i_wParam,
  91. IN LPARAM i_lParam,
  92. IN OUT BOOL& io_bHandled
  93. );
  94. LRESULT OnNotify(
  95. IN UINT i_uMsg,
  96. IN WPARAM i_wParam,
  97. IN LPARAM i_lParam,
  98. IN OUT BOOL& io_bHandled
  99. );
  100. BOOL OnItemChanged(int i_iItem);
  101. private:
  102. void _Reset();
  103. CNewReplicaSet* m_pRepSet;
  104. int m_nCount; // number of eligible members
  105. };
  106. class CNewReplicaSetPage2:
  107. public CQWizardPageImpl<CNewReplicaSetPage2>
  108. {
  109. BEGIN_MSG_MAP(CNewReplicaSetPage2)
  110. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  111. COMMAND_ID_HANDLER(IDC_NEWFRSWIZ_TOPOLOGYPREF, OnTopologyPref)
  112. CHAIN_MSG_MAP(CQWizardPageImpl<CNewReplicaSetPage2>)
  113. END_MSG_MAP()
  114. public:
  115. enum { IDD = IDD_NEWFRSWIZ_PAGE2 };
  116. CNewReplicaSetPage2(CNewReplicaSet* i_pRepSet, BOOL i_bNewSchema);
  117. BOOL OnSetActive();
  118. BOOL OnWizardBack();
  119. BOOL OnWizardFinish();
  120. LRESULT OnInitDialog(
  121. IN UINT i_uMsg,
  122. IN WPARAM i_wParam,
  123. IN LPARAM i_lParam,
  124. IN OUT BOOL& io_bHandled
  125. );
  126. BOOL OnTopologyPref(
  127. IN WORD wNotifyCode,
  128. IN WORD wID,
  129. IN HWND hWndCtl,
  130. IN BOOL& bHandled
  131. );
  132. private:
  133. void _Reset();
  134. HRESULT _CreateReplicaSet();
  135. CNewReplicaSet* m_pRepSet;
  136. BOOL m_bNewSchema;
  137. };
  138. /*
  139. class CNewReplicaSetPage3:
  140. public CQWizardPageImpl<CNewReplicaSetPage3>
  141. {
  142. BEGIN_MSG_MAP(CNewReplicaSetPage3)
  143. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  144. CHAIN_MSG_MAP(CQWizardPageImpl<CNewReplicaSetPage3>)
  145. END_MSG_MAP()
  146. public:
  147. enum { IDD = IDD_NEWFRSWIZ_PAGE3 };
  148. CNewReplicaSetPage3(CNewReplicaSet* i_pRepSet);
  149. BOOL OnSetActive();
  150. BOOL OnWizardBack();
  151. BOOL OnWizardFinish();
  152. LRESULT OnInitDialog(
  153. IN UINT i_uMsg,
  154. IN WPARAM i_wParam,
  155. IN LPARAM i_lParam,
  156. IN OUT BOOL& io_bHandled
  157. );
  158. private:
  159. void _Reset();
  160. HRESULT _CreateReplicaSet();
  161. CNewReplicaSet* m_pRepSet;
  162. };
  163. */
  164. #endif // _NEWFRS_H_