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.

107 lines
4.1 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2002 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // TaskGatherInformation.h
  7. //
  8. // Description:
  9. // CTaskGatherInformation implementation.
  10. //
  11. // Maintained By:
  12. // Galen Barbee (GalenB) 22-NOV-1999
  13. //
  14. //////////////////////////////////////////////////////////////////////////////
  15. #pragma once
  16. // CTaskGatherInformation
  17. class CTaskGatherInformation
  18. : public ITaskGatherInformation
  19. {
  20. private:
  21. // IUnknown
  22. LONG m_cRef;
  23. // IDoTask / ITaskGatherInformation
  24. OBJECTCOOKIE m_cookieCompletion; // Cookie to signal when task is completed.
  25. OBJECTCOOKIE m_cookieNode; // Cookie of the node to gather from.
  26. IClusCfgCallback * m_pcccb; // Marshalled UI Layer callback
  27. BOOL m_fAdding; // If the node is to be added to a cluster...
  28. ULONG m_cResources; // Resource counter
  29. IObjectManager * m_pom; // Object manager
  30. IClusCfgServer * m_pccs; // ClusCfgServer
  31. BSTR m_bstrNodeName; // Hostname of the node
  32. ULONG m_ulQuorumDiskSize; // Size of the selected quorum resource
  33. IClusCfgManagedResourceInfo * m_pccmriQuorum; // Punk to the MT quorum resource object
  34. BOOL m_fStop;
  35. BOOL m_fMinConfig; // Was minimal configuration selected?
  36. CTaskGatherInformation( void );
  37. ~CTaskGatherInformation( void );
  38. // Private copy constructor to prevent copying.
  39. CTaskGatherInformation( const CTaskGatherInformation & nodeSrc );
  40. // Private assignment operator to prevent copying.
  41. const CTaskGatherInformation & operator = ( const CTaskGatherInformation & nodeSrc );
  42. STDMETHOD( HrInit )( void );
  43. HRESULT HrGatherResources( IEnumClusCfgManagedResources * pResourceEnumIn, DWORD cTotalResourcesIn );
  44. HRESULT HrGatherNetworks( IEnumClusCfgNetworks * pNetworkEnumIn, DWORD cTotalResourcesIn );
  45. HRESULT HrSendStatusReport(
  46. LPCWSTR pcszNodeNameIn
  47. , CLSID clsidMajorIn
  48. , CLSID clsidMinorIn
  49. , ULONG ulMinIn
  50. , ULONG ulMaxIn
  51. , ULONG ulCurrentIn
  52. , HRESULT hrIn
  53. , int idsDescriptionIn
  54. , int idsReferenceIdIn
  55. );
  56. HRESULT HrSendStatusReport(
  57. LPCWSTR pcszNodeNameIn
  58. , CLSID clsidMajorIn
  59. , CLSID clsidMinorIn
  60. , ULONG ulMinIn
  61. , ULONG ulMaxIn
  62. , ULONG ulCurrentIn
  63. , HRESULT hrIn
  64. , LPCWSTR pcszDescriptionIn
  65. , int idsReferenceIdIn
  66. );
  67. STDMETHOD( SendStatusReport )(
  68. LPCWSTR pcszNodeNameIn
  69. , CLSID clsidTaskMajorIn
  70. , CLSID clsidTaskMinorIn
  71. , ULONG ulMinIn
  72. , ULONG ulMaxIn
  73. , ULONG ulCurrentIn
  74. , HRESULT hrStatusIn
  75. , LPCWSTR pcszDescriptionIn
  76. , LPCWSTR pcszReferenceIn
  77. );
  78. public: // Methods
  79. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  80. // IUnknown
  81. STDMETHOD( QueryInterface )( REFIID riidIn, LPVOID * ppvOut );
  82. STDMETHOD_( ULONG, AddRef )( void );
  83. STDMETHOD_( ULONG, Release )( void );
  84. // IDoTask / ITaskGatherInformation
  85. STDMETHOD( BeginTask )( void );
  86. STDMETHOD( StopTask )( void );
  87. STDMETHOD( SetCompletionCookie )( OBJECTCOOKIE cookieIn );
  88. STDMETHOD( SetNodeCookie )( OBJECTCOOKIE cookieIn );
  89. STDMETHOD( SetJoining )( void );
  90. STDMETHOD( SetMinimalConfiguration )( BOOL fMinimalConfigIn );
  91. }; //*** class CTaskGatherInformation