/* * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved. * * The contents of this file constitute Original Code as defined in and are * subject to the Apple Public Source License Version 1.2 (the 'License'). * You may not use this file except in compliance with the License. Please obtain * a copy of the License at http://www.apple.com/publicsource and read it before * using this file. * * This Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the * specific language governing rights and limitations under the License. */ /* * asn-useful.h * * "ASN-USEFUL" ASN.1 module C type definitions and prototypes * * This .h file was generated by snacc on Mon Mar 3 11:08:41 1997 * * 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 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 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 */