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.

96 lines
3.7 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // ConfigurationConnection.h
  7. //
  8. // Description:
  9. // CConfigurationConnection implementation.
  10. //
  11. // Maintained By:
  12. // Galen Barbee (GalenB) 22-NOV-1999
  13. //
  14. //////////////////////////////////////////////////////////////////////////////
  15. #pragma once
  16. // CConfigurationConnection
  17. class
  18. CConfigurationConnection
  19. : public IConfigurationConnection
  20. , public IClusCfgServer
  21. , public IClusCfgCallback
  22. , public IClusCfgCapabilities
  23. , public IClusCfgVerify
  24. {
  25. private:
  26. // IUnknown
  27. LONG m_cRef;
  28. // IConfigurationConnection
  29. IGlobalInterfaceTable * m_pgit; // Global Interface Table
  30. DWORD m_cookieGITServer; // Goblal Interface Table cookie -- Server interface
  31. DWORD m_cookieGITVerify; // Goblal Interface Table cookie -- Server interface
  32. DWORD m_cookieGITCallbackTask; // Goblal Interface Table cookie -- polling callback task interface
  33. IClusCfgCallback * m_pcccb; // Marshalled callback interface
  34. BSTR m_bstrLocalComputerName; // Local computer name FQDN
  35. BSTR m_bstrLocalHostname; // Local computer hostname
  36. HRESULT m_hrLastStatus; // Last status of connection.
  37. BSTR m_bstrBindingString; // String used to bind to the server.
  38. private: // Methods
  39. CConfigurationConnection( void );
  40. ~CConfigurationConnection( void );
  41. STDMETHOD( Init )( void );
  42. HRESULT HrRetrieveServerInterface( IClusCfgServer ** ppccsOut );
  43. HRESULT HrStartPolling( void );
  44. HRESULT HrStopPolling( void );
  45. HRESULT HrSetSecurityBlanket( IClusCfgServer * pccsIn );
  46. HRESULT HrIsLocalComputer( LPCWSTR pcszNameIn );
  47. public: // Methods
  48. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  49. // IUnknown
  50. STDMETHOD( QueryInterface )( REFIID riid, LPVOID *ppv );
  51. STDMETHOD_( ULONG, AddRef )( void );
  52. STDMETHOD_( ULONG, Release )( void );
  53. // IConfigurationConnection
  54. STDMETHOD( ConnectTo )( OBJECTCOOKIE cookieIn );
  55. STDMETHOD( ConnectToObject )( OBJECTCOOKIE cookieIn, REFIID riidIn, LPUNKNOWN * ppunkOut );
  56. // IClusCfgServer
  57. STDMETHOD( GetClusterNodeInfo )( IClusCfgNodeInfo ** ppClusterNodeInfoOut );
  58. STDMETHOD( GetManagedResourcesEnum )( IEnumClusCfgManagedResources ** ppEnumManagedResourcesOut );
  59. STDMETHOD( GetNetworksEnum )( IEnumClusCfgNetworks ** ppEnumNetworksOut );
  60. STDMETHOD( CommitChanges )( void );
  61. STDMETHOD( SetBindingString )( LPCWSTR pcszBindingStringIn );
  62. STDMETHOD( GetBindingString )( BSTR * pbstrBindingStringOut );
  63. // IClusCfgCallback
  64. STDMETHOD( SendStatusReport )(
  65. LPCWSTR pcszNodeNameIn
  66. , CLSID clsidTaskMajorIn
  67. , CLSID clsidTaskMinorIn
  68. , ULONG ulMinIn
  69. , ULONG ulMaxIn
  70. , ULONG ulCurrentIn
  71. , HRESULT hrStatusIn
  72. , LPCWSTR pcszDescriptionIn
  73. , FILETIME * pftTimeIn
  74. , LPCWSTR pcszReferenceIn
  75. );
  76. // IClusCfgCapabilities
  77. STDMETHOD( CanNodeBeClustered )( void );
  78. // IClusCfgVerify
  79. STDMETHOD( VerifyCredentials )( LPCWSTR pcszUserIn, LPCWSTR pcszDomainIn, LPCWSTR pcszPasswordIn );
  80. STDMETHOD( VerifyConnectionToCluster )( LPCWSTR pcszClusterNameIn );
  81. STDMETHOD( VerifyConnectionToNode )( LPCWSTR pcszNodeNameIn );
  82. }; // class CConfigurationConnection