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.

61 lines
1.4 KiB

  1. /* Copyright 1999 American Power Conversion, All Rights Reserved
  2. *
  3. * Description:
  4. * Interface to all high level states.
  5. *
  6. * Revision History:
  7. * dsmith 31Mar1999 Created
  8. *
  9. */
  10. #ifndef _INC_STATES_H_
  11. #define _INC_STATES_H_
  12. #include <windows.h>
  13. ////////////////////
  14. // States
  15. ////////////////////
  16. #define INITIALIZING 0
  17. #define RUNNING 1
  18. #define NO_COMM 2
  19. #define ON_LINE 3
  20. #define ON_BATTERY 4
  21. #define WAITING_TO_SHUTDOWN 5
  22. #define SHUTTING_DOWN 6
  23. #define HIBERNATE 7
  24. #define STOPPING 8
  25. #define EXIT_NOW 9
  26. ////////////////////
  27. // State Methods
  28. ////////////////////
  29. // Each state has three methods associated with it: Enter, DoWork and Exit
  30. // DoWork is where all of the major state work is performed. Enter and Exit
  31. // is where one time processing tasks associated with the state is
  32. // done.
  33. void Initializing_Enter(DWORD anEvent);
  34. DWORD Initializing_DoWork();
  35. void Initializing_Exit(DWORD anEvent);
  36. void WaitingToShutdown_Enter(DWORD anEvent);
  37. DWORD WaitingToShutdown_DoWork();
  38. void WaitingToShutdown_Exit(DWORD anEvent);
  39. void ShuttingDown_Enter(DWORD anEvent);
  40. DWORD ShuttingDown_DoWork();
  41. void ShuttingDown_Exit(DWORD anEvent);
  42. void Hibernate_Enter(DWORD anEvent);
  43. DWORD Hibernate_DoWork();
  44. void Hibernate_Exit(DWORD anEvent);
  45. void Stopping_Enter(DWORD anEvent);
  46. DWORD Stopping_DoWork();
  47. void Stopping_Exit(DWORD anEvent);
  48. #endif