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 Thu Jun 8 12:35:27 2000
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 UTF8String
; /* [UNIVERSAL 12] IMPLICIT OCTET STRING */
53 AsnLen BEncUTF8String
PROTO ((BUF_TYPE b
, UTF8String
*v
));
55 void BDecUTF8String
PROTO ((BUF_TYPE b
, UTF8String
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
56 #define BEncUTF8StringContent BEncAsnOctsContent
58 #define BDecUTF8StringContent BDecAsnOctsContent
60 #define PrintUTF8String PrintAsnOcts
62 #define FreeUTF8String FreeAsnOcts
67 typedef AsnOcts NumericString
; /* [UNIVERSAL 18] IMPLICIT OCTET STRING */
69 AsnLen BEncNumericString
PROTO ((BUF_TYPE b
, NumericString
*v
));
71 void BDecNumericString
PROTO ((BUF_TYPE b
, NumericString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
72 #define BEncNumericStringContent BEncAsnOctsContent
74 #define BDecNumericStringContent BDecAsnOctsContent
76 #define PrintNumericString PrintAsnOcts
78 #define FreeNumericString FreeAsnOcts
83 typedef AsnOcts PrintableString
; /* [UNIVERSAL 19] IMPLICIT OCTET STRING */
85 AsnLen BEncPrintableString
PROTO ((BUF_TYPE b
, PrintableString
*v
));
87 void BDecPrintableString
PROTO ((BUF_TYPE b
, PrintableString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
88 #define BEncPrintableStringContent BEncAsnOctsContent
90 #define BDecPrintableStringContent BDecAsnOctsContent
92 #define PrintPrintableString PrintAsnOcts
94 #define FreePrintableString FreeAsnOcts
99 typedef AsnOcts TeletexString
; /* [UNIVERSAL 20] IMPLICIT OCTET STRING */
101 AsnLen BEncTeletexString
PROTO ((BUF_TYPE b
, TeletexString
*v
));
103 void BDecTeletexString
PROTO ((BUF_TYPE b
, TeletexString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
104 #define BEncTeletexStringContent BEncAsnOctsContent
106 #define BDecTeletexStringContent BDecAsnOctsContent
108 #define PrintTeletexString PrintAsnOcts
110 #define FreeTeletexString FreeAsnOcts
115 typedef AsnOcts T61String
; /* [UNIVERSAL 20] IMPLICIT OCTET STRING */
117 AsnLen BEncT61String
PROTO ((BUF_TYPE b
, T61String
*v
));
119 void BDecT61String
PROTO ((BUF_TYPE b
, T61String
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
120 #define BEncT61StringContent BEncAsnOctsContent
122 #define BDecT61StringContent BDecAsnOctsContent
124 #define PrintT61String PrintAsnOcts
126 #define FreeT61String FreeAsnOcts
131 typedef AsnOcts VideotexString
; /* [UNIVERSAL 21] IMPLICIT OCTET STRING */
133 AsnLen BEncVideotexString
PROTO ((BUF_TYPE b
, VideotexString
*v
));
135 void BDecVideotexString
PROTO ((BUF_TYPE b
, VideotexString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
136 #define BEncVideotexStringContent BEncAsnOctsContent
138 #define BDecVideotexStringContent BDecAsnOctsContent
140 #define PrintVideotexString PrintAsnOcts
142 #define FreeVideotexString FreeAsnOcts
147 typedef AsnOcts IA5String
; /* [UNIVERSAL 22] IMPLICIT OCTET STRING */
149 AsnLen BEncIA5String
PROTO ((BUF_TYPE b
, IA5String
*v
));
151 void BDecIA5String
PROTO ((BUF_TYPE b
, IA5String
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
152 #define BEncIA5StringContent BEncAsnOctsContent
154 #define BDecIA5StringContent BDecAsnOctsContent
156 #define PrintIA5String PrintAsnOcts
158 #define FreeIA5String FreeAsnOcts
163 typedef AsnOcts GraphicString
; /* [UNIVERSAL 25] IMPLICIT OCTET STRING */
165 AsnLen BEncGraphicString
PROTO ((BUF_TYPE b
, GraphicString
*v
));
167 void BDecGraphicString
PROTO ((BUF_TYPE b
, GraphicString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
168 #define BEncGraphicStringContent BEncAsnOctsContent
170 #define BDecGraphicStringContent BDecAsnOctsContent
172 #define PrintGraphicString PrintAsnOcts
174 #define FreeGraphicString FreeAsnOcts
179 typedef AsnOcts VisibleString
; /* [UNIVERSAL 26] IMPLICIT OCTET STRING */
181 AsnLen BEncVisibleString
PROTO ((BUF_TYPE b
, VisibleString
*v
));
183 void BDecVisibleString
PROTO ((BUF_TYPE b
, VisibleString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
184 #define BEncVisibleStringContent BEncAsnOctsContent
186 #define BDecVisibleStringContent BDecAsnOctsContent
188 #define PrintVisibleString PrintAsnOcts
190 #define FreeVisibleString FreeAsnOcts
195 typedef AsnOcts ISO646String
; /* [UNIVERSAL 26] IMPLICIT OCTET STRING */
197 AsnLen BEncISO646String
PROTO ((BUF_TYPE b
, ISO646String
*v
));
199 void BDecISO646String
PROTO ((BUF_TYPE b
, ISO646String
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
200 #define BEncISO646StringContent BEncAsnOctsContent
202 #define BDecISO646StringContent BDecAsnOctsContent
204 #define PrintISO646String PrintAsnOcts
206 #define FreeISO646String FreeAsnOcts
211 typedef AsnOcts GeneralString
; /* [UNIVERSAL 27] IMPLICIT OCTET STRING */
213 AsnLen BEncGeneralString
PROTO ((BUF_TYPE b
, GeneralString
*v
));
215 void BDecGeneralString
PROTO ((BUF_TYPE b
, GeneralString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
216 #define BEncGeneralStringContent BEncAsnOctsContent
218 #define BDecGeneralStringContent BDecAsnOctsContent
220 #define PrintGeneralString PrintAsnOcts
222 #define FreeGeneralString FreeAsnOcts
227 typedef AsnOcts UTCTime
; /* [UNIVERSAL 23] IMPLICIT OCTET STRING */
229 AsnLen BEncUTCTime
PROTO ((BUF_TYPE b
, UTCTime
*v
));
231 void BDecUTCTime
PROTO ((BUF_TYPE b
, UTCTime
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
232 #define BEncUTCTimeContent BEncAsnOctsContent
234 #define BDecUTCTimeContent BDecAsnOctsContent
236 #define PrintUTCTime PrintAsnOcts
238 #define FreeUTCTime FreeAsnOcts
243 typedef AsnOcts GeneralizedTime
; /* [UNIVERSAL 24] IMPLICIT OCTET STRING */
245 AsnLen BEncGeneralizedTime
PROTO ((BUF_TYPE b
, GeneralizedTime
*v
));
247 void BDecGeneralizedTime
PROTO ((BUF_TYPE b
, GeneralizedTime
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
248 #define BEncGeneralizedTimeContent BEncAsnOctsContent
250 #define BDecGeneralizedTimeContent BDecAsnOctsContent
252 #define PrintGeneralizedTime PrintAsnOcts
254 #define FreeGeneralizedTime FreeAsnOcts
259 typedef AsnOcts UniversalString
; /* [UNIVERSAL 28] IMPLICIT OCTET STRING */
261 AsnLen BEncUniversalString
PROTO ((BUF_TYPE b
, UniversalString
*v
));
263 void BDecUniversalString
PROTO ((BUF_TYPE b
, UniversalString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
264 #define BEncUniversalStringContent BEncAsnOctsContent
266 #define BDecUniversalStringContent BDecAsnOctsContent
268 #define PrintUniversalString PrintAsnOcts
270 #define FreeUniversalString FreeAsnOcts
275 typedef AsnOcts BMPString
; /* [UNIVERSAL 30] IMPLICIT OCTET STRING */
277 AsnLen BEncBMPString
PROTO ((BUF_TYPE b
, BMPString
*v
));
279 void BDecBMPString
PROTO ((BUF_TYPE b
, BMPString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
280 #define BEncBMPStringContent BEncAsnOctsContent
282 #define BDecBMPStringContent BDecAsnOctsContent
284 #define PrintBMPString PrintAsnOcts
286 #define FreeBMPString FreeAsnOcts
291 typedef struct EXTERNALChoice
/* CHOICE */
293 enum EXTERNALChoiceChoiceId
295 EXTERNALCHOICE_SINGLE_ASN1_TYPE
,
296 EXTERNALCHOICE_OCTET_ALIGNED
,
297 EXTERNALCHOICE_ARBITRARY
299 union EXTERNALChoiceChoiceUnion
301 AsnOcts
* single_ASN1_type
; /* [0] OCTET STRING */
302 AsnOcts
* octet_aligned
; /* [1] IMPLICIT OCTET STRING */
303 AsnBits
* arbitrary
; /* [2] IMPLICIT BIT STRING */
307 AsnLen BEncEXTERNALChoiceContent
PROTO ((BUF_TYPE b
, EXTERNALChoice
*v
));
309 void BDecEXTERNALChoiceContent
PROTO ((BUF_TYPE b
, AsnTag tagId0
, AsnLen elmtLen0
, EXTERNALChoice
*v
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
312 void PrintEXTERNALChoice
PROTO ((FILE* f
, EXTERNALChoice
*v
, unsigned short int indent
));
313 void FreeEXTERNALChoice
PROTO ((EXTERNALChoice
*v
));
319 typedef struct EXTERNAL
/* [UNIVERSAL 8] IMPLICIT SEQUENCE */
321 AsnOid direct_reference
; /* OBJECT IDENTIFIER OPTIONAL */
322 AsnInt
* indirect_reference
; /* INTEGER OPTIONAL */
323 ObjectDescriptor data_value_descriptor
; /* ObjectDescriptor OPTIONAL */
324 struct EXTERNALChoice
* encoding
; /* EXTERNALChoice */
327 AsnLen BEncEXTERNAL
PROTO ((BUF_TYPE b
, EXTERNAL
*v
));
329 void BDecEXTERNAL
PROTO ((BUF_TYPE b
, EXTERNAL
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
330 AsnLen BEncEXTERNALContent
PROTO ((BUF_TYPE b
, EXTERNAL
*v
));
332 void BDecEXTERNALContent
PROTO ((BUF_TYPE b
, AsnTag tagId0
, AsnLen elmtLen0
, EXTERNAL
*v
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
335 void PrintEXTERNAL
PROTO ((FILE* f
, EXTERNAL
*v
, unsigned short int indent
));
336 void FreeEXTERNAL
PROTO ((EXTERNAL
*v
));
343 #endif /* conditional include of asn-useful.h */