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.

73 lines
1.8 KiB

  1. /***************************************************************************\
  2. *
  3. * File: Scheduler.h
  4. *
  5. * Description:
  6. * Scheduler.h maintains a collection of timers that are created and used
  7. * by the application for notifications.
  8. *
  9. *
  10. * History:
  11. * 1/18/2000: JStall: Created
  12. *
  13. * Copyright (C) 2000 by Microsoft Corporation. All rights reserved.
  14. *
  15. \***************************************************************************/
  16. #if !defined(MOTION__Scheduler_h__INCLUDED)
  17. #define MOTION__Scheduler_h__INCLUDED
  18. #pragma once
  19. // Forward declarations
  20. class Action;
  21. /***************************************************************************\
  22. *
  23. * class Scheduler
  24. *
  25. * Scheduler maintains lists of actions that are both occuring now and will
  26. * occur in the future.
  27. *
  28. \***************************************************************************/
  29. class Scheduler
  30. {
  31. // Construction
  32. public:
  33. Scheduler();
  34. ~Scheduler();
  35. void xwPreDestroy();
  36. // Operations
  37. public:
  38. Action * AddAction(const GMA_ACTION * pma);
  39. DWORD xwProcessActionsNL();
  40. // Implementation
  41. protected:
  42. void xwRemoveAllActions();
  43. inline void Enter();
  44. inline void Leave();
  45. void xwFireNL(GArrayF<Action *> & aracFire, BOOL fFire) const;
  46. // Data
  47. protected:
  48. CritLock m_lock;
  49. GList<Action> m_lstacPresent;
  50. GList<Action> m_lstacFuture;
  51. #if DBG
  52. long m_DEBUG_fLocked;
  53. #endif // DBG
  54. BOOL m_fShutdown:1; // Have started shutdown
  55. };
  56. HACTION GdCreateAction(const GMA_ACTION * pma);
  57. #include "Scheduler.inl"
  58. #endif // MOTION__Scheduler_h__INCLUDED