#pragma once

#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:
//   explicit EtsiTs103097PDUCodec() { };
//   virtual int encode (const IEEE1609dot2::ToBeSignedCertificate& p_cert, BITSTRING& data);
//   virtual int decode (const BITSTRING& data, IEEE1609dot2::ToBeSignedCertificate&);
// };

class etsi_ts103097_tobesigned_certificate_codec : public Codec<IEEE1609dot2::ToBeSignedCertificate, IEEE1609dot2::ToBeSignedCertificate>
{
  //  EtsiTs103097PDUCodec asn_codec;

public:
  // explicit etsi_ts103097_tobesigned_certificate_codec() : Codec<IEEE1609dot2::ToBeSignedCertificate, IEEE1609dot2::ToBeSignedCertificate>(), asn_codec() { };
  explicit etsi_ts103097_tobesigned_certificate_codec() : Codec<IEEE1609dot2::ToBeSignedCertificate, IEEE1609dot2::ToBeSignedCertificate>() { };
  virtual ~etsi_ts103097_tobesigned_certificate_codec() { };

  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);
};
