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.

72 lines
1.7 KiB

  1. /*
  2. *
  3. * NOTES:
  4. *
  5. * REVISIONS:
  6. * pcy24Nov92: Get rid of PopUps, EventLog. It belongs in the App.
  7. * Use _CLASSDEF rather than includes for interfaces.
  8. * Use apc.h
  9. * pcy15Dec92: Include comctrl.h and ups.h since definition uses
  10. * ane11Jan93: Added slave related members
  11. * ane03Feb93: Added state and SetInvalid
  12. * rct06Feb93: Removed VOID form SlaveOn's args, made isA() IsA()
  13. * tje24Feb93: Conditionally removed slave stuff for Window's version
  14. * cad11Jun93: Added mups
  15. * cad15Nov93: Changed how comm lost works
  16. * pcy08Apr94: Trim size, use static iterators, dead code removal
  17. * ajr13Feb96: Port to SINIX. can't mix // with cpp directives
  18. * tjg26Jan98: Added Stop method
  19. */
  20. #ifndef __DEVCTRL_H
  21. #define __DEVCTRL_H
  22. #include "_defs.h"
  23. #include "apc.h"
  24. _CLASSDEF(DeviceController)
  25. //
  26. // Definition uses
  27. //
  28. #include "contrlr.h"
  29. #include "comctrl.h"
  30. #include "ups.h"
  31. #include "mainapp.h"
  32. //
  33. // Interface Uses
  34. //
  35. _CLASSDEF(Event)
  36. _CLASSDEF(CommController)
  37. _CLASSDEF(UpdateObj)
  38. class DeviceController : public Controller
  39. {
  40. public:
  41. DeviceController(PMainApplication anApp);
  42. virtual ~DeviceController();
  43. virtual INT Get(INT code, PCHAR value);
  44. virtual INT Set(INT code, const PCHAR value);
  45. virtual INT Update(PEvent aEvent);
  46. virtual INT RegisterEvent(INT aEventCode, PUpdateObj aUpdateObj);
  47. virtual INT Initialize();
  48. virtual INT CreateUps();
  49. VOID SetInvalid();
  50. VOID Stop();
  51. protected:
  52. PCommController theCommController;
  53. PUps theUps;
  54. PMainApplication theApplication;
  55. INT slaveEnabled;
  56. private:
  57. INT theState;
  58. };
  59. #endif