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.

69 lines
1.8 KiB

  1. //=============================================================================
  2. //
  3. // Copyright (c) 1996-1999, Microsoft Corporation, All rights reserved
  4. //
  5. // EQUEUE.H
  6. //
  7. // This file defines the classes for a queue of events which have matched
  8. // some of the filters and will have to be dispatched.
  9. //
  10. // Classes defined:
  11. //
  12. // CEventQueue
  13. //
  14. // History:
  15. //
  16. // 11/27/96 a-levn Compiles.
  17. //
  18. //=============================================================================
  19. #ifndef __EVENT_QUEUE__H_
  20. #define __EVENT_QUEUE__H_
  21. #include "binding.h"
  22. #include <wbemcomn.h>
  23. #include <execq.h>
  24. class CEss;
  25. //*****************************************************************************
  26. //
  27. // class CEventQueue
  28. //
  29. // This class stores a queue of events that need to be dispatched to
  30. // consumers. It also handles the actual dispatcher functionality: when an
  31. // instance of this class is created (and there expected to be only one), a
  32. // new thread is created which will wake up when new requests are added to the
  33. // queue and process them.
  34. //
  35. //*****************************************************************************
  36. class CEventQueue : public CExecQueue
  37. {
  38. protected:
  39. class CDeliverRequest : public CExecRequest
  40. {
  41. private:
  42. CQueueingEventSink* m_pConsumer;
  43. public:
  44. CDeliverRequest(CQueueingEventSink* pConsumer);
  45. ~CDeliverRequest();
  46. HRESULT Execute();
  47. };
  48. CEss* m_pEss;
  49. protected:
  50. virtual void ThreadMain(CThreadRecord* pRecord);
  51. HRESULT InitializeThread();
  52. void UninitializeThread();
  53. public:
  54. CEventQueue(STORE CEss* pEss);
  55. HRESULT EnqueueDeliver(CQueueingEventSink* pConsumer);
  56. void DumpStatistics(FILE* f, long lFlags);
  57. };
  58. #endif