blob: 327bae2e458aa9933ea6c5c30e72fb1a93e128a2 [file] [log] [blame]
Lev Walkinf15320b2004-06-03 03:38:44 +00001/*-
2 * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
3 * Redistribution and modifications are permitted subject to BSD license.
4 */
5#ifndef _CONSTR_CHOICE_H_
6#define _CONSTR_CHOICE_H_
7
8#include <constr_TYPE.h>
9
Lev Walkinf15320b2004-06-03 03:38:44 +000010typedef struct asn1_CHOICE_specifics_s {
11 /*
12 * Target structure description.
13 */
14 int struct_size; /* Size of the target structure. */
15 int ctx_offset; /* Offset of the ber_dec_ctx_t member */
16 int pres_offset; /* Identifier of the present member */
17 int pres_size; /* Size of the identifier (enum) */
18
19 /*
Lev Walkinf15320b2004-06-03 03:38:44 +000020 * Tags to members mapping table.
21 */
Lev Walkin4c36e302004-06-06 07:20:02 +000022 asn1_TYPE_tag2member_t *tag2el;
Lev Walkinf15320b2004-06-03 03:38:44 +000023 int tag2el_count;
24
25 /*
26 * Extensions-related stuff.
27 */
28 int extensible; /* Whether CHOICE is extensible */
29} asn1_CHOICE_specifics_t;
30
31/*
32 * A set specialized functions dealing with the CHOICE type.
33 */
34asn_constr_check_f CHOICE_constraint;
35ber_type_decoder_f CHOICE_decode_ber;
36der_type_encoder_f CHOICE_encode_der;
37asn_outmost_tag_f CHOICE_outmost_tag;
38asn_struct_print_f CHOICE_print;
39asn_struct_free_f CHOICE_free;
40
41#endif /* _CONSTR_CHOICE_H_ */