remark release date
[Net-Radio-Location-SUPL-Test.git] / asn1 / Notification.c
blob421603494b4b18178f117d001ea4c0762001c615
1 /*
2 * Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
3 * From ASN.1 module "SUPL-INIT"
4 * found in "../asn1src/SUPL-INIT.asn"
5 * `asn1c -gen-PER -fskeletons-copy -fnative-types`
6 */
8 #include "Notification.h"
10 static int
11 memb_requestorId_constraint_1(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 && size <= 50)) {
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;
36 static int
37 memb_clientName_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
38 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
39 const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
40 size_t size;
42 if(!sptr) {
43 _ASN_CTFAIL(app_key, td, sptr,
44 "%s: value not given (%s:%d)",
45 td->name, __FILE__, __LINE__);
46 return -1;
49 size = st->size;
51 if((size >= 1 && size <= 50)) {
52 /* Constraint check succeeded */
53 return 0;
54 } else {
55 _ASN_CTFAIL(app_key, td, sptr,
56 "%s: constraint failed (%s:%d)",
57 td->name, __FILE__, __LINE__);
58 return -1;
62 static asn_per_constraints_t asn_PER_memb_requestorId_constr_4 = {
63 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
64 { APC_CONSTRAINED, 6, 6, 1, 50 } /* (SIZE(1..50)) */,
65 0, 0 /* No PER value map */
67 static asn_per_constraints_t asn_PER_memb_clientName_constr_6 = {
68 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
69 { APC_CONSTRAINED, 6, 6, 1, 50 } /* (SIZE(1..50)) */,
70 0, 0 /* No PER value map */
72 static asn_TYPE_member_t asn_MBR_Notification_1[] = {
73 { ATF_NOFLAGS, 0, offsetof(struct Notification, notificationType),
74 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
75 -1, /* IMPLICIT tag at current level */
76 &asn_DEF_NotificationType,
77 0, /* Defer constraints checking to the member type */
78 0, /* No PER visible constraints */
80 "notificationType"
82 { ATF_POINTER, 5, offsetof(struct Notification, encodingType),
83 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
84 -1, /* IMPLICIT tag at current level */
85 &asn_DEF_EncodingType,
86 0, /* Defer constraints checking to the member type */
87 0, /* No PER visible constraints */
89 "encodingType"
91 { ATF_POINTER, 4, offsetof(struct Notification, requestorId),
92 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
93 -1, /* IMPLICIT tag at current level */
94 &asn_DEF_OCTET_STRING,
95 memb_requestorId_constraint_1,
96 &asn_PER_memb_requestorId_constr_4,
98 "requestorId"
100 { ATF_POINTER, 3, offsetof(struct Notification, requestorIdType),
101 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
102 -1, /* IMPLICIT tag at current level */
103 &asn_DEF_FormatIndicator,
104 0, /* Defer constraints checking to the member type */
105 0, /* No PER visible constraints */
107 "requestorIdType"
109 { ATF_POINTER, 2, offsetof(struct Notification, clientName),
110 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
111 -1, /* IMPLICIT tag at current level */
112 &asn_DEF_OCTET_STRING,
113 memb_clientName_constraint_1,
114 &asn_PER_memb_clientName_constr_6,
116 "clientName"
118 { ATF_POINTER, 1, offsetof(struct Notification, clientNameType),
119 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
120 -1, /* IMPLICIT tag at current level */
121 &asn_DEF_FormatIndicator,
122 0, /* Defer constraints checking to the member type */
123 0, /* No PER visible constraints */
125 "clientNameType"
128 static int asn_MAP_Notification_oms_1[] = { 1, 2, 3, 4, 5 };
129 static ber_tlv_tag_t asn_DEF_Notification_tags_1[] = {
130 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
132 static asn_TYPE_tag2member_t asn_MAP_Notification_tag2el_1[] = {
133 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* notificationType at 20 */
134 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* encodingType at 21 */
135 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* requestorId at 22 */
136 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* requestorIdType at 23 */
137 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* clientName at 24 */
138 { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* clientNameType at 25 */
140 static asn_SEQUENCE_specifics_t asn_SPC_Notification_specs_1 = {
141 sizeof(struct Notification),
142 offsetof(struct Notification, _asn_ctx),
143 asn_MAP_Notification_tag2el_1,
144 6, /* Count of tags in the map */
145 asn_MAP_Notification_oms_1, /* Optional members */
146 5, 0, /* Root/Additions */
147 5, /* Start extensions */
148 7 /* Stop extensions */
150 asn_TYPE_descriptor_t asn_DEF_Notification = {
151 "Notification",
152 "Notification",
153 SEQUENCE_free,
154 SEQUENCE_print,
155 SEQUENCE_constraint,
156 SEQUENCE_decode_ber,
157 SEQUENCE_encode_der,
158 SEQUENCE_decode_xer,
159 SEQUENCE_encode_xer,
160 SEQUENCE_decode_uper,
161 SEQUENCE_encode_uper,
162 0, /* Use generic outmost tag fetcher */
163 asn_DEF_Notification_tags_1,
164 sizeof(asn_DEF_Notification_tags_1)
165 /sizeof(asn_DEF_Notification_tags_1[0]), /* 1 */
166 asn_DEF_Notification_tags_1, /* Same as above */
167 sizeof(asn_DEF_Notification_tags_1)
168 /sizeof(asn_DEF_Notification_tags_1[0]), /* 1 */
169 0, /* No PER visible constraints */
170 asn_MBR_Notification_1,
171 6, /* Elements count */
172 &asn_SPC_Notification_specs_1 /* Additional specs */