Updated INFO.yaml file
[ric-app/kpimon.git] / asn1c_defs / all-defs / constr_CHOICE.h
1 /*\r
2  * Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.\r
3  * Redistribution and modifications are permitted subject to BSD license.\r
4  */\r
5 #ifndef _CONSTR_CHOICE_H_\r
6 #define _CONSTR_CHOICE_H_\r
7 \r
8 #include <asn_application.h>\r
9 \r
10 #ifdef __cplusplus\r
11 extern "C" {\r
12 #endif\r
13 \r
14 typedef struct asn_CHOICE_specifics_s {\r
15         /*\r
16          * Target structure description.\r
17          */\r
18         unsigned struct_size;       /* Size of the target structure. */\r
19         unsigned ctx_offset;        /* Offset of the asn_codec_ctx_t member */\r
20         unsigned pres_offset;       /* Identifier of the present member */\r
21         unsigned pres_size;         /* Size of the identifier (enum) */\r
22 \r
23         /*\r
24          * Tags to members mapping table.\r
25          */\r
26         const asn_TYPE_tag2member_t *tag2el;\r
27         unsigned tag2el_count;\r
28 \r
29         /* Canonical ordering of CHOICE elements, for PER */\r
30         const unsigned *to_canonical_order;\r
31         const unsigned *from_canonical_order;\r
32 \r
33         /*\r
34          * Extensions-related stuff.\r
35          */\r
36         signed ext_start; /* First member of extensions, or -1 */\r
37 } asn_CHOICE_specifics_t;\r
38 \r
39 /*\r
40  * A set specialized functions dealing with the CHOICE type.\r
41  */\r
42 asn_struct_free_f CHOICE_free;\r
43 asn_struct_print_f CHOICE_print;\r
44 asn_struct_compare_f CHOICE_compare;\r
45 asn_constr_check_f CHOICE_constraint;\r
46 ber_type_decoder_f CHOICE_decode_ber;\r
47 der_type_encoder_f CHOICE_encode_der;\r
48 xer_type_decoder_f CHOICE_decode_xer;\r
49 xer_type_encoder_f CHOICE_encode_xer;\r
50 oer_type_decoder_f CHOICE_decode_oer;\r
51 oer_type_encoder_f CHOICE_encode_oer;\r
52 per_type_decoder_f CHOICE_decode_uper;\r
53 per_type_encoder_f CHOICE_encode_uper;\r
54 per_type_decoder_f CHOICE_decode_aper;\r
55 per_type_encoder_f CHOICE_encode_aper;\r
56 asn_outmost_tag_f CHOICE_outmost_tag;\r
57 asn_random_fill_f CHOICE_random_fill;\r
58 extern asn_TYPE_operation_t asn_OP_CHOICE;\r
59 \r
60 /*\r
61  * Return the 1-based choice variant presence index.\r
62  * Returns 0 in case of error.\r
63  */\r
64 unsigned CHOICE_variant_get_presence(const asn_TYPE_descriptor_t *td,\r
65                                      const void *structure_ptr);\r
66 \r
67 /*\r
68  * Sets or resets the 1-based choice variant presence index.\r
69  * In case a previous index is not zero, the currently selected structure\r
70  * member is freed and zeroed-out first.\r
71  * Returns 0 on success and -1 on error.\r
72  */\r
73 int CHOICE_variant_set_presence(const asn_TYPE_descriptor_t *td,\r
74                                 void *structure_ptr, unsigned present);\r
75 \r
76 #ifdef __cplusplus\r
77 }\r
78 #endif\r
79 \r
80 #endif  /* _CONSTR_CHOICE_H_ */\r