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

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

/**************************************************************/
/*                                                            */
/*  NSServiceType                                             */
/*                                                            */
/**************************************************************/

struct EXTERN NSServiceType {
   enum Root {
      registerName = 1,
      deleteName = 2,
      checkName = 3,
      reserveName = 4
   } ;
} ;

typedef ASN1UINT ASN1T_NSServiceType;

class EXTERN ASN1C_NSServiceType :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_NSServiceType& msgData;
public:
   ASN1C_NSServiceType (ASN1T_NSServiceType& data);
   ASN1C_NSServiceType (
      ASN1MessageBufferIF& msgBuf, ASN1T_NSServiceType& data);
   ASN1C_NSServiceType (ASN1C_NSServiceType& 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_NSServiceType& getCopy (ASN1T_NSServiceType* pDstData = 0);
   ASN1T_NSServiceType* newCopy ();

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

EXTERN int asn1E_NSServiceType (ASN1CTXT* pctxt,
   ASN1T_NSServiceType *pvalue, ASN1TagType tagging);

EXTERN int asn1D_NSServiceType (ASN1CTXT* pctxt,
   ASN1T_NSServiceType *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_NSServiceType
  (ASN1CTXT* pctxt, ASN1T_NSServiceType value,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_NSServiceType (ASN1CTXT *pctxt, ASN1T_NSServiceType* pSrcValue, ASN1T_NSServiceType* pDstValue);

/**************************************************************/
/*                                                            */
/*  NSStatus                                                  */
/*                                                            */
/**************************************************************/

struct EXTERN NSStatus {
   enum Root {
      success = 0,
      nameExists = 1,
      incompleteName = 2
   } ;
} ;

typedef ASN1UINT ASN1T_NSStatus;

class EXTERN ASN1C_NSStatus :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_NSStatus& msgData;
public:
   ASN1C_NSStatus (ASN1T_NSStatus& data);
   ASN1C_NSStatus (
      ASN1MessageBufferIF& msgBuf, ASN1T_NSStatus& data);
   ASN1C_NSStatus (ASN1C_NSStatus& 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_NSStatus& getCopy (ASN1T_NSStatus* pDstData = 0);
   ASN1T_NSStatus* newCopy ();

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

EXTERN int asn1E_NSStatus (ASN1CTXT* pctxt,
   ASN1T_NSStatus *pvalue, ASN1TagType tagging);

EXTERN int asn1D_NSStatus (ASN1CTXT* pctxt,
   ASN1T_NSStatus *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_NSStatus
  (ASN1CTXT* pctxt, ASN1T_NSStatus value,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_NSStatus (ASN1CTXT *pctxt, ASN1T_NSStatus* pSrcValue, ASN1T_NSStatus* pDstValue);

/**************************************************************/
/*                                                            */
/*  NSVersion                                                 */
/*                                                            */
/**************************************************************/

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

typedef ASN1UINT ASN1T_NSVersion;

class EXTERN ASN1C_NSVersion :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_NSVersion& msgData;
public:
   ASN1C_NSVersion (ASN1T_NSVersion& data);
   ASN1C_NSVersion (
      ASN1MessageBufferIF& msgBuf, ASN1T_NSVersion& data);
   ASN1C_NSVersion (ASN1C_NSVersion& 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_NSVersion& getCopy (ASN1T_NSVersion* pDstData = 0);
   ASN1T_NSVersion* newCopy ();

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

EXTERN int asn1E_NSVersion (ASN1CTXT* pctxt,
   ASN1T_NSVersion *pvalue, ASN1TagType tagging);

EXTERN int asn1D_NSVersion (ASN1CTXT* pctxt,
   ASN1T_NSVersion *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_NSVersion
  (ASN1CTXT* pctxt, ASN1T_NSVersion value,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_NSVersion (ASN1CTXT *pctxt, ASN1T_NSVersion* pSrcValue, ASN1T_NSVersion* pDstValue);

/**************************************************************/
/*                                                            */
/*  NSRequestInformation                                      */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_NSRequestInformation;

typedef struct EXTERN ASN1T_NSRequestInformation : public ASN1TPDU {
   struct {
      unsigned versionPresent : 1;
      unsigned requesterPresent : 1;
   } m;
   ASN1T_NSVersion version;
   ASN1T_NSServiceType service;
   ASN1GeneralizedTime requestTime;
   ASN1T_GeneralNames requester;
   ASN1T_NSRequestInformation ();
   ASN1T_NSRequestInformation (ASN1C_NSRequestInformation& srcData);
   ~ASN1T_NSRequestInformation ();
} ASN1T_NSRequestInformation;

class EXTERN ASN1C_NSRequestInformation :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_NSRequestInformation& msgData;
   struct ElementID {
      enum {
         _unknown, version, service, requestTime, requester
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_GeneralNames* mpRequesterC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_NSRequestInformation (ASN1T_NSRequestInformation& data);
   ASN1C_NSRequestInformation (
      ASN1MessageBufferIF& msgBuf, ASN1T_NSRequestInformation& data);
   ASN1C_NSRequestInformation (ASN1C_NSRequestInformation& original);

   ~ASN1C_NSRequestInformation();
   // 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_NSRequestInformation& getCopy (ASN1T_NSRequestInformation* pDstData = 0);
   ASN1T_NSRequestInformation* newCopy ();

   inline ASN1C_NSRequestInformation& operator= (ASN1C_NSRequestInformation& 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_NSRequestInformation (ASN1CTXT* pctxt,
   ASN1T_NSRequestInformation *pvalue, ASN1TagType tagging);

EXTERN int asn1D_NSRequestInformation (ASN1CTXT* pctxt,
   ASN1T_NSRequestInformation *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_NSRequestInformation
  (ASN1CTXT* pctxt, ASN1T_NSRequestInformation* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_NSRequestInformation (ASN1CTXT *pctxt, ASN1T_NSRequestInformation* pSrcValue, ASN1T_NSRequestInformation* pDstValue);

EXTERN void asn1Free_NSRequestInformation (ASN1CTXT *pctxt, ASN1T_NSRequestInformation* pvalue);

/**************************************************************/
/*                                                            */
/*  SubjectNameInfo                                           */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_SubjectNameInfo;

typedef struct EXTERN ASN1T_SubjectNameInfo : public ASN1TPDU {
   struct {
      unsigned subjectPresent : 1;
      unsigned subjectAltNamePresent : 1;
   } m;
   ASN1T_Name subject;
   ASN1T_GeneralNames subjectAltName;
   ASN1T_SubjectNameInfo ();
   ASN1T_SubjectNameInfo (ASN1C_SubjectNameInfo& srcData);
   ~ASN1T_SubjectNameInfo ();
} ASN1T_SubjectNameInfo;

class EXTERN ASN1C_SubjectNameInfo :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_SubjectNameInfo& msgData;
   struct ElementID {
      enum {
         _unknown, subject, subjectAltName
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_Name* mpSubjectC;
   class ASN1C_GeneralNames* mpSubjectAltNameC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   int mReqElemCnt;
public:
   ASN1C_SubjectNameInfo (ASN1T_SubjectNameInfo& data);
   ASN1C_SubjectNameInfo (
      ASN1MessageBufferIF& msgBuf, ASN1T_SubjectNameInfo& data);
   ASN1C_SubjectNameInfo (ASN1C_SubjectNameInfo& original);

   ~ASN1C_SubjectNameInfo();
   // 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_SubjectNameInfo& getCopy (ASN1T_SubjectNameInfo* pDstData = 0);
   ASN1T_SubjectNameInfo* newCopy ();

   inline ASN1C_SubjectNameInfo& operator= (ASN1C_SubjectNameInfo& 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_SubjectNameInfo (ASN1CTXT* pctxt,
   ASN1T_SubjectNameInfo *pvalue, ASN1TagType tagging);

EXTERN int asn1D_SubjectNameInfo (ASN1CTXT* pctxt,
   ASN1T_SubjectNameInfo *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_SubjectNameInfo
  (ASN1CTXT* pctxt, ASN1T_SubjectNameInfo* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_SubjectNameInfo (ASN1CTXT *pctxt, ASN1T_SubjectNameInfo* pSrcValue, ASN1T_SubjectNameInfo* pDstValue);

EXTERN void asn1Free_SubjectNameInfo (ASN1CTXT *pctxt, ASN1T_SubjectNameInfo* pvalue);

/**************************************************************/
/*                                                            */
/*  NameInfo                                                  */
/*                                                            */
/**************************************************************/

/* Choice tag constants */

#define T_NameInfo_subjectNameInfo      1

class EXTERN ASN1C_NameInfo;

typedef struct EXTERN ASN1T_NameInfo : public ASN1TPDU {
   int t;
   union {
      /* t = 1 */
      ASN1T_SubjectNameInfo *subjectNameInfo;
   } u;
   ASN1T_NameInfo () {}
   ASN1T_NameInfo (ASN1C_NameInfo& srcData);
   ~ASN1T_NameInfo ();
} ASN1T_NameInfo;

class EXTERN ASN1C_NameInfo :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_NameInfo& msgData;
   struct ElementID {
      enum {
         _unknown, subjectNameInfo
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_SubjectNameInfo* mpSubjectNameInfoC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
public:
   ASN1C_NameInfo (ASN1T_NameInfo& data);
   ASN1C_NameInfo (
      ASN1MessageBufferIF& msgBuf, ASN1T_NameInfo& data);
   ASN1C_NameInfo (ASN1C_NameInfo& original);

   ~ASN1C_NameInfo();
   // 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_NameInfo& getCopy (ASN1T_NameInfo* pDstData = 0);
   ASN1T_NameInfo* newCopy ();

   inline ASN1C_NameInfo& operator= (ASN1C_NameInfo& 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_NameInfo (ASN1CTXT* pctxt,
   ASN1T_NameInfo *pvalue, ASN1TagType tagging);

EXTERN int asn1D_NameInfo (ASN1CTXT* pctxt,
   ASN1T_NameInfo *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_NameInfo
  (ASN1CTXT* pctxt, ASN1T_NameInfo* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_NameInfo (ASN1CTXT *pctxt, ASN1T_NameInfo* pSrcValue, ASN1T_NameInfo* pDstValue);

EXTERN void asn1Free_NameInfo (ASN1CTXT *pctxt, ASN1T_NameInfo* pvalue);

/**************************************************************/
/*                                                            */
/*  NSData                                                    */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_NSData;

typedef struct EXTERN ASN1T_NSData : public ASN1TPDU {
   ASN1INT reservedPeriod;
   ASN1INT nameType;
   ASN1T_NameInfo nsName;
   ASN1T_NSData ();
   ASN1T_NSData (ASN1C_NSData& srcData);
   ~ASN1T_NSData ();
} ASN1T_NSData;

class EXTERN ASN1C_NSData :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_NSData& msgData;
   struct ElementID {
      enum {
         _unknown, reservedPeriod, nameType, nsName
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_NameInfo* mpNsNameC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_NSData (ASN1T_NSData& data);
   ASN1C_NSData (
      ASN1MessageBufferIF& msgBuf, ASN1T_NSData& data);
   ASN1C_NSData (ASN1C_NSData& original);

   ~ASN1C_NSData();
   // 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_NSData& getCopy (ASN1T_NSData* pDstData = 0);
   ASN1T_NSData* newCopy ();

   inline ASN1C_NSData& operator= (ASN1C_NSData& 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_NSData (ASN1CTXT* pctxt,
   ASN1T_NSData *pvalue, ASN1TagType tagging);

EXTERN int asn1D_NSData (ASN1CTXT* pctxt,
   ASN1T_NSData *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_NSData
  (ASN1CTXT* pctxt, ASN1T_NSData* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_NSData (ASN1CTXT *pctxt, ASN1T_NSData* pSrcValue, ASN1T_NSData* pDstValue);

EXTERN void asn1Free_NSData (ASN1CTXT *pctxt, ASN1T_NSData* pvalue);

/**************************************************************/
/*                                                            */
/*  NSRequest                                                 */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_NSRequest;

typedef struct EXTERN ASN1T_NSRequest : public ASN1TPDU {
   struct {
      unsigned transactionIdentifierPresent : 1;
   } m;
   ASN1T_NSRequestInformation requestInformation;
   ASN1T_NSData nsData;
   ASN1T_GeneralName transactionIdentifier;
   ASN1T_NSRequest ();
   ASN1T_NSRequest (ASN1C_NSRequest& srcData);
   ~ASN1T_NSRequest ();
} ASN1T_NSRequest;

class EXTERN ASN1C_NSRequest :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_NSRequest& msgData;
   struct ElementID {
      enum {
         _unknown, requestInformation, nsData, transactionIdentifier
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_NSRequestInformation* mpRequestInformationC;
   class ASN1C_NSData* mpNsDataC;
   class ASN1C_GeneralName* mpTransactionIdentifierC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   int mReqElemCnt;
public:
   ASN1C_NSRequest (ASN1T_NSRequest& data);
   ASN1C_NSRequest (
      ASN1MessageBufferIF& msgBuf, ASN1T_NSRequest& data);
   ASN1C_NSRequest (ASN1C_NSRequest& original);

   ~ASN1C_NSRequest();
   // 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_NSRequest& getCopy (ASN1T_NSRequest* pDstData = 0);
   ASN1T_NSRequest* newCopy ();

   inline ASN1C_NSRequest& operator= (ASN1C_NSRequest& 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_NSRequest (ASN1CTXT* pctxt,
   ASN1T_NSRequest *pvalue, ASN1TagType tagging);

EXTERN int asn1D_NSRequest (ASN1CTXT* pctxt,
   ASN1T_NSRequest *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_NSRequest
  (ASN1CTXT* pctxt, ASN1T_NSRequest* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_NSRequest (ASN1CTXT *pctxt, ASN1T_NSRequest* pSrcValue, ASN1T_NSRequest* pDstValue);

EXTERN void asn1Free_NSRequest (ASN1CTXT *pctxt, ASN1T_NSRequest* pvalue);

/**************************************************************/
/*                                                            */
/*  NSStatusInfo                                              */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_NSStatusInfo;

typedef struct EXTERN ASN1T_NSStatusInfo : public ASN1TPDU {
   struct {
      unsigned statusStringPresent : 1;
   } m;
   ASN1T_NSStatus status;
   ASN1T_PKIFreeText statusString;
   ASN1T_NSStatusInfo ();
   ASN1T_NSStatusInfo (ASN1C_NSStatusInfo& srcData);
   ~ASN1T_NSStatusInfo ();
} ASN1T_NSStatusInfo;

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

   class ASN1C_PKIFreeText* mpStatusStringC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_NSStatusInfo (ASN1T_NSStatusInfo& data);
   ASN1C_NSStatusInfo (
      ASN1MessageBufferIF& msgBuf, ASN1T_NSStatusInfo& data);
   ASN1C_NSStatusInfo (ASN1C_NSStatusInfo& original);

   ~ASN1C_NSStatusInfo();
   // 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_NSStatusInfo& getCopy (ASN1T_NSStatusInfo* pDstData = 0);
   ASN1T_NSStatusInfo* newCopy ();

   inline ASN1C_NSStatusInfo& operator= (ASN1C_NSStatusInfo& 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_NSStatusInfo (ASN1CTXT* pctxt,
   ASN1T_NSStatusInfo *pvalue, ASN1TagType tagging);

EXTERN int asn1D_NSStatusInfo (ASN1CTXT* pctxt,
   ASN1T_NSStatusInfo *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_NSStatusInfo
  (ASN1CTXT* pctxt, ASN1T_NSStatusInfo* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_NSStatusInfo (ASN1CTXT *pctxt, ASN1T_NSStatusInfo* pSrcValue, ASN1T_NSStatusInfo* pDstValue);

EXTERN void asn1Free_NSStatusInfo (ASN1CTXT *pctxt, ASN1T_NSStatusInfo* pvalue);

/**************************************************************/
/*                                                            */
/*  NSRespInfo                                                */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_NSRespInfo;

typedef struct EXTERN ASN1T_NSRespInfo : public ASN1TPDU {
   struct {
      unsigned versionPresent : 1;
      unsigned extensionsPresent : 1;
   } m;
   ASN1T_NSVersion version;
   ASN1GeneralizedTime responseTime;
   ASN1T_NSStatusInfo nsStatus;
   ASN1T_Extensions extensions;
   ASN1T_NSRespInfo ();
   ASN1T_NSRespInfo (ASN1C_NSRespInfo& srcData);
   ~ASN1T_NSRespInfo ();
} ASN1T_NSRespInfo;

class EXTERN ASN1C_NSRespInfo :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_NSRespInfo& msgData;
   struct ElementID {
      enum {
         _unknown, version, responseTime, nsStatus, extensions
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_NSStatusInfo* mpNsStatusC;
   class ASN1C_Extensions* mpExtensionsC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_NSRespInfo (ASN1T_NSRespInfo& data);
   ASN1C_NSRespInfo (
      ASN1MessageBufferIF& msgBuf, ASN1T_NSRespInfo& data);
   ASN1C_NSRespInfo (ASN1C_NSRespInfo& original);

   ~ASN1C_NSRespInfo();
   // 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_NSRespInfo& getCopy (ASN1T_NSRespInfo* pDstData = 0);
   ASN1T_NSRespInfo* newCopy ();

   inline ASN1C_NSRespInfo& operator= (ASN1C_NSRespInfo& 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_NSRespInfo (ASN1CTXT* pctxt,
   ASN1T_NSRespInfo *pvalue, ASN1TagType tagging);

EXTERN int asn1D_NSRespInfo (ASN1CTXT* pctxt,
   ASN1T_NSRespInfo *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_NSRespInfo
  (ASN1CTXT* pctxt, ASN1T_NSRespInfo* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_NSRespInfo (ASN1CTXT *pctxt, ASN1T_NSRespInfo* pSrcValue, ASN1T_NSRespInfo* pDstValue);

EXTERN void asn1Free_NSRespInfo (ASN1CTXT *pctxt, ASN1T_NSRespInfo* pvalue);

/**************************************************************/
/*                                                            */
/*  NSErrorNotice                                             */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_NSErrorNotice;

typedef struct EXTERN ASN1T_NSErrorNotice : public ASN1TPDU {
   struct {
      unsigned transactionIdentifierPresent : 1;
   } m;
   ASN1T_PKIStatusInfo transactionStatus;
   ASN1T_GeneralName transactionIdentifier;
   ASN1T_NSErrorNotice ();
   ASN1T_NSErrorNotice (ASN1C_NSErrorNotice& srcData);
   ~ASN1T_NSErrorNotice ();
} ASN1T_NSErrorNotice;

class EXTERN ASN1C_NSErrorNotice :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_NSErrorNotice& msgData;
   struct ElementID {
      enum {
         _unknown, transactionStatus, transactionIdentifier
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_PKIStatusInfo* mpTransactionStatusC;
   class ASN1C_GeneralName* mpTransactionIdentifierC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   int mReqElemCnt;
public:
   ASN1C_NSErrorNotice (ASN1T_NSErrorNotice& data);
   ASN1C_NSErrorNotice (
      ASN1MessageBufferIF& msgBuf, ASN1T_NSErrorNotice& data);
   ASN1C_NSErrorNotice (ASN1C_NSErrorNotice& original);

   ~ASN1C_NSErrorNotice();
   // 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_NSErrorNotice& getCopy (ASN1T_NSErrorNotice* pDstData = 0);
   ASN1T_NSErrorNotice* newCopy ();

   inline ASN1C_NSErrorNotice& operator= (ASN1C_NSErrorNotice& 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_NSErrorNotice (ASN1CTXT* pctxt,
   ASN1T_NSErrorNotice *pvalue, ASN1TagType tagging);

EXTERN int asn1D_NSErrorNotice (ASN1CTXT* pctxt,
   ASN1T_NSErrorNotice *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_NSErrorNotice
  (ASN1CTXT* pctxt, ASN1T_NSErrorNotice* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_NSErrorNotice (ASN1CTXT *pctxt, ASN1T_NSErrorNotice* pSrcValue, ASN1T_NSErrorNotice* pDstValue);

EXTERN void asn1Free_NSErrorNotice (ASN1CTXT *pctxt, ASN1T_NSErrorNotice* pvalue);

/**************************************************************/
/*                                                            */
/*  NSResponse                                                */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_NSResponse;

typedef struct EXTERN ASN1T_NSResponse : public ASN1TPDU {
   ASN1T_NSRespInfo nsRespInfo;
   ASN1T_NSErrorNotice nsErrorNote;
   ASN1T_NSResponse ();
   ASN1T_NSResponse (ASN1C_NSResponse& srcData);
   ~ASN1T_NSResponse ();
} ASN1T_NSResponse;

class EXTERN ASN1C_NSResponse :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_NSResponse& msgData;
   struct ElementID {
      enum {
         _unknown, nsRespInfo, nsErrorNote
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_NSRespInfo* mpNsRespInfoC;
   class ASN1C_NSErrorNotice* mpNsErrorNoteC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   int mReqElemCnt;
public:
   ASN1C_NSResponse (ASN1T_NSResponse& data);
   ASN1C_NSResponse (
      ASN1MessageBufferIF& msgBuf, ASN1T_NSResponse& data);
   ASN1C_NSResponse (ASN1C_NSResponse& original);

   ~ASN1C_NSResponse();
   // 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_NSResponse& getCopy (ASN1T_NSResponse* pDstData = 0);
   ASN1T_NSResponse* newCopy ();

   inline ASN1C_NSResponse& operator= (ASN1C_NSResponse& 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_NSResponse (ASN1CTXT* pctxt,
   ASN1T_NSResponse *pvalue, ASN1TagType tagging);

EXTERN int asn1D_NSResponse (ASN1CTXT* pctxt,
   ASN1T_NSResponse *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_NSResponse
  (ASN1CTXT* pctxt, ASN1T_NSResponse* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_NSResponse (ASN1CTXT *pctxt, ASN1T_NSResponse* pSrcValue, ASN1T_NSResponse* pDstValue);

EXTERN void asn1Free_NSResponse (ASN1CTXT *pctxt, ASN1T_NSResponse* pvalue);

/* Value definitions */

extern EXTERN ASN1OBJID id_ct_NSRequestData;
extern EXTERN ASN1OBJID id_ct_NSResponseData;

}
#endif
