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.

102 lines
2.9 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2002 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // LogManager.h
  7. //
  8. // Description:
  9. // Log Manager implementation.
  10. //
  11. // Maintained By:
  12. // David Potter (DavidP) 07-DEC-2000
  13. //
  14. //////////////////////////////////////////////////////////////////////////////
  15. #pragma once
  16. //////////////////////////////////////////////////////////////////////////////
  17. // Forward Class Definitions
  18. //////////////////////////////////////////////////////////////////////////////
  19. class CLogManager;
  20. //////////////////////////////////////////////////////////////////////////////
  21. //++
  22. //
  23. // class CLogManager
  24. //
  25. // Description:
  26. // Logs notifications to the log file.
  27. //
  28. //--
  29. //////////////////////////////////////////////////////////////////////////////
  30. class
  31. CLogManager
  32. : public ILogManager
  33. , public IClusCfgCallback
  34. {
  35. private:
  36. // IUnknown
  37. LONG m_cRef; // Reference counter.
  38. // ILogManager
  39. ILogger * m_plLogger; // ILogger for doing logging.
  40. // IClusCfgCallback
  41. OBJECTCOOKIE m_cookieCompletion; // Completion cookie.
  42. HRESULT m_hrResult; // Result of the analyze task.
  43. BSTR m_bstrLogMsg; // Reusable logging buffer.
  44. IConnectionPoint * m_pcpcb; // IClusCfgCallback Connection Point.
  45. DWORD m_dwCookieCallback; // Notification registration cookie.
  46. private: // Methods
  47. CLogManager( void );
  48. ~CLogManager( void );
  49. STDMETHOD( HrInit )( void );
  50. // Private copy constructor to prevent copying.
  51. CLogManager( const CLogManager & );
  52. // Private assignment operator to prevent copying.
  53. CLogManager & operator=( const CLogManager & );
  54. public: // Methods
  55. //
  56. // Public, non interface methods.
  57. //
  58. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  59. //
  60. // IUnknown
  61. //
  62. STDMETHOD( QueryInterface )( REFIID riidIn, LPVOID * ppvOut );
  63. STDMETHOD_( ULONG, AddRef )( void );
  64. STDMETHOD_( ULONG, Release )( void );
  65. //
  66. // ILogManager
  67. //
  68. STDMETHOD( StartLogging )( void );
  69. STDMETHOD( StopLogging )( void );
  70. STDMETHOD( GetLogger )( ILogger ** ppLoggerOut );
  71. //
  72. // IClusCfgCallback
  73. //
  74. STDMETHOD( SendStatusReport )(
  75. LPCWSTR pcszNodeNameIn
  76. , CLSID clsidTaskMajorIn
  77. , CLSID clsidTaskMinorIn
  78. , ULONG ulMinIn
  79. , ULONG ulMaxIn
  80. , ULONG ulCurrentIn
  81. , HRESULT hrStatusIn
  82. , LPCWSTR pcszDescriptionIn
  83. , FILETIME * pftTimeIn
  84. , LPCWSTR pcszReferenceIn
  85. );
  86. }; //*** class CLogManager