#ifndef EtsiTs103097CODEC_TBSCERT_H
#define EtsiTs103097CODEC_TBSCERT_H

#include "Codec.hh"
//#include "CodecOer.hh"
#include "Params.hh"

#include "EtsiTs103097Module.hh"
//class BITSTRING;
//class OCTETSTRING;
//class IEEE1609dot2::ToBeSignedCertificate;

// class EtsiTs103097PDUCodec// : public OERCodec <IEEE1609dot2::ToBeSignedCertificate>
// {
// public:
//   EtsiTs103097PDUCodec() { };
//   virtual int encode (const IEEE1609dot2::ToBeSignedCertificate& p_cert, BITSTRING& data);
//   virtual int decode (const BITSTRING& data, IEEE1609dot2::ToBeSignedCertificate&);
// };

class EtsiTs103097Codec_ToBeSignedCertificate : public Codec<IEEE1609dot2::ToBeSignedCertificate, IEEE1609dot2::ToBeSignedCertificate>
{
  //  EtsiTs103097PDUCodec asnCodec;

public:
  // EtsiTs103097Codec_ToBeSignedCertificate() : Codec<IEEE1609dot2::ToBeSignedCertificate, IEEE1609dot2::ToBeSignedCertificate>(), asnCodec() { };
  EtsiTs103097Codec_ToBeSignedCertificate() : Codec<IEEE1609dot2::ToBeSignedCertificate, IEEE1609dot2::ToBeSignedCertificate>() { };
  virtual ~EtsiTs103097Codec_ToBeSignedCertificate() { };

  virtual int encode (const IEEE1609dot2::ToBeSignedCertificate& p_cert, OCTETSTRING& p_data);
  virtual int decode (const OCTETSTRING& p_data, IEEE1609dot2::ToBeSignedCertificate& p_cert, Params* p_params = NULL);
};

#endif
