1 | /* Generated automatically by the YAZ ASN.1 Compiler 0.3 */
|
---|
2 | /* Module-C: Z39-50-APDU-1995 */
|
---|
3 |
|
---|
4 | #include <yaz/z-core.h>
|
---|
5 |
|
---|
6 | int z_APDU (ODR o, Z_APDU **p, int opt, const char *name)
|
---|
7 | {
|
---|
8 | static Odr_arm arm[] = {
|
---|
9 | {ODR_IMPLICIT, ODR_CONTEXT, 20, Z_APDU_initRequest,
|
---|
10 | (Odr_fun) z_InitRequest, "initRequest"},
|
---|
11 | {ODR_IMPLICIT, ODR_CONTEXT, 21, Z_APDU_initResponse,
|
---|
12 | (Odr_fun) z_InitResponse, "initResponse"},
|
---|
13 | {ODR_IMPLICIT, ODR_CONTEXT, 22, Z_APDU_searchRequest,
|
---|
14 | (Odr_fun) z_SearchRequest, "searchRequest"},
|
---|
15 | {ODR_IMPLICIT, ODR_CONTEXT, 23, Z_APDU_searchResponse,
|
---|
16 | (Odr_fun) z_SearchResponse, "searchResponse"},
|
---|
17 | {ODR_IMPLICIT, ODR_CONTEXT, 24, Z_APDU_presentRequest,
|
---|
18 | (Odr_fun) z_PresentRequest, "presentRequest"},
|
---|
19 | {ODR_IMPLICIT, ODR_CONTEXT, 25, Z_APDU_presentResponse,
|
---|
20 | (Odr_fun) z_PresentResponse, "presentResponse"},
|
---|
21 | {ODR_IMPLICIT, ODR_CONTEXT, 26, Z_APDU_deleteResultSetRequest,
|
---|
22 | (Odr_fun) z_DeleteResultSetRequest, "deleteResultSetRequest"},
|
---|
23 | {ODR_IMPLICIT, ODR_CONTEXT, 27, Z_APDU_deleteResultSetResponse,
|
---|
24 | (Odr_fun) z_DeleteResultSetResponse, "deleteResultSetResponse"},
|
---|
25 | {ODR_IMPLICIT, ODR_CONTEXT, 28, Z_APDU_accessControlRequest,
|
---|
26 | (Odr_fun) z_AccessControlRequest, "accessControlRequest"},
|
---|
27 | {ODR_IMPLICIT, ODR_CONTEXT, 29, Z_APDU_accessControlResponse,
|
---|
28 | (Odr_fun) z_AccessControlResponse, "accessControlResponse"},
|
---|
29 | {ODR_IMPLICIT, ODR_CONTEXT, 30, Z_APDU_resourceControlRequest,
|
---|
30 | (Odr_fun) z_ResourceControlRequest, "resourceControlRequest"},
|
---|
31 | {ODR_IMPLICIT, ODR_CONTEXT, 31, Z_APDU_resourceControlResponse,
|
---|
32 | (Odr_fun) z_ResourceControlResponse, "resourceControlResponse"},
|
---|
33 | {ODR_IMPLICIT, ODR_CONTEXT, 32, Z_APDU_triggerResourceControlRequest,
|
---|
34 | (Odr_fun) z_TriggerResourceControlRequest, "triggerResourceControlRequest"},
|
---|
35 | {ODR_IMPLICIT, ODR_CONTEXT, 33, Z_APDU_resourceReportRequest,
|
---|
36 | (Odr_fun) z_ResourceReportRequest, "resourceReportRequest"},
|
---|
37 | {ODR_IMPLICIT, ODR_CONTEXT, 34, Z_APDU_resourceReportResponse,
|
---|
38 | (Odr_fun) z_ResourceReportResponse, "resourceReportResponse"},
|
---|
39 | {ODR_IMPLICIT, ODR_CONTEXT, 35, Z_APDU_scanRequest,
|
---|
40 | (Odr_fun) z_ScanRequest, "scanRequest"},
|
---|
41 | {ODR_IMPLICIT, ODR_CONTEXT, 36, Z_APDU_scanResponse,
|
---|
42 | (Odr_fun) z_ScanResponse, "scanResponse"},
|
---|
43 | {ODR_IMPLICIT, ODR_CONTEXT, 43, Z_APDU_sortRequest,
|
---|
44 | (Odr_fun) z_SortRequest, "sortRequest"},
|
---|
45 | {ODR_IMPLICIT, ODR_CONTEXT, 44, Z_APDU_sortResponse,
|
---|
46 | (Odr_fun) z_SortResponse, "sortResponse"},
|
---|
47 | {ODR_IMPLICIT, ODR_CONTEXT, 45, Z_APDU_segmentRequest,
|
---|
48 | (Odr_fun) z_Segment, "segmentRequest"},
|
---|
49 | {ODR_IMPLICIT, ODR_CONTEXT, 46, Z_APDU_extendedServicesRequest,
|
---|
50 | (Odr_fun) z_ExtendedServicesRequest, "extendedServicesRequest"},
|
---|
51 | {ODR_IMPLICIT, ODR_CONTEXT, 47, Z_APDU_extendedServicesResponse,
|
---|
52 | (Odr_fun) z_ExtendedServicesResponse, "extendedServicesResponse"},
|
---|
53 | {ODR_IMPLICIT, ODR_CONTEXT, 48, Z_APDU_close,
|
---|
54 | (Odr_fun) z_Close, "close"},
|
---|
55 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
56 | };
|
---|
57 | if (!odr_initmember(o, p, sizeof(**p)))
|
---|
58 | return opt && odr_ok(o);
|
---|
59 | if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
|
---|
60 | return 1;
|
---|
61 | *p = 0;
|
---|
62 | return opt && odr_ok(o);
|
---|
63 | }
|
---|
64 |
|
---|
65 | int z_InitRequest (ODR o, Z_InitRequest **p, int opt, const char *name)
|
---|
66 | {
|
---|
67 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
68 | return opt && odr_ok (o);
|
---|
69 | return
|
---|
70 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
71 | z_ProtocolVersion(o, &(*p)->protocolVersion, 0, "protocolVersion") &&
|
---|
72 | z_Options(o, &(*p)->options, 0, "options") &&
|
---|
73 | odr_implicit_tag (o, odr_integer,
|
---|
74 | &(*p)->preferredMessageSize, ODR_CONTEXT, 5, 0, "preferredMessageSize") &&
|
---|
75 | odr_implicit_tag (o, odr_integer,
|
---|
76 | &(*p)->maximumRecordSize, ODR_CONTEXT, 6, 0, "maximumRecordSize") &&
|
---|
77 | odr_explicit_tag (o, z_IdAuthentication,
|
---|
78 | &(*p)->idAuthentication, ODR_CONTEXT, 7, 1, "idAuthentication") &&
|
---|
79 | odr_implicit_tag (o, z_InternationalString,
|
---|
80 | &(*p)->implementationId, ODR_CONTEXT, 110, 1, "implementationId") &&
|
---|
81 | odr_implicit_tag (o, z_InternationalString,
|
---|
82 | &(*p)->implementationName, ODR_CONTEXT, 111, 1, "implementationName") &&
|
---|
83 | odr_implicit_tag (o, z_InternationalString,
|
---|
84 | &(*p)->implementationVersion, ODR_CONTEXT, 112, 1, "implementationVersion") &&
|
---|
85 | odr_explicit_tag (o, z_External,
|
---|
86 | &(*p)->userInformationField, ODR_CONTEXT, 11, 1, "userInformationField") &&
|
---|
87 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
88 | odr_sequence_end (o);
|
---|
89 | }
|
---|
90 |
|
---|
91 | int z_IdPass (ODR o, Z_IdPass **p, int opt, const char *name)
|
---|
92 | {
|
---|
93 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
94 | return opt && odr_ok (o);
|
---|
95 | return
|
---|
96 | odr_implicit_tag (o, z_InternationalString,
|
---|
97 | &(*p)->groupId, ODR_CONTEXT, 0, 1, "groupId") &&
|
---|
98 | odr_implicit_tag (o, z_InternationalString,
|
---|
99 | &(*p)->userId, ODR_CONTEXT, 1, 1, "userId") &&
|
---|
100 | odr_implicit_tag (o, z_InternationalString,
|
---|
101 | &(*p)->password, ODR_CONTEXT, 2, 1, "password") &&
|
---|
102 | odr_sequence_end (o);
|
---|
103 | }
|
---|
104 |
|
---|
105 | int z_IdAuthentication (ODR o, Z_IdAuthentication **p, int opt, const char *name)
|
---|
106 | {
|
---|
107 | static Odr_arm arm[] = {
|
---|
108 | {-1, -1, -1, Z_IdAuthentication_open,
|
---|
109 | (Odr_fun) odr_visiblestring, "open"},
|
---|
110 | {-1, -1, -1, Z_IdAuthentication_idPass,
|
---|
111 | (Odr_fun) z_IdPass, "idPass"},
|
---|
112 | {-1, -1, -1, Z_IdAuthentication_anonymous,
|
---|
113 | (Odr_fun) odr_null, "anonymous"},
|
---|
114 | {-1, -1, -1, Z_IdAuthentication_other,
|
---|
115 | (Odr_fun) z_External, "other"},
|
---|
116 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
117 | };
|
---|
118 | if (!odr_initmember(o, p, sizeof(**p)))
|
---|
119 | return opt && odr_ok(o);
|
---|
120 | if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
|
---|
121 | return 1;
|
---|
122 | *p = 0;
|
---|
123 | return opt && odr_ok(o);
|
---|
124 | }
|
---|
125 |
|
---|
126 | int z_InitResponse (ODR o, Z_InitResponse **p, int opt, const char *name)
|
---|
127 | {
|
---|
128 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
129 | return opt && odr_ok (o);
|
---|
130 | return
|
---|
131 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
132 | z_ProtocolVersion(o, &(*p)->protocolVersion, 0, "protocolVersion") &&
|
---|
133 | z_Options(o, &(*p)->options, 0, "options") &&
|
---|
134 | odr_implicit_tag (o, odr_integer,
|
---|
135 | &(*p)->preferredMessageSize, ODR_CONTEXT, 5, 0, "preferredMessageSize") &&
|
---|
136 | odr_implicit_tag (o, odr_integer,
|
---|
137 | &(*p)->maximumRecordSize, ODR_CONTEXT, 6, 0, "maximumRecordSize") &&
|
---|
138 | odr_implicit_tag (o, odr_bool,
|
---|
139 | &(*p)->result, ODR_CONTEXT, 12, 0, "result") &&
|
---|
140 | odr_implicit_tag (o, z_InternationalString,
|
---|
141 | &(*p)->implementationId, ODR_CONTEXT, 110, 1, "implementationId") &&
|
---|
142 | odr_implicit_tag (o, z_InternationalString,
|
---|
143 | &(*p)->implementationName, ODR_CONTEXT, 111, 1, "implementationName") &&
|
---|
144 | odr_implicit_tag (o, z_InternationalString,
|
---|
145 | &(*p)->implementationVersion, ODR_CONTEXT, 112, 1, "implementationVersion") &&
|
---|
146 | odr_explicit_tag (o, z_External,
|
---|
147 | &(*p)->userInformationField, ODR_CONTEXT, 11, 1, "userInformationField") &&
|
---|
148 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
149 | odr_sequence_end (o);
|
---|
150 | }
|
---|
151 |
|
---|
152 | int z_ProtocolVersion (ODR o, Z_ProtocolVersion **p, int opt, const char *name)
|
---|
153 | {
|
---|
154 | return odr_implicit_tag (o, odr_bitstring, p, ODR_CONTEXT, 3, opt, name);
|
---|
155 | }
|
---|
156 |
|
---|
157 | int z_Options (ODR o, Z_Options **p, int opt, const char *name)
|
---|
158 | {
|
---|
159 | return odr_implicit_tag (o, odr_bitstring, p, ODR_CONTEXT, 4, opt, name);
|
---|
160 | }
|
---|
161 |
|
---|
162 | int z_SearchRequest (ODR o, Z_SearchRequest **p, int opt, const char *name)
|
---|
163 | {
|
---|
164 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
165 | return opt && odr_ok (o);
|
---|
166 | return
|
---|
167 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
168 | odr_implicit_tag (o, odr_integer,
|
---|
169 | &(*p)->smallSetUpperBound, ODR_CONTEXT, 13, 0, "smallSetUpperBound") &&
|
---|
170 | odr_implicit_tag (o, odr_integer,
|
---|
171 | &(*p)->largeSetLowerBound, ODR_CONTEXT, 14, 0, "largeSetLowerBound") &&
|
---|
172 | odr_implicit_tag (o, odr_integer,
|
---|
173 | &(*p)->mediumSetPresentNumber, ODR_CONTEXT, 15, 0, "mediumSetPresentNumber") &&
|
---|
174 | odr_implicit_tag (o, odr_bool,
|
---|
175 | &(*p)->replaceIndicator, ODR_CONTEXT, 16, 0, "replaceIndicator") &&
|
---|
176 | odr_implicit_tag (o, z_InternationalString,
|
---|
177 | &(*p)->resultSetName, ODR_CONTEXT, 17, 0, "resultSetName") &&
|
---|
178 | odr_implicit_settag (o, ODR_CONTEXT, 18) &&
|
---|
179 | odr_sequence_of(o, (Odr_fun) z_DatabaseName, &(*p)->databaseNames,
|
---|
180 | &(*p)->num_databaseNames, "databaseNames") &&
|
---|
181 | odr_explicit_tag (o, z_ElementSetNames,
|
---|
182 | &(*p)->smallSetElementSetNames, ODR_CONTEXT, 100, 1, "smallSetElementSetNames") &&
|
---|
183 | odr_explicit_tag (o, z_ElementSetNames,
|
---|
184 | &(*p)->mediumSetElementSetNames, ODR_CONTEXT, 101, 1, "mediumSetElementSetNames") &&
|
---|
185 | odr_implicit_tag (o, odr_oid,
|
---|
186 | &(*p)->preferredRecordSyntax, ODR_CONTEXT, 104, 1, "preferredRecordSyntax") &&
|
---|
187 | odr_explicit_tag (o, z_Query,
|
---|
188 | &(*p)->query, ODR_CONTEXT, 21, 0, "query") &&
|
---|
189 | odr_implicit_tag (o, z_OtherInformation,
|
---|
190 | &(*p)->additionalSearchInfo, ODR_CONTEXT, 203, 1, "additionalSearchInfo") &&
|
---|
191 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
192 | odr_sequence_end (o);
|
---|
193 | }
|
---|
194 |
|
---|
195 | int z_Query (ODR o, Z_Query **p, int opt, const char *name)
|
---|
196 | {
|
---|
197 | static Odr_arm arm[] = {
|
---|
198 | {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_Query_type_0,
|
---|
199 | (Odr_fun) z_ANY_type_0, "type_0"},
|
---|
200 | {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Query_type_1,
|
---|
201 | (Odr_fun) z_RPNQuery, "type_1"},
|
---|
202 | {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_Query_type_2,
|
---|
203 | (Odr_fun) odr_octetstring, "type_2"},
|
---|
204 | {ODR_EXPLICIT, ODR_CONTEXT, 100, Z_Query_type_100,
|
---|
205 | (Odr_fun) odr_octetstring, "type_100"},
|
---|
206 | {ODR_IMPLICIT, ODR_CONTEXT, 101, Z_Query_type_101,
|
---|
207 | (Odr_fun) z_RPNQuery, "type_101"},
|
---|
208 | {ODR_EXPLICIT, ODR_CONTEXT, 102, Z_Query_type_102,
|
---|
209 | (Odr_fun) odr_octetstring, "type_102"},
|
---|
210 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
211 | };
|
---|
212 | if (!odr_initmember(o, p, sizeof(**p)))
|
---|
213 | return opt && odr_ok(o);
|
---|
214 | if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
|
---|
215 | return 1;
|
---|
216 | *p = 0;
|
---|
217 | return opt && odr_ok(o);
|
---|
218 | }
|
---|
219 |
|
---|
220 | int z_RPNQuery (ODR o, Z_RPNQuery **p, int opt, const char *name)
|
---|
221 | {
|
---|
222 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
223 | return opt && odr_ok (o);
|
---|
224 | return
|
---|
225 | z_AttributeSetId(o, &(*p)->attributeSetId, 0, "attributeSetId") &&
|
---|
226 | z_RPNStructure(o, &(*p)->RPNStructure, 0, "RPNStructure") &&
|
---|
227 | odr_sequence_end (o);
|
---|
228 | }
|
---|
229 |
|
---|
230 | int z_Complex (ODR o, Z_Complex **p, int opt, const char *name)
|
---|
231 | {
|
---|
232 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
233 | return opt && odr_ok (o);
|
---|
234 | return
|
---|
235 | z_RPNStructure(o, &(*p)->s1, 0, "s1") &&
|
---|
236 | z_RPNStructure(o, &(*p)->s2, 0, "s2") &&
|
---|
237 | z_Operator(o, &(*p)->roperator, 0, "roperator") &&
|
---|
238 | odr_sequence_end (o);
|
---|
239 | }
|
---|
240 |
|
---|
241 | int z_RPNStructure (ODR o, Z_RPNStructure **p, int opt, const char *name)
|
---|
242 | {
|
---|
243 | static Odr_arm arm[] = {
|
---|
244 | {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_RPNStructure_simple,
|
---|
245 | (Odr_fun) z_Operand, "simple"},
|
---|
246 | {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_RPNStructure_complex,
|
---|
247 | (Odr_fun) z_Complex, "complex"},
|
---|
248 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
249 | };
|
---|
250 | if (!odr_initmember(o, p, sizeof(**p)))
|
---|
251 | return opt && odr_ok(o);
|
---|
252 | if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
|
---|
253 | return 1;
|
---|
254 | *p = 0;
|
---|
255 | return opt && odr_ok(o);
|
---|
256 | }
|
---|
257 |
|
---|
258 | int z_Operand (ODR o, Z_Operand **p, int opt, const char *name)
|
---|
259 | {
|
---|
260 | static Odr_arm arm[] = {
|
---|
261 | {-1, -1, -1, Z_Operand_APT,
|
---|
262 | (Odr_fun) z_AttributesPlusTerm, "attributesPlusTerm"},
|
---|
263 | {-1, -1, -1, Z_Operand_resultSetId,
|
---|
264 | (Odr_fun) z_ResultSetId, "resultSetId"},
|
---|
265 | {-1, -1, -1, Z_Operand_resultAttr,
|
---|
266 | (Odr_fun) z_ResultSetPlusAttributes, "resultAttr"},
|
---|
267 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
268 | };
|
---|
269 | if (!odr_initmember(o, p, sizeof(**p)))
|
---|
270 | return opt && odr_ok(o);
|
---|
271 | if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
|
---|
272 | return 1;
|
---|
273 | *p = 0;
|
---|
274 | return opt && odr_ok(o);
|
---|
275 | }
|
---|
276 |
|
---|
277 | int z_AttributesPlusTerm (ODR o, Z_AttributesPlusTerm **p, int opt, const char *name)
|
---|
278 | {
|
---|
279 | if (!odr_implicit_settag (o, ODR_CONTEXT, 102) ||
|
---|
280 | !odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
281 | return opt && odr_ok(o);
|
---|
282 | return
|
---|
283 | z_AttributeList(o, &(*p)->attributes, 0, "attributes") &&
|
---|
284 | z_Term(o, &(*p)->term, 0, "term") &&
|
---|
285 | odr_sequence_end (o);
|
---|
286 | }
|
---|
287 |
|
---|
288 | int z_ResultSetPlusAttributes (ODR o, Z_ResultSetPlusAttributes **p, int opt, const char *name)
|
---|
289 | {
|
---|
290 | if (!odr_implicit_settag (o, ODR_CONTEXT, 214) ||
|
---|
291 | !odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
292 | return opt && odr_ok(o);
|
---|
293 | return
|
---|
294 | z_ResultSetId(o, &(*p)->resultSet, 0, "resultSet") &&
|
---|
295 | z_AttributeList(o, &(*p)->attributes, 0, "attributes") &&
|
---|
296 | odr_sequence_end (o);
|
---|
297 | }
|
---|
298 |
|
---|
299 | int z_AttributeList (ODR o, Z_AttributeList **p, int opt, const char *name)
|
---|
300 | {
|
---|
301 | if (!odr_initmember (o, p, sizeof(**p)))
|
---|
302 | return opt && odr_ok(o);
|
---|
303 | odr_implicit_settag (o, ODR_CONTEXT, 44);
|
---|
304 | if (odr_sequence_of (o, (Odr_fun) z_AttributeElement, &(*p)->attributes,
|
---|
305 | &(*p)->num_attributes, name))
|
---|
306 | return 1;
|
---|
307 | *p = 0;
|
---|
308 | return opt && odr_ok(o);
|
---|
309 | }
|
---|
310 |
|
---|
311 | int z_Term (ODR o, Z_Term **p, int opt, const char *name)
|
---|
312 | {
|
---|
313 | static Odr_arm arm[] = {
|
---|
314 | {ODR_IMPLICIT, ODR_CONTEXT, 45, Z_Term_general,
|
---|
315 | (Odr_fun) odr_octetstring, "general"},
|
---|
316 | {ODR_IMPLICIT, ODR_CONTEXT, 215, Z_Term_numeric,
|
---|
317 | (Odr_fun) odr_integer, "numeric"},
|
---|
318 | {ODR_IMPLICIT, ODR_CONTEXT, 216, Z_Term_characterString,
|
---|
319 | (Odr_fun) z_InternationalString, "characterString"},
|
---|
320 | {ODR_IMPLICIT, ODR_CONTEXT, 217, Z_Term_oid,
|
---|
321 | (Odr_fun) odr_oid, "oid"},
|
---|
322 | {ODR_IMPLICIT, ODR_CONTEXT, 218, Z_Term_dateTime,
|
---|
323 | (Odr_fun) odr_generalizedtime, "dateTime"},
|
---|
324 | {ODR_IMPLICIT, ODR_CONTEXT, 219, Z_Term_external,
|
---|
325 | (Odr_fun) z_External, "external"},
|
---|
326 | {ODR_IMPLICIT, ODR_CONTEXT, 220, Z_Term_integerAndUnit,
|
---|
327 | (Odr_fun) z_IntUnit, "integerAndUnit"},
|
---|
328 | {ODR_IMPLICIT, ODR_CONTEXT, 221, Z_Term_null,
|
---|
329 | (Odr_fun) odr_null, "null"},
|
---|
330 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
331 | };
|
---|
332 | if (!odr_initmember(o, p, sizeof(**p)))
|
---|
333 | return opt && odr_ok(o);
|
---|
334 | if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
|
---|
335 | return 1;
|
---|
336 | *p = 0;
|
---|
337 | return opt && odr_ok(o);
|
---|
338 | }
|
---|
339 |
|
---|
340 | int z_Operator (ODR o, Z_Operator **p, int opt, const char *name)
|
---|
341 | {
|
---|
342 | static Odr_arm arm[] = {
|
---|
343 | {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_Operator_and,
|
---|
344 | (Odr_fun) odr_null, "and"},
|
---|
345 | {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Operator_or,
|
---|
346 | (Odr_fun) odr_null, "or"},
|
---|
347 | {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_Operator_and_not,
|
---|
348 | (Odr_fun) odr_null, "and_not"},
|
---|
349 | {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_Operator_prox,
|
---|
350 | (Odr_fun) z_ProximityOperator, "prox"},
|
---|
351 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
352 | };
|
---|
353 | if (!*p && o->direction != ODR_DECODE)
|
---|
354 | return opt;
|
---|
355 | if (!odr_constructed_begin(o, p, ODR_CONTEXT, 46, 0))
|
---|
356 | return opt && odr_ok(o);
|
---|
357 | if (!odr_initmember(o, p, sizeof(**p)))
|
---|
358 | return opt && odr_ok(o);
|
---|
359 | if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name) &&
|
---|
360 | odr_constructed_end(o))
|
---|
361 | return 1;
|
---|
362 | *p = 0;
|
---|
363 | return opt && odr_ok(o);
|
---|
364 | }
|
---|
365 |
|
---|
366 | int z_ComplexAttribute (ODR o, Z_ComplexAttribute **p, int opt, const char *name)
|
---|
367 | {
|
---|
368 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
369 | return opt && odr_ok (o);
|
---|
370 | return
|
---|
371 | odr_implicit_settag (o, ODR_CONTEXT, 1) &&
|
---|
372 | odr_sequence_of(o, (Odr_fun) z_StringOrNumeric, &(*p)->list,
|
---|
373 | &(*p)->num_list, "list") &&
|
---|
374 | odr_implicit_settag (o, ODR_CONTEXT, 2) &&
|
---|
375 | (odr_sequence_of(o, (Odr_fun) odr_integer, &(*p)->semanticAction,
|
---|
376 | &(*p)->num_semanticAction, "semanticAction") || odr_ok(o)) &&
|
---|
377 | odr_sequence_end (o);
|
---|
378 | }
|
---|
379 |
|
---|
380 | int z_AttributeElement (ODR o, Z_AttributeElement **p, int opt, const char *name)
|
---|
381 | {
|
---|
382 | static Odr_arm arm[] = {
|
---|
383 | {ODR_IMPLICIT, ODR_CONTEXT, 121, Z_AttributeValue_numeric,
|
---|
384 | (Odr_fun) odr_integer, "numeric"},
|
---|
385 | {ODR_IMPLICIT, ODR_CONTEXT, 224, Z_AttributeValue_complex,
|
---|
386 | (Odr_fun) z_ComplexAttribute, "complex"},
|
---|
387 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
388 | };
|
---|
389 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
390 | return opt && odr_ok (o);
|
---|
391 | return
|
---|
392 | odr_implicit_tag (o, z_AttributeSetId,
|
---|
393 | &(*p)->attributeSet, ODR_CONTEXT, 1, 1, "attributeSet") &&
|
---|
394 | odr_implicit_tag (o, odr_integer,
|
---|
395 | &(*p)->attributeType, ODR_CONTEXT, 120, 0, "attributeType") &&
|
---|
396 | odr_choice (o, arm, &(*p)->value, &(*p)->which, 0) &&
|
---|
397 | odr_sequence_end (o);
|
---|
398 | }
|
---|
399 |
|
---|
400 | int z_ProximityOperator (ODR o, Z_ProximityOperator **p, int opt, const char *name)
|
---|
401 | {
|
---|
402 | static Odr_arm arm[] = {
|
---|
403 | {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ProximityOperator_known,
|
---|
404 | (Odr_fun) z_ProxUnit, "known"},
|
---|
405 | {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_ProximityOperator_private,
|
---|
406 | (Odr_fun) odr_integer, "zprivate"},
|
---|
407 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
408 | };
|
---|
409 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
410 | return opt && odr_ok (o);
|
---|
411 | return
|
---|
412 | odr_implicit_tag (o, odr_bool,
|
---|
413 | &(*p)->exclusion, ODR_CONTEXT, 1, 1, "exclusion") &&
|
---|
414 | odr_implicit_tag (o, odr_integer,
|
---|
415 | &(*p)->distance, ODR_CONTEXT, 2, 0, "distance") &&
|
---|
416 | odr_implicit_tag (o, odr_bool,
|
---|
417 | &(*p)->ordered, ODR_CONTEXT, 3, 0, "ordered") &&
|
---|
418 | odr_implicit_tag (o, odr_integer,
|
---|
419 | &(*p)->relationType, ODR_CONTEXT, 4, 0, "relationType") &&
|
---|
420 | odr_constructed_begin (o, &(*p)->u, ODR_CONTEXT, 5, "proximityUnitCode") &&
|
---|
421 | odr_choice (o, arm, &(*p)->u, &(*p)->which, 0) &&
|
---|
422 | odr_constructed_end (o) &&
|
---|
423 | odr_sequence_end (o);
|
---|
424 | }
|
---|
425 |
|
---|
426 | int z_ProxUnit (ODR o, Z_ProxUnit **p, int opt, const char *name)
|
---|
427 | {
|
---|
428 | return odr_integer (o, p, opt, name);
|
---|
429 | }
|
---|
430 |
|
---|
431 | int z_SearchResponse (ODR o, Z_SearchResponse **p, int opt, const char *name)
|
---|
432 | {
|
---|
433 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
434 | return opt && odr_ok (o);
|
---|
435 | return
|
---|
436 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
437 | odr_implicit_tag (o, odr_integer,
|
---|
438 | &(*p)->resultCount, ODR_CONTEXT, 23, 0, "resultCount") &&
|
---|
439 | odr_implicit_tag (o, odr_integer,
|
---|
440 | &(*p)->numberOfRecordsReturned, ODR_CONTEXT, 24, 0, "numberOfRecordsReturned") &&
|
---|
441 | odr_implicit_tag (o, odr_integer,
|
---|
442 | &(*p)->nextResultSetPosition, ODR_CONTEXT, 25, 0, "nextResultSetPosition") &&
|
---|
443 | odr_implicit_tag (o, odr_bool,
|
---|
444 | &(*p)->searchStatus, ODR_CONTEXT, 22, 0, "searchStatus") &&
|
---|
445 | odr_implicit_tag (o, odr_integer,
|
---|
446 | &(*p)->resultSetStatus, ODR_CONTEXT, 26, 1, "resultSetStatus") &&
|
---|
447 | z_PresentStatus(o, &(*p)->presentStatus, 1, "presentStatus") &&
|
---|
448 | z_Records(o, &(*p)->records, 1, "records") &&
|
---|
449 | odr_implicit_tag (o, z_OtherInformation,
|
---|
450 | &(*p)->additionalSearchInfo, ODR_CONTEXT, 203, 1, "additionalSearchInfo") &&
|
---|
451 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
452 | odr_sequence_end (o);
|
---|
453 | }
|
---|
454 |
|
---|
455 | int z_RecordComposition (ODR o, Z_RecordComposition **p, int opt, const char *name)
|
---|
456 | {
|
---|
457 | static Odr_arm arm[] = {
|
---|
458 | {ODR_EXPLICIT, ODR_CONTEXT, 19, Z_RecordComp_simple,
|
---|
459 | (Odr_fun) z_ElementSetNames, "simple"},
|
---|
460 | {ODR_IMPLICIT, ODR_CONTEXT, 209, Z_RecordComp_complex,
|
---|
461 | (Odr_fun) z_CompSpec, "complex"},
|
---|
462 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
463 | };
|
---|
464 | if (!odr_initmember(o, p, sizeof(**p)))
|
---|
465 | return opt && odr_ok(o);
|
---|
466 | if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
|
---|
467 | return 1;
|
---|
468 | *p = 0;
|
---|
469 | return opt && odr_ok(o);
|
---|
470 | }
|
---|
471 |
|
---|
472 | int z_PresentRequest (ODR o, Z_PresentRequest **p, int opt, const char *name)
|
---|
473 | {
|
---|
474 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
475 | return opt && odr_ok (o);
|
---|
476 | return
|
---|
477 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
478 | z_ResultSetId(o, &(*p)->resultSetId, 0, "resultSetId") &&
|
---|
479 | odr_implicit_tag (o, odr_integer,
|
---|
480 | &(*p)->resultSetStartPoint, ODR_CONTEXT, 30, 0, "resultSetStartPoint") &&
|
---|
481 | odr_implicit_tag (o, odr_integer,
|
---|
482 | &(*p)->numberOfRecordsRequested, ODR_CONTEXT, 29, 0, "numberOfRecordsRequested") &&
|
---|
483 | odr_implicit_settag (o, ODR_CONTEXT, 212) &&
|
---|
484 | (odr_sequence_of(o, (Odr_fun) z_Range, &(*p)->additionalRanges,
|
---|
485 | &(*p)->num_ranges, "additionalRanges") || odr_ok(o)) &&
|
---|
486 | z_RecordComposition (o, &(*p)->recordComposition, 1, "recordComposition") &&
|
---|
487 | odr_implicit_tag (o, odr_oid,
|
---|
488 | &(*p)->preferredRecordSyntax, ODR_CONTEXT, 104, 1, "preferredRecordSyntax") &&
|
---|
489 | odr_implicit_tag (o, odr_integer,
|
---|
490 | &(*p)->maxSegmentCount, ODR_CONTEXT, 204, 1, "maxSegmentCount") &&
|
---|
491 | odr_implicit_tag (o, odr_integer,
|
---|
492 | &(*p)->maxRecordSize, ODR_CONTEXT, 206, 1, "maxRecordSize") &&
|
---|
493 | odr_implicit_tag (o, odr_integer,
|
---|
494 | &(*p)->maxSegmentSize, ODR_CONTEXT, 207, 1, "maxSegmentSize") &&
|
---|
495 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
496 | odr_sequence_end (o);
|
---|
497 | }
|
---|
498 |
|
---|
499 | int z_Segment (ODR o, Z_Segment **p, int opt, const char *name)
|
---|
500 | {
|
---|
501 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
502 | return opt && odr_ok (o);
|
---|
503 | return
|
---|
504 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
505 | odr_implicit_tag (o, odr_integer,
|
---|
506 | &(*p)->numberOfRecordsReturned, ODR_CONTEXT, 24, 0, "numberOfRecordsReturned") &&
|
---|
507 | odr_implicit_settag (o, ODR_CONTEXT, 0) &&
|
---|
508 | odr_sequence_of(o, (Odr_fun) z_NamePlusRecord, &(*p)->segmentRecords,
|
---|
509 | &(*p)->num_segmentRecords, "segmentRecords") &&
|
---|
510 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
511 | odr_sequence_end (o);
|
---|
512 | }
|
---|
513 |
|
---|
514 | int z_PresentResponse (ODR o, Z_PresentResponse **p, int opt, const char *name)
|
---|
515 | {
|
---|
516 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
517 | return opt && odr_ok (o);
|
---|
518 | return
|
---|
519 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
520 | odr_implicit_tag (o, odr_integer,
|
---|
521 | &(*p)->numberOfRecordsReturned, ODR_CONTEXT, 24, 0, "numberOfRecordsReturned") &&
|
---|
522 | odr_implicit_tag (o, odr_integer,
|
---|
523 | &(*p)->nextResultSetPosition, ODR_CONTEXT, 25, 0, "nextResultSetPosition") &&
|
---|
524 | z_PresentStatus(o, &(*p)->presentStatus, 0, "presentStatus") &&
|
---|
525 | z_Records(o, &(*p)->records, 1, "records") &&
|
---|
526 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
527 | odr_sequence_end (o);
|
---|
528 | }
|
---|
529 |
|
---|
530 | int z_NamePlusRecordList (ODR o, Z_NamePlusRecordList **p, int opt, const char *name)
|
---|
531 | {
|
---|
532 | if (!odr_initmember (o, p, sizeof(**p)))
|
---|
533 | return opt && odr_ok(o);
|
---|
534 | if (odr_sequence_of (o, (Odr_fun) z_NamePlusRecord, &(*p)->records,
|
---|
535 | &(*p)->num_records, name))
|
---|
536 | return 1;
|
---|
537 | *p = 0;
|
---|
538 | return opt && odr_ok(o);
|
---|
539 | }
|
---|
540 |
|
---|
541 | int z_DiagRecs (ODR o, Z_DiagRecs **p, int opt, const char *name)
|
---|
542 | {
|
---|
543 | if (!odr_initmember (o, p, sizeof(**p)))
|
---|
544 | return opt && odr_ok(o);
|
---|
545 | if (odr_sequence_of (o, (Odr_fun) z_DiagRec, &(*p)->diagRecs,
|
---|
546 | &(*p)->num_diagRecs, name))
|
---|
547 | return 1;
|
---|
548 | *p = 0;
|
---|
549 | return opt && odr_ok(o);
|
---|
550 | }
|
---|
551 |
|
---|
552 | int z_Records (ODR o, Z_Records **p, int opt, const char *name)
|
---|
553 | {
|
---|
554 | static Odr_arm arm[] = {
|
---|
555 | {ODR_IMPLICIT, ODR_CONTEXT, 28, Z_Records_DBOSD,
|
---|
556 | (Odr_fun) z_NamePlusRecordList, "databaseOrSurDiagnostics"},
|
---|
557 | {ODR_IMPLICIT, ODR_CONTEXT, 130, Z_Records_NSD,
|
---|
558 | (Odr_fun) z_DefaultDiagFormat, "nonSurrogateDiagnostic"},
|
---|
559 | {ODR_IMPLICIT, ODR_CONTEXT, 205, Z_Records_multipleNSD,
|
---|
560 | (Odr_fun) z_DiagRecs, "multipleNonSurDiagnostics"},
|
---|
561 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
562 | };
|
---|
563 | if (!odr_initmember(o, p, sizeof(**p)))
|
---|
564 | return opt && odr_ok(o);
|
---|
565 | if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
|
---|
566 | return 1;
|
---|
567 | *p = 0;
|
---|
568 | return opt && odr_ok(o);
|
---|
569 | }
|
---|
570 |
|
---|
571 | int z_NamePlusRecord (ODR o, Z_NamePlusRecord **p, int opt, const char *name)
|
---|
572 | {
|
---|
573 | static Odr_arm arm[] = {
|
---|
574 | {ODR_EXPLICIT, ODR_CONTEXT, 1, Z_NamePlusRecord_databaseRecord,
|
---|
575 | (Odr_fun) z_External, "databaseRecord"},
|
---|
576 | {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_NamePlusRecord_surrogateDiagnostic,
|
---|
577 | (Odr_fun) z_DiagRec, "surrogateDiagnostic"},
|
---|
578 | {ODR_EXPLICIT, ODR_CONTEXT, 3, Z_NamePlusRecord_startingFragment,
|
---|
579 | (Odr_fun) z_FragmentSyntax, "startingFragment"},
|
---|
580 | {ODR_EXPLICIT, ODR_CONTEXT, 4, Z_NamePlusRecord_intermediateFragment,
|
---|
581 | (Odr_fun) z_FragmentSyntax, "intermediateFragment"},
|
---|
582 | {ODR_EXPLICIT, ODR_CONTEXT, 5, Z_NamePlusRecord_finalFragment,
|
---|
583 | (Odr_fun) z_FragmentSyntax, "finalFragment"},
|
---|
584 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
585 | };
|
---|
586 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
587 | return opt && odr_ok (o);
|
---|
588 | return
|
---|
589 | odr_implicit_tag (o, z_DatabaseName,
|
---|
590 | &(*p)->databaseName, ODR_CONTEXT, 0, 1, "databaseName") &&
|
---|
591 | odr_constructed_begin (o, &(*p)->u, ODR_CONTEXT, 1, "record") &&
|
---|
592 | odr_choice (o, arm, &(*p)->u, &(*p)->which, 0) &&
|
---|
593 | odr_constructed_end (o) &&
|
---|
594 | odr_sequence_end (o);
|
---|
595 | }
|
---|
596 |
|
---|
597 | int z_FragmentSyntax (ODR o, Z_FragmentSyntax **p, int opt, const char *name)
|
---|
598 | {
|
---|
599 | static Odr_arm arm[] = {
|
---|
600 | {-1, -1, -1, Z_FragmentSyntax_externallyTagged,
|
---|
601 | (Odr_fun) z_External, "externallyTagged"},
|
---|
602 | {-1, -1, -1, Z_FragmentSyntax_notExternallyTagged,
|
---|
603 | (Odr_fun) odr_octetstring, "notExternallyTagged"},
|
---|
604 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
605 | };
|
---|
606 | if (!odr_initmember(o, p, sizeof(**p)))
|
---|
607 | return opt && odr_ok(o);
|
---|
608 | if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
|
---|
609 | return 1;
|
---|
610 | *p = 0;
|
---|
611 | return opt && odr_ok(o);
|
---|
612 | }
|
---|
613 |
|
---|
614 | int z_DiagRec (ODR o, Z_DiagRec **p, int opt, const char *name)
|
---|
615 | {
|
---|
616 | static Odr_arm arm[] = {
|
---|
617 | {-1, -1, -1, Z_DiagRec_defaultFormat,
|
---|
618 | (Odr_fun) z_DefaultDiagFormat, "defaultFormat"},
|
---|
619 | {-1, -1, -1, Z_DiagRec_externallyDefined,
|
---|
620 | (Odr_fun) z_External, "externallyDefined"},
|
---|
621 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
622 | };
|
---|
623 | if (!odr_initmember(o, p, sizeof(**p)))
|
---|
624 | return opt && odr_ok(o);
|
---|
625 | if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
|
---|
626 | return 1;
|
---|
627 | *p = 0;
|
---|
628 | return opt && odr_ok(o);
|
---|
629 | }
|
---|
630 |
|
---|
631 | int z_DefaultDiagFormat (ODR o, Z_DefaultDiagFormat **p, int opt, const char *name)
|
---|
632 | {
|
---|
633 | static Odr_arm arm[] = {
|
---|
634 | {-1, -1, -1, Z_DefaultDiagFormat_v2Addinfo,
|
---|
635 | (Odr_fun) odr_visiblestring, "v2Addinfo"},
|
---|
636 | {-1, -1, -1, Z_DefaultDiagFormat_v3Addinfo,
|
---|
637 | (Odr_fun) z_InternationalString, "v3Addinfo"},
|
---|
638 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
639 | };
|
---|
640 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
641 | return opt && odr_ok (o);
|
---|
642 | return
|
---|
643 | odr_oid(o, &(*p)->diagnosticSetId, 0, "diagnosticSetId") &&
|
---|
644 | odr_integer(o, &(*p)->condition, 0, "condition") &&
|
---|
645 | odr_choice (o, arm, &(*p)->u, &(*p)->which, 0) &&
|
---|
646 | odr_sequence_end (o);
|
---|
647 | }
|
---|
648 |
|
---|
649 | int z_Range (ODR o, Z_Range **p, int opt, const char *name)
|
---|
650 | {
|
---|
651 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
652 | return opt && odr_ok (o);
|
---|
653 | return
|
---|
654 | odr_implicit_tag (o, odr_integer,
|
---|
655 | &(*p)->startingPosition, ODR_CONTEXT, 1, 0, "startingPosition") &&
|
---|
656 | odr_implicit_tag (o, odr_integer,
|
---|
657 | &(*p)->numberOfRecords, ODR_CONTEXT, 2, 0, "numberOfRecords") &&
|
---|
658 | odr_sequence_end (o);
|
---|
659 | }
|
---|
660 |
|
---|
661 | int z_DatabaseSpecificUnit (ODR o, Z_DatabaseSpecificUnit **p, int opt, const char *name)
|
---|
662 | {
|
---|
663 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
664 | return opt && odr_ok (o);
|
---|
665 | return
|
---|
666 | z_DatabaseName(o, &(*p)->dbName, 0, "dbName") &&
|
---|
667 | z_ElementSetName(o, &(*p)->esn, 0, "esn") &&
|
---|
668 | odr_sequence_end (o);
|
---|
669 | }
|
---|
670 |
|
---|
671 | int z_DatabaseSpecific (ODR o, Z_DatabaseSpecific **p, int opt, const char *name)
|
---|
672 | {
|
---|
673 | if (!odr_initmember (o, p, sizeof(**p)))
|
---|
674 | return opt && odr_ok(o);
|
---|
675 | if (odr_sequence_of (o, (Odr_fun) z_DatabaseSpecificUnit, &(*p)->elements,
|
---|
676 | &(*p)->num, name))
|
---|
677 | return 1;
|
---|
678 | *p = 0;
|
---|
679 | return opt && odr_ok(o);
|
---|
680 | }
|
---|
681 |
|
---|
682 | int z_ElementSetNames (ODR o, Z_ElementSetNames **p, int opt, const char *name)
|
---|
683 | {
|
---|
684 | static Odr_arm arm[] = {
|
---|
685 | {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_ElementSetNames_generic,
|
---|
686 | (Odr_fun) z_InternationalString, "generic"},
|
---|
687 | {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ElementSetNames_databaseSpecific,
|
---|
688 | (Odr_fun) z_DatabaseSpecific, "databaseSpecific"},
|
---|
689 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
690 | };
|
---|
691 | if (!odr_initmember(o, p, sizeof(**p)))
|
---|
692 | return opt && odr_ok(o);
|
---|
693 | if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
|
---|
694 | return 1;
|
---|
695 | *p = 0;
|
---|
696 | return opt && odr_ok(o);
|
---|
697 | }
|
---|
698 |
|
---|
699 | int z_PresentStatus (ODR o, Z_PresentStatus **p, int opt, const char *name)
|
---|
700 | {
|
---|
701 | return odr_implicit_tag (o, odr_integer, p, ODR_CONTEXT, 27, opt, name);
|
---|
702 | }
|
---|
703 |
|
---|
704 | int z_DbSpecific (ODR o, Z_DbSpecific **p, int opt, const char *name)
|
---|
705 | {
|
---|
706 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
707 | return opt && odr_ok (o);
|
---|
708 | return
|
---|
709 | odr_explicit_tag (o, z_DatabaseName,
|
---|
710 | &(*p)->db, ODR_CONTEXT, 1, 0, "db") &&
|
---|
711 | odr_implicit_tag (o, z_Specification,
|
---|
712 | &(*p)->spec, ODR_CONTEXT, 2, 0, "spec") &&
|
---|
713 | odr_sequence_end (o);
|
---|
714 | }
|
---|
715 |
|
---|
716 | int z_CompSpec (ODR o, Z_CompSpec **p, int opt, const char *name)
|
---|
717 | {
|
---|
718 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
719 | return opt && odr_ok (o);
|
---|
720 | return
|
---|
721 | odr_implicit_tag (o, odr_bool,
|
---|
722 | &(*p)->selectAlternativeSyntax, ODR_CONTEXT, 1, 0, "selectAlternativeSyntax") &&
|
---|
723 | odr_implicit_tag (o, z_Specification,
|
---|
724 | &(*p)->generic, ODR_CONTEXT, 2, 1, "generic") &&
|
---|
725 | odr_implicit_settag (o, ODR_CONTEXT, 3) &&
|
---|
726 | (odr_sequence_of(o, (Odr_fun) z_DbSpecific, &(*p)->dbSpecific,
|
---|
727 | &(*p)->num_dbSpecific, "dbSpecific") || odr_ok(o)) &&
|
---|
728 | odr_implicit_settag (o, ODR_CONTEXT, 4) &&
|
---|
729 | (odr_sequence_of(o, (Odr_fun) odr_oid, &(*p)->recordSyntax,
|
---|
730 | &(*p)->num_recordSyntax, "recordSyntax") || odr_ok(o)) &&
|
---|
731 | odr_sequence_end (o);
|
---|
732 | }
|
---|
733 |
|
---|
734 | int z_ElementSpec (ODR o, Z_ElementSpec **p, int opt, const char *name)
|
---|
735 | {
|
---|
736 | static Odr_arm arm[] = {
|
---|
737 | {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ElementSpec_elementSetName,
|
---|
738 | (Odr_fun) z_InternationalString, "elementSetName"},
|
---|
739 | {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_ElementSpec_externalSpec,
|
---|
740 | (Odr_fun) z_External, "externalSpec"},
|
---|
741 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
742 | };
|
---|
743 | if (!odr_initmember(o, p, sizeof(**p)))
|
---|
744 | return opt && odr_ok(o);
|
---|
745 | if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
|
---|
746 | return 1;
|
---|
747 | *p = 0;
|
---|
748 | return opt && odr_ok(o);
|
---|
749 | }
|
---|
750 |
|
---|
751 | int z_Specification (ODR o, Z_Specification **p, int opt, const char *name)
|
---|
752 | {
|
---|
753 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
754 | return opt && odr_ok (o);
|
---|
755 | return
|
---|
756 | odr_implicit_tag (o, odr_oid,
|
---|
757 | &(*p)->schema, ODR_CONTEXT, 1, 1, "schema") &&
|
---|
758 | odr_explicit_tag (o, z_ElementSpec,
|
---|
759 | &(*p)->elementSpec, ODR_CONTEXT, 2, 1, "elementSpec") &&
|
---|
760 | odr_sequence_end (o);
|
---|
761 | }
|
---|
762 |
|
---|
763 | int z_DeleteResultSetRequest (ODR o, Z_DeleteResultSetRequest **p, int opt, const char *name)
|
---|
764 | {
|
---|
765 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
766 | return opt && odr_ok (o);
|
---|
767 | return
|
---|
768 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
769 | odr_implicit_tag (o, odr_integer,
|
---|
770 | &(*p)->deleteFunction, ODR_CONTEXT, 32, 0, "deleteFunction") &&
|
---|
771 | (odr_sequence_of(o, (Odr_fun) z_ResultSetId, &(*p)->resultSetList,
|
---|
772 | &(*p)->num_resultSetList, "resultSetList") || odr_ok(o)) &&
|
---|
773 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
774 | odr_sequence_end (o);
|
---|
775 | }
|
---|
776 |
|
---|
777 | int z_DeleteResultSetResponse (ODR o, Z_DeleteResultSetResponse **p, int opt, const char *name)
|
---|
778 | {
|
---|
779 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
780 | return opt && odr_ok (o);
|
---|
781 | return
|
---|
782 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
783 | odr_implicit_tag (o, z_DeleteStatus,
|
---|
784 | &(*p)->deleteOperationStatus, ODR_CONTEXT, 0, 0, "deleteOperationStatus") &&
|
---|
785 | odr_implicit_tag (o, z_ListStatuses,
|
---|
786 | &(*p)->deleteListStatuses, ODR_CONTEXT, 1, 1, "deleteListStatuses") &&
|
---|
787 | odr_implicit_tag (o, odr_integer,
|
---|
788 | &(*p)->numberNotDeleted, ODR_CONTEXT, 34, 1, "numberNotDeleted") &&
|
---|
789 | odr_implicit_tag (o, z_ListStatuses,
|
---|
790 | &(*p)->bulkStatuses, ODR_CONTEXT, 35, 1, "bulkStatuses") &&
|
---|
791 | odr_implicit_tag (o, z_InternationalString,
|
---|
792 | &(*p)->deleteMessage, ODR_CONTEXT, 36, 1, "deleteMessage") &&
|
---|
793 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
794 | odr_sequence_end (o);
|
---|
795 | }
|
---|
796 |
|
---|
797 | int z_ListStatus (ODR o, Z_ListStatus **p, int opt, const char *name)
|
---|
798 | {
|
---|
799 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
800 | return opt && odr_ok (o);
|
---|
801 | return
|
---|
802 | z_ResultSetId(o, &(*p)->id, 0, "id") &&
|
---|
803 | z_DeleteStatus(o, &(*p)->status, 0, "status") &&
|
---|
804 | odr_sequence_end (o);
|
---|
805 | }
|
---|
806 |
|
---|
807 | int z_ListStatuses (ODR o, Z_ListStatuses **p, int opt, const char *name)
|
---|
808 | {
|
---|
809 | if (!odr_initmember (o, p, sizeof(**p)))
|
---|
810 | return opt && odr_ok(o);
|
---|
811 | if (odr_sequence_of (o, (Odr_fun) z_ListStatus, &(*p)->elements,
|
---|
812 | &(*p)->num, name))
|
---|
813 | return 1;
|
---|
814 | *p = 0;
|
---|
815 | return opt && odr_ok(o);
|
---|
816 | }
|
---|
817 |
|
---|
818 | int z_DeleteStatus (ODR o, Z_DeleteStatus **p, int opt, const char *name)
|
---|
819 | {
|
---|
820 | return odr_implicit_tag (o, odr_integer, p, ODR_CONTEXT, 33, opt, name);
|
---|
821 | }
|
---|
822 |
|
---|
823 | int z_AccessControlRequest (ODR o, Z_AccessControlRequest **p, int opt, const char *name)
|
---|
824 | {
|
---|
825 | static Odr_arm arm[] = {
|
---|
826 | {ODR_IMPLICIT, ODR_CONTEXT, 37, Z_AccessControlRequest_simpleForm,
|
---|
827 | (Odr_fun) odr_octetstring, "simpleForm"},
|
---|
828 | {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_AccessControlRequest_externallyDefined,
|
---|
829 | (Odr_fun) z_External, "externallyDefined"},
|
---|
830 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
831 | };
|
---|
832 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
833 | return opt && odr_ok (o);
|
---|
834 | return
|
---|
835 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
836 | odr_choice (o, arm, &(*p)->u, &(*p)->which, 0) &&
|
---|
837 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
838 | odr_sequence_end (o);
|
---|
839 | }
|
---|
840 |
|
---|
841 | int z_AccessControlResponse (ODR o, Z_AccessControlResponse **p, int opt, const char *name)
|
---|
842 | {
|
---|
843 | static Odr_arm arm[] = {
|
---|
844 | {ODR_IMPLICIT, ODR_CONTEXT, 38, Z_AccessControlResponse_simpleForm,
|
---|
845 | (Odr_fun) odr_octetstring, "simpleForm"},
|
---|
846 | {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_AccessControlResponse_externallyDefined,
|
---|
847 | (Odr_fun) z_External, "externallyDefined"},
|
---|
848 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
849 | };
|
---|
850 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
851 | return opt && odr_ok (o);
|
---|
852 | return
|
---|
853 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
854 | (odr_choice (o, arm, &(*p)->u, &(*p)->which, 0) || odr_ok(o)) &&
|
---|
855 | odr_explicit_tag (o, z_DiagRec,
|
---|
856 | &(*p)->diagnostic, ODR_CONTEXT, 223, 1, "diagnostic") &&
|
---|
857 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
858 | odr_sequence_end (o);
|
---|
859 | }
|
---|
860 |
|
---|
861 | int z_ResourceControlRequest (ODR o, Z_ResourceControlRequest **p, int opt, const char *name)
|
---|
862 | {
|
---|
863 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
864 | return opt && odr_ok (o);
|
---|
865 | return
|
---|
866 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
867 | odr_implicit_tag (o, odr_bool,
|
---|
868 | &(*p)->suspendedFlag, ODR_CONTEXT, 39, 1, "suspendedFlag") &&
|
---|
869 | odr_explicit_tag (o, z_ResourceReport,
|
---|
870 | &(*p)->resourceReport, ODR_CONTEXT, 40, 1, "resourceReport") &&
|
---|
871 | odr_implicit_tag (o, odr_integer,
|
---|
872 | &(*p)->partialResultsAvailable, ODR_CONTEXT, 41, 1, "partialResultsAvailable") &&
|
---|
873 | odr_implicit_tag (o, odr_bool,
|
---|
874 | &(*p)->responseRequired, ODR_CONTEXT, 42, 0, "responseRequired") &&
|
---|
875 | odr_implicit_tag (o, odr_bool,
|
---|
876 | &(*p)->triggeredRequestFlag, ODR_CONTEXT, 43, 1, "triggeredRequestFlag") &&
|
---|
877 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
878 | odr_sequence_end (o);
|
---|
879 | }
|
---|
880 |
|
---|
881 | int z_ResourceControlResponse (ODR o, Z_ResourceControlResponse **p, int opt, const char *name)
|
---|
882 | {
|
---|
883 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
884 | return opt && odr_ok (o);
|
---|
885 | return
|
---|
886 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
887 | odr_implicit_tag (o, odr_bool,
|
---|
888 | &(*p)->continueFlag, ODR_CONTEXT, 44, 0, "continueFlag") &&
|
---|
889 | odr_implicit_tag (o, odr_bool,
|
---|
890 | &(*p)->resultSetWanted, ODR_CONTEXT, 45, 1, "resultSetWanted") &&
|
---|
891 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
892 | odr_sequence_end (o);
|
---|
893 | }
|
---|
894 |
|
---|
895 | int z_TriggerResourceControlRequest (ODR o, Z_TriggerResourceControlRequest **p, int opt, const char *name)
|
---|
896 | {
|
---|
897 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
898 | return opt && odr_ok (o);
|
---|
899 | return
|
---|
900 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
901 | odr_implicit_tag (o, odr_integer,
|
---|
902 | &(*p)->requestedAction, ODR_CONTEXT, 46, 0, "requestedAction") &&
|
---|
903 | odr_implicit_tag (o, z_ResourceReportId,
|
---|
904 | &(*p)->prefResourceReportFormat, ODR_CONTEXT, 47, 1, "prefResourceReportFormat") &&
|
---|
905 | odr_implicit_tag (o, odr_bool,
|
---|
906 | &(*p)->resultSetWanted, ODR_CONTEXT, 48, 1, "resultSetWanted") &&
|
---|
907 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
908 | odr_sequence_end (o);
|
---|
909 | }
|
---|
910 |
|
---|
911 | int z_ResourceReportRequest (ODR o, Z_ResourceReportRequest **p, int opt, const char *name)
|
---|
912 | {
|
---|
913 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
914 | return opt && odr_ok (o);
|
---|
915 | return
|
---|
916 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
917 | odr_implicit_tag (o, z_ReferenceId,
|
---|
918 | &(*p)->opId, ODR_CONTEXT, 210, 1, "opId") &&
|
---|
919 | odr_implicit_tag (o, z_ResourceReportId,
|
---|
920 | &(*p)->prefResourceReportFormat, ODR_CONTEXT, 49, 1, "prefResourceReportFormat") &&
|
---|
921 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
922 | odr_sequence_end (o);
|
---|
923 | }
|
---|
924 |
|
---|
925 | int z_ResourceReportResponse (ODR o, Z_ResourceReportResponse **p, int opt, const char *name)
|
---|
926 | {
|
---|
927 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
928 | return opt && odr_ok (o);
|
---|
929 | return
|
---|
930 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
931 | odr_implicit_tag (o, odr_integer,
|
---|
932 | &(*p)->resourceReportStatus, ODR_CONTEXT, 50, 0, "resourceReportStatus") &&
|
---|
933 | odr_explicit_tag (o, z_ResourceReport,
|
---|
934 | &(*p)->resourceReport, ODR_CONTEXT, 51, 1, "resourceReport") &&
|
---|
935 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
936 | odr_sequence_end (o);
|
---|
937 | }
|
---|
938 |
|
---|
939 | int z_ResourceReport (ODR o, Z_ResourceReport **p, int opt, const char *name)
|
---|
940 | {
|
---|
941 | return z_External (o, p, opt, name);
|
---|
942 | }
|
---|
943 |
|
---|
944 | int z_ResourceReportId (ODR o, Z_ResourceReportId **p, int opt, const char *name)
|
---|
945 | {
|
---|
946 | return odr_oid (o, p, opt, name);
|
---|
947 | }
|
---|
948 |
|
---|
949 | int z_ScanRequest (ODR o, Z_ScanRequest **p, int opt, const char *name)
|
---|
950 | {
|
---|
951 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
952 | return opt && odr_ok (o);
|
---|
953 | return
|
---|
954 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
955 | odr_implicit_settag (o, ODR_CONTEXT, 3) &&
|
---|
956 | odr_sequence_of(o, (Odr_fun) z_DatabaseName, &(*p)->databaseNames,
|
---|
957 | &(*p)->num_databaseNames, "databaseNames") &&
|
---|
958 | z_AttributeSetId(o, &(*p)->attributeSet, 1, "attributeSet") &&
|
---|
959 | z_AttributesPlusTerm(o, &(*p)->termListAndStartPoint, 0, "termListAndStartPoint") &&
|
---|
960 | odr_implicit_tag (o, odr_integer,
|
---|
961 | &(*p)->stepSize, ODR_CONTEXT, 5, 1, "stepSize") &&
|
---|
962 | odr_implicit_tag (o, odr_integer,
|
---|
963 | &(*p)->numberOfTermsRequested, ODR_CONTEXT, 6, 0, "numberOfTermsRequested") &&
|
---|
964 | odr_implicit_tag (o, odr_integer,
|
---|
965 | &(*p)->preferredPositionInResponse, ODR_CONTEXT, 7, 1, "preferredPositionInResponse") &&
|
---|
966 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
967 | odr_sequence_end (o);
|
---|
968 | }
|
---|
969 |
|
---|
970 | int z_ScanResponse (ODR o, Z_ScanResponse **p, int opt, const char *name)
|
---|
971 | {
|
---|
972 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
973 | return opt && odr_ok (o);
|
---|
974 | return
|
---|
975 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
976 | odr_implicit_tag (o, odr_integer,
|
---|
977 | &(*p)->stepSize, ODR_CONTEXT, 3, 1, "stepSize") &&
|
---|
978 | odr_implicit_tag (o, odr_integer,
|
---|
979 | &(*p)->scanStatus, ODR_CONTEXT, 4, 0, "scanStatus") &&
|
---|
980 | odr_implicit_tag (o, odr_integer,
|
---|
981 | &(*p)->numberOfEntriesReturned, ODR_CONTEXT, 5, 0, "numberOfEntriesReturned") &&
|
---|
982 | odr_implicit_tag (o, odr_integer,
|
---|
983 | &(*p)->positionOfTerm, ODR_CONTEXT, 6, 1, "positionOfTerm") &&
|
---|
984 | odr_implicit_tag (o, z_ListEntries,
|
---|
985 | &(*p)->entries, ODR_CONTEXT, 7, 1, "entries") &&
|
---|
986 | odr_implicit_tag (o, z_AttributeSetId,
|
---|
987 | &(*p)->attributeSet, ODR_CONTEXT, 8, 1, "attributeSet") &&
|
---|
988 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
989 | odr_sequence_end (o);
|
---|
990 | }
|
---|
991 |
|
---|
992 | int z_ListEntries (ODR o, Z_ListEntries **p, int opt, const char *name)
|
---|
993 | {
|
---|
994 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
995 | return opt && odr_ok (o);
|
---|
996 | return
|
---|
997 | odr_implicit_settag (o, ODR_CONTEXT, 1) &&
|
---|
998 | (odr_sequence_of(o, (Odr_fun) z_Entry, &(*p)->entries,
|
---|
999 | &(*p)->num_entries, "entries") || odr_ok(o)) &&
|
---|
1000 | odr_implicit_settag (o, ODR_CONTEXT, 2) &&
|
---|
1001 | (odr_sequence_of(o, (Odr_fun) z_DiagRec, &(*p)->nonsurrogateDiagnostics,
|
---|
1002 | &(*p)->num_nonsurrogateDiagnostics, "nonsurrogateDiagnostics") || odr_ok(o)) &&
|
---|
1003 | odr_sequence_end (o);
|
---|
1004 | }
|
---|
1005 |
|
---|
1006 | int z_Entry (ODR o, Z_Entry **p, int opt, const char *name)
|
---|
1007 | {
|
---|
1008 | static Odr_arm arm[] = {
|
---|
1009 | {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Entry_termInfo,
|
---|
1010 | (Odr_fun) z_TermInfo, "termInfo"},
|
---|
1011 | {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_Entry_surrogateDiagnostic,
|
---|
1012 | (Odr_fun) z_DiagRec, "surrogateDiagnostic"},
|
---|
1013 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
1014 | };
|
---|
1015 | if (!odr_initmember(o, p, sizeof(**p)))
|
---|
1016 | return opt && odr_ok(o);
|
---|
1017 | if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
|
---|
1018 | return 1;
|
---|
1019 | *p = 0;
|
---|
1020 | return opt && odr_ok(o);
|
---|
1021 | }
|
---|
1022 |
|
---|
1023 | int z_TermInfo (ODR o, Z_TermInfo **p, int opt, const char *name)
|
---|
1024 | {
|
---|
1025 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
1026 | return opt && odr_ok (o);
|
---|
1027 | return
|
---|
1028 | z_Term(o, &(*p)->term, 0, "term") &&
|
---|
1029 | odr_implicit_tag (o, z_InternationalString,
|
---|
1030 | &(*p)->displayTerm, ODR_CONTEXT, 0, 1, "displayTerm") &&
|
---|
1031 | z_AttributeList(o, &(*p)->suggestedAttributes, 1, "suggestedAttributes") &&
|
---|
1032 | odr_implicit_settag (o, ODR_CONTEXT, 4) &&
|
---|
1033 | (odr_sequence_of(o, (Odr_fun) z_AttributesPlusTerm, &(*p)->alternativeTerm,
|
---|
1034 | &(*p)->num_alternativeTerm, "alternativeTerm") || odr_ok(o)) &&
|
---|
1035 | odr_implicit_tag (o, odr_integer,
|
---|
1036 | &(*p)->globalOccurrences, ODR_CONTEXT, 2, 1, "globalOccurrences") &&
|
---|
1037 | odr_implicit_tag (o, z_OccurrenceByAttributes,
|
---|
1038 | &(*p)->byAttributes, ODR_CONTEXT, 3, 1, "byAttributes") &&
|
---|
1039 | z_OtherInformation(o, &(*p)->otherTermInfo, 1, "otherTermInfo") &&
|
---|
1040 | odr_sequence_end (o);
|
---|
1041 | }
|
---|
1042 |
|
---|
1043 | int z_byDatabaseList_s (ODR o, Z_byDatabaseList_s **p, int opt, const char *name)
|
---|
1044 | {
|
---|
1045 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
1046 | return opt && odr_ok (o);
|
---|
1047 | return
|
---|
1048 | z_DatabaseName(o, &(*p)->db, 0, "db") &&
|
---|
1049 | odr_implicit_tag (o, odr_integer,
|
---|
1050 | &(*p)->num, ODR_CONTEXT, 1, 1, "num") &&
|
---|
1051 | z_OtherInformation(o, &(*p)->otherDbInfo, 1, "otherDbInfo") &&
|
---|
1052 | odr_sequence_end (o);
|
---|
1053 | }
|
---|
1054 |
|
---|
1055 | int z_byDatabaseList (ODR o, Z_byDatabaseList **p, int opt, const char *name)
|
---|
1056 | {
|
---|
1057 | if (!odr_initmember (o, p, sizeof(**p)))
|
---|
1058 | return opt && odr_ok(o);
|
---|
1059 | if (odr_sequence_of (o, (Odr_fun) z_byDatabaseList_s, &(*p)->elements,
|
---|
1060 | &(*p)->num, name))
|
---|
1061 | return 1;
|
---|
1062 | *p = 0;
|
---|
1063 | return opt && odr_ok(o);
|
---|
1064 | }
|
---|
1065 |
|
---|
1066 | int z_OccurrenceByAttributesElem (ODR o, Z_OccurrenceByAttributesElem **p, int opt, const char *name)
|
---|
1067 | {
|
---|
1068 | static Odr_arm arm[] = {
|
---|
1069 | {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_OccurrenceByAttributesElem_global,
|
---|
1070 | (Odr_fun) odr_integer, "global"},
|
---|
1071 | {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_OccurrenceByAttributesElem_byDatabase,
|
---|
1072 | (Odr_fun) z_byDatabaseList, "byDatabase"},
|
---|
1073 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
1074 | };
|
---|
1075 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
1076 | return opt && odr_ok (o);
|
---|
1077 | return
|
---|
1078 | odr_explicit_tag (o, z_AttributeList,
|
---|
1079 | &(*p)->attributes, ODR_CONTEXT, 1, 0, "attributes") &&
|
---|
1080 | (odr_choice (o, arm, &(*p)->u, &(*p)->which, 0) || odr_ok(o)) &&
|
---|
1081 | z_OtherInformation(o, &(*p)->otherOccurInfo, 1, "otherOccurInfo") &&
|
---|
1082 | odr_sequence_end (o);
|
---|
1083 | }
|
---|
1084 |
|
---|
1085 | int z_OccurrenceByAttributes (ODR o, Z_OccurrenceByAttributes **p, int opt, const char *name)
|
---|
1086 | {
|
---|
1087 | if (!odr_initmember (o, p, sizeof(**p)))
|
---|
1088 | return opt && odr_ok(o);
|
---|
1089 | if (odr_sequence_of (o, (Odr_fun) z_OccurrenceByAttributesElem, &(*p)->elements,
|
---|
1090 | &(*p)->num, name))
|
---|
1091 | return 1;
|
---|
1092 | *p = 0;
|
---|
1093 | return opt && odr_ok(o);
|
---|
1094 | }
|
---|
1095 |
|
---|
1096 | int z_SortKeySpecList (ODR o, Z_SortKeySpecList **p, int opt, const char *name)
|
---|
1097 | {
|
---|
1098 | if (!odr_initmember (o, p, sizeof(**p)))
|
---|
1099 | return opt && odr_ok(o);
|
---|
1100 | if (odr_sequence_of (o, (Odr_fun) z_SortKeySpec, &(*p)->specs,
|
---|
1101 | &(*p)->num_specs, name))
|
---|
1102 | return 1;
|
---|
1103 | *p = 0;
|
---|
1104 | return opt && odr_ok(o);
|
---|
1105 | }
|
---|
1106 |
|
---|
1107 | int z_SortRequest (ODR o, Z_SortRequest **p, int opt, const char *name)
|
---|
1108 | {
|
---|
1109 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
1110 | return opt && odr_ok (o);
|
---|
1111 | return
|
---|
1112 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
1113 | odr_implicit_settag (o, ODR_CONTEXT, 3) &&
|
---|
1114 | odr_sequence_of(o, (Odr_fun) z_InternationalString, &(*p)->inputResultSetNames,
|
---|
1115 | &(*p)->num_inputResultSetNames, "inputResultSetNames") &&
|
---|
1116 | odr_implicit_tag (o, z_InternationalString,
|
---|
1117 | &(*p)->sortedResultSetName, ODR_CONTEXT, 4, 0, "sortedResultSetName") &&
|
---|
1118 | odr_implicit_tag (o, z_SortKeySpecList,
|
---|
1119 | &(*p)->sortSequence, ODR_CONTEXT, 5, 0, "sortSequence") &&
|
---|
1120 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
1121 | odr_sequence_end (o);
|
---|
1122 | }
|
---|
1123 |
|
---|
1124 | int z_SortResponse (ODR o, Z_SortResponse **p, int opt, const char *name)
|
---|
1125 | {
|
---|
1126 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
1127 | return opt && odr_ok (o);
|
---|
1128 | return
|
---|
1129 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
1130 | odr_implicit_tag (o, odr_integer,
|
---|
1131 | &(*p)->sortStatus, ODR_CONTEXT, 3, 0, "sortStatus") &&
|
---|
1132 | odr_implicit_tag (o, odr_integer,
|
---|
1133 | &(*p)->resultSetStatus, ODR_CONTEXT, 4, 1, "resultSetStatus") &&
|
---|
1134 | odr_implicit_settag (o, ODR_CONTEXT, 5) &&
|
---|
1135 | (odr_sequence_of(o, (Odr_fun) z_DiagRec, &(*p)->diagnostics,
|
---|
1136 | &(*p)->num_diagnostics, "diagnostics") || odr_ok(o)) &&
|
---|
1137 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
1138 | odr_sequence_end (o);
|
---|
1139 | }
|
---|
1140 |
|
---|
1141 | int z_SortKeySpec (ODR o, Z_SortKeySpec **p, int opt, const char *name)
|
---|
1142 | {
|
---|
1143 | static Odr_arm arm[] = {
|
---|
1144 | {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_SortKeySpec_abort,
|
---|
1145 | (Odr_fun) odr_null, "abort"},
|
---|
1146 | {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_SortKeySpec_null,
|
---|
1147 | (Odr_fun) odr_null, "null"},
|
---|
1148 | {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_SortKeySpec_missingValueData,
|
---|
1149 | (Odr_fun) odr_octetstring, "missingValueData"},
|
---|
1150 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
1151 | };
|
---|
1152 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
1153 | return opt && odr_ok (o);
|
---|
1154 | return
|
---|
1155 | z_SortElement(o, &(*p)->sortElement, 0, "sortElement") &&
|
---|
1156 | odr_implicit_tag (o, odr_integer,
|
---|
1157 | &(*p)->sortRelation, ODR_CONTEXT, 1, 0, "sortRelation") &&
|
---|
1158 | odr_implicit_tag (o, odr_integer,
|
---|
1159 | &(*p)->caseSensitivity, ODR_CONTEXT, 2, 0, "caseSensitivity") &&
|
---|
1160 | ((odr_constructed_begin (o, &(*p)->u, ODR_CONTEXT, 3, "missingValueAction") &&
|
---|
1161 | odr_choice (o, arm, &(*p)->u, &(*p)->which, 0) &&
|
---|
1162 | odr_constructed_end (o)) || odr_ok(o)) &&
|
---|
1163 | odr_sequence_end (o);
|
---|
1164 | }
|
---|
1165 |
|
---|
1166 | int z_SortDbSpecificList_s (ODR o, Z_SortDbSpecificList_s **p, int opt, const char *name)
|
---|
1167 | {
|
---|
1168 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
1169 | return opt && odr_ok (o);
|
---|
1170 | return
|
---|
1171 | z_DatabaseName(o, &(*p)->databaseName, 0, "databaseName") &&
|
---|
1172 | z_SortKey(o, &(*p)->dbSort, 0, "dbSort") &&
|
---|
1173 | odr_sequence_end (o);
|
---|
1174 | }
|
---|
1175 |
|
---|
1176 | int z_SortDbSpecificList (ODR o, Z_SortDbSpecificList **p, int opt, const char *name)
|
---|
1177 | {
|
---|
1178 | if (!odr_initmember (o, p, sizeof(**p)))
|
---|
1179 | return opt && odr_ok(o);
|
---|
1180 | if (odr_sequence_of (o, (Odr_fun) z_SortDbSpecificList_s, &(*p)->elements,
|
---|
1181 | &(*p)->num, name))
|
---|
1182 | return 1;
|
---|
1183 | *p = 0;
|
---|
1184 | return opt && odr_ok(o);
|
---|
1185 | }
|
---|
1186 |
|
---|
1187 | int z_SortElement (ODR o, Z_SortElement **p, int opt, const char *name)
|
---|
1188 | {
|
---|
1189 | static Odr_arm arm[] = {
|
---|
1190 | {ODR_EXPLICIT, ODR_CONTEXT, 1, Z_SortElement_generic,
|
---|
1191 | (Odr_fun) z_SortKey, "generic"},
|
---|
1192 | {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_SortElement_databaseSpecific,
|
---|
1193 | (Odr_fun) z_SortDbSpecificList, "databaseSpecific"},
|
---|
1194 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
1195 | };
|
---|
1196 | if (!odr_initmember(o, p, sizeof(**p)))
|
---|
1197 | return opt && odr_ok(o);
|
---|
1198 | if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
|
---|
1199 | return 1;
|
---|
1200 | *p = 0;
|
---|
1201 | return opt && odr_ok(o);
|
---|
1202 | }
|
---|
1203 |
|
---|
1204 | int z_SortAttributes (ODR o, Z_SortAttributes **p, int opt, const char *name)
|
---|
1205 | {
|
---|
1206 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
1207 | return opt && odr_ok (o);
|
---|
1208 | return
|
---|
1209 | z_AttributeSetId(o, &(*p)->id, 0, "id") &&
|
---|
1210 | z_AttributeList(o, &(*p)->list, 0, "list") &&
|
---|
1211 | odr_sequence_end (o);
|
---|
1212 | }
|
---|
1213 |
|
---|
1214 | int z_SortKey (ODR o, Z_SortKey **p, int opt, const char *name)
|
---|
1215 | {
|
---|
1216 | static Odr_arm arm[] = {
|
---|
1217 | {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_SortKey_sortField,
|
---|
1218 | (Odr_fun) z_InternationalString, "sortField"},
|
---|
1219 | {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_SortKey_elementSpec,
|
---|
1220 | (Odr_fun) z_Specification, "elementSpec"},
|
---|
1221 | {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_SortKey_sortAttributes,
|
---|
1222 | (Odr_fun) z_SortAttributes, "sortAttributes"},
|
---|
1223 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
1224 | };
|
---|
1225 | if (!odr_initmember(o, p, sizeof(**p)))
|
---|
1226 | return opt && odr_ok(o);
|
---|
1227 | if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
|
---|
1228 | return 1;
|
---|
1229 | *p = 0;
|
---|
1230 | return opt && odr_ok(o);
|
---|
1231 | }
|
---|
1232 |
|
---|
1233 | int z_ExtendedServicesRequest (ODR o, Z_ExtendedServicesRequest **p, int opt, const char *name)
|
---|
1234 | {
|
---|
1235 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
1236 | return opt && odr_ok (o);
|
---|
1237 | return
|
---|
1238 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
1239 | odr_implicit_tag (o, odr_integer,
|
---|
1240 | &(*p)->function, ODR_CONTEXT, 3, 0, "function") &&
|
---|
1241 | odr_implicit_tag (o, odr_oid,
|
---|
1242 | &(*p)->packageType, ODR_CONTEXT, 4, 0, "packageType") &&
|
---|
1243 | odr_implicit_tag (o, z_InternationalString,
|
---|
1244 | &(*p)->packageName, ODR_CONTEXT, 5, 1, "packageName") &&
|
---|
1245 | odr_implicit_tag (o, z_InternationalString,
|
---|
1246 | &(*p)->userId, ODR_CONTEXT, 6, 1, "userId") &&
|
---|
1247 | odr_implicit_tag (o, z_IntUnit,
|
---|
1248 | &(*p)->retentionTime, ODR_CONTEXT, 7, 1, "retentionTime") &&
|
---|
1249 | odr_implicit_tag (o, z_Permissions,
|
---|
1250 | &(*p)->permissions, ODR_CONTEXT, 8, 1, "permissions") &&
|
---|
1251 | odr_implicit_tag (o, z_InternationalString,
|
---|
1252 | &(*p)->description, ODR_CONTEXT, 9, 1, "description") &&
|
---|
1253 | odr_implicit_tag (o, z_External,
|
---|
1254 | &(*p)->taskSpecificParameters, ODR_CONTEXT, 10, 1, "taskSpecificParameters") &&
|
---|
1255 | odr_implicit_tag (o, odr_integer,
|
---|
1256 | &(*p)->waitAction, ODR_CONTEXT, 11, 0, "waitAction") &&
|
---|
1257 | z_ElementSetName(o, &(*p)->elements, 1, "elements") &&
|
---|
1258 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
1259 | odr_sequence_end (o);
|
---|
1260 | }
|
---|
1261 |
|
---|
1262 | int z_ExtendedServicesResponse (ODR o, Z_ExtendedServicesResponse **p, int opt, const char *name)
|
---|
1263 | {
|
---|
1264 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
1265 | return opt && odr_ok (o);
|
---|
1266 | return
|
---|
1267 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
1268 | odr_implicit_tag (o, odr_integer,
|
---|
1269 | &(*p)->operationStatus, ODR_CONTEXT, 3, 0, "operationStatus") &&
|
---|
1270 | odr_implicit_settag (o, ODR_CONTEXT, 4) &&
|
---|
1271 | (odr_sequence_of(o, (Odr_fun) z_DiagRec, &(*p)->diagnostics,
|
---|
1272 | &(*p)->num_diagnostics, "diagnostics") || odr_ok(o)) &&
|
---|
1273 | odr_implicit_tag (o, z_External,
|
---|
1274 | &(*p)->taskPackage, ODR_CONTEXT, 5, 1, "taskPackage") &&
|
---|
1275 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
1276 | odr_sequence_end (o);
|
---|
1277 | }
|
---|
1278 |
|
---|
1279 | int z_Permissions_s (ODR o, Z_Permissions_s **p, int opt, const char *name)
|
---|
1280 | {
|
---|
1281 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
1282 | return opt && odr_ok (o);
|
---|
1283 | return
|
---|
1284 | odr_implicit_tag (o, z_InternationalString,
|
---|
1285 | &(*p)->userId, ODR_CONTEXT, 1, 0, "userId") &&
|
---|
1286 | odr_implicit_settag (o, ODR_CONTEXT, 2) &&
|
---|
1287 | odr_sequence_of(o, (Odr_fun) odr_integer, &(*p)->allowableFunctions,
|
---|
1288 | &(*p)->num_allowableFunctions, "allowableFunctions") &&
|
---|
1289 | odr_sequence_end (o);
|
---|
1290 | }
|
---|
1291 |
|
---|
1292 | int z_Permissions (ODR o, Z_Permissions **p, int opt, const char *name)
|
---|
1293 | {
|
---|
1294 | if (!odr_initmember (o, p, sizeof(**p)))
|
---|
1295 | return opt && odr_ok(o);
|
---|
1296 | if (odr_sequence_of (o, (Odr_fun) z_Permissions_s, &(*p)->elements,
|
---|
1297 | &(*p)->num, name))
|
---|
1298 | return 1;
|
---|
1299 | *p = 0;
|
---|
1300 | return opt && odr_ok(o);
|
---|
1301 | }
|
---|
1302 |
|
---|
1303 | int z_Close (ODR o, Z_Close **p, int opt, const char *name)
|
---|
1304 | {
|
---|
1305 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
1306 | return opt && odr_ok (o);
|
---|
1307 | return
|
---|
1308 | z_ReferenceId(o, &(*p)->referenceId, 1, "referenceId") &&
|
---|
1309 | z_CloseReason(o, &(*p)->closeReason, 0, "closeReason") &&
|
---|
1310 | odr_implicit_tag (o, z_InternationalString,
|
---|
1311 | &(*p)->diagnosticInformation, ODR_CONTEXT, 3, 1, "diagnosticInformation") &&
|
---|
1312 | odr_implicit_tag (o, z_ResourceReportId,
|
---|
1313 | &(*p)->resourceReportFormat, ODR_CONTEXT, 4, 1, "resourceReportFormat") &&
|
---|
1314 | odr_explicit_tag (o, z_ResourceReport,
|
---|
1315 | &(*p)->resourceReport, ODR_CONTEXT, 5, 1, "resourceReport") &&
|
---|
1316 | z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
|
---|
1317 | odr_sequence_end (o);
|
---|
1318 | }
|
---|
1319 |
|
---|
1320 | int z_CloseReason (ODR o, Z_CloseReason **p, int opt, const char *name)
|
---|
1321 | {
|
---|
1322 | return odr_implicit_tag (o, odr_integer, p, ODR_CONTEXT, 211, opt, name);
|
---|
1323 | }
|
---|
1324 |
|
---|
1325 | int z_ReferenceId (ODR o, Z_ReferenceId **p, int opt, const char *name)
|
---|
1326 | {
|
---|
1327 | return odr_implicit_tag (o, odr_octetstring, p, ODR_CONTEXT, 2, opt, name);
|
---|
1328 | }
|
---|
1329 |
|
---|
1330 | int z_ResultSetId (ODR o, Z_ResultSetId **p, int opt, const char *name)
|
---|
1331 | {
|
---|
1332 | return odr_implicit_tag (o, z_InternationalString, p, ODR_CONTEXT, 31, opt, name);
|
---|
1333 | }
|
---|
1334 |
|
---|
1335 | int z_ElementSetName (ODR o, Z_ElementSetName **p, int opt, const char *name)
|
---|
1336 | {
|
---|
1337 | return odr_implicit_tag (o, z_InternationalString, p, ODR_CONTEXT, 103, opt, name);
|
---|
1338 | }
|
---|
1339 |
|
---|
1340 | int z_DatabaseName (ODR o, Z_DatabaseName **p, int opt, const char *name)
|
---|
1341 | {
|
---|
1342 | return odr_implicit_tag (o, z_InternationalString, p, ODR_CONTEXT, 105, opt, name);
|
---|
1343 | }
|
---|
1344 |
|
---|
1345 | int z_AttributeSetId (ODR o, Z_AttributeSetId **p, int opt, const char *name)
|
---|
1346 | {
|
---|
1347 | return odr_oid (o, p, opt, name);
|
---|
1348 | }
|
---|
1349 |
|
---|
1350 | int z_OtherInformationUnit (ODR o, Z_OtherInformationUnit **p, int opt, const char *name)
|
---|
1351 | {
|
---|
1352 | static Odr_arm arm[] = {
|
---|
1353 | {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_OtherInfo_characterInfo,
|
---|
1354 | (Odr_fun) z_InternationalString, "characterInfo"},
|
---|
1355 | {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_OtherInfo_binaryInfo,
|
---|
1356 | (Odr_fun) odr_octetstring, "binaryInfo"},
|
---|
1357 | {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_OtherInfo_externallyDefinedInfo,
|
---|
1358 | (Odr_fun) z_External, "externallyDefinedInfo"},
|
---|
1359 | {ODR_IMPLICIT, ODR_CONTEXT, 5, Z_OtherInfo_oid,
|
---|
1360 | (Odr_fun) odr_oid, "oid"},
|
---|
1361 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
1362 | };
|
---|
1363 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
1364 | return opt && odr_ok (o);
|
---|
1365 | return
|
---|
1366 | odr_implicit_tag (o, z_InfoCategory,
|
---|
1367 | &(*p)->category, ODR_CONTEXT, 1, 1, "category") &&
|
---|
1368 | odr_choice (o, arm, &(*p)->information, &(*p)->which, 0) &&
|
---|
1369 | odr_sequence_end (o);
|
---|
1370 | }
|
---|
1371 |
|
---|
1372 | int z_OtherInformation (ODR o, Z_OtherInformation **p, int opt, const char *name)
|
---|
1373 | {
|
---|
1374 | if (!odr_initmember (o, p, sizeof(**p)))
|
---|
1375 | return opt && odr_ok(o);
|
---|
1376 | odr_implicit_settag (o, ODR_CONTEXT, 201);
|
---|
1377 | if (odr_sequence_of (o, (Odr_fun) z_OtherInformationUnit, &(*p)->list,
|
---|
1378 | &(*p)->num_elements, name))
|
---|
1379 | return 1;
|
---|
1380 | *p = 0;
|
---|
1381 | return opt && odr_ok(o);
|
---|
1382 | }
|
---|
1383 |
|
---|
1384 | int z_InfoCategory (ODR o, Z_InfoCategory **p, int opt, const char *name)
|
---|
1385 | {
|
---|
1386 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
1387 | return opt && odr_ok (o);
|
---|
1388 | return
|
---|
1389 | odr_implicit_tag (o, odr_oid,
|
---|
1390 | &(*p)->categoryTypeId, ODR_CONTEXT, 1, 1, "categoryTypeId") &&
|
---|
1391 | odr_implicit_tag (o, odr_integer,
|
---|
1392 | &(*p)->categoryValue, ODR_CONTEXT, 2, 0, "categoryValue") &&
|
---|
1393 | odr_sequence_end (o);
|
---|
1394 | }
|
---|
1395 |
|
---|
1396 | int z_IntUnit (ODR o, Z_IntUnit **p, int opt, const char *name)
|
---|
1397 | {
|
---|
1398 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
1399 | return opt && odr_ok (o);
|
---|
1400 | return
|
---|
1401 | odr_implicit_tag (o, odr_integer,
|
---|
1402 | &(*p)->value, ODR_CONTEXT, 1, 0, "value") &&
|
---|
1403 | odr_implicit_tag (o, z_Unit,
|
---|
1404 | &(*p)->unitUsed, ODR_CONTEXT, 2, 0, "unitUsed") &&
|
---|
1405 | odr_sequence_end (o);
|
---|
1406 | }
|
---|
1407 |
|
---|
1408 | int z_Unit (ODR o, Z_Unit **p, int opt, const char *name)
|
---|
1409 | {
|
---|
1410 | if (!odr_sequence_begin (o, p, sizeof(**p), name))
|
---|
1411 | return opt && odr_ok (o);
|
---|
1412 | return
|
---|
1413 | odr_explicit_tag (o, z_InternationalString,
|
---|
1414 | &(*p)->unitSystem, ODR_CONTEXT, 1, 1, "unitSystem") &&
|
---|
1415 | odr_explicit_tag (o, z_StringOrNumeric,
|
---|
1416 | &(*p)->unitType, ODR_CONTEXT, 2, 1, "unitType") &&
|
---|
1417 | odr_explicit_tag (o, z_StringOrNumeric,
|
---|
1418 | &(*p)->unit, ODR_CONTEXT, 3, 1, "unit") &&
|
---|
1419 | odr_implicit_tag (o, odr_integer,
|
---|
1420 | &(*p)->scaleFactor, ODR_CONTEXT, 4, 1, "scaleFactor") &&
|
---|
1421 | odr_sequence_end (o);
|
---|
1422 | }
|
---|
1423 |
|
---|
1424 | int z_InternationalString (ODR o, Z_InternationalString **p, int opt, const char *name)
|
---|
1425 | {
|
---|
1426 | return odr_generalstring (o, p, opt, name);
|
---|
1427 | }
|
---|
1428 |
|
---|
1429 | int z_StringOrNumeric (ODR o, Z_StringOrNumeric **p, int opt, const char *name)
|
---|
1430 | {
|
---|
1431 | static Odr_arm arm[] = {
|
---|
1432 | {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_StringOrNumeric_string,
|
---|
1433 | (Odr_fun) z_InternationalString, "string"},
|
---|
1434 | {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_StringOrNumeric_numeric,
|
---|
1435 | (Odr_fun) odr_integer, "numeric"},
|
---|
1436 | {-1, -1, -1, -1, (Odr_fun) 0, 0}
|
---|
1437 | };
|
---|
1438 | if (!odr_initmember(o, p, sizeof(**p)))
|
---|
1439 | return opt && odr_ok(o);
|
---|
1440 | if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
|
---|
1441 | return 1;
|
---|
1442 | *p = 0;
|
---|
1443 | return opt && odr_ok(o);
|
---|
1444 | }
|
---|
1445 |
|
---|
1446 |
|
---|
1447 | /* the type-0 query ... */
|
---|
1448 | int z_ANY_type_0 (ODR o, void **p, int opt)
|
---|
1449 | {
|
---|
1450 | return 0;
|
---|
1451 | }
|
---|
1452 |
|
---|
1453 |
|
---|