#ifndef EtsiTs103097CODEC_CERT_H
#define EtsiTs103097CODEC_CERT_H

#include "Codec.hh"
//#include "CodecOer.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 EtsiTs103097Codec_Certificate : public Codec<IEEE1609dot2::CertificateBase, IEEE1609dot2::CertificateBase>
{
  //  EtsiTs103097PDUCodec asnCodec;

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

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

#endif
