#ifndef EtsiTs103097CODEC_H
#define EtsiTs103097CODEC_H

#include "Codec.hh"
//#include "CodecOer.hh"
#include "loggers.hh" // TODO To be removed
#include "Params.hh"

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

// class EtsiTs103097PDUCodec// : public OERCodec <IEEE1609dot2::CertificateBase>
// {
// public:
//   EtsiTs103097PDUCodec() { loggers::get_instance().log("EtsiTs103097PDUCodec::EtsiTs103097PDUCodec(D)"); };
//   virtual int encode (const IEEE1609dot2::CertificateBase& p_cert, BITSTRING& data);
//   virtual int decode (const BITSTRING& data, IEEE1609dot2::CertificateBase&);
// };

class EtsiTs103097Codec : public Codec<IEEE1609dot2::CertificateBase, IEEE1609dot2::CertificateBase>
{
  //  EtsiTs103097PDUCodec asnCodec;

public:
  // EtsiTs103097Codec() : Codec<IEEE1609dot2::CertificateBase, IEEE1609dot2::CertificateBase>(), asnCodec() { loggers::get_instance().log("EtsiTs103097Codec::EtsiTs103097Codec(D)"); };
  EtsiTs103097Codec() : Codec<IEEE1609dot2::CertificateBase, IEEE1609dot2::CertificateBase>() { loggers::get_instance().log("EtsiTs103097Codec::EtsiTs103097Codec(D)"); };
  virtual ~EtsiTs103097Codec() { loggers::get_instance().log("EtsiTs103097Codec::~EtsiTs103097Codec"); };

  virtual int encode (const IEEE1609dot2::CertificateBase& p_cert, OCTETSTRING& data);
  virtual int decode (const OCTETSTRING& data, IEEE1609dot2::CertificateBase&, Params* params = NULL);
};

#endif
