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.

94 lines
3.8 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // ManagedNetwork.h
  7. //
  8. // Description:
  9. // CManagedNetwork implementation.
  10. //
  11. // Maintained By:
  12. // Galen Barbee (GalenB) 22-NOV-1999
  13. //
  14. //////////////////////////////////////////////////////////////////////////////
  15. #pragma once
  16. class CEnumManageableNetworks;
  17. // CManagedNetwork
  18. class CManagedNetwork
  19. : public IExtendObjectManager
  20. , public IClusCfgNetworkInfo
  21. , public IEnumClusCfgIPAddresses
  22. , public IGatherData // Private Interface
  23. {
  24. friend class CEnumManageableNetworks;
  25. private:
  26. // IUnknown
  27. LONG m_cRef;
  28. // Async/IClusCfgNetworkInfo
  29. BSTR m_bstrUID; // Unique Identifier
  30. BSTR m_bstrName; // Display Name
  31. BSTR m_bstrDescription; // Description
  32. BOOL m_fGathered; // TRUE if the object has already gathered its information
  33. BOOL m_fHasNameChanged; // If the name was changed by the user....
  34. BOOL m_fHasDescriptionChanged; // If the description was changed by the user...
  35. BOOL m_fIsPublic; // If the interface is for public traffic...
  36. BOOL m_fIsPrivate; // If the interface is for private traffic...
  37. IUnknown * m_punkPrimaryAddress; // Primary IP address info.
  38. ULONG m_cAllocedIPs; // Count of allocated IPs
  39. ULONG m_cCurrentIPs; // Count of currently used IPs
  40. ULONG m_cIter; // Iter counter
  41. IUnknown ** m_ppunkIPs; // List of child IP addresses
  42. // IExtendObjectManager
  43. private: // Methods
  44. CManagedNetwork( void );
  45. ~CManagedNetwork( void );
  46. STDMETHOD( HrInit )( void );
  47. STDMETHOD( EnumChildrenAndTransferInformation )( OBJECTCOOKIE cookieIn, IEnumClusCfgIPAddresses * pecciaIn );
  48. public: // Methods
  49. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  50. // IUnknown
  51. STDMETHOD( QueryInterface )( REFIID riidIn, LPVOID * ppvOut );
  52. STDMETHOD_( ULONG, AddRef )( void );
  53. STDMETHOD_( ULONG, Release )( void );
  54. // IClusCfgNetworkInfo
  55. STDMETHOD( GetUID )( BSTR * pbstrUIDOut );
  56. STDMETHOD( GetName )( BSTR * pbstrNameOut );
  57. STDMETHOD( SetName )( LPCWSTR pcszNameIn );
  58. STDMETHOD( GetDescription )( BSTR * pbstrDescriptionOut );
  59. STDMETHOD( SetDescription )( LPCWSTR pcszDescriptionIn );
  60. STDMETHOD( GetPrimaryNetworkAddress )( IClusCfgIPAddressInfo ** ppIPAddressOut );
  61. STDMETHOD( SetPrimaryNetworkAddress )( IClusCfgIPAddressInfo * pIPAddressIn );
  62. STDMETHOD( IsPublic )( void );
  63. STDMETHOD( SetPublic )( BOOL fIsPublicIn );
  64. STDMETHOD( IsPrivate )( void );
  65. STDMETHOD( SetPrivate )( BOOL fIsPrivateIn );
  66. // IGatherData
  67. STDMETHOD( Gather )( OBJECTCOOKIE cookieParentIn, IUnknown * punkIn );
  68. // IExtendObjectManager
  69. STDMETHOD( FindObject )(
  70. OBJECTCOOKIE cookieIn
  71. , REFCLSID rclsidTypeIn
  72. , LPCWSTR pcszNameIn
  73. , LPUNKNOWN * ppunkOut
  74. );
  75. // IEnumClusCfgIPAddresses
  76. STDMETHOD( Next )( ULONG cNumberRequestedIn, IClusCfgIPAddressInfo ** rgpIPAddressInfoOut, ULONG * pcNumberFetchedOut );
  77. STDMETHOD( Skip )( ULONG cNumberToSkipIn );
  78. STDMETHOD( Reset )( void );
  79. STDMETHOD( Clone )( IEnumClusCfgIPAddresses ** ppEnumClusCfgIPAddressesOut );
  80. STDMETHOD( Count )( DWORD * pnCountOut );
  81. }; //*** class CManagedNetwork