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.

60 lines
1.7 KiB

  1. /*
  2. * ogcccode.h
  3. *
  4. * Copyright (c) 1999 by Microsoft Corporation
  5. *
  6. * Abstract:
  7. * This is the interface file for the CNPCoder class. This
  8. * class is used to encode and decode CNP Protocol Data Units (PDU's)
  9. * to and from ASN.1 compliant byte streams using the ASN.1 toolkit.
  10. *
  11. * Caveats:
  12. * None.
  13. *
  14. * Author:
  15. * Xin Liu
  16. *
  17. */
  18. #ifndef _CCNPCODER_
  19. #define _CCNPCODER_
  20. #include "pktcoder.h"
  21. #include "cnppdu.h"
  22. /*
  23. * This is the class definition for class CCNPCoder
  24. */
  25. class CCNPCoder : public PacketCoder
  26. {
  27. public:
  28. CCNPCoder ();
  29. BOOL Init ( void );
  30. virtual ~CCNPCoder ();
  31. virtual BOOL Encode (LPVOID pdu_structure,
  32. int pdu_type,
  33. UINT rules_type,
  34. LPBYTE *encoding_buffer,
  35. UINT *encoding_buffer_length);
  36. virtual BOOL Decode (LPBYTE encoded_buffer,
  37. UINT encoded_buffer_length,
  38. int pdu_type,
  39. UINT rules_type,
  40. LPVOID *decoding_buffer,
  41. UINT *decoding_buffer_length);
  42. virtual void FreeEncoded (LPBYTE encoded_buffer);
  43. virtual void FreeDecoded (int pdu_type, LPVOID decoded_buffer);
  44. virtual BOOL IsMCSDataPacket ( LPBYTE, UINT ) { return FALSE; };
  45. private:
  46. // BOOL IsObjectIDCompliant (PKey t124_identifier);
  47. ASN1encoding_t m_pEncInfo; // ptr to encoder info
  48. ASN1decoding_t m_pDecInfo; // ptr to decoder info
  49. };
  50. typedef CCNPCoder * PCCNPCoder;
  51. #endif