blob: ddcbb393f41c9bfa678035c020b9649b0bcf251e [file] [log] [blame]
Harald Welte92c45f32010-06-12 18:59:38 +02001/*-
2 * Copyright (c) 2003, 2004, 2005 Lev Walkin <vlm@lionet.info>.
3 * All rights reserved.
4 * Redistribution and modifications are permitted subject to BSD license.
5 */
6#ifndef _CONSTR_CHOICE_H_
7#define _CONSTR_CHOICE_H_
8
9#include <asn_application.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
Harald Welte41b85d52015-08-31 08:56:53 +020015typedef const struct asn_CHOICE_specifics_s {
Harald Welte92c45f32010-06-12 18:59:38 +020016 /*
17 * Target structure description.
18 */
19 int struct_size; /* Size of the target structure. */
20 int ctx_offset; /* Offset of the asn_codec_ctx_t member */
21 int pres_offset; /* Identifier of the present member */
22 int pres_size; /* Size of the identifier (enum) */
23
24 /*
25 * Tags to members mapping table.
26 */
Harald Welte41b85d52015-08-31 08:56:53 +020027 const asn_TYPE_tag2member_t *tag2el;
Harald Welte92c45f32010-06-12 18:59:38 +020028 int tag2el_count;
29
30 /* Canonical ordering of CHOICE elements, for PER */
31 int *canonical_order;
32
33 /*
34 * Extensions-related stuff.
35 */
36 int ext_start; /* First member of extensions, or -1 */
37} asn_CHOICE_specifics_t;
38
39/*
40 * A set specialized functions dealing with the CHOICE type.
41 */
42asn_struct_free_f CHOICE_free;
43asn_struct_print_f CHOICE_print;
44asn_constr_check_f CHOICE_constraint;
45ber_type_decoder_f CHOICE_decode_ber;
46der_type_encoder_f CHOICE_encode_der;
47xer_type_decoder_f CHOICE_decode_xer;
48xer_type_encoder_f CHOICE_encode_xer;
49per_type_decoder_f CHOICE_decode_uper;
50per_type_encoder_f CHOICE_encode_uper;
Harald Welte41b85d52015-08-31 08:56:53 +020051per_type_decoder_f CHOICE_decode_aper;
52per_type_encoder_f CHOICE_encode_aper;
Harald Welte92c45f32010-06-12 18:59:38 +020053asn_outmost_tag_f CHOICE_outmost_tag;
54
55#ifdef __cplusplus
56}
57#endif
58
59#endif /* _CONSTR_CHOICE_H_ */