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.

58 lines
823 B

  1. /*
  2. *
  3. * NOTES:
  4. *
  5. * REVISIONS:
  6. * xxxddMMMyy
  7. *
  8. * jps20jul94: added extern "C" for stdio.h (os2 1.x)
  9. */
  10. #define INCL_BASE
  11. #define INCL_NOPM
  12. #include "cdefine.h"
  13. #include "_defs.h"
  14. #include "dcomctrl.h"
  15. #include "upsdev.h"
  16. #include "event.h"
  17. #include "codes.h"
  18. extern "C" {
  19. #include <stdio.h>
  20. }
  21. DevComContrl::DevComContrl(PUpdateObj aParent)
  22. : CommController(), theParent(aParent)
  23. {
  24. theCommDevice = new UpsCommDevice(this);
  25. }
  26. DevComContrl::~DevComContrl()
  27. {
  28. if (theParent)
  29. {
  30. theParent->UnregisterEvent(EXIT_THREAD_NOW, this);
  31. }
  32. }
  33. INT DevComContrl::Initialize()
  34. {
  35. if (theParent)
  36. {
  37. theParent->RegisterEvent(EXIT_THREAD_NOW, this);
  38. }
  39. return CommController::Initialize();
  40. }
  41. INT DevComContrl::Update(PEvent anEvent)
  42. {
  43. return UpdateObj::Update(anEvent);
  44. }