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.

139 lines
3.5 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // CClusCfgIPAddressInfo.h
  7. //
  8. // Description:
  9. // This file contains the declaration of the CClusCfgIPAddressInfo
  10. // class.
  11. //
  12. // The class CClusCfgIPAddressInfo is the representation of a
  13. // cluster manageable IP address. It implements the IClusCfgIPAddressInfo
  14. // interface.
  15. //
  16. // Documentation:
  17. //
  18. // Implementation Files:
  19. //
  20. // Maintained By:
  21. // Galen Barbee (GalenB) 23-MAR-2000
  22. //
  23. // Remarks:
  24. // None.
  25. //
  26. //
  27. //////////////////////////////////////////////////////////////////////////////
  28. // Make sure that this file is included only once per compile path.
  29. #pragma once
  30. //////////////////////////////////////////////////////////////////////////////
  31. // Include Files
  32. //////////////////////////////////////////////////////////////////////////////
  33. #include "PrivateInterfaces.h"
  34. //////////////////////////////////////////////////////////////////////////////
  35. // Constant Declarations
  36. //////////////////////////////////////////////////////////////////////////////
  37. //////////////////////////////////////////////////////////////////////////////
  38. //++
  39. //
  40. // class CClusCfgIPAddressInfo
  41. //
  42. // Description:
  43. // The class CClusCfgIPAddressInfo is the enumeration of
  44. // cluster manageable devices.
  45. //
  46. // Interfaces:
  47. // IClusCfgIPAddressInfo
  48. // IClusCfgWbemServices
  49. // IEnumClusCfgIPAddresses
  50. //
  51. //--
  52. //////////////////////////////////////////////////////////////////////////////
  53. class CClusCfgIPAddressInfo
  54. : public IClusCfgIPAddressInfo
  55. , public IClusCfgWbemServices
  56. , public IClusCfgInitialize
  57. {
  58. private:
  59. //
  60. // Private member functions and data
  61. //
  62. LONG m_cRef;
  63. IWbemServices * m_pIWbemServices;
  64. ULONG m_ulIPAddress;
  65. ULONG m_ulIPSubnet;
  66. LCID m_lcid;
  67. IClusCfgCallback * m_picccCallback;
  68. // Private constructors and destructors
  69. CClusCfgIPAddressInfo( void );
  70. ~CClusCfgIPAddressInfo( void );
  71. // Private copy constructor to prevent copying.
  72. CClusCfgIPAddressInfo( const CClusCfgIPAddressInfo & nodeSrc );
  73. // Private assignment operator to prevent copying.
  74. const CClusCfgIPAddressInfo & operator = ( const CClusCfgIPAddressInfo & nodeSrc );
  75. HRESULT HrInit( void );
  76. HRESULT HrInit( ULONG ulIPAddressIn, ULONG IPSubnetIn );
  77. public:
  78. //
  79. // Public, non interface methods.
  80. //
  81. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  82. static HRESULT S_HrCreateInstance( ULONG ulIPAddressIn, ULONG IPSubnetIn, IUnknown ** ppunkOut );
  83. //
  84. // IUnknown Interfaces
  85. //
  86. STDMETHOD( QueryInterface )( REFIID riid, void ** ppvObject );
  87. STDMETHOD_( ULONG, AddRef )( void );
  88. STDMETHOD_( ULONG, Release )( void );
  89. //
  90. // IClusCfgInitialize Interfaces
  91. //
  92. // Register callbacks, locale id, etc.
  93. STDMETHOD( Initialize )( IUnknown * punkCallbackIn, LCID lcidIn );
  94. //
  95. // IClusCfgWbemServices Interfaces
  96. //
  97. STDMETHOD( SetWbemServices )( IWbemServices * pIWbemServicesIn );
  98. //
  99. // IClusCfgIPAddressInfo Interfaces.
  100. //
  101. STDMETHOD( GetUID )( BSTR * pbstrUIDOut );
  102. STDMETHOD( GetIPAddress )( ULONG * pulDottedQuadOut );
  103. STDMETHOD( SetIPAddress )( ULONG ulDottedQuadIn );
  104. STDMETHOD( GetSubnetMask )( ULONG * pulDottedQuadOut );
  105. STDMETHOD( SetSubnetMask )( ULONG ulDottedQuadIn );
  106. }; //*** Class CClusCfgIPAddressInfo