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

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

/**************************************************************/
/*                                                            */
/*  SMIMECapability                                           */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_SMIMECapability;

typedef struct EXTERN ASN1T_SMIMECapability : public ASN1TPDU {
   struct {
      unsigned parametersPresent : 1;
   } m;
   ASN1TObjId capabilityID;
   ASN1TOpenType parameters;
   ASN1T_SMIMECapability ();
   ASN1T_SMIMECapability (ASN1C_SMIMECapability& srcData);
   ~ASN1T_SMIMECapability ();
} ASN1T_SMIMECapability;

class EXTERN ASN1C_SMIMECapability :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_SMIMECapability& msgData;
   struct ElementID {
      enum {
         _unknown, capabilityID, parameters
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   ASN1CXerOpenType* mpParametersC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_SMIMECapability (ASN1T_SMIMECapability& data);
   ASN1C_SMIMECapability (
      ASN1MessageBufferIF& msgBuf, ASN1T_SMIMECapability& data);
   ASN1C_SMIMECapability (ASN1C_SMIMECapability& original);

   ~ASN1C_SMIMECapability();
   // 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_SMIMECapability& getCopy (ASN1T_SMIMECapability* pDstData = 0);
   ASN1T_SMIMECapability* newCopy ();

   inline ASN1C_SMIMECapability& operator= (ASN1C_SMIMECapability& 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_SMIMECapability (ASN1CTXT* pctxt,
   ASN1T_SMIMECapability *pvalue, ASN1TagType tagging);

EXTERN int asn1D_SMIMECapability (ASN1CTXT* pctxt,
   ASN1T_SMIMECapability *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_SMIMECapability
  (ASN1CTXT* pctxt, ASN1T_SMIMECapability* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_SMIMECapability (ASN1CTXT *pctxt, ASN1T_SMIMECapability* pSrcValue, ASN1T_SMIMECapability* pDstValue);

EXTERN void asn1Free_SMIMECapability (ASN1CTXT *pctxt, ASN1T_SMIMECapability* pvalue);

/**************************************************************/
/*                                                            */
/*  SMIMECapabilities                                         */
/*                                                            */
/**************************************************************/

/* List of ASN1T_SMIMECapability */
typedef struct EXTERN ASN1T_SMIMECapabilities : public ASN1TPDUSeqOfList {
   ~ASN1T_SMIMECapabilities();
} ASN1T_SMIMECapabilities;

class EXTERN ASN1C_SMIMECapabilities :
   public ASN1CSeqOfList, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_SMIMECapabilities& msgData;
   ASN1T_SMIMECapability *mpElement;
   class ASN1C_SMIMECapability* mpElementC;
   ASN1XERSAXDecodeHandler* mpCurrElem;

public:
   ASN1C_SMIMECapabilities (ASN1T_SMIMECapabilities& data);
   ASN1C_SMIMECapabilities (
      ASN1MessageBufferIF& msgBuf, ASN1T_SMIMECapabilities& data);
   ASN1C_SMIMECapabilities (ASN1C_SMIMECapabilities& original);

   ~ASN1C_SMIMECapabilities();
   // 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_SMIMECapabilities& getCopy (ASN1T_SMIMECapabilities* pDstData = 0);
   ASN1T_SMIMECapabilities* newCopy ();

   ASN1C_SMIMECapabilities& operator= (ASN1C_SMIMECapabilities& srcData);
   void Append (ASN1T_SMIMECapability * elem) {
      append ((void*)elem);
   }

   // 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_SMIMECapabilities (ASN1CTXT* pctxt,
   ASN1T_SMIMECapabilities *pvalue, ASN1TagType tagging);

EXTERN int asn1D_SMIMECapabilities (ASN1CTXT* pctxt,
   ASN1T_SMIMECapabilities *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_SMIMECapabilities
  (ASN1CTXT* pctxt, ASN1T_SMIMECapabilities* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_SMIMECapabilities (ASN1CTXT *pctxt, ASN1T_SMIMECapabilities* pSrcValue, ASN1T_SMIMECapabilities* pDstValue);

EXTERN void asn1Free_SMIMECapabilities (ASN1CTXT *pctxt, ASN1T_SMIMECapabilities* pvalue);

/**************************************************************/
/*                                                            */
/*  SMIMEEncryptionKeyPreference                              */
/*                                                            */
/**************************************************************/

/* Choice tag constants */

#define T_SMIMEEncryptionKeyPreference_issuerAndSerialNumber 1
#define T_SMIMEEncryptionKeyPreference_receipentKeyId 2
#define T_SMIMEEncryptionKeyPreference_subjectAltKeyIdentifier 3

class EXTERN ASN1C_SMIMEEncryptionKeyPreference;

typedef struct EXTERN ASN1T_SMIMEEncryptionKeyPreference : public ASN1TPDU {
   int t;
   union {
      /* t = 1 */
      ASN1T_IssuerAndSerialNumber *issuerAndSerialNumber;
      /* t = 2 */
      ASN1T_RecipientKeyIdentifier *receipentKeyId;
      /* t = 3 */
      ASN1T_SubjectKeyIdentifier *subjectAltKeyIdentifier;
   } u;
   ASN1T_SMIMEEncryptionKeyPreference () {}
   ASN1T_SMIMEEncryptionKeyPreference (ASN1C_SMIMEEncryptionKeyPreference& srcData);
   ~ASN1T_SMIMEEncryptionKeyPreference ();
} ASN1T_SMIMEEncryptionKeyPreference;

class EXTERN ASN1C_SMIMEEncryptionKeyPreference :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_SMIMEEncryptionKeyPreference& msgData;
   struct ElementID {
      enum {
         _unknown, issuerAndSerialNumber, receipentKeyId,
         subjectAltKeyIdentifier
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   class ASN1C_IssuerAndSerialNumber* mpIssuerAndSerialNumberC;
   class ASN1C_RecipientKeyIdentifier* mpReceipentKeyIdC;
   ASN1XERSAXDecodeHandler* mpCurrElem;
   ASN1MemBuf mCurrElemValue;
public:
   ASN1C_SMIMEEncryptionKeyPreference (ASN1T_SMIMEEncryptionKeyPreference& data);
   ASN1C_SMIMEEncryptionKeyPreference (
      ASN1MessageBufferIF& msgBuf, ASN1T_SMIMEEncryptionKeyPreference& data);
   ASN1C_SMIMEEncryptionKeyPreference (ASN1C_SMIMEEncryptionKeyPreference& original);

   ~ASN1C_SMIMEEncryptionKeyPreference();
   // 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_SMIMEEncryptionKeyPreference& getCopy (ASN1T_SMIMEEncryptionKeyPreference* pDstData = 0);
   ASN1T_SMIMEEncryptionKeyPreference* newCopy ();

   inline ASN1C_SMIMEEncryptionKeyPreference& operator= (ASN1C_SMIMEEncryptionKeyPreference& 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_SMIMEEncryptionKeyPreference (ASN1CTXT* pctxt,
   ASN1T_SMIMEEncryptionKeyPreference *pvalue, ASN1TagType tagging);

EXTERN int asn1D_SMIMEEncryptionKeyPreference (ASN1CTXT* pctxt,
   ASN1T_SMIMEEncryptionKeyPreference *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_SMIMEEncryptionKeyPreference
  (ASN1CTXT* pctxt, ASN1T_SMIMEEncryptionKeyPreference* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_SMIMEEncryptionKeyPreference (ASN1CTXT *pctxt, ASN1T_SMIMEEncryptionKeyPreference* pSrcValue, ASN1T_SMIMEEncryptionKeyPreference* pDstValue);

EXTERN void asn1Free_SMIMEEncryptionKeyPreference (ASN1CTXT *pctxt, ASN1T_SMIMEEncryptionKeyPreference* pvalue);

/**************************************************************/
/*                                                            */
/*  RC2_CBC_parameter                                         */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_RC2_CBC_parameter;

typedef struct EXTERN ASN1T_RC2_CBC_parameter : public ASN1TPDU {
   ASN1INT rc2ParameterVersion;
   ASN1T_IV iv;
   ASN1T_RC2_CBC_parameter ();
   ASN1T_RC2_CBC_parameter (ASN1C_RC2_CBC_parameter& srcData);
   ~ASN1T_RC2_CBC_parameter ();
} ASN1T_RC2_CBC_parameter;

class EXTERN ASN1C_RC2_CBC_parameter :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_RC2_CBC_parameter& msgData;
   struct ElementID {
      enum {
         _unknown, rc2ParameterVersion, iv
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_RC2_CBC_parameter (ASN1T_RC2_CBC_parameter& data);
   ASN1C_RC2_CBC_parameter (
      ASN1MessageBufferIF& msgBuf, ASN1T_RC2_CBC_parameter& data);
   ASN1C_RC2_CBC_parameter (ASN1C_RC2_CBC_parameter& 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_RC2_CBC_parameter& getCopy (ASN1T_RC2_CBC_parameter* pDstData = 0);
   ASN1T_RC2_CBC_parameter* newCopy ();

   inline ASN1C_RC2_CBC_parameter& operator= (ASN1C_RC2_CBC_parameter& 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_RC2_CBC_parameter (ASN1CTXT* pctxt,
   ASN1T_RC2_CBC_parameter *pvalue, ASN1TagType tagging);

EXTERN int asn1D_RC2_CBC_parameter (ASN1CTXT* pctxt,
   ASN1T_RC2_CBC_parameter *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_RC2_CBC_parameter
  (ASN1CTXT* pctxt, ASN1T_RC2_CBC_parameter* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_RC2_CBC_parameter (ASN1CTXT *pctxt, ASN1T_RC2_CBC_parameter* pSrcValue, ASN1T_RC2_CBC_parameter* pDstValue);

EXTERN void asn1Free_RC2_CBC_parameter (ASN1CTXT *pctxt, ASN1T_RC2_CBC_parameter* pvalue);

/* Value definitions */

extern EXTERN ASN1OBJID id_aa;
extern EXTERN ASN1OBJID smimeCapabilities;
extern EXTERN ASN1OBJID id_aa_encrypKeyPref;
extern EXTERN ASN1OBJID dES_EDE3_CBC;
extern EXTERN ASN1OBJID rC2_CBC;

}
#endif
