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.

45 lines
954 B

  1. /*
  2. *
  3. * NOTES:
  4. *
  5. * REVISIONS:
  6. * ker25NOV92 Initial OS/2 Revision
  7. * pcy07Dec92: Changed defines used for smart boost state values.
  8. * pcy14Dec92: Changed READ_WRITE to AREAD_WRITE
  9. * pcy16Feb93: Made to work like a state sensor
  10. * cgm12Apr96: Destructor with unregister
  11. */
  12. #define INCL_BASE
  13. #define INCL_DOS
  14. #define INCL_NOPM
  15. #include "cdefine.h"
  16. extern "C" {
  17. #if (C_OS & C_OS2)
  18. #include <os2.h>
  19. #endif
  20. #include <stdlib.h>
  21. #include <stdio.h>
  22. #include <malloc.h>
  23. #include <string.h>
  24. }
  25. #include "smboosen.h"
  26. #include "comctrl.h"
  27. //Constructor
  28. SmartBoostSensor :: SmartBoostSensor(PDevice aParent,
  29. PCommController aCommController)
  30. : StateSensor(aParent,aCommController, SMART_BOOST_STATE,AREAD_WRITE)
  31. {
  32. storeState(SMART_BOOST_OFF);
  33. theCommController->RegisterEvent(SMART_BOOST_STATE, this);
  34. }
  35. SmartBoostSensor :: ~SmartBoostSensor()
  36. {
  37. theCommController->UnregisterEvent(SMART_BOOST_STATE, this);
  38. }