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.

75 lines
1.9 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1997, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // AuditChannel.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // This file describes the class AuditChannel.
  12. //
  13. // MODIFICATION HISTORY
  14. //
  15. // 09/05/1997 Original version.
  16. //
  17. ///////////////////////////////////////////////////////////////////////////////
  18. #ifndef _AUDITCHANNEL_H_
  19. #define _AUDITCHANNEL_H_
  20. #include <iastlb.h>
  21. #include <resource.h>
  22. #include <vector>
  23. ///////////////////////////////////////////////////////////////////////////////
  24. //
  25. // CLASS
  26. //
  27. // AuditChannel
  28. //
  29. // DESCRIPTION
  30. //
  31. // This class implements the IAuditSource and IAuditSink interfaces.
  32. //
  33. ///////////////////////////////////////////////////////////////////////////////
  34. class ATL_NO_VTABLE AuditChannel :
  35. public CComObjectRootEx<CComMultiThreadModel>,
  36. public CComCoClass<AuditChannel, &__uuidof(AuditChannel)>,
  37. public IAuditSink,
  38. public IAuditSource
  39. {
  40. public:
  41. IAS_DECLARE_REGISTRY(AuditChannel, 1, 0, IASCoreLib)
  42. DECLARE_CLASSFACTORY_SINGLETON(AuditChannel)
  43. DECLARE_NOT_AGGREGATABLE(AuditChannel)
  44. BEGIN_COM_MAP(AuditChannel)
  45. COM_INTERFACE_ENTRY_IID(__uuidof(IAuditSource), IAuditSource)
  46. COM_INTERFACE_ENTRY_IID(__uuidof(IAuditSink), IAuditSink)
  47. END_COM_MAP()
  48. //////////
  49. // IAuditSource
  50. //////////
  51. STDMETHOD(Clear)();
  52. STDMETHOD(Connect)(IAuditSink* pSink);
  53. STDMETHOD(Disconnect)(IAuditSink* pSink);
  54. //////////
  55. // IAuditSink
  56. //////////
  57. STDMETHOD(AuditEvent)(ULONG ulEventID,
  58. ULONG ulNumStrings,
  59. ULONG ulDataSize,
  60. wchar_t** aszStrings,
  61. byte* pRawData);
  62. protected:
  63. typedef std::vector<IAuditSinkPtr> SinkVector;
  64. SinkVector sinks;
  65. };
  66. #endif //_AUDITCHANNEL_H_