2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
22 * "ASN-USEFUL" ASN.1 module C type definitions and prototypes
24 * This .h file was generated by snacc on Mon Mar 3 11:08:41 1997
26 * UBC snacc written compiler by Mike Sample
28 * NOTE: This is a machine generated file--editing not recommended
32 #ifndef _asn_useful_h_
33 #define _asn_useful_h_
38 typedef AsnOcts ObjectDescriptor
; /* [UNIVERSAL 7] IMPLICIT OCTET STRING */
40 #define BEncObjectDescriptorContent BEncAsnOctsContent
42 #define BDecObjectDescriptorContent BDecAsnOctsContent
44 #define PrintObjectDescriptor PrintAsnOcts
46 #define FreeObjectDescriptor FreeAsnOcts
51 typedef AsnOcts NumericString
; /* [UNIVERSAL 18] IMPLICIT OCTET STRING */
53 AsnLen BEncNumericString
PROTO ((BUF_TYPE b
, NumericString
*v
));
55 void BDecNumericString
PROTO ((BUF_TYPE b
, NumericString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
56 #define BEncNumericStringContent BEncAsnOctsContent
58 #define BDecNumericStringContent BDecAsnOctsContent
60 #define PrintNumericString PrintAsnOcts
62 #define FreeNumericString FreeAsnOcts
67 typedef AsnOcts PrintableString
; /* [UNIVERSAL 19] IMPLICIT OCTET STRING */
69 AsnLen BEncPrintableString
PROTO ((BUF_TYPE b
, PrintableString
*v
));
71 void BDecPrintableString
PROTO ((BUF_TYPE b
, PrintableString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
72 #define BEncPrintableStringContent BEncAsnOctsContent
74 #define BDecPrintableStringContent BDecAsnOctsContent
76 #define PrintPrintableString PrintAsnOcts
78 #define FreePrintableString FreeAsnOcts
83 typedef AsnOcts TeletexString
; /* [UNIVERSAL 20] IMPLICIT OCTET STRING */
85 AsnLen BEncTeletexString
PROTO ((BUF_TYPE b
, TeletexString
*v
));
87 void BDecTeletexString
PROTO ((BUF_TYPE b
, TeletexString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
88 #define BEncTeletexStringContent BEncAsnOctsContent
90 #define BDecTeletexStringContent BDecAsnOctsContent
92 #define PrintTeletexString PrintAsnOcts
94 #define FreeTeletexString FreeAsnOcts
99 typedef AsnOcts T61String
; /* [UNIVERSAL 20] IMPLICIT OCTET STRING */
101 AsnLen BEncT61String
PROTO ((BUF_TYPE b
, T61String
*v
));
103 void BDecT61String
PROTO ((BUF_TYPE b
, T61String
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
104 #define BEncT61StringContent BEncAsnOctsContent
106 #define BDecT61StringContent BDecAsnOctsContent
108 #define PrintT61String PrintAsnOcts
110 #define FreeT61String FreeAsnOcts
115 typedef AsnOcts VideotexString
; /* [UNIVERSAL 21] IMPLICIT OCTET STRING */
117 AsnLen BEncVideotexString
PROTO ((BUF_TYPE b
, VideotexString
*v
));
119 void BDecVideotexString
PROTO ((BUF_TYPE b
, VideotexString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
120 #define BEncVideotexStringContent BEncAsnOctsContent
122 #define BDecVideotexStringContent BDecAsnOctsContent
124 #define PrintVideotexString PrintAsnOcts
126 #define FreeVideotexString FreeAsnOcts
131 typedef AsnOcts IA5String
; /* [UNIVERSAL 22] IMPLICIT OCTET STRING */
133 AsnLen BEncIA5String
PROTO ((BUF_TYPE b
, IA5String
*v
));
135 void BDecIA5String
PROTO ((BUF_TYPE b
, IA5String
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
136 #define BEncIA5StringContent BEncAsnOctsContent
138 #define BDecIA5StringContent BDecAsnOctsContent
140 #define PrintIA5String PrintAsnOcts
142 #define FreeIA5String FreeAsnOcts
147 typedef AsnOcts GraphicString
; /* [UNIVERSAL 25] IMPLICIT OCTET STRING */
149 AsnLen BEncGraphicString
PROTO ((BUF_TYPE b
, GraphicString
*v
));
151 void BDecGraphicString
PROTO ((BUF_TYPE b
, GraphicString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
152 #define BEncGraphicStringContent BEncAsnOctsContent
154 #define BDecGraphicStringContent BDecAsnOctsContent
156 #define PrintGraphicString PrintAsnOcts
158 #define FreeGraphicString FreeAsnOcts
163 typedef AsnOcts VisibleString
; /* [UNIVERSAL 26] IMPLICIT OCTET STRING */
165 AsnLen BEncVisibleString
PROTO ((BUF_TYPE b
, VisibleString
*v
));
167 void BDecVisibleString
PROTO ((BUF_TYPE b
, VisibleString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
168 #define BEncVisibleStringContent BEncAsnOctsContent
170 #define BDecVisibleStringContent BDecAsnOctsContent
172 #define PrintVisibleString PrintAsnOcts
174 #define FreeVisibleString FreeAsnOcts
179 typedef AsnOcts ISO646String
; /* [UNIVERSAL 26] IMPLICIT OCTET STRING */
181 AsnLen BEncISO646String
PROTO ((BUF_TYPE b
, ISO646String
*v
));
183 void BDecISO646String
PROTO ((BUF_TYPE b
, ISO646String
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
184 #define BEncISO646StringContent BEncAsnOctsContent
186 #define BDecISO646StringContent BDecAsnOctsContent
188 #define PrintISO646String PrintAsnOcts
190 #define FreeISO646String FreeAsnOcts
195 typedef AsnOcts GeneralString
; /* [UNIVERSAL 27] IMPLICIT OCTET STRING */
197 AsnLen BEncGeneralString
PROTO ((BUF_TYPE b
, GeneralString
*v
));
199 void BDecGeneralString
PROTO ((BUF_TYPE b
, GeneralString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
200 #define BEncGeneralStringContent BEncAsnOctsContent
202 #define BDecGeneralStringContent BDecAsnOctsContent
204 #define PrintGeneralString PrintAsnOcts
206 #define FreeGeneralString FreeAsnOcts
211 typedef AsnOcts UTCTime
; /* [UNIVERSAL 23] IMPLICIT OCTET STRING */
213 AsnLen BEncUTCTime
PROTO ((BUF_TYPE b
, UTCTime
*v
));
215 void BDecUTCTime
PROTO ((BUF_TYPE b
, UTCTime
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
216 #define BEncUTCTimeContent BEncAsnOctsContent
218 #define BDecUTCTimeContent BDecAsnOctsContent
220 #define PrintUTCTime PrintAsnOcts
222 #define FreeUTCTime FreeAsnOcts
227 typedef AsnOcts GeneralizedTime
; /* [UNIVERSAL 24] IMPLICIT OCTET STRING */
229 AsnLen BEncGeneralizedTime
PROTO ((BUF_TYPE b
, GeneralizedTime
*v
));
231 void BDecGeneralizedTime
PROTO ((BUF_TYPE b
, GeneralizedTime
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
232 #define BEncGeneralizedTimeContent BEncAsnOctsContent
234 #define BDecGeneralizedTimeContent BDecAsnOctsContent
236 #define PrintGeneralizedTime PrintAsnOcts
238 #define FreeGeneralizedTime FreeAsnOcts
243 typedef struct EXTERNALChoice
/* CHOICE */
245 enum EXTERNALChoiceChoiceId
247 EXTERNALCHOICE_SINGLE_ASN1_TYPE
,
248 EXTERNALCHOICE_OCTET_ALIGNED
,
249 EXTERNALCHOICE_ARBITRARY
251 union EXTERNALChoiceChoiceUnion
253 AsnOcts
* single_ASN1_type
; /* [0] OCTET STRING */
254 AsnOcts
* octet_aligned
; /* [1] IMPLICIT OCTET STRING */
255 AsnBits
* arbitrary
; /* [2] IMPLICIT BIT STRING */
259 AsnLen BEncEXTERNALChoiceContent
PROTO ((BUF_TYPE b
, EXTERNALChoice
*v
));
261 void BDecEXTERNALChoiceContent
PROTO ((BUF_TYPE b
, AsnTag tagId0
, AsnLen elmtLen0
, EXTERNALChoice
*v
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
264 void PrintEXTERNALChoice
PROTO ((FILE* f
, EXTERNALChoice
*v
, unsigned short int indent
));
265 void FreeEXTERNALChoice
PROTO ((EXTERNALChoice
*v
));
271 typedef struct EXTERNAL
/* [UNIVERSAL 8] IMPLICIT SEQUENCE */
273 AsnOid direct_reference
; /* OBJECT IDENTIFIER OPTIONAL */
274 AsnInt
* indirect_reference
; /* INTEGER OPTIONAL */
275 ObjectDescriptor data_value_descriptor
; /* ObjectDescriptor OPTIONAL */
276 struct EXTERNALChoice
* encoding
; /* EXTERNALChoice */
279 AsnLen BEncEXTERNAL
PROTO ((BUF_TYPE b
, EXTERNAL
*v
));
281 void BDecEXTERNAL
PROTO ((BUF_TYPE b
, EXTERNAL
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
282 AsnLen BEncEXTERNALContent
PROTO ((BUF_TYPE b
, EXTERNAL
*v
));
284 void BDecEXTERNALContent
PROTO ((BUF_TYPE b
, AsnTag tagId0
, AsnLen elmtLen0
, EXTERNAL
*v
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
287 void PrintEXTERNAL
PROTO ((FILE* f
, EXTERNAL
*v
, unsigned short int indent
));
288 void FreeEXTERNAL
PROTO ((EXTERNAL
*v
));
295 #endif /* conditional include of asn-useful.h */