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.

150 lines
4.4 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // CEnumClusCfgManagedResources.h
  7. //
  8. // Description:
  9. // This file contains the declaration of the CEnumClusCfgManagedResources
  10. // class.
  11. //
  12. // The class CEnumClusCfgManagedResources is the enumeration of cluster
  13. // managed devices. It implements the IEnumClusCfgManagedResources
  14. // interface.
  15. //
  16. // Documentation:
  17. //
  18. // Implementation Files:
  19. // CEnumClusCfgManagedResources.cpp
  20. //
  21. // Maintained By:
  22. // Galen Barbee (GalenB) 23-FEB-2000
  23. //
  24. //////////////////////////////////////////////////////////////////////////////
  25. // Make sure that this file is included only once per compile path.
  26. #pragma once
  27. //////////////////////////////////////////////////////////////////////////////
  28. // Include Files
  29. //////////////////////////////////////////////////////////////////////////////
  30. #include "PrivateInterfaces.h"
  31. //////////////////////////////////////////////////////////////////////////////
  32. // Constant Declarations
  33. //////////////////////////////////////////////////////////////////////////////
  34. //////////////////////////////////////////////////////////////////////////////
  35. //++
  36. //
  37. // class CEnumClusCfgManagedResources
  38. //
  39. // Description:
  40. // The class CEnumClusCfgManagedResources is the enumeration of
  41. // cluster managed devices.
  42. //
  43. // Interfaces:
  44. // IEnumClusCfgManagedResources
  45. // IClusCfgWbemServices
  46. // IClusCfgInitialize
  47. //
  48. //--
  49. //////////////////////////////////////////////////////////////////////////////
  50. class CEnumClusCfgManagedResources
  51. : public IEnumClusCfgManagedResources
  52. , public IClusCfgWbemServices
  53. , public IClusCfgInitialize
  54. {
  55. private:
  56. //
  57. // Private member functions and data
  58. //
  59. LONG m_cRef;
  60. LCID m_lcid;
  61. IClusCfgCallback * m_picccCallback;
  62. IWbemServices * m_pIWbemServices;
  63. IUnknown * ((*m_rgpProviders)[]);
  64. BOOL m_fLoadedDevices:1;
  65. ULONG m_idxNextProvider;
  66. ULONG m_idxCurrentProvider;
  67. DWORD m_cTotalResources;
  68. BSTR m_bstrNodeName;
  69. // Private constructors and destructors
  70. CEnumClusCfgManagedResources( void );
  71. ~CEnumClusCfgManagedResources( void );
  72. // Private copy constructor to prevent copying.
  73. CEnumClusCfgManagedResources( const CEnumClusCfgManagedResources & nodeSrc );
  74. // Private assignment operator to prevent copying.
  75. const CEnumClusCfgManagedResources & operator = ( const CEnumClusCfgManagedResources & nodeSrc );
  76. HRESULT HrInit( void );
  77. HRESULT HrLoadEnum( void );
  78. HRESULT HrDoNext( ULONG cNumberRequestedIn, IClusCfgManagedResourceInfo ** rgpManagedResourceInfoOut, ULONG * pcNumberFetchedOut );
  79. HRESULT HrAddToProvidersArray( IUnknown * punkIn );
  80. HRESULT HrDoSkip( ULONG cNumberToSkipIn );
  81. HRESULT HrDoReset( void );
  82. HRESULT HrDoClone( IEnumClusCfgManagedResources ** ppEnumClusCfgManagedResourcesOut );
  83. HRESULT HrLoadUnknownQuorumProvider( void );
  84. HRESULT HrIsClusterServiceRunning( void );
  85. HRESULT HrIsThereAQuorumDevice( void );
  86. HRESULT HrInitializeAndSaveProvider( IUnknown * punkIn );
  87. HRESULT HrGetQuorumResourceName( BSTR * pbstrQuorumResourceNameOut , BOOL * pfQuormIsOwnedByThisNodeOut );
  88. public:
  89. //
  90. // Public, non interface methods.
  91. //
  92. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  93. //
  94. // IUnknown Interfaces
  95. //
  96. STDMETHOD( QueryInterface )( REFIID riid, void ** ppvObject );
  97. STDMETHOD_( ULONG, AddRef )( void );
  98. STDMETHOD_( ULONG, Release )( void );
  99. //
  100. // IClusCfgWbemServices Interfaces
  101. //
  102. STDMETHOD( SetWbemServices )( IWbemServices * pIWbemServicesIn );
  103. //
  104. // IClusCfgInitialize Interfaces
  105. //
  106. // Register callbacks, locale id, etc.
  107. STDMETHOD( Initialize )( IUnknown * punkCallbackIn, LCID lcidIn );
  108. //
  109. // IEnumClusCfgManagedResources Interfaces
  110. //
  111. STDMETHOD( Next )( ULONG cNumberRequestedIn, IClusCfgManagedResourceInfo ** rgpManagedResourceInfoOut, ULONG * pcNumberFetchedOut );
  112. STDMETHOD( Skip )( ULONG cNumberToSkipIn );
  113. STDMETHOD( Reset )( void );
  114. STDMETHOD( Clone )( IEnumClusCfgManagedResources ** ppEnumClusCfgManagedResourcesOut );
  115. STDMETHOD( Count )( DWORD * pnCountOut );
  116. }; //*** Class CEnumClusCfgManagedResources