/**
 * This file was generated by the Objective Systems ASN1C Compiler
 * (http://www.obj-sys.com).  Version: 5.63.
 */
#ifndef PKIXTSP_H
#define PKIXTSP_H

#include <stdio.h>
#include <stdlib.h>
#include "asn1BerCppTypes.h"
#include "asn1XerCppTypes.h"
#include "rtTable.h"
#include "PKIX1Explicit88.h"
#include "CertificateExtensions.h"
#include "CryptographicMessageSyntax.h"
#include "PKIXCMP.h"
namespace asn1data {

/**************************************************************/
/*                                                            */
/*  TSAPolicyId                                               */
/*                                                            */
/**************************************************************/

typedef ASN1TObjId ASN1T_TSAPolicyId;

class EXTERN ASN1C_TSAPolicyId :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_TSAPolicyId& msgData;
public:
   ASN1C_TSAPolicyId (ASN1T_TSAPolicyId& data);
   ASN1C_TSAPolicyId (
      ASN1MessageBufferIF& msgBuf, ASN1T_TSAPolicyId& data);
   ASN1C_TSAPolicyId (ASN1C_TSAPolicyId& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_TSAPolicyId& getCopy (ASN1T_TSAPolicyId* pDstData = 0);
   ASN1T_TSAPolicyId* newCopy ();

   inline ASN1C_TSAPolicyId& operator= (ASN1C_TSAPolicyId& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }
} ;

EXTERN int asn1E_TSAPolicyId (ASN1CTXT* pctxt,
   ASN1T_TSAPolicyId *pvalue, ASN1TagType tagging);

EXTERN int asn1D_TSAPolicyId (ASN1CTXT* pctxt,
   ASN1T_TSAPolicyId *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_TSAPolicyId
  (ASN1CTXT* pctxt, ASN1T_TSAPolicyId* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_TSAPolicyId (ASN1CTXT *pctxt, ASN1T_TSAPolicyId* pSrcValue, ASN1T_TSAPolicyId* pDstValue);

/**************************************************************/
/*                                                            */
/*  TSTInfo_version                                           */
/*                                                            */
/**************************************************************/

struct EXTERN TSTInfo_version {
   enum Root {
      v1 = 1
   } ;
} ;

typedef ASN1ConstCharPtr ASN1T_TSTInfo_version;

class EXTERN ASN1C_TSTInfo_version :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_TSTInfo_version& msgData;
public:
   ASN1C_TSTInfo_version (ASN1T_TSTInfo_version& data);
   ASN1C_TSTInfo_version (
      ASN1MessageBufferIF& msgBuf, ASN1T_TSTInfo_version& data);
   ASN1C_TSTInfo_version (ASN1C_TSTInfo_version& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_TSTInfo_version& getCopy (ASN1T_TSTInfo_version* pDstData = 0);
   ASN1T_TSTInfo_version* newCopy ();

   inline ASN1C_TSTInfo_version& operator= (ASN1C_TSTInfo_version& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }
   static int parseNamedValue (ASN1CTXT* pctxt, ASN1ConstCharPtr* value);
} ;

EXTERN int asn1E_TSTInfo_version (ASN1CTXT* pctxt,
   ASN1T_TSTInfo_version *pvalue, ASN1TagType tagging);

EXTERN int asn1D_TSTInfo_version (ASN1CTXT* pctxt,
   ASN1T_TSTInfo_version *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_TSTInfo_version
  (ASN1CTXT* pctxt, ASN1T_TSTInfo_version value,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_TSTInfo_version (ASN1CTXT *pctxt, ASN1T_TSTInfo_version* pSrcValue, ASN1T_TSTInfo_version* pDstValue);

/**************************************************************/
/*                                                            */
/*  MessageImprint                                            */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_MessageImprint;

typedef struct EXTERN ASN1T_MessageImprint : public ASN1TPDU {
   ASN1T_AlgorithmIdentifier hashAlgorithm;
   ASN1TDynOctStr hashedMessage;
   ASN1T_MessageImprint ();
   ASN1T_MessageImprint (ASN1C_MessageImprint& srcData);
   ~ASN1T_MessageImprint ();
} ASN1T_MessageImprint;

class EXTERN ASN1C_MessageImprint :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_MessageImprint& msgData;
   struct ElementID {
      enum {
         _unknown, hashAlgorithm, hashedMessage
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_AlgorithmIdentifier* mpHashAlgorithmC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_MessageImprint (ASN1T_MessageImprint& data);
   ASN1C_MessageImprint (
      ASN1MessageBufferIF& msgBuf, ASN1T_MessageImprint& data);
   ASN1C_MessageImprint (ASN1C_MessageImprint& original);

   ~ASN1C_MessageImprint();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_MessageImprint& getCopy (ASN1T_MessageImprint* pDstData = 0);
   ASN1T_MessageImprint* newCopy ();

   inline ASN1C_MessageImprint& operator= (ASN1C_MessageImprint& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_MessageImprint (ASN1CTXT* pctxt,
   ASN1T_MessageImprint *pvalue, ASN1TagType tagging);

EXTERN int asn1D_MessageImprint (ASN1CTXT* pctxt,
   ASN1T_MessageImprint *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_MessageImprint
  (ASN1CTXT* pctxt, ASN1T_MessageImprint* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_MessageImprint (ASN1CTXT *pctxt, ASN1T_MessageImprint* pSrcValue, ASN1T_MessageImprint* pDstValue);

EXTERN void asn1Free_MessageImprint (ASN1CTXT *pctxt, ASN1T_MessageImprint* pvalue);

/**************************************************************/
/*                                                            */
/*  Accuracy                                                  */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_Accuracy;

typedef struct EXTERN ASN1T_Accuracy : public ASN1TPDU {
   struct {
      unsigned secondsPresent : 1;
      unsigned millisPresent : 1;
      unsigned microsPresent : 1;
   } m;
   ASN1INT seconds;
   ASN1USINT millis;
   ASN1USINT micros;
   ASN1T_Accuracy ();
   ASN1T_Accuracy (ASN1C_Accuracy& srcData);
} ASN1T_Accuracy;

class EXTERN ASN1C_Accuracy :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_Accuracy& msgData;
   struct ElementID {
      enum {
         _unknown, seconds, millis, micros
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_Accuracy (ASN1T_Accuracy& data);
   ASN1C_Accuracy (
      ASN1MessageBufferIF& msgBuf, ASN1T_Accuracy& data);
   ASN1C_Accuracy (ASN1C_Accuracy& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_Accuracy& getCopy (ASN1T_Accuracy* pDstData = 0);
   ASN1T_Accuracy* newCopy ();

   inline ASN1C_Accuracy& operator= (ASN1C_Accuracy& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_Accuracy (ASN1CTXT* pctxt,
   ASN1T_Accuracy *pvalue, ASN1TagType tagging);

EXTERN int asn1D_Accuracy (ASN1CTXT* pctxt,
   ASN1T_Accuracy *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_Accuracy
  (ASN1CTXT* pctxt, ASN1T_Accuracy* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_Accuracy (ASN1CTXT *pctxt, ASN1T_Accuracy* pSrcValue, ASN1T_Accuracy* pDstValue);

/**************************************************************/
/*                                                            */
/*  TSTInfo                                                   */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_TSTInfo;

typedef struct EXTERN ASN1T_TSTInfo : public ASN1TPDU {
   struct {
      unsigned accuracyPresent : 1;
      unsigned noncePresent : 1;
      unsigned tsaPresent : 1;
      unsigned extensionsPresent : 1;
   } m;
   ASN1T_TSTInfo_version version;
   ASN1T_TSAPolicyId policy;
   ASN1T_MessageImprint messageImprint;
   ASN1ConstCharPtr serialNumber;
   ASN1GeneralizedTime genTime;
   ASN1T_Accuracy accuracy;
   ASN1BOOL ordering;
   ASN1ConstCharPtr nonce;
   ASN1T_GeneralName tsa;
   ASN1T_Extensions extensions;
   ASN1T_TSTInfo ();
   ASN1T_TSTInfo (ASN1C_TSTInfo& srcData);
   ~ASN1T_TSTInfo ();
} ASN1T_TSTInfo;

class EXTERN ASN1C_TSTInfo :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_TSTInfo& msgData;
   struct ElementID {
      enum {
         _unknown, version, policy, messageImprint, serialNumber, genTime,
         accuracy, ordering, nonce, tsa, extensions
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_MessageImprint* mpMessageImprintC;
   class ASN1C_Accuracy* mpAccuracyC;
   class ASN1C_GeneralName* mpTsaC;
   class ASN1C_Extensions* mpExtensionsC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_TSTInfo (ASN1T_TSTInfo& data);
   ASN1C_TSTInfo (
      ASN1MessageBufferIF& msgBuf, ASN1T_TSTInfo& data);
   ASN1C_TSTInfo (ASN1C_TSTInfo& original);

   ~ASN1C_TSTInfo();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_TSTInfo& getCopy (ASN1T_TSTInfo* pDstData = 0);
   ASN1T_TSTInfo* newCopy ();

   inline ASN1C_TSTInfo& operator= (ASN1C_TSTInfo& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_TSTInfo (ASN1CTXT* pctxt,
   ASN1T_TSTInfo *pvalue, ASN1TagType tagging);

EXTERN int asn1D_TSTInfo (ASN1CTXT* pctxt,
   ASN1T_TSTInfo *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_TSTInfo
  (ASN1CTXT* pctxt, ASN1T_TSTInfo* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_TSTInfo (ASN1CTXT *pctxt, ASN1T_TSTInfo* pSrcValue, ASN1T_TSTInfo* pDstValue);

EXTERN void asn1Free_TSTInfo (ASN1CTXT *pctxt, ASN1T_TSTInfo* pvalue);

/**************************************************************/
/*                                                            */
/*  TimeStampToken                                            */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_TimeStampToken;

typedef ASN1T_ContentInfo ASN1T_TimeStampToken;

class EXTERN ASN1C_TimeStampToken :
   public ASN1C_ContentInfo
{
protected:
public:
   ASN1C_TimeStampToken (ASN1T_TimeStampToken& data);
   ASN1C_TimeStampToken (
      ASN1MessageBufferIF& msgBuf, ASN1T_TimeStampToken& data);
   ASN1C_TimeStampToken (ASN1C_TimeStampToken& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_TimeStampToken& getCopy (ASN1T_TimeStampToken* pDstData = 0);
   ASN1T_TimeStampToken* newCopy ();

   inline ASN1C_TimeStampToken& operator= (ASN1C_TimeStampToken& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }
} ;

EXTERN int asn1E_TimeStampToken (ASN1CTXT* pctxt,
   ASN1T_TimeStampToken *pvalue, ASN1TagType tagging);

EXTERN int asn1D_TimeStampToken (ASN1CTXT* pctxt,
   ASN1T_TimeStampToken *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_TimeStampToken
  (ASN1CTXT* pctxt, ASN1T_TimeStampToken* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_TimeStampToken (ASN1CTXT *pctxt, ASN1T_TimeStampToken* pSrcValue, ASN1T_TimeStampToken* pDstValue);

EXTERN void asn1Free_TimeStampToken (ASN1CTXT *pctxt, ASN1T_TimeStampToken* pvalue);

/**************************************************************/
/*                                                            */
/*  TimeStampReq_version                                      */
/*                                                            */
/**************************************************************/

struct EXTERN TimeStampReq_version {
   enum Root {
      v1 = 1
   } ;
} ;

typedef ASN1ConstCharPtr ASN1T_TimeStampReq_version;

class EXTERN ASN1C_TimeStampReq_version :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_TimeStampReq_version& msgData;
public:
   ASN1C_TimeStampReq_version (ASN1T_TimeStampReq_version& data);
   ASN1C_TimeStampReq_version (
      ASN1MessageBufferIF& msgBuf, ASN1T_TimeStampReq_version& data);
   ASN1C_TimeStampReq_version (ASN1C_TimeStampReq_version& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_TimeStampReq_version& getCopy (ASN1T_TimeStampReq_version* pDstData = 0);
   ASN1T_TimeStampReq_version* newCopy ();

   inline ASN1C_TimeStampReq_version& operator= (ASN1C_TimeStampReq_version& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }
   static int parseNamedValue (ASN1CTXT* pctxt, ASN1ConstCharPtr* value);
} ;

EXTERN int asn1E_TimeStampReq_version (ASN1CTXT* pctxt,
   ASN1T_TimeStampReq_version *pvalue, ASN1TagType tagging);

EXTERN int asn1D_TimeStampReq_version (ASN1CTXT* pctxt,
   ASN1T_TimeStampReq_version *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_TimeStampReq_version
  (ASN1CTXT* pctxt, ASN1T_TimeStampReq_version value,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_TimeStampReq_version (ASN1CTXT *pctxt, ASN1T_TimeStampReq_version* pSrcValue, ASN1T_TimeStampReq_version* pDstValue);

/**************************************************************/
/*                                                            */
/*  TimeStampReq                                              */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_TimeStampReq;

typedef struct EXTERN ASN1T_TimeStampReq : public ASN1TPDU {
   struct {
      unsigned reqPolicyPresent : 1;
      unsigned noncePresent : 1;
      unsigned extensionsPresent : 1;
   } m;
   ASN1T_TimeStampReq_version version;
   ASN1T_MessageImprint messageImprint;
   ASN1T_TSAPolicyId reqPolicy;
   ASN1ConstCharPtr nonce;
   ASN1BOOL certReq;
   ASN1T_Extensions extensions;
   ASN1T_TimeStampReq ();
   ASN1T_TimeStampReq (ASN1C_TimeStampReq& srcData);
   ~ASN1T_TimeStampReq ();
} ASN1T_TimeStampReq;

class EXTERN ASN1C_TimeStampReq :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_TimeStampReq& msgData;
   struct ElementID {
      enum {
         _unknown, version, messageImprint, reqPolicy, nonce, certReq,
         extensions
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_MessageImprint* mpMessageImprintC;
   class ASN1C_Extensions* mpExtensionsC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_TimeStampReq (ASN1T_TimeStampReq& data);
   ASN1C_TimeStampReq (
      ASN1MessageBufferIF& msgBuf, ASN1T_TimeStampReq& data);
   ASN1C_TimeStampReq (ASN1C_TimeStampReq& original);

   ~ASN1C_TimeStampReq();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_TimeStampReq& getCopy (ASN1T_TimeStampReq* pDstData = 0);
   ASN1T_TimeStampReq* newCopy ();

   inline ASN1C_TimeStampReq& operator= (ASN1C_TimeStampReq& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_TimeStampReq (ASN1CTXT* pctxt,
   ASN1T_TimeStampReq *pvalue, ASN1TagType tagging);

EXTERN int asn1D_TimeStampReq (ASN1CTXT* pctxt,
   ASN1T_TimeStampReq *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_TimeStampReq
  (ASN1CTXT* pctxt, ASN1T_TimeStampReq* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_TimeStampReq (ASN1CTXT *pctxt, ASN1T_TimeStampReq* pSrcValue, ASN1T_TimeStampReq* pDstValue);

EXTERN void asn1Free_TimeStampReq (ASN1CTXT *pctxt, ASN1T_TimeStampReq* pvalue);

/**************************************************************/
/*                                                            */
/*  TimeStampResp                                             */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_TimeStampResp;

typedef struct EXTERN ASN1T_TimeStampResp : public ASN1TPDU {
   struct {
      unsigned timeStampTokenPresent : 1;
   } m;
   ASN1T_PKIStatusInfo status;
   ASN1T_TimeStampToken timeStampToken;
   ASN1T_TimeStampResp ();
   ASN1T_TimeStampResp (ASN1C_TimeStampResp& srcData);
   ~ASN1T_TimeStampResp ();
} ASN1T_TimeStampResp;

class EXTERN ASN1C_TimeStampResp :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_TimeStampResp& msgData;
   struct ElementID {
      enum {
         _unknown, status, timeStampToken
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_PKIStatusInfo* mpStatusC;
   class ASN1C_TimeStampToken* mpTimeStampTokenC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   int mReqElemCnt;
public:
   ASN1C_TimeStampResp (ASN1T_TimeStampResp& data);
   ASN1C_TimeStampResp (
      ASN1MessageBufferIF& msgBuf, ASN1T_TimeStampResp& data);
   ASN1C_TimeStampResp (ASN1C_TimeStampResp& original);

   ~ASN1C_TimeStampResp();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_TimeStampResp& getCopy (ASN1T_TimeStampResp* pDstData = 0);
   ASN1T_TimeStampResp* newCopy ();

   inline ASN1C_TimeStampResp& operator= (ASN1C_TimeStampResp& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_TimeStampResp (ASN1CTXT* pctxt,
   ASN1T_TimeStampResp *pvalue, ASN1TagType tagging);

EXTERN int asn1D_TimeStampResp (ASN1CTXT* pctxt,
   ASN1T_TimeStampResp *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_TimeStampResp
  (ASN1CTXT* pctxt, ASN1T_TimeStampResp* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_TimeStampResp (ASN1CTXT *pctxt, ASN1T_TimeStampResp* pSrcValue, ASN1T_TimeStampResp* pDstValue);

EXTERN void asn1Free_TimeStampResp (ASN1CTXT *pctxt, ASN1T_TimeStampResp* pvalue);

/**************************************************************/
/*                                                            */
/*  TimeStampAuthenticodeRequest                              */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_TimeStampAuthenticodeRequest;

typedef struct EXTERN ASN1T_TimeStampAuthenticodeRequest : public ASN1TPDU {
   struct {
      unsigned attributesPresent : 1;
   } m;
   ASN1TObjId timeStampAlgorithm;
   ASN1T_UnsignedAttributes attributes;
   ASN1T_ContentInfo contentInfo;
   ASN1T_TimeStampAuthenticodeRequest ();
   ASN1T_TimeStampAuthenticodeRequest (ASN1C_TimeStampAuthenticodeRequest& srcData);
   ~ASN1T_TimeStampAuthenticodeRequest ();
} ASN1T_TimeStampAuthenticodeRequest;

class EXTERN ASN1C_TimeStampAuthenticodeRequest :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_TimeStampAuthenticodeRequest& msgData;
   struct ElementID {
      enum {
         _unknown, timeStampAlgorithm, attributes, contentInfo
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_UnsignedAttributes* mpAttributesC;
   class ASN1C_ContentInfo* mpContentInfoC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_TimeStampAuthenticodeRequest (ASN1T_TimeStampAuthenticodeRequest& data);
   ASN1C_TimeStampAuthenticodeRequest (
      ASN1MessageBufferIF& msgBuf, ASN1T_TimeStampAuthenticodeRequest& data);
   ASN1C_TimeStampAuthenticodeRequest (ASN1C_TimeStampAuthenticodeRequest& original);

   ~ASN1C_TimeStampAuthenticodeRequest();
   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_TimeStampAuthenticodeRequest& getCopy (ASN1T_TimeStampAuthenticodeRequest* pDstData = 0);
   ASN1T_TimeStampAuthenticodeRequest* newCopy ();

   inline ASN1C_TimeStampAuthenticodeRequest& operator= (ASN1C_TimeStampAuthenticodeRequest& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_TimeStampAuthenticodeRequest (ASN1CTXT* pctxt,
   ASN1T_TimeStampAuthenticodeRequest *pvalue, ASN1TagType tagging);

EXTERN int asn1D_TimeStampAuthenticodeRequest (ASN1CTXT* pctxt,
   ASN1T_TimeStampAuthenticodeRequest *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_TimeStampAuthenticodeRequest
  (ASN1CTXT* pctxt, ASN1T_TimeStampAuthenticodeRequest* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_TimeStampAuthenticodeRequest (ASN1CTXT *pctxt, ASN1T_TimeStampAuthenticodeRequest* pSrcValue, ASN1T_TimeStampAuthenticodeRequest* pDstValue);

EXTERN void asn1Free_TimeStampAuthenticodeRequest (ASN1CTXT *pctxt, ASN1T_TimeStampAuthenticodeRequest* pvalue);

/* Value definitions */

extern EXTERN ASN1OBJID id_ct_TSTInfo;

}
#endif
