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.

219 lines
5.5 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1998 **/
  4. /**********************************************************************/
  5. /*
  6. repprtpp.h
  7. replication partner property page
  8. FILE HISTORY:
  9. */
  10. #if !defined(AFX_REPPRTPP_H__3D0612A2_4756_11D1_B9A5_00C04FBF914A__INCLUDED_)
  11. #define AFX_REPPRTPP_H__3D0612A2_4756_11D1_B9A5_00C04FBF914A__INCLUDED_
  12. #if _MSC_VER >= 1000
  13. #pragma once
  14. #endif // _MSC_VER >= 1000
  15. #ifndef _IPCTRL_H
  16. #include "ipctrl.h"
  17. #endif
  18. #ifndef _CONFIG_H
  19. #include "config.h"
  20. #endif
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CRepPartnerPropGen dialog
  23. class CRepPartnerPropGen : public CPropertyPageBase
  24. {
  25. DECLARE_DYNCREATE(CRepPartnerPropGen)
  26. // Construction
  27. public:
  28. CRepPartnerPropGen();
  29. ~CRepPartnerPropGen();
  30. // Dialog Data
  31. //{{AFX_DATA(CRepPartnerPropGen)
  32. enum { IDD = IDD_REP_PROP_GENERAL };
  33. CEdit m_editName;
  34. CEdit m_editIpAdd;
  35. //}}AFX_DATA
  36. CEdit m_customIPAdd;
  37. UINT m_uImage;
  38. // Overrides
  39. // ClassWizard generate virtual function overrides
  40. //{{AFX_VIRTUAL(CRepPartnerPropGen)
  41. protected:
  42. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  43. //}}AFX_VIRTUAL
  44. // Implementation
  45. protected:
  46. // Generated message map functions
  47. //{{AFX_MSG(CRepPartnerPropGen)
  48. virtual BOOL OnInitDialog();
  49. //}}AFX_MSG
  50. DECLARE_MESSAGE_MAP()
  51. private:
  52. void GetServerNameIP(CString &strName, CString& strIP) ;
  53. IPControl m_ipControl;
  54. CWinsServerObj * m_pServer;
  55. public:
  56. virtual DWORD * GetHelpMap() { return WinsGetHelpMap(CRepPartnerPropGen::IDD);};
  57. };
  58. /////////////////////////////////////////////////////////////////////////////
  59. // CRepPartnerPropAdv dialog
  60. class CRepPartnerPropAdv : public CPropertyPageBase
  61. {
  62. DECLARE_DYNCREATE(CRepPartnerPropAdv)
  63. // Construction
  64. public:
  65. CRepPartnerPropAdv();
  66. ~CRepPartnerPropAdv();
  67. // Dialog Data
  68. //{{AFX_DATA(CRepPartnerPropAdv)
  69. enum { IDD = IDD_REP_PROP_ADVANCED };
  70. CButton m_buttonPushPersistence;
  71. CButton m_buttonPullPersistence;
  72. CButton m_GroupPush;
  73. CButton m_GroupPull;
  74. CStatic m_staticUpdate;
  75. CStatic m_staticStartTime;
  76. CStatic m_staticRepTime;
  77. CSpinButtonCtrl m_spinUpdateCount;
  78. CSpinButtonCtrl m_spinStartSecond;
  79. CSpinButtonCtrl m_spinStartMinute;
  80. CSpinButtonCtrl m_spinStartHour;
  81. CSpinButtonCtrl m_spinRepMinute;
  82. CSpinButtonCtrl m_spinRepHour;
  83. CSpinButtonCtrl m_spinRepDay;
  84. CEdit m_editUpdateCount;
  85. CEdit m_editStartSecond;
  86. CEdit m_editStartMinute;
  87. CEdit m_editStartHour;
  88. CEdit m_editRepMinute;
  89. CEdit m_editRepHour;
  90. CEdit m_editRepDay;
  91. CComboBox m_comboType;
  92. CButton m_buttonPush;
  93. CButton m_buttonPull;
  94. CString m_strType;
  95. DWORD m_nUpdateCount;
  96. int m_nRepDay;
  97. int m_nRepHour;
  98. int m_nRepMinute;
  99. int m_nStartHour;
  100. int m_nStartMinute;
  101. int m_nStartSecond;
  102. //}}AFX_DATA
  103. CWinsServerObj * m_pServer;
  104. // Overrides
  105. // ClassWizard generate virtual function overrides
  106. //{{AFX_VIRTUAL(CRepPartnerPropAdv)
  107. public:
  108. virtual void OnOK();
  109. virtual BOOL OnApply();
  110. protected:
  111. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  112. //}}AFX_VIRTUAL
  113. // Implementation
  114. protected:
  115. // Generated message map functions
  116. //{{AFX_MSG(CRepPartnerPropAdv)
  117. virtual BOOL OnInitDialog();
  118. afx_msg void OnButtonPullSetDefault();
  119. afx_msg void OnButtonPushSetDefault();
  120. afx_msg void OnChangeEditRepHour();
  121. afx_msg void OnSelchangeComboType();
  122. //}}AFX_MSG
  123. DECLARE_MESSAGE_MAP()
  124. private:
  125. void FillPullParameters();
  126. void FillPushParameters();
  127. CString ToString(int nNum);
  128. void ReadFromServerPref(DWORD &dwPullTime, DWORD& dwPullSpTime, DWORD &dwUpdateCount, DWORD & dwPushPersistence, DWORD & dwPullPersistence);
  129. void UpdateRep();
  130. DWORD UpdateReg();
  131. void CalculateRepInt(DWORD& dwRepInt);
  132. void CalculateStartInt(CTime & time);
  133. int ToInt(CString strNumber);
  134. void UpdateUI();
  135. void EnablePushControls(BOOL bEnable = TRUE);
  136. void EnablePullControls(BOOL bEnable = TRUE);
  137. void SetState(CString & strType, BOOL bPush, BOOL bPull);
  138. DWORD GetConfig(CConfiguration & config);
  139. DWORD UpdatePullParameters();
  140. DWORD UpdatePushParameters();
  141. DWORD RemovePullPartner();
  142. DWORD RemovePushPartner();
  143. public:
  144. virtual DWORD * GetHelpMap() { return WinsGetHelpMap(CRepPartnerPropAdv::IDD);};
  145. };
  146. class CReplicationPartnerProperties : public CPropertyPageHolderBase
  147. {
  148. public:
  149. CReplicationPartnerProperties(ITFSNode * pNode,
  150. IComponentData * pComponentData,
  151. ITFSComponentData * pTFSCompData,
  152. LPCTSTR pszSheetName
  153. );
  154. virtual ~CReplicationPartnerProperties();
  155. ITFSComponentData * GetTFSCompData()
  156. {
  157. if (m_spTFSCompData)
  158. m_spTFSCompData->AddRef();
  159. return m_spTFSCompData;
  160. }
  161. void SetServer(CWinsServerObj * pServer)
  162. {
  163. m_Server = *pServer;
  164. }
  165. CWinsServerObj * GetServer()
  166. {
  167. return &m_Server;
  168. }
  169. public:
  170. CRepPartnerPropGen m_pageGeneral;
  171. CRepPartnerPropAdv m_pageAdvanced;
  172. CWinsServerObj m_Server; // replication partner this is for
  173. protected:
  174. SPITFSComponentData m_spTFSCompData;
  175. };
  176. //{{AFX_INSERT_LOCATION}}
  177. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  178. #endif // !defined(AFX_REPPRTPP_H__3D0612A2_4756_11D1_B9A5_00C04FBF914A__INCLUDED_)