#pragma once

#include "Codec.hh"
//#include "oer_codec.hh"
#include "params.hh"

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

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

class etsi_ts103097_certificate_codec : public Codec<IEEE1609dot2::CertificateBase, IEEE1609dot2::CertificateBase>
{
  //  EtsiTs103097PDUCodec asn_codec;

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

  virtual int encode (const IEEE1609dot2::CertificateBase& p_cert, OCTETSTRING& p_data);
  virtual int decode (const OCTETSTRING& p_data, IEEE1609dot2::CertificateBase& p_cert, params* p_params = NULL);
}; // End of class etsi_ts103097_certificate_codec

