2 * Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
3 * Redistribution and modifications are permitted subject to BSD license.
5 #ifndef CONSTR_SET_OF_H
6 #define CONSTR_SET_OF_H
8 #include <asn_application.h>
9 #include <asn_SET_OF.h>
15 typedef struct asn_SET_OF_specifics_s {
17 * Target structure description.
19 unsigned struct_size; /* Size of the target structure. */
20 unsigned ctx_offset; /* Offset of the asn_struct_ctx_t member */
22 /* XER-specific stuff */
23 int as_XMLValueList; /* The member type must be encoded like this */
24 } asn_SET_OF_specifics_t;
27 * A set specialized functions dealing with the SET OF type.
29 asn_struct_free_f SET_OF_free;
31 #if !defined(ASN_DISABLE_PRINT_SUPPORT)
32 asn_struct_print_f SET_OF_print;
33 #endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
35 asn_struct_compare_f SET_OF_compare;
37 asn_constr_check_f SET_OF_constraint;
39 #if !defined(ASN_DISABLE_BER_SUPPORT)
40 ber_type_decoder_f SET_OF_decode_ber;
41 der_type_encoder_f SET_OF_encode_der;
42 #endif /* !defined(ASN_DISABLE_BER_SUPPORT) */
44 #if !defined(ASN_DISABLE_XER_SUPPORT)
45 xer_type_decoder_f SET_OF_decode_xer;
46 xer_type_encoder_f SET_OF_encode_xer;
47 #endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
49 #if !defined(ASN_DISABLE_JER_SUPPORT)
50 jer_type_encoder_f SET_OF_encode_jer;
51 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
53 #if !defined(ASN_DISABLE_OER_SUPPORT)
54 oer_type_decoder_f SET_OF_decode_oer;
55 oer_type_encoder_f SET_OF_encode_oer;
56 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
58 #if !defined(ASN_DISABLE_UPER_SUPPORT)
59 per_type_decoder_f SET_OF_decode_uper;
60 per_type_encoder_f SET_OF_encode_uper;
61 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */
62 #if !defined(ASN_DISABLE_APER_SUPPORT)
63 per_type_decoder_f SET_OF_decode_aper;
64 per_type_encoder_f SET_OF_encode_aper;
65 #endif /* !defined(ASN_DISABLE_APER_SUPPORT) */
67 #if !defined(ASN_DISABLE_RFILL_SUPPORT)
68 asn_random_fill_f SET_OF_random_fill;
69 #endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */
71 extern asn_TYPE_operation_t asn_OP_SET_OF;
74 * Internally visible buffer holding a single encoded element.
79 size_t allocated_size;
83 enum SET_OF__encode_method {
84 SOES_DER, /* Distinguished Encoding Rules */
85 SOES_CUPER, /* Canonical Unaligned Packed Encoding Rules */
86 SOES_CAPER /* Canonical Aligned Packed Encoding Rules */
89 struct _el_buffer * SET_OF__encode_sorted(
90 const asn_TYPE_member_t *elm,
91 const asn_anonymous_set_ *list,
92 enum SET_OF__encode_method method);
94 void SET_OF__encode_sorted_free(
95 struct _el_buffer *el_buf,
102 #endif /* CONSTR_SET_OF_H */