vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1 | /*- |
| 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 | |
vlm | d157958 | 2004-09-24 21:00:50 +0000 | [diff] [blame] | 8 | #include <asn_application.h> |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 9 | |
vlm | 3a41758 | 2005-07-24 09:03:44 +0000 | [diff] [blame] | 10 | #ifdef __cplusplus |
| 11 | extern "C" { |
| 12 | #endif |
| 13 | |
vlm | ef6355b | 2004-09-29 13:26:15 +0000 | [diff] [blame] | 14 | typedef struct asn_CHOICE_specifics_s { |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 15 | /* |
| 16 | * Target structure description. |
| 17 | */ |
| 18 | int struct_size; /* Size of the target structure. */ |
vlm | 9de248e | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 19 | int ctx_offset; /* Offset of the asn_codec_ctx_t member */ |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 20 | int pres_offset; /* Identifier of the present member */ |
| 21 | int pres_size; /* Size of the identifier (enum) */ |
| 22 | |
| 23 | /* |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 24 | * Tags to members mapping table. |
| 25 | */ |
vlm | ef6355b | 2004-09-29 13:26:15 +0000 | [diff] [blame] | 26 | asn_TYPE_tag2member_t *tag2el; |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 27 | int tag2el_count; |
| 28 | |
| 29 | /* |
| 30 | * Extensions-related stuff. |
| 31 | */ |
| 32 | int extensible; /* Whether CHOICE is extensible */ |
vlm | ef6355b | 2004-09-29 13:26:15 +0000 | [diff] [blame] | 33 | } asn_CHOICE_specifics_t; |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 34 | |
| 35 | /* |
| 36 | * A set specialized functions dealing with the CHOICE type. |
| 37 | */ |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 38 | asn_struct_free_f CHOICE_free; |
| 39 | asn_struct_print_f CHOICE_print; |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 40 | asn_constr_check_f CHOICE_constraint; |
| 41 | ber_type_decoder_f CHOICE_decode_ber; |
| 42 | der_type_encoder_f CHOICE_encode_der; |
vlm | 6fbdf97 | 2004-10-23 14:57:50 +0000 | [diff] [blame] | 43 | xer_type_decoder_f CHOICE_decode_xer; |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 44 | xer_type_encoder_f CHOICE_encode_xer; |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 45 | asn_outmost_tag_f CHOICE_outmost_tag; |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 46 | |
vlm | 3a41758 | 2005-07-24 09:03:44 +0000 | [diff] [blame] | 47 | #ifdef __cplusplus |
| 48 | } |
| 49 | #endif |
| 50 | |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 51 | #endif /* _CONSTR_CHOICE_H_ */ |