remark release date
[Net-Radio-Location-SUPL-Test.git] / asn1 / RANAP-ServiceHandover.c
blob57f727b8185a36597546bcec305843a28c6662b6
1 /*
2 * Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
3 * From ASN.1 module "MAP-MS-DataTypes"
4 * found in "../asn1src/MAP-MS-DataTypes.asn"
5 * `asn1c -gen-PER -fskeletons-copy -fnative-types`
6 */
8 #include "RANAP-ServiceHandover.h"
10 int
11 RANAP_ServiceHandover_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
12 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13 const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
14 size_t size;
16 if(!sptr) {
17 _ASN_CTFAIL(app_key, td, sptr,
18 "%s: value not given (%s:%d)",
19 td->name, __FILE__, __LINE__);
20 return -1;
23 size = st->size;
25 if((size == 1)) {
26 /* Constraint check succeeded */
27 return 0;
28 } else {
29 _ASN_CTFAIL(app_key, td, sptr,
30 "%s: constraint failed (%s:%d)",
31 td->name, __FILE__, __LINE__);
32 return -1;
37 * This type is implemented using OCTET_STRING,
38 * so here we adjust the DEF accordingly.
40 static void
41 RANAP_ServiceHandover_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
42 td->free_struct = asn_DEF_OCTET_STRING.free_struct;
43 td->print_struct = asn_DEF_OCTET_STRING.print_struct;
44 td->ber_decoder = asn_DEF_OCTET_STRING.ber_decoder;
45 td->der_encoder = asn_DEF_OCTET_STRING.der_encoder;
46 td->xer_decoder = asn_DEF_OCTET_STRING.xer_decoder;
47 td->xer_encoder = asn_DEF_OCTET_STRING.xer_encoder;
48 td->uper_decoder = asn_DEF_OCTET_STRING.uper_decoder;
49 td->uper_encoder = asn_DEF_OCTET_STRING.uper_encoder;
50 if(!td->per_constraints)
51 td->per_constraints = asn_DEF_OCTET_STRING.per_constraints;
52 td->elements = asn_DEF_OCTET_STRING.elements;
53 td->elements_count = asn_DEF_OCTET_STRING.elements_count;
54 td->specifics = asn_DEF_OCTET_STRING.specifics;
57 void
58 RANAP_ServiceHandover_free(asn_TYPE_descriptor_t *td,
59 void *struct_ptr, int contents_only) {
60 RANAP_ServiceHandover_1_inherit_TYPE_descriptor(td);
61 td->free_struct(td, struct_ptr, contents_only);
64 int
65 RANAP_ServiceHandover_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
66 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
67 RANAP_ServiceHandover_1_inherit_TYPE_descriptor(td);
68 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
71 asn_dec_rval_t
72 RANAP_ServiceHandover_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
73 void **structure, const void *bufptr, size_t size, int tag_mode) {
74 RANAP_ServiceHandover_1_inherit_TYPE_descriptor(td);
75 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
78 asn_enc_rval_t
79 RANAP_ServiceHandover_encode_der(asn_TYPE_descriptor_t *td,
80 void *structure, int tag_mode, ber_tlv_tag_t tag,
81 asn_app_consume_bytes_f *cb, void *app_key) {
82 RANAP_ServiceHandover_1_inherit_TYPE_descriptor(td);
83 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
86 asn_dec_rval_t
87 RANAP_ServiceHandover_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
88 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
89 RANAP_ServiceHandover_1_inherit_TYPE_descriptor(td);
90 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
93 asn_enc_rval_t
94 RANAP_ServiceHandover_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
95 int ilevel, enum xer_encoder_flags_e flags,
96 asn_app_consume_bytes_f *cb, void *app_key) {
97 RANAP_ServiceHandover_1_inherit_TYPE_descriptor(td);
98 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
101 asn_dec_rval_t
102 RANAP_ServiceHandover_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
103 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
104 RANAP_ServiceHandover_1_inherit_TYPE_descriptor(td);
105 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
108 asn_enc_rval_t
109 RANAP_ServiceHandover_encode_uper(asn_TYPE_descriptor_t *td,
110 asn_per_constraints_t *constraints,
111 void *structure, asn_per_outp_t *per_out) {
112 RANAP_ServiceHandover_1_inherit_TYPE_descriptor(td);
113 return td->uper_encoder(td, constraints, structure, per_out);
116 static asn_per_constraints_t asn_PER_type_RANAP_ServiceHandover_constr_1 = {
117 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
118 { APC_CONSTRAINED, 0, 0, 1, 1 } /* (SIZE(1..1)) */,
119 0, 0 /* No PER value map */
121 static ber_tlv_tag_t asn_DEF_RANAP_ServiceHandover_tags_1[] = {
122 (ASN_TAG_CLASS_UNIVERSAL | (4 << 2))
124 asn_TYPE_descriptor_t asn_DEF_RANAP_ServiceHandover = {
125 "RANAP-ServiceHandover",
126 "RANAP-ServiceHandover",
127 RANAP_ServiceHandover_free,
128 RANAP_ServiceHandover_print,
129 RANAP_ServiceHandover_constraint,
130 RANAP_ServiceHandover_decode_ber,
131 RANAP_ServiceHandover_encode_der,
132 RANAP_ServiceHandover_decode_xer,
133 RANAP_ServiceHandover_encode_xer,
134 RANAP_ServiceHandover_decode_uper,
135 RANAP_ServiceHandover_encode_uper,
136 0, /* Use generic outmost tag fetcher */
137 asn_DEF_RANAP_ServiceHandover_tags_1,
138 sizeof(asn_DEF_RANAP_ServiceHandover_tags_1)
139 /sizeof(asn_DEF_RANAP_ServiceHandover_tags_1[0]), /* 1 */
140 asn_DEF_RANAP_ServiceHandover_tags_1, /* Same as above */
141 sizeof(asn_DEF_RANAP_ServiceHandover_tags_1)
142 /sizeof(asn_DEF_RANAP_ServiceHandover_tags_1[0]), /* 1 */
143 &asn_PER_type_RANAP_ServiceHandover_constr_1,
144 0, 0, /* No members */
145 0 /* No specifics */