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.

58 lines
1.4 KiB

  1. /*
  2. *
  3. * NOTES:
  4. *
  5. * REVISIONS:
  6. * pcy11Dec92: Get rid of list.h and node.h
  7. * pcy11Dec92: Use _CLASSDEF for CommController and Message
  8. * cad22Jul93: Had to add destructor
  9. * cad15Nov93: Added Get
  10. * cad18Nov93: Added forcecommflag
  11. * mwh19Nov93: changed EventID to INT
  12. * pcy10Mar94: Got rid of meaningless overides of Get and Set
  13. */
  14. #ifndef __UPSDEV_H
  15. #define __UPSDEV_H
  16. _CLASSDEF(UpsCommDevice)
  17. _CLASSDEF(TransactionGroup)
  18. _CLASSDEF(CommController)
  19. _CLASSDEF(Message)
  20. #include "cdevice.h"
  21. #include "serport.h"
  22. #define UNKNOWN 0
  23. class Message;
  24. class UpsCommDevice : public CommDevice
  25. {
  26. // for windows version made some of these methods protected virtuals;
  27. // we are super classing into W31UpsDevice
  28. protected:
  29. private:
  30. virtual INT Connect();
  31. protected:
  32. virtual INT Retry();
  33. virtual INT AskUps(PMessage msg);
  34. INT rebuildPort();
  35. INT sendRetryMessage();
  36. ULONG theRetryTimer;
  37. INT theForceCommEventFlag;
  38. enum cableTypes theCableType;
  39. public:
  40. UpsCommDevice(PCommController control);
  41. virtual ~UpsCommDevice();
  42. virtual INT Initialize();
  43. virtual INT CreatePort();
  44. virtual INT CreateProtocol();
  45. virtual INT Update(PEvent anEvent);
  46. VOID DeviceThread();
  47. virtual INT Get(INT pid, PCHAR value);
  48. virtual INT Set(INT pid, const PCHAR value);
  49. };
  50. #endif