/*
 *    asn-useful.h
 *
 *    "ASN-USEFUL" ASN.1 module C type definitions and prototypes
 *
 *    This .h file was generated by snacc on Tue Mar 19 07:24:46 2002
 *
 *    UBC snacc written compiler by Mike Sample
 *
 *    NOTE: This is a machine generated file--editing not recommended
 */


#ifndef _asn_useful_h_
#define _asn_useful_h_




typedef AsnOcts ObjectDescriptor; /* [UNIVERSAL 7] IMPLICIT OCTET STRING */

#define BEncObjectDescriptorContent BEncAsnOctsContent

#define BDecObjectDescriptorContent BDecAsnOctsContent

#define PrintObjectDescriptor PrintAsnOcts

#define FreeObjectDescriptor FreeAsnOcts 




typedef AsnOcts UTF8String; /* [UNIVERSAL 12] IMPLICIT OCTET STRING */

AsnLen BEncUTF8String PROTO ((BUF_TYPE b, UTF8String *v));

void BDecUTF8String PROTO ((BUF_TYPE b, UTF8String *result, AsnLen *bytesDecoded, ENV_TYPE env));
#define BEncUTF8StringContent BEncAsnOctsContent

#define BDecUTF8StringContent BDecAsnOctsContent

#define PrintUTF8String PrintAsnOcts

#define FreeUTF8String FreeAsnOcts 




typedef AsnOcts NumericString; /* [UNIVERSAL 18] IMPLICIT OCTET STRING */

AsnLen BEncNumericString PROTO ((BUF_TYPE b, NumericString *v));

void BDecNumericString PROTO ((BUF_TYPE b, NumericString *result, AsnLen *bytesDecoded, ENV_TYPE env));
#define BEncNumericStringContent BEncAsnOctsContent

#define BDecNumericStringContent BDecAsnOctsContent

#define PrintNumericString PrintAsnOcts

#define FreeNumericString FreeAsnOcts 




typedef AsnOcts PrintableString; /* [UNIVERSAL 19] IMPLICIT OCTET STRING */

AsnLen BEncPrintableString PROTO ((BUF_TYPE b, PrintableString *v));

void BDecPrintableString PROTO ((BUF_TYPE b, PrintableString *result, AsnLen *bytesDecoded, ENV_TYPE env));
#define BEncPrintableStringContent BEncAsnOctsContent

#define BDecPrintableStringContent BDecAsnOctsContent

#define PrintPrintableString PrintAsnOcts

#define FreePrintableString FreeAsnOcts 




typedef AsnOcts TeletexString; /* [UNIVERSAL 20] IMPLICIT OCTET STRING */

AsnLen BEncTeletexString PROTO ((BUF_TYPE b, TeletexString *v));

void BDecTeletexString PROTO ((BUF_TYPE b, TeletexString *result, AsnLen *bytesDecoded, ENV_TYPE env));
#define BEncTeletexStringContent BEncAsnOctsContent

#define BDecTeletexStringContent BDecAsnOctsContent

#define PrintTeletexString PrintAsnOcts

#define FreeTeletexString FreeAsnOcts 




typedef AsnOcts T61String; /* [UNIVERSAL 20] IMPLICIT OCTET STRING */

AsnLen BEncT61String PROTO ((BUF_TYPE b, T61String *v));

void BDecT61String PROTO ((BUF_TYPE b, T61String *result, AsnLen *bytesDecoded, ENV_TYPE env));
#define BEncT61StringContent BEncAsnOctsContent

#define BDecT61StringContent BDecAsnOctsContent

#define PrintT61String PrintAsnOcts

#define FreeT61String FreeAsnOcts 




typedef AsnOcts VideotexString; /* [UNIVERSAL 21] IMPLICIT OCTET STRING */

AsnLen BEncVideotexString PROTO ((BUF_TYPE b, VideotexString *v));

void BDecVideotexString PROTO ((BUF_TYPE b, VideotexString *result, AsnLen *bytesDecoded, ENV_TYPE env));
#define BEncVideotexStringContent BEncAsnOctsContent

#define BDecVideotexStringContent BDecAsnOctsContent

#define PrintVideotexString PrintAsnOcts

#define FreeVideotexString FreeAsnOcts 




typedef AsnOcts IA5String; /* [UNIVERSAL 22] IMPLICIT OCTET STRING */

AsnLen BEncIA5String PROTO ((BUF_TYPE b, IA5String *v));

void BDecIA5String PROTO ((BUF_TYPE b, IA5String *result, AsnLen *bytesDecoded, ENV_TYPE env));
#define BEncIA5StringContent BEncAsnOctsContent

#define BDecIA5StringContent BDecAsnOctsContent

#define PrintIA5String PrintAsnOcts

#define FreeIA5String FreeAsnOcts 




typedef AsnOcts GraphicString; /* [UNIVERSAL 25] IMPLICIT OCTET STRING */

AsnLen BEncGraphicString PROTO ((BUF_TYPE b, GraphicString *v));

void BDecGraphicString PROTO ((BUF_TYPE b, GraphicString *result, AsnLen *bytesDecoded, ENV_TYPE env));
#define BEncGraphicStringContent BEncAsnOctsContent

#define BDecGraphicStringContent BDecAsnOctsContent

#define PrintGraphicString PrintAsnOcts

#define FreeGraphicString FreeAsnOcts 




typedef AsnOcts VisibleString; /* [UNIVERSAL 26] IMPLICIT OCTET STRING */

AsnLen BEncVisibleString PROTO ((BUF_TYPE b, VisibleString *v));

void BDecVisibleString PROTO ((BUF_TYPE b, VisibleString *result, AsnLen *bytesDecoded, ENV_TYPE env));
#define BEncVisibleStringContent BEncAsnOctsContent

#define BDecVisibleStringContent BDecAsnOctsContent

#define PrintVisibleString PrintAsnOcts

#define FreeVisibleString FreeAsnOcts 




typedef AsnOcts ISO646String; /* [UNIVERSAL 26] IMPLICIT OCTET STRING */

AsnLen BEncISO646String PROTO ((BUF_TYPE b, ISO646String *v));

void BDecISO646String PROTO ((BUF_TYPE b, ISO646String *result, AsnLen *bytesDecoded, ENV_TYPE env));
#define BEncISO646StringContent BEncAsnOctsContent

#define BDecISO646StringContent BDecAsnOctsContent

#define PrintISO646String PrintAsnOcts

#define FreeISO646String FreeAsnOcts 




typedef AsnOcts GeneralString; /* [UNIVERSAL 27] IMPLICIT OCTET STRING */

AsnLen BEncGeneralString PROTO ((BUF_TYPE b, GeneralString *v));

void BDecGeneralString PROTO ((BUF_TYPE b, GeneralString *result, AsnLen *bytesDecoded, ENV_TYPE env));
#define BEncGeneralStringContent BEncAsnOctsContent

#define BDecGeneralStringContent BDecAsnOctsContent

#define PrintGeneralString PrintAsnOcts

#define FreeGeneralString FreeAsnOcts 




typedef AsnOcts UTCTime; /* [UNIVERSAL 23] IMPLICIT OCTET STRING */

AsnLen BEncUTCTime PROTO ((BUF_TYPE b, UTCTime *v));

void BDecUTCTime PROTO ((BUF_TYPE b, UTCTime *result, AsnLen *bytesDecoded, ENV_TYPE env));
#define BEncUTCTimeContent BEncAsnOctsContent

#define BDecUTCTimeContent BDecAsnOctsContent

#define PrintUTCTime PrintAsnOcts

#define FreeUTCTime FreeAsnOcts 




typedef AsnOcts GeneralizedTime; /* [UNIVERSAL 24] IMPLICIT OCTET STRING */

AsnLen BEncGeneralizedTime PROTO ((BUF_TYPE b, GeneralizedTime *v));

void BDecGeneralizedTime PROTO ((BUF_TYPE b, GeneralizedTime *result, AsnLen *bytesDecoded, ENV_TYPE env));
#define BEncGeneralizedTimeContent BEncAsnOctsContent

#define BDecGeneralizedTimeContent BDecAsnOctsContent

#define PrintGeneralizedTime PrintAsnOcts

#define FreeGeneralizedTime FreeAsnOcts 




typedef AsnOcts UniversalString; /* [UNIVERSAL 28] IMPLICIT OCTET STRING */

AsnLen BEncUniversalString PROTO ((BUF_TYPE b, UniversalString *v));

void BDecUniversalString PROTO ((BUF_TYPE b, UniversalString *result, AsnLen *bytesDecoded, ENV_TYPE env));
#define BEncUniversalStringContent BEncAsnOctsContent

#define BDecUniversalStringContent BDecAsnOctsContent

#define PrintUniversalString PrintAsnOcts

#define FreeUniversalString FreeAsnOcts 




typedef AsnOcts BMPString; /* [UNIVERSAL 30] IMPLICIT OCTET STRING */

AsnLen BEncBMPString PROTO ((BUF_TYPE b, BMPString *v));

void BDecBMPString PROTO ((BUF_TYPE b, BMPString *result, AsnLen *bytesDecoded, ENV_TYPE env));
#define BEncBMPStringContent BEncAsnOctsContent

#define BDecBMPStringContent BDecAsnOctsContent

#define PrintBMPString PrintAsnOcts

#define FreeBMPString FreeAsnOcts 




typedef struct EXTERNALChoice /* CHOICE */
{
    enum EXTERNALChoiceChoiceId
    {
        EXTERNALCHOICE_SINGLE_ASN1_TYPE,
        EXTERNALCHOICE_OCTET_ALIGNED,
        EXTERNALCHOICE_ARBITRARY
    } choiceId;
    union EXTERNALChoiceChoiceUnion
    {
    AsnOcts* single_ASN1_type; /* [0] OCTET STRING */
    AsnOcts* octet_aligned; /* [1] IMPLICIT OCTET STRING */
    AsnBits* arbitrary; /* [2] IMPLICIT BIT STRING */
    } a;
} EXTERNALChoice;

AsnLen BEncEXTERNALChoiceContent PROTO ((BUF_TYPE b, EXTERNALChoice *v));

void BDecEXTERNALChoiceContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, EXTERNALChoice *v, AsnLen *bytesDecoded, ENV_TYPE env));


void PrintEXTERNALChoice PROTO ((FILE* f, EXTERNALChoice *v, unsigned short int indent));
void FreeEXTERNALChoice PROTO ((EXTERNALChoice *v));





typedef struct EXTERNAL /* [UNIVERSAL 8] IMPLICIT SEQUENCE */
{
    AsnOid direct_reference; /* OBJECT IDENTIFIER OPTIONAL */
    AsnInt* indirect_reference; /* INTEGER OPTIONAL */
    ObjectDescriptor data_value_descriptor; /* ObjectDescriptor OPTIONAL */
    struct EXTERNALChoice* encoding; /* EXTERNALChoice */
} EXTERNAL;

AsnLen BEncEXTERNAL PROTO ((BUF_TYPE b, EXTERNAL *v));

void BDecEXTERNAL PROTO ((BUF_TYPE b, EXTERNAL *result, AsnLen *bytesDecoded, ENV_TYPE env));
AsnLen BEncEXTERNALContent PROTO ((BUF_TYPE b, EXTERNAL *v));

void BDecEXTERNALContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, EXTERNAL *v, AsnLen *bytesDecoded, ENV_TYPE env));


void PrintEXTERNAL PROTO ((FILE* f, EXTERNAL *v, unsigned short int indent));
void FreeEXTERNAL PROTO ((EXTERNAL *v));






#endif /* conditional include of asn-useful.h */
