blob: 859c53296c2e99bd20a9917440ad2c9bbde3427e [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
Lev Walkin11c3e172004-09-24 21:00:50 +00008#include <asn_application.h>
Lev Walkinf15320b2004-06-03 03:38:44 +00009
Lev Walkin21b41ac2005-07-24 09:03:44 +000010#ifdef __cplusplus
11extern "C" {
12#endif
13
Lev Walkin5e033762004-09-29 13:26:15 +000014typedef struct asn_CHOICE_specifics_s {
Lev Walkinf15320b2004-06-03 03:38:44 +000015 /*
16 * Target structure description.
17 */
18 int struct_size; /* Size of the target structure. */
Lev Walkindc06f6b2004-10-20 15:50:55 +000019 int ctx_offset; /* Offset of the asn_codec_ctx_t member */
Lev Walkinf15320b2004-06-03 03:38:44 +000020 int pres_offset; /* Identifier of the present member */
21 int pres_size; /* Size of the identifier (enum) */
22
23 /*
Lev Walkinf15320b2004-06-03 03:38:44 +000024 * Tags to members mapping table.
25 */
Lev Walkin5e033762004-09-29 13:26:15 +000026 asn_TYPE_tag2member_t *tag2el;
Lev Walkinf15320b2004-06-03 03:38:44 +000027 int tag2el_count;
28
29 /*
30 * Extensions-related stuff.
31 */
32 int extensible; /* Whether CHOICE is extensible */
Lev Walkin5e033762004-09-29 13:26:15 +000033} asn_CHOICE_specifics_t;
Lev Walkinf15320b2004-06-03 03:38:44 +000034
35/*
36 * A set specialized functions dealing with the CHOICE type.
37 */
Lev Walkina9cc46e2004-09-22 16:06:28 +000038asn_struct_free_f CHOICE_free;
39asn_struct_print_f CHOICE_print;
Lev Walkinf15320b2004-06-03 03:38:44 +000040asn_constr_check_f CHOICE_constraint;
41ber_type_decoder_f CHOICE_decode_ber;
42der_type_encoder_f CHOICE_encode_der;
Lev Walkin8d01b4c2004-10-23 14:57:50 +000043xer_type_decoder_f CHOICE_decode_xer;
Lev Walkina9cc46e2004-09-22 16:06:28 +000044xer_type_encoder_f CHOICE_encode_xer;
Lev Walkinf15320b2004-06-03 03:38:44 +000045asn_outmost_tag_f CHOICE_outmost_tag;
Lev Walkinf15320b2004-06-03 03:38:44 +000046
Lev Walkin21b41ac2005-07-24 09:03:44 +000047#ifdef __cplusplus
48}
49#endif
50
Lev Walkinf15320b2004-06-03 03:38:44 +000051#endif /* _CONSTR_CHOICE_H_ */