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.

85 lines
2.4 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2001 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. public: // Methods
  51. static HRESULT
  52. S_HrCreateInstance( IUnknown ** ppunkOut );
  53. // IUnknown
  54. STDMETHOD( QueryInterface )( REFIID riidIn, LPVOID * ppvOut );
  55. STDMETHOD_( ULONG, AddRef )( void );
  56. STDMETHOD_( ULONG, Release )( void );
  57. // ILogManager
  58. STDMETHOD( StartLogging )( void );
  59. STDMETHOD( StopLogging )( void );
  60. // IClusCfgCallback
  61. STDMETHOD( SendStatusReport )(
  62. LPCWSTR pcszNodeNameIn
  63. , CLSID clsidTaskMajorIn
  64. , CLSID clsidTaskMinorIn
  65. , ULONG ulMinIn
  66. , ULONG ulMaxIn
  67. , ULONG ulCurrentIn
  68. , HRESULT hrStatusIn
  69. , LPCWSTR pcszDescriptionIn
  70. , FILETIME * pftTimeIn
  71. , LPCWSTR pcszReferenceIn
  72. );
  73. }; //*** class CLogManager