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.

126 lines
3.7 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // StartupNotify.h
  7. //
  8. // Description:
  9. // This file contains the declaration of the CStartupNotify
  10. // class. This class handles is used to clean up a node after it has been
  11. // evicted from a cluster.
  12. //
  13. // Documentation:
  14. // TODO: fill in pointer to external documentation
  15. //
  16. // Implementation Files:
  17. // StartupNotify.cpp
  18. //
  19. // Maintained By:
  20. // Vij Vasu (VVasu) 04-AUG-2000
  21. //
  22. //////////////////////////////////////////////////////////////////////////////
  23. // Make sure that this file is included only once per compile path.
  24. #pragma once
  25. //////////////////////////////////////////////////////////////////////////////
  26. // Include Files
  27. //////////////////////////////////////////////////////////////////////////////
  28. // For IUnknown
  29. #include <unknwn.h>
  30. // For IClusCfgStartup
  31. #include "ClusCfgServer.h"
  32. //////////////////////////////////////////////////////////////////////////////
  33. //++
  34. //
  35. // class CStartupNotify
  36. //
  37. // Description:
  38. // This class handles is used to clean up a node after it has been
  39. // evicted from a cluster.
  40. //
  41. //--
  42. //////////////////////////////////////////////////////////////////////////////
  43. class CStartupNotify
  44. : public IClusCfgStartupNotify
  45. {
  46. public:
  47. //////////////////////////////////////////////////////////////////////////
  48. // IUnknown methods
  49. //////////////////////////////////////////////////////////////////////////
  50. STDMETHOD( QueryInterface )( REFIID riid, void ** ppvObject );
  51. STDMETHOD_( ULONG, AddRef )( void );
  52. STDMETHOD_( ULONG, Release )( void );
  53. //////////////////////////////////////////////////////////////////////////
  54. // IClusCfgStartupNotify methods
  55. //////////////////////////////////////////////////////////////////////////
  56. // Send out notification of cluster service startup to interested listeners
  57. STDMETHOD( SendNotifications )( void );
  58. //////////////////////////////////////////////////////////////////////////
  59. // Other public methods
  60. //////////////////////////////////////////////////////////////////////////
  61. // Create an instance of this class.
  62. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  63. private:
  64. //////////////////////////////////////////////////////////////////////////
  65. // Private member functions
  66. //////////////////////////////////////////////////////////////////////////
  67. // Enumerate all components on the local computer registered for cluster
  68. // startup notification.
  69. HRESULT HrNotifyListeners( void );
  70. // Instantiate a cluster startup listener component and call the
  71. // appropriate methods.
  72. HRESULT HrProcessListener(
  73. const CLSID & rclsidListenerCLSIDIn
  74. , IUnknown * punkResTypeServicesIn
  75. );
  76. //
  77. // Private constructors, destructor and assignment operator.
  78. // All of these methods are private for two reasons:
  79. // 1. Lifetimes of objects of this class are controlled by S_HrCreateInstance and Release.
  80. // 2. Copying of an object of this class is prohibited.
  81. //
  82. // Default constructor.
  83. CStartupNotify( void );
  84. // Destructor.
  85. ~CStartupNotify( void );
  86. // Copy constructor.
  87. CStartupNotify( const CStartupNotify & );
  88. // Assignment operator.
  89. CStartupNotify & operator =( const CStartupNotify & );
  90. //////////////////////////////////////////////////////////////////////////
  91. // Private data
  92. //////////////////////////////////////////////////////////////////////////
  93. // Reference count for this object.
  94. LONG m_cRef;
  95. }; //*** class CStartupNotify