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.

104 lines
3.8 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // CEnumCfgResources.h
  7. //
  8. // Description:
  9. // This file contains the declaration of the CEnumCfgResources
  10. // class.
  11. //
  12. // The class CEnumCfgResources is the enumeration of
  13. // cluster networks. It implements the IEnumClusCfgNetworks interface.
  14. //
  15. // Documentation:
  16. //
  17. // Implementation Files:
  18. // CEnumCfgResources.cpp
  19. //
  20. // Maintained By:
  21. // Galen Barbee (GalenB) 02-AUG-2000
  22. //
  23. //////////////////////////////////////////////////////////////////////////////
  24. // Make sure that this file is included only once per compile path.
  25. #pragma once
  26. //////////////////////////////////////////////////////////////////////////////
  27. //++
  28. //
  29. // class CEnumCfgResources
  30. //
  31. // Description:
  32. // The class CEnumCfgResources is the enumeration of cluster resoruces.
  33. //
  34. // Interfaces:
  35. // CBaseEnum
  36. // IEnumClusCfgManagedResources
  37. // IClusCfgSetHandle
  38. // IClusCfgInitialize
  39. //
  40. //--
  41. //////////////////////////////////////////////////////////////////////////////
  42. class CEnumCfgResources
  43. : public IEnumClusCfgManagedResources
  44. {
  45. private:
  46. LONG m_cRef;
  47. IUnknown * m_punkOuter; // Outer control object - It can't be deleted until we get deleted.
  48. HCLUSTER * m_phCluster; // Pointer to the handle of the cluster/node - DO NOT CLOSE!
  49. CLSID * m_pclsidMajor; // Pointer to the clsid to log UI information to.
  50. IClusCfgCallback * m_pcccb; // Callback interface to log information.
  51. HCLUSENUM m_hClusEnum; // Cluster enumer handle
  52. DWORD m_dwIndex; // Current index
  53. CEnumCfgResources( void );
  54. ~CEnumCfgResources( void );
  55. // Private copy constructor to prevent copying.
  56. CEnumCfgResources( const CEnumCfgResources & nodeSrc );
  57. // Private assignment operator to prevent copying.
  58. const CEnumCfgResources & operator = ( const CEnumCfgResources & nodeSrc );
  59. HRESULT HrInit( IUnknown * pOuterIn, HCLUSTER * phClusterIn, CLSID * pclsidMajorIn );
  60. HRESULT HrGetItem( IClusCfgManagedResourceInfo ** ppManagedResourceInfoOut );
  61. public: // methods
  62. static HRESULT
  63. S_HrCreateInstance( IUnknown ** ppunkOut,
  64. IUnknown * pOuterIn,
  65. HCLUSTER * phClusterIn,
  66. CLSID * pclsidMajorIn
  67. );
  68. // IUnknown
  69. STDMETHOD( QueryInterface )( REFIID riid, LPVOID * ppv );
  70. STDMETHOD_( ULONG, AddRef )( void );
  71. STDMETHOD_( ULONG, Release )( void );
  72. // IEnum
  73. STDMETHOD( Next )( ULONG cNumberRequestedIn,
  74. IClusCfgManagedResourceInfo ** rgpManagedResourceInfoOut,
  75. ULONG * pcNumberFetchedOut
  76. );
  77. STDMETHOD( Reset )( void );
  78. STDMETHOD( Skip )( ULONG cNumberToSkipIn );
  79. STDMETHOD( Clone )( IEnumClusCfgManagedResources ** ppEnumManagedResourcesOut );
  80. STDMETHOD( Count )( DWORD * pnCountOut );
  81. // IClusCfgCallback
  82. STDMETHOD( SendStatusReport )( BSTR bstrNodeNameIn,
  83. CLSID clsidTaskMajorIn,
  84. CLSID clsidTaskMinorIn,
  85. ULONG ulMinIn,
  86. ULONG ulMaxIn,
  87. ULONG ulCurrentIn,
  88. HRESULT hrStatusIn,
  89. BSTR bstrDescriptionIn,
  90. FILETIME * pftTimeIn,
  91. BSTR bstrReferenceIn
  92. );
  93. }; //*** class CEnumCfgResources