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.

71 lines
1.9 KiB

  1. /*
  2. * REVISIONS:
  3. * jod30Nov92: Added GCIP object stuff
  4. * jod02Dec92: Fixed Jim's sloppy code
  5. * jod13Jan93: Added eventList to InterpretMessage
  6. * pcy21Apr93: OS2 FE merge
  7. * pcy21May93: PROTOSIZE changed from 2600 to 8000
  8. * cad22Jul93: Fixed up destructor conflicts and omissions
  9. * pcy17Aug93: Removing strtok() requires new arg in InterpretParameters
  10. * rct05Nov93: moved destructor to CXX file
  11. * ajr08Mar94: Increased the size of PROTOSIZE to reflect changes someone
  12. * made in codes.h
  13. *
  14. * pcy08Apr94: Trim size, use static iterators, dead code removal
  15. * cgm04May96: TestResponse now uses BufferSize
  16. */
  17. #ifndef __PROTOCOL_H
  18. #define __PROTOCOL_H
  19. #include "_defs.h"
  20. #include "apc.h"
  21. //
  22. // Defines
  23. //
  24. _CLASSDEF(Protocol)
  25. //
  26. // Implementation uses
  27. //
  28. #include "err.h"
  29. #include "trans.h"
  30. #include "pollparm.h"
  31. //
  32. // Interface uses
  33. //
  34. _CLASSDEF(List)
  35. _CLASSDEF(Message)
  36. #define PROTOSIZE 10000
  37. class Protocol
  38. {
  39. protected:
  40. PPollParam ProtoList[PROTOSIZE];
  41. static INT currentTransactionId; //mwh changed from int
  42. PTransactionItem theOriginalTransactionItem;
  43. PTransactionGroup theCurrentTransactionGroup;
  44. public:
  45. Protocol();
  46. virtual ~Protocol();
  47. virtual INT BuildTransactionGroupMessages(PTransactionGroup agroup) = 0;
  48. virtual INT BuildPollTransactionGroupMessages(PTransactionGroup
  49. aTransactionGroup) = 0;
  50. virtual INT InterpretMessage(PMessage msg, PList eventList,
  51. PList newmsglist=(PList)NULL) = 0;
  52. virtual PTransactionGroup InterpretTransactionGroup(PCHAR msg) = 0;
  53. virtual INT TestResponse(PMessage msg,PCHAR Buffer,USHORT BufferSize) =0;
  54. VOID SetCurrentTransactionGroup(PTransactionGroup current);
  55. PTransactionGroup GetCurrentTransactionGroup() {return theCurrentTransactionGroup;};
  56. INT IsEventCodePollable(INT aCode);
  57. };
  58. #endif