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