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.

128 lines
3.3 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // IPAddressInfo.h
  7. //
  8. // Description:
  9. // This file contains the declaration of the CIPAddressInfo
  10. // class.
  11. //
  12. // Maintained By:
  13. // Galen Barbee (GalenB) 23-MAY-2000
  14. //
  15. //////////////////////////////////////////////////////////////////////////////
  16. // Make sure that this file is included only once per compile path.
  17. #pragma once
  18. //////////////////////////////////////////////////////////////////////////////
  19. // Include Files
  20. //////////////////////////////////////////////////////////////////////////////
  21. class CEnumIPAddresses;
  22. //////////////////////////////////////////////////////////////////////////////
  23. // Constant Declarations
  24. //////////////////////////////////////////////////////////////////////////////
  25. //////////////////////////////////////////////////////////////////////////////
  26. //++
  27. //
  28. // class CIPAddressInfo
  29. //
  30. // Description:
  31. // The class IPAddressInfo is the enumeration of
  32. // cluster manageable devices.
  33. //
  34. // Interfaces:
  35. // IClusCfgIPAddressInfo
  36. // IGatherData
  37. // IExtendObjectManager
  38. //
  39. //--
  40. //////////////////////////////////////////////////////////////////////////////
  41. class CIPAddressInfo
  42. : public IExtendObjectManager
  43. , public IClusCfgIPAddressInfo
  44. , public IGatherData // private
  45. {
  46. friend class CEnumIPAddresses;
  47. public:
  48. //
  49. // Public constructors and destructors
  50. //
  51. CIPAddressInfo( void );
  52. virtual ~CIPAddressInfo( void );
  53. //
  54. // IUnknown Interfaces
  55. //
  56. STDMETHOD( QueryInterface )( REFIID riid, void ** ppvObject );
  57. STDMETHOD_( ULONG, AddRef )( void );
  58. STDMETHOD_( ULONG, Release )( void );
  59. //
  60. // IGatherData
  61. //
  62. STDMETHOD( Gather )( OBJECTCOOKIE cookieParentIn, IUnknown * punkIn );
  63. //
  64. // IClusCfgIPAddressInfo Interfaces.
  65. //
  66. STDMETHOD( GetUID )( BSTR * pbstrUIDOut );
  67. STDMETHOD( GetIPAddress )( ULONG * pulDottedQuadOut );
  68. STDMETHOD( SetIPAddress )( ULONG ulDottedQuad );
  69. STDMETHOD( GetSubnetMask )( ULONG * pulDottedQuadOut );
  70. STDMETHOD( SetSubnetMask )( ULONG ulDottedQuad );
  71. // IObjectManager
  72. STDMETHOD( FindObject )(
  73. OBJECTCOOKIE cookieIn
  74. , REFCLSID rclsidTypeIn
  75. , LPCWSTR pcszNameIn
  76. , LPUNKNOWN * ppunkOut
  77. );
  78. //
  79. // Public, non interface methods.
  80. //
  81. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  82. private:
  83. //
  84. // Private member functions and data
  85. //
  86. LONG m_cRef;
  87. ULONG m_ulIPAddress;
  88. ULONG m_ulIPSubnet;
  89. BSTR m_bstrUID;
  90. BSTR m_bstrName;
  91. // IExtendObjectManager
  92. // Private copy constructor to prevent copying.
  93. CIPAddressInfo( const CIPAddressInfo & nodeSrc );
  94. // Private assignment operator to prevent copying.
  95. const CIPAddressInfo & operator = ( const CIPAddressInfo & nodeSrc );
  96. STDMETHOD( HrInit )( void );
  97. STDMETHOD( LoadName )( void );
  98. }; //*** Class CIPAddressInfo