#pragma once

#include "codec.hh"
//#include "CodecOer.hh"
#include "params.hh"

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

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

class etsi_ts103097_tobesigned_data_codec : public codec<IEEE1609dot2::ToBeSignedData, IEEE1609dot2::ToBeSignedData>
{
  //  EtsiTs103097PDUCodec asn_codec;

public:
  // explicit etsi_ts103097_tobesigned_data_codec() : codec<IEEE1609dot2::ToBeSignedData, IEEE1609dot2::ToBeSignedData>(), asn_codec() { };
  explicit etsi_ts103097_tobesigned_data_codec() : codec<IEEE1609dot2::ToBeSignedData, IEEE1609dot2::ToBeSignedData>() { };
  virtual ~etsi_ts103097_tobesigned_data_codec() { };

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