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.

110 lines
4.2 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // TaskCommitClusterChanges.h
  7. //
  8. // Description:
  9. // CTaskCommitClusterChanges implementation.
  10. //
  11. // Maintained By:
  12. // Galen Barbee (GalenB) 22-NOV-1999
  13. //
  14. //////////////////////////////////////////////////////////////////////////////
  15. #pragma once
  16. // CTaskCommitClusterChanges
  17. class
  18. CTaskCommitClusterChanges
  19. : public ITaskCommitClusterChanges
  20. , public INotifyUI
  21. , public IClusCfgCallback
  22. {
  23. private:
  24. // IUnknown
  25. LONG m_cRef;
  26. // ITaskCommitClusterChanges
  27. BOOL m_fJoining; // If we are attempting to join...
  28. OBJECTCOOKIE m_cookie; // Task completion cookie
  29. IClusCfgCallback * m_pcccb; // Marshalled callback interface
  30. OBJECTCOOKIE * m_pcookies; // Completion cookies for the subtasks.
  31. ULONG m_cNodes; // Count of nodes/subtasks that need to signal completion.
  32. HANDLE m_event; // Synchronization event to signal when subtasks have completed.
  33. OBJECTCOOKIE m_cookieCluster; // Cookie of the cluster to commit changes
  34. OBJECTCOOKIE m_cookieFormingNode; // Cookie of the forming node.
  35. IUnknown * m_punkFormingNode; // The node to form the cluster.
  36. BSTR m_bstrClusterName; // The cluster to form
  37. BSTR m_bstrClusterBindingString; // The cluster to form
  38. BSTR m_bstrAccountName; // The name of credentials used to run the cluster.
  39. BSTR m_bstrAccountPassword; // The password of credentials used to run the cluster.
  40. BSTR m_bstrAccountDomain; // The domain of credentials used to run the cluster.
  41. ULONG m_ulIPAddress; // IP address of the new cluster.
  42. ULONG m_ulSubnetMask; // IP subnet mask of the new cluster.
  43. BSTR m_bstrNetworkUID; // UID of the network the IP should be advertized.
  44. IEnumNodes * m_pen; // Nodes to form/join
  45. INotifyUI * m_pnui;
  46. IObjectManager * m_pom;
  47. ITaskManager * m_ptm;
  48. IConnectionManager * m_pcm;
  49. // INotifyUI
  50. ULONG m_cSubTasksDone; // The number of subtasks done.
  51. HRESULT m_hrStatus; // Status of callbacks
  52. CTaskCommitClusterChanges( void );
  53. ~CTaskCommitClusterChanges( void );
  54. STDMETHOD( Init )( void );
  55. HRESULT
  56. HrCompareAndPushInformationToNodes( void );
  57. HRESULT
  58. HrGatherClusterInformation( void );
  59. HRESULT
  60. HrFormFirstNode( void );
  61. HRESULT
  62. HrAddJoiningNodes( void );
  63. HRESULT
  64. HrAddAJoiningNode( BSTR bstrNameIn, OBJECTCOOKIE cookieIn );
  65. public: // Methods
  66. static HRESULT
  67. S_HrCreateInstance( IUnknown ** ppunkOut );
  68. // IUnknown
  69. STDMETHOD( QueryInterface )( REFIID riid, LPVOID *ppv );
  70. STDMETHOD_( ULONG, AddRef )( void );
  71. STDMETHOD_( ULONG, Release )( void );
  72. // IDoTask / ITaskCommitClusterChanges
  73. STDMETHOD( BeginTask )( void );
  74. STDMETHOD( StopTask )( void );
  75. STDMETHOD( SetCookie )( OBJECTCOOKIE cookieIn );
  76. STDMETHOD( SetClusterCookie )( OBJECTCOOKIE cookieClusterIn );
  77. STDMETHOD( SetJoining )( void );
  78. // IClusCfgCallback
  79. STDMETHOD( SendStatusReport )(
  80. LPCWSTR pcszNodeNameIn
  81. , CLSID clsidTaskMajorIn
  82. , CLSID clsidTaskMinorIn
  83. , ULONG ulMinIn
  84. , ULONG ulMaxIn
  85. , ULONG ulCurrentIn
  86. , HRESULT hrStatusIn
  87. , LPCWSTR pcszDescriptionIn
  88. , FILETIME * pftTimeIn
  89. , LPCWSTR pcszReferenceIn
  90. );
  91. // INotifyUI
  92. STDMETHOD( ObjectChanged )( OBJECTCOOKIE cookieIn );
  93. }; // class CTaskCommitClusterChanges