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.

167 lines
6.0 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1996-2000 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // Cluster.h
  7. //
  8. // Abstract:
  9. // Definition of the CCluster class.
  10. //
  11. // Author:
  12. // David Potter (davidp) May 13, 1996
  13. //
  14. // Revision History:
  15. //
  16. // Notes:
  17. //
  18. /////////////////////////////////////////////////////////////////////////////
  19. #ifndef _CLUSTER_H_
  20. #define _CLUSTER_H_
  21. /////////////////////////////////////////////////////////////////////////////
  22. // Include Files
  23. /////////////////////////////////////////////////////////////////////////////
  24. #ifndef _TREEITEM_
  25. #include "ClusItem.h" // for CClusterItem
  26. #endif
  27. #ifndef _PROPLIST_H_
  28. #include "PropList.h" // for CObjectProperty, CClusPropList
  29. #endif
  30. /////////////////////////////////////////////////////////////////////////////
  31. // Forward Class Declarations
  32. /////////////////////////////////////////////////////////////////////////////
  33. class CCluster;
  34. /////////////////////////////////////////////////////////////////////////////
  35. // External Class Declarations
  36. /////////////////////////////////////////////////////////////////////////////
  37. class CResource;
  38. class CNetworkList;
  39. /////////////////////////////////////////////////////////////////////////////
  40. // CCluster command target
  41. /////////////////////////////////////////////////////////////////////////////
  42. class CCluster : public CClusterItem
  43. {
  44. DECLARE_DYNCREATE(CCluster)
  45. CCluster(void); // protected constructor used by dynamic creation
  46. void Init(
  47. IN OUT CClusterDoc * pdoc,
  48. IN LPCTSTR lpszName,
  49. IN HCLUSTER hOpenedCluster = NULL
  50. );
  51. // Attributes
  52. protected:
  53. CLUSTERVERSIONINFO m_cvi;
  54. CString m_strFQDN;
  55. CString m_strQuorumResource;
  56. CString m_strQuorumPath;
  57. DWORD m_nMaxQuorumLogSize;
  58. DWORD m_nDefaultNetworkRole;
  59. DWORD m_nQuorumArbitrationTimeMax;
  60. DWORD m_nQuorumArbitrationTimeMin;
  61. BOOL m_bEnableEventLogReplication;
  62. CStringList m_lstrClusterExtensions;
  63. CStringList m_lstrNodeExtensions;
  64. CStringList m_lstrGroupExtensions;
  65. CStringList m_lstrResourceExtensions;
  66. CStringList m_lstrResTypeExtensions;
  67. CStringList m_lstrNetworkExtensions;
  68. CStringList m_lstrNetInterfaceExtensions;
  69. CNetworkList * m_plpciNetworkPriority;
  70. enum
  71. {
  72. epropDefaultNetworkRole = 0,
  73. epropDescription,
  74. epropEnableEventLogReplication,
  75. epropQuorumArbitrationTimeMax,
  76. epropQuorumArbitrationTimeMin,
  77. epropMAX
  78. };
  79. CObjectProperty m_rgProps[epropMAX];
  80. public:
  81. virtual const CStringList * PlstrExtensions(void) const;
  82. const CLUSTERVERSIONINFO & Cvi(void) const { return m_cvi; }
  83. const CString & StrFQDN(void) const { return m_strFQDN; }
  84. const CString & StrQuorumResource(void) const { return m_strQuorumResource; }
  85. const CString & StrQuorumPath(void) const { return m_strQuorumPath; }
  86. DWORD NMaxQuorumLogSize(void) const { return m_nMaxQuorumLogSize; }
  87. const CStringList & LstrClusterExtensions(void) const { return m_lstrClusterExtensions; }
  88. const CStringList & LstrNodeExtensions(void) const { return m_lstrNodeExtensions; }
  89. const CStringList & LstrGroupExtensions(void) const { return m_lstrGroupExtensions; }
  90. const CStringList & LstrResourceExtensions(void) const { return m_lstrResourceExtensions; }
  91. const CStringList & LstrResTypeExtensions(void) const { return m_lstrResTypeExtensions; }
  92. const CStringList & LstrNetworkExtensions(void) const { return m_lstrNetworkExtensions; }
  93. const CStringList & LstrNetInterfaceExtensions(void) const { return m_lstrNetInterfaceExtensions; }
  94. const CNetworkList & LpciNetworkPriority(void) const { ASSERT(m_plpciNetworkPriority != NULL); return *m_plpciNetworkPriority; }
  95. // Operations
  96. public:
  97. void SetName(IN LPCTSTR pszName);
  98. void SetDescription(IN LPCTSTR pszDesc);
  99. void SetQuorumResource(
  100. IN LPCTSTR pszResource,
  101. IN LPCTSTR pszQuorumPath,
  102. IN DWORD nMaxLogSize
  103. );
  104. void SetNetworkPriority(IN const CNetworkList & rlpci);
  105. void CollectNetworkPriority(IN OUT CNetworkList * plpci);
  106. void ReadClusterInfo(void);
  107. void ReadClusterExtensions(void);
  108. void ReadNodeExtensions(void);
  109. void ReadGroupExtensions(void);
  110. void ReadResourceExtensions(void);
  111. void ReadResTypeExtensions(void);
  112. void ReadNetworkExtensions(void);
  113. void ReadNetInterfaceExtensions(void);
  114. // Overrides
  115. virtual void Cleanup(void);
  116. virtual void ReadItem(void);
  117. virtual void UpdateState(void);
  118. virtual void Rename(IN LPCTSTR pszName);
  119. virtual BOOL BCanBeEdited(void) const { return TRUE; }
  120. virtual void OnBeginLabelEdit(IN OUT CEdit * pedit);
  121. virtual BOOL BDisplayProperties(IN BOOL bReadOnly = FALSE);
  122. virtual BOOL BIsLabelEditValueValid(IN LPCTSTR pszName);
  123. // ClassWizard generated virtual function overrides
  124. //{{AFX_VIRTUAL(CCluster)
  125. //}}AFX_VIRTUAL
  126. // Implementation
  127. public:
  128. virtual ~CCluster(void);
  129. protected:
  130. // Generated message map functions
  131. //{{AFX_MSG(CCluster)
  132. afx_msg void OnUpdateProperties(CCmdUI* pCmdUI);
  133. //}}AFX_MSG
  134. DECLARE_MESSAGE_MAP()
  135. }; //*** class CCluster
  136. /////////////////////////////////////////////////////////////////////////////
  137. #endif // _CLUSTER_H_