YAZ  5.23.1
ill-core.c
Go to the documentation of this file.
1 
6 #if HAVE_CONFIG_H
7 #include <config.h>
8 #endif
9 
10 #include <yaz/ill-core.h>
11 
12 int ill_APDU(ODR o, ILL_APDU **p, int opt, const char *name)
13 {
14  static Odr_arm arm[] = {
15  {-1, -1, -1, ILL_APDU_ILL_Request,
16  (Odr_fun) ill_Request, "illRequest"},
17  {-1, -1, -1, ILL_APDU_Forward_Notification,
18  (Odr_fun) ill_Forward_Notification, "Forward_Notification"},
19  {-1, -1, -1, ILL_APDU_Shipped,
20  (Odr_fun) ill_Shipped, "Shipped"},
21  {-1, -1, -1, ILL_APDU_ILL_Answer,
22  (Odr_fun) ill_Answer, "illAnswer"},
23  {-1, -1, -1, ILL_APDU_Conditional_Reply,
24  (Odr_fun) ill_Conditional_Reply, "Conditional_Reply"},
25  {-1, -1, -1, ILL_APDU_Cancel,
26  (Odr_fun) ill_Cancel, "Cancel"},
27  {-1, -1, -1, ILL_APDU_Cancel_Reply,
28  (Odr_fun) ill_Cancel_Reply, "Cancel_Reply"},
29  {-1, -1, -1, ILL_APDU_Received,
30  (Odr_fun) ill_Received, "Received"},
31  {-1, -1, -1, ILL_APDU_Recall,
32  (Odr_fun) ill_Recall, "Recall"},
33  {-1, -1, -1, ILL_APDU_Returned,
34  (Odr_fun) ill_Returned, "Returned"},
35  {-1, -1, -1, ILL_APDU_Checked_In,
36  (Odr_fun) ill_Checked_In, "Checked_In"},
37  {-1, -1, -1, ILL_APDU_Overdue,
38  (Odr_fun) ill_Overdue, "Overdue"},
39  {-1, -1, -1, ILL_APDU_Renew,
40  (Odr_fun) ill_Renew, "Renew"},
41  {-1, -1, -1, ILL_APDU_Renew_Answer,
42  (Odr_fun) ill_Renew_Answer, "Renew_Answer"},
43  {-1, -1, -1, ILL_APDU_Lost,
44  (Odr_fun) ill_Lost, "Lost"},
45  {-1, -1, -1, ILL_APDU_Damaged,
46  (Odr_fun) ill_Damaged, "Damaged"},
47  {-1, -1, -1, ILL_APDU_Message,
48  (Odr_fun) ill_Message, "Message"},
49  {-1, -1, -1, ILL_APDU_Status_Query,
50  (Odr_fun) ill_Status_Query, "Status_Query"},
52  (Odr_fun) ill_Status_Or_Error_Report, "Status_Or_Error_Report"},
53  {-1, -1, -1, ILL_APDU_Expired,
54  (Odr_fun) ill_Expired, "Expired"},
55  {-1, -1, -1, -1, (Odr_fun) 0, 0}
56  };
57  if (!odr_initmember(o, p, sizeof(**p)))
58  return odr_missing(o, opt, name);
59  if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
60  return 1;
61  if (o->direction == ODR_DECODE)
62  *p = 0;
63  return odr_missing(o, opt, name);
64 }
65 
66 int ill_Request(ODR o, ILL_Request **p, int opt, const char *name)
67 {
68  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 1, name))
69  return odr_missing(o, opt, name);
70  if (o->direction == ODR_DECODE)
71  *p = (ILL_Request *) odr_malloc(o, sizeof(**p));
72  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
73  {
74  if (o->direction == ODR_DECODE)
75  *p = 0;
76  return 0;
77  }
78  return
80  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
82  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
84  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
86  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
88  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
90  &(*p)->transaction_type, ODR_CONTEXT, 5, 0, "transaction_type") &&
92  &(*p)->delivery_address, ODR_CONTEXT, 6, 1, "delivery_address") &&
93  ill_Delivery_Service(o, &(*p)->delivery_service, 1, "delivery_service") &&
95  &(*p)->billing_address, ODR_CONTEXT, 8, 1, "billing_address") &&
97  odr_sequence_of(o, (Odr_fun) ill_Service_Type, &(*p)->iLL_service_type,
98  &(*p)->num_iLL_service_type, "iLL_service_type") &&
100  &(*p)->responder_specific_service, ODR_CONTEXT, 10, 1, "responder_specific_service") &&
102  &(*p)->requester_optional_messages, ODR_CONTEXT, 11, 0, "requester_optional_messages") &&
104  &(*p)->search_type, ODR_CONTEXT, 12, 1, "search_type") &&
106  (odr_sequence_of(o, (Odr_fun) ill_Supply_Medium_Info_Type, &(*p)->supply_medium_info_type,
107  &(*p)->num_supply_medium_info_type, "supply_medium_info_type") || odr_ok(o)) &&
109  &(*p)->place_on_hold, ODR_CONTEXT, 14, 0, "place_on_hold") &&
111  &(*p)->client_id, ODR_CONTEXT, 15, 1, "client_id") &&
113  &(*p)->item_id, ODR_CONTEXT, 16, 0, "item_id") &&
115  &(*p)->supplemental_item_description, ODR_CONTEXT, 17, 1, "supplemental_item_description") &&
117  &(*p)->cost_info_type, ODR_CONTEXT, 18, 1, "cost_info_type") &&
119  &(*p)->copyright_compliance, ODR_CONTEXT, 19, 1, "copyright_compliance") &&
121  &(*p)->third_party_info_type, ODR_CONTEXT, 20, 1, "third_party_info_type") &&
123  &(*p)->retry_flag, ODR_CONTEXT, 21, 0, "retry_flag") &&
125  &(*p)->forward_flag, ODR_CONTEXT, 22, 0, "forward_flag") &&
127  &(*p)->requester_note, ODR_CONTEXT, 46, 1, "requester_note") &&
129  &(*p)->forward_note, ODR_CONTEXT, 47, 1, "forward_note") &&
131  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->iLL_request_extensions,
132  &(*p)->num_iLL_request_extensions, "iLL_request_extensions") || odr_ok(o)) &&
133  odr_sequence_end(o) &&
135 }
136 
138 {
139  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 2, name))
140  return odr_missing(o, opt, name);
141  if (o->direction == ODR_DECODE)
142  *p = (ILL_Forward_Notification *) odr_malloc(o, sizeof(**p));
143  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
144  {
145  if (o->direction == ODR_DECODE)
146  *p = 0;
147  return 0;
148  }
149  return
151  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
153  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
155  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
157  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
159  &(*p)->responder_id, ODR_CONTEXT, 4, 0, "responder_id") &&
161  &(*p)->responder_address, ODR_CONTEXT, 24, 1, "responder_address") &&
163  &(*p)->intermediary_id, ODR_CONTEXT, 25, 0, "intermediary_id") &&
165  &(*p)->notification_note, ODR_CONTEXT, 48, 1, "notification_note") &&
167  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->forward_notification_extensions,
168  &(*p)->num_forward_notification_extensions, "forward_notification_extensions") || odr_ok(o)) &&
169  odr_sequence_end(o) &&
171 }
172 
173 int ill_Shipped(ODR o, ILL_Shipped **p, int opt, const char *name)
174 {
175  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 3, name))
176  return odr_missing(o, opt, name);
177  if (o->direction == ODR_DECODE)
178  *p = (ILL_Shipped *) odr_malloc(o, sizeof(**p));
179  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
180  {
181  if (o->direction == ODR_DECODE)
182  *p = 0;
183  return 0;
184  }
185  return
187  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
189  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
191  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
193  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
195  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
197  &(*p)->responder_address, ODR_CONTEXT, 24, 1, "responder_address") &&
199  &(*p)->intermediary_id, ODR_CONTEXT, 25, 1, "intermediary_id") &&
201  &(*p)->supplier_id, ODR_CONTEXT, 26, 1, "supplier_id") &&
203  &(*p)->client_id, ODR_CONTEXT, 15, 1, "client_id") &&
205  &(*p)->transaction_type, ODR_CONTEXT, 5, 0, "transaction_type") &&
207  &(*p)->supplemental_item_description, ODR_CONTEXT, 17, 1, "supplemental_item_description") &&
209  &(*p)->shipped_service_type, ODR_CONTEXT, 27, 0, "shipped_service_type") &&
211  &(*p)->responder_optional_messages, ODR_CONTEXT, 28, 1, "responder_optional_messages") &&
213  &(*p)->supply_details, ODR_CONTEXT, 29, 0, "supply_details") &&
215  &(*p)->return_to_address, ODR_CONTEXT, 30, 1, "return_to_address") &&
217  &(*p)->responder_note, ODR_CONTEXT, 46, 1, "responder_note") &&
219  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->shipped_extensions,
220  &(*p)->num_shipped_extensions, "shipped_extensions") || odr_ok(o)) &&
221  odr_sequence_end(o) &&
223 }
224 
225 int ill_Answer(ODR o, ILL_Answer **p, int opt, const char *name)
226 {
227  static Odr_arm arm[] = {
229  (Odr_fun) ill_Conditional_Results, "conditional_results"},
231  (Odr_fun) ill_Retry_Results, "retry_results"},
233  (Odr_fun) ill_Unfilled_Results, "unfilled_results"},
235  (Odr_fun) ill_Locations_Results, "locations_results"},
237  (Odr_fun) ill_Will_Supply_Results, "will_supply_results"},
239  (Odr_fun) ill_Hold_Placed_Results, "hold_placed_results"},
241  (Odr_fun) ill_Estimate_Results, "estimate_results"},
242  {-1, -1, -1, -1, (Odr_fun) 0, 0}
243  };
244  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 4, name))
245  return odr_missing(o, opt, name);
246  if (o->direction == ODR_DECODE)
247  *p = (ILL_Answer *) odr_malloc(o, sizeof(**p));
248  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
249  {
250  if (o->direction == ODR_DECODE)
251  *p = 0;
252  return 0;
253  }
254  return
256  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
258  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
260  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
262  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
264  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
266  &(*p)->transaction_results, ODR_CONTEXT, 31, 0, "transaction_results") &&
267  ((odr_constructed_begin(o, &(*p)->u, ODR_CONTEXT, 32, "results_explanation") &&
268  odr_choice(o, arm, &(*p)->u, &(*p)->which, 0) &&
269  odr_constructed_end(o)) || odr_ok(o)) &&
271  &(*p)->responder_specific_results, ODR_CONTEXT, 33, 1, "responder_specific_results") &&
273  &(*p)->supplemental_item_description, ODR_CONTEXT, 17, 1, "supplemental_item_description") &&
275  &(*p)->send_to_list, ODR_CONTEXT, 23, 1, "send_to_list") &&
277  &(*p)->already_tried_list, ODR_CONTEXT, 34, 1, "already_tried_list") &&
279  &(*p)->responder_optional_messages, ODR_CONTEXT, 28, 1, "responder_optional_messages") &&
281  &(*p)->responder_note, ODR_CONTEXT, 46, 1, "responder_note") &&
283  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->ill_answer_extensions,
284  &(*p)->num_ill_answer_extensions, "ill_answer_extensions") || odr_ok(o)) &&
285  odr_sequence_end(o) &&
287 }
288 
290 {
291  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 5, name))
292  return odr_missing(o, opt, name);
293  if (o->direction == ODR_DECODE)
294  *p = (ILL_Conditional_Reply *) odr_malloc(o, sizeof(**p));
295  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
296  {
297  if (o->direction == ODR_DECODE)
298  *p = 0;
299  return 0;
300  }
301  return
303  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
305  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
307  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
309  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
311  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
313  &(*p)->answer, ODR_CONTEXT, 35, 0, "answer") &&
315  &(*p)->requester_note, ODR_CONTEXT, 46, 1, "requester_note") &&
317  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->conditional_reply_extensions,
318  &(*p)->num_conditional_reply_extensions, "conditional_reply_extensions") || odr_ok(o)) &&
319  odr_sequence_end(o) &&
321 }
322 
323 int ill_Cancel(ODR o, ILL_Cancel **p, int opt, const char *name)
324 {
325  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 6, name))
326  return odr_missing(o, opt, name);
327  if (o->direction == ODR_DECODE)
328  *p = (ILL_Cancel *) odr_malloc(o, sizeof(**p));
329  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
330  {
331  if (o->direction == ODR_DECODE)
332  *p = 0;
333  return 0;
334  }
335  return
337  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
339  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
341  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
343  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
345  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
347  &(*p)->requester_note, ODR_CONTEXT, 46, 1, "requester_note") &&
349  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->cancel_extensions,
350  &(*p)->num_cancel_extensions, "cancel_extensions") || odr_ok(o)) &&
351  odr_sequence_end(o) &&
353 }
354 
355 int ill_Cancel_Reply(ODR o, ILL_Cancel_Reply **p, int opt, const char *name)
356 {
357  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 7, name))
358  return odr_missing(o, opt, name);
359  if (o->direction == ODR_DECODE)
360  *p = (ILL_Cancel_Reply *) odr_malloc(o, sizeof(**p));
361  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
362  {
363  if (o->direction == ODR_DECODE)
364  *p = 0;
365  return 0;
366  }
367  return
369  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
371  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
373  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
375  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
377  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
379  &(*p)->answer, ODR_CONTEXT, 35, 0, "answer") &&
381  &(*p)->responder_note, ODR_CONTEXT, 46, 1, "responder_note") &&
383  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->cancel_reply_extensions,
384  &(*p)->num_cancel_reply_extensions, "cancel_reply_extensions") || odr_ok(o)) &&
385  odr_sequence_end(o) &&
387 }
388 
389 int ill_Received(ODR o, ILL_Received **p, int opt, const char *name)
390 {
391  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 8, name))
392  return odr_missing(o, opt, name);
393  if (o->direction == ODR_DECODE)
394  *p = (ILL_Received *) odr_malloc(o, sizeof(**p));
395  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
396  {
397  if (o->direction == ODR_DECODE)
398  *p = 0;
399  return 0;
400  }
401  return
403  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
405  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
407  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
409  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
411  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
413  &(*p)->supplier_id, ODR_CONTEXT, 26, 1, "supplier_id") &&
415  &(*p)->supplemental_item_description, ODR_CONTEXT, 17, 1, "supplemental_item_description") &&
417  &(*p)->date_received, ODR_CONTEXT, 36, 0, "date_received") &&
419  &(*p)->shipped_service_type, ODR_CONTEXT, 27, 0, "shipped_service_type") &&
421  &(*p)->requester_note, ODR_CONTEXT, 46, 1, "requester_note") &&
423  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->received_extensions,
424  &(*p)->num_received_extensions, "received_extensions") || odr_ok(o)) &&
425  odr_sequence_end(o) &&
427 }
428 
429 int ill_Recall(ODR o, ILL_Recall **p, int opt, const char *name)
430 {
431  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 9, name))
432  return odr_missing(o, opt, name);
433  if (o->direction == ODR_DECODE)
434  *p = (ILL_Recall *) odr_malloc(o, sizeof(**p));
435  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
436  {
437  if (o->direction == ODR_DECODE)
438  *p = 0;
439  return 0;
440  }
441  return
443  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
445  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
447  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
449  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
451  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
453  &(*p)->responder_note, ODR_CONTEXT, 46, 1, "responder_note") &&
455  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->recall_extensions,
456  &(*p)->num_recall_extensions, "recall_extensions") || odr_ok(o)) &&
457  odr_sequence_end(o) &&
459 }
460 
461 int ill_Returned(ODR o, ILL_Returned **p, int opt, const char *name)
462 {
463  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 10, name))
464  return odr_missing(o, opt, name);
465  if (o->direction == ODR_DECODE)
466  *p = (ILL_Returned *) odr_malloc(o, sizeof(**p));
467  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
468  {
469  if (o->direction == ODR_DECODE)
470  *p = 0;
471  return 0;
472  }
473  return
475  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
477  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
479  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
481  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
483  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
485  &(*p)->supplemental_item_description, ODR_CONTEXT, 17, 1, "supplemental_item_description") &&
487  &(*p)->date_returned, ODR_CONTEXT, 37, 0, "date_returned") &&
489  &(*p)->returned_via, ODR_CONTEXT, 38, 1, "returned_via") &&
491  &(*p)->insured_for, ODR_CONTEXT, 39, 1, "insured_for") &&
493  &(*p)->requester_note, ODR_CONTEXT, 46, 1, "requester_note") &&
495  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->returned_extensions,
496  &(*p)->num_returned_extensions, "returned_extensions") || odr_ok(o)) &&
497  odr_sequence_end(o) &&
499 }
500 
501 int ill_Checked_In(ODR o, ILL_Checked_In **p, int opt, const char *name)
502 {
503  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 11, name))
504  return odr_missing(o, opt, name);
505  if (o->direction == ODR_DECODE)
506  *p = (ILL_Checked_In *) odr_malloc(o, sizeof(**p));
507  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
508  {
509  if (o->direction == ODR_DECODE)
510  *p = 0;
511  return 0;
512  }
513  return
515  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
517  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
519  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
521  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
523  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
525  &(*p)->date_checked_in, ODR_CONTEXT, 40, 0, "date_checked_in") &&
527  &(*p)->responder_note, ODR_CONTEXT, 46, 1, "responder_note") &&
529  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->checked_in_extensions,
530  &(*p)->num_checked_in_extensions, "checked_in_extensions") || odr_ok(o)) &&
531  odr_sequence_end(o) &&
533 }
534 
536 {
537  if (!odr_initmember(o, p, sizeof(**p)))
538  return odr_missing(o, opt, name);
539  if (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->elements,
540  &(*p)->num, name))
541  return 1;
542  if (o->direction == ODR_DECODE)
543  *p = 0;
544  return odr_missing(o, opt, name);
545 }
546 
547 int ill_Overdue(ODR o, ILL_Overdue **p, int opt, const char *name)
548 {
549  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 12, name))
550  return odr_missing(o, opt, name);
551  if (o->direction == ODR_DECODE)
552  *p = (ILL_Overdue *) odr_malloc(o, sizeof(**p));
553  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
554  {
555  if (o->direction == ODR_DECODE)
556  *p = 0;
557  return 0;
558  }
559  return
561  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
563  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
565  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
567  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
569  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
571  &(*p)->date_due, ODR_CONTEXT, 41, 0, "date_due") &&
573  &(*p)->responder_note, ODR_CONTEXT, 46, 1, "responder_note") &&
575  &(*p)->overdue_extensions, ODR_CONTEXT, 49, 1, "overdue_extensions") &&
576  odr_sequence_end(o) &&
578 }
579 
580 int ill_Renew(ODR o, ILL_Renew **p, int opt, const char *name)
581 {
582  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 13, name))
583  return odr_missing(o, opt, name);
584  if (o->direction == ODR_DECODE)
585  *p = (ILL_Renew *) odr_malloc(o, sizeof(**p));
586  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
587  {
588  if (o->direction == ODR_DECODE)
589  *p = 0;
590  return 0;
591  }
592  return
594  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
596  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
598  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
600  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
602  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
604  &(*p)->desired_due_date, ODR_CONTEXT, 42, 1, "desired_due_date") &&
606  &(*p)->requester_note, ODR_CONTEXT, 46, 1, "requester_note") &&
608  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->renew_extensions,
609  &(*p)->num_renew_extensions, "renew_extensions") || odr_ok(o)) &&
610  odr_sequence_end(o) &&
612 }
613 
614 int ill_Renew_Answer(ODR o, ILL_Renew_Answer **p, int opt, const char *name)
615 {
616  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 14, name))
617  return odr_missing(o, opt, name);
618  if (o->direction == ODR_DECODE)
619  *p = (ILL_Renew_Answer *) odr_malloc(o, sizeof(**p));
620  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
621  {
622  if (o->direction == ODR_DECODE)
623  *p = 0;
624  return 0;
625  }
626  return
628  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
630  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
632  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
634  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
636  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
638  &(*p)->answer, ODR_CONTEXT, 35, 0, "answer") &&
640  &(*p)->date_due, ODR_CONTEXT, 41, 1, "date_due") &&
642  &(*p)->responder_note, ODR_CONTEXT, 46, 1, "responder_note") &&
644  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->renew_answer_extensions,
645  &(*p)->num_renew_answer_extensions, "renew_answer_extensions") || odr_ok(o)) &&
646  odr_sequence_end(o) &&
648 }
649 
650 int ill_Lost(ODR o, ILL_Lost **p, int opt, const char *name)
651 {
652  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 15, name))
653  return odr_missing(o, opt, name);
654  if (o->direction == ODR_DECODE)
655  *p = (ILL_Lost *) odr_malloc(o, sizeof(**p));
656  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
657  {
658  if (o->direction == ODR_DECODE)
659  *p = 0;
660  return 0;
661  }
662  return
664  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
666  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
668  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
670  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
672  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
674  &(*p)->note, ODR_CONTEXT, 46, 1, "note") &&
676  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->lost_extensions,
677  &(*p)->num_lost_extensions, "lost_extensions") || odr_ok(o)) &&
678  odr_sequence_end(o) &&
680 }
681 
682 int ill_Damaged(ODR o, ILL_Damaged **p, int opt, const char *name)
683 {
684  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 16, name))
685  return odr_missing(o, opt, name);
686  if (o->direction == ODR_DECODE)
687  *p = (ILL_Damaged *) odr_malloc(o, sizeof(**p));
688  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
689  {
690  if (o->direction == ODR_DECODE)
691  *p = 0;
692  return 0;
693  }
694  return
696  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
698  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
700  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
702  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
704  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
706  &(*p)->damaged_details, ODR_CONTEXT, 5, 1, "damaged_details") &&
708  &(*p)->note, ODR_CONTEXT, 46, 1, "note") &&
710  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->damaged_extensions,
711  &(*p)->num_damaged_extensions, "damaged_extensions") || odr_ok(o)) &&
712  odr_sequence_end(o) &&
714 }
715 
716 int ill_Message(ODR o, ILL_Message **p, int opt, const char *name)
717 {
718  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 17, name))
719  return odr_missing(o, opt, name);
720  if (o->direction == ODR_DECODE)
721  *p = (ILL_Message *) odr_malloc(o, sizeof(**p));
722  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
723  {
724  if (o->direction == ODR_DECODE)
725  *p = 0;
726  return 0;
727  }
728  return
730  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
732  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
734  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
736  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
738  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
740  &(*p)->note, ODR_CONTEXT, 46, 0, "note") &&
742  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->message_extensions,
743  &(*p)->num_message_extensions, "message_extensions") || odr_ok(o)) &&
744  odr_sequence_end(o) &&
746 }
747 
748 int ill_Status_Query(ODR o, ILL_Status_Query **p, int opt, const char *name)
749 {
750  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 18, name))
751  return odr_missing(o, opt, name);
752  if (o->direction == ODR_DECODE)
753  *p = (ILL_Status_Query *) odr_malloc(o, sizeof(**p));
754  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
755  {
756  if (o->direction == ODR_DECODE)
757  *p = 0;
758  return 0;
759  }
760  return
762  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
764  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
766  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
768  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
770  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
772  &(*p)->note, ODR_CONTEXT, 46, 1, "note") &&
774  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->status_query_extensions,
775  &(*p)->num_status_query_extensions, "status_query_extensions") || odr_ok(o)) &&
776  odr_sequence_end(o) &&
778 }
779 
781 {
782  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 19, name))
783  return odr_missing(o, opt, name);
784  if (o->direction == ODR_DECODE)
785  *p = (ILL_Status_Or_Error_Report *) odr_malloc(o, sizeof(**p));
786  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
787  {
788  if (o->direction == ODR_DECODE)
789  *p = 0;
790  return 0;
791  }
792  return
794  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
796  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
798  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
800  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
802  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
804  &(*p)->reason_no_report, ODR_CONTEXT, 43, 1, "reason_no_report") &&
806  &(*p)->status_report, ODR_CONTEXT, 44, 1, "status_report") &&
808  &(*p)->error_report, ODR_CONTEXT, 45, 1, "error_report") &&
810  &(*p)->note, ODR_CONTEXT, 46, 1, "note") &&
812  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->status_or_error_report_extensions,
813  &(*p)->num_status_or_error_report_extensions, "status_or_error_report_extensions") || odr_ok(o)) &&
814  odr_sequence_end(o) &&
816 }
817 
818 int ill_Expired(ODR o, ILL_Expired **p, int opt, const char *name)
819 {
820  if (!odr_constructed_begin(o, p, ODR_APPLICATION, 20, name))
821  return odr_missing(o, opt, name);
822  if (o->direction == ODR_DECODE)
823  *p = (ILL_Expired *) odr_malloc(o, sizeof(**p));
824  if (!odr_sequence_begin(o, p, sizeof(**p), 0))
825  {
826  if (o->direction == ODR_DECODE)
827  *p = 0;
828  return 0;
829  }
830  return
832  &(*p)->protocol_version_num, ODR_CONTEXT, 0, 0, "protocol_version_num") &&
834  &(*p)->transaction_id, ODR_CONTEXT, 1, 0, "transaction_id") &&
836  &(*p)->service_date_time, ODR_CONTEXT, 2, 0, "service_date_time") &&
838  &(*p)->requester_id, ODR_CONTEXT, 3, 1, "requester_id") &&
840  &(*p)->responder_id, ODR_CONTEXT, 4, 1, "responder_id") &&
842  (odr_sequence_of(o, (Odr_fun) ill_Extension, &(*p)->expired_extensions,
843  &(*p)->num_expired_extensions, "expired_extensions") || odr_ok(o)) &&
844  odr_sequence_end(o) &&
846 }
847 
848 int ill_Account_Number(ODR o, ILL_Account_Number **p, int opt, const char *name)
849 {
850  return ill_String (o, p, opt, name);
851 }
852 
854 {
855  if (!odr_sequence_begin(o, p, sizeof(**p), name))
856  return odr_missing(o, opt, name) && odr_ok (o);
857  return
859  &(*p)->responder_id, ODR_CONTEXT, 0, 0, "responder_id") &&
861  &(*p)->responder_address, ODR_CONTEXT, 1, 1, "responder_address") &&
862  odr_sequence_end(o);
863 }
864 
866 {
867  if (!odr_initmember(o, p, sizeof(**p)))
868  return odr_missing(o, opt, name);
869  if (odr_sequence_of(o, (Odr_fun) ill_System_Id, &(*p)->elements,
870  &(*p)->num, name))
871  return 1;
872  if (o->direction == ODR_DECODE)
873  *p = 0;
874  return odr_missing(o, opt, name);
875 }
876 
877 int ill_Amount(ODR o, ILL_Amount **p, int opt, const char *name)
878 {
879  if (!odr_sequence_begin(o, p, sizeof(**p), name))
880  return odr_missing(o, opt, name) && odr_ok (o);
881  return
883  &(*p)->currency_code, ODR_CONTEXT, 0, 1, "currency_code") &&
885  &(*p)->monetary_value, ODR_CONTEXT, 1, 0, "monetary_value") &&
886  odr_sequence_end(o);
887 }
888 
889 int ill_AmountString(ODR o, ILL_AmountString **p, int opt, const char *name)
890 {
891  return odr_visiblestring (o, p, opt, name);
892 }
893 
894 int ill_Client_Id(ODR o, ILL_Client_Id **p, int opt, const char *name)
895 {
896  if (!odr_sequence_begin(o, p, sizeof(**p), name))
897  return odr_missing(o, opt, name) && odr_ok (o);
898  return
900  &(*p)->client_name, ODR_CONTEXT, 0, 1, "client_name") &&
902  &(*p)->client_status, ODR_CONTEXT, 1, 1, "client_status") &&
904  &(*p)->client_identifier, ODR_CONTEXT, 2, 1, "client_identifier") &&
905  odr_sequence_end(o);
906 }
907 
909 {
910  if (!odr_sequence_begin(o, p, sizeof(**p), name))
911  return odr_missing(o, opt, name) && odr_ok (o);
912  return
914  &(*p)->conditions, ODR_CONTEXT, 0, 0, "conditions") &&
916  &(*p)->date_for_reply, ODR_CONTEXT, 1, 1, "date_for_reply") &&
918  (odr_sequence_of(o, (Odr_fun) ill_Location_Info, &(*p)->locations,
919  &(*p)->num_locations, "locations") || odr_ok(o)) &&
920  ill_Delivery_Service(o, &(*p)->proposed_delivery_service, 1, "proposed_delivery_service") &&
921  odr_sequence_end(o);
922 }
923 
924 int ill_Cost_Info_Type(ODR o, ILL_Cost_Info_Type **p, int opt, const char *name)
925 {
926  if (!odr_sequence_begin(o, p, sizeof(**p), name))
927  return odr_missing(o, opt, name) && odr_ok (o);
928  return
930  &(*p)->account_number, ODR_CONTEXT, 0, 1, "account_number") &&
932  &(*p)->maximum_cost, ODR_CONTEXT, 1, 1, "maximum_cost") &&
934  &(*p)->reciprocal_agreement, ODR_CONTEXT, 2, 0, "reciprocal_agreement") &&
936  &(*p)->will_pay_fee, ODR_CONTEXT, 3, 0, "will_pay_fee") &&
938  &(*p)->payment_provided, ODR_CONTEXT, 4, 0, "payment_provided") &&
939  odr_sequence_end(o);
940 }
941 
942 int ill_Current_State(ODR o, ILL_Current_State **p, int opt, const char *name)
943 {
944  return odr_enum (o, p, opt, name);
945 }
946 
948 {
949  if (!odr_initmember(o, p, sizeof(**p)))
950  return odr_missing(o, opt, name);
951  if (odr_sequence_of(o, (Odr_fun) odr_integer, &(*p)->elements,
952  &(*p)->num, name))
953  return 1;
954  if (o->direction == ODR_DECODE)
955  *p = 0;
956  return odr_missing(o, opt, name);
957 }
958 
959 int ill_Damaged_Details(ODR o, ILL_Damaged_Details **p, int opt, const char *name)
960 {
961  static Odr_arm arm[] = {
963  (Odr_fun) odr_null, "complete_document"},
965  (Odr_fun) ill_Damaged_DetailsSpecific_units, "specific_units"},
966  {-1, -1, -1, -1, (Odr_fun) 0, 0}
967  };
968  if (!odr_sequence_begin(o, p, sizeof(**p), name))
969  return odr_missing(o, opt, name) && odr_ok (o);
970  return
972  &(*p)->document_type_id, ODR_CONTEXT, 0, 1, "document_type_id") &&
973  odr_choice(o, arm, &(*p)->u, &(*p)->which, 0) &&
974  odr_sequence_end(o);
975 }
976 
977 int ill_Date_Due(ODR o, ILL_Date_Due **p, int opt, const char *name)
978 {
979  if (!odr_sequence_begin(o, p, sizeof(**p), name))
980  return odr_missing(o, opt, name) && odr_ok (o);
981  return
983  &(*p)->date_due_field, ODR_CONTEXT, 0, 0, "date_due_field") &&
985  &(*p)->renewable, ODR_CONTEXT, 1, 0, "renewable") &&
986  odr_sequence_end(o);
987 }
988 
989 int ill_Delivery_Address(ODR o, ILL_Delivery_Address **p, int opt, const char *name)
990 {
991  if (!odr_sequence_begin(o, p, sizeof(**p), name))
992  return odr_missing(o, opt, name) && odr_ok (o);
993  return
995  &(*p)->postal_address, ODR_CONTEXT, 0, 1, "postal_address") &&
997  &(*p)->electronic_address, ODR_CONTEXT, 1, 1, "electronic_address") &&
998  odr_sequence_end(o);
999 }
1000 
1002 {
1003  if (!odr_initmember(o, p, sizeof(**p)))
1004  return odr_missing(o, opt, name);
1005  if (odr_sequence_of(o, (Odr_fun) ill_Electronic_Delivery_Service, &(*p)->elements,
1006  &(*p)->num, name))
1007  return 1;
1008  if (o->direction == ODR_DECODE)
1009  *p = 0;
1010  return odr_missing(o, opt, name);
1011 }
1012 
1014 {
1015  static Odr_arm arm[] = {
1017  (Odr_fun) ill_Transportation_Mode, "physical_delivery"},
1019  (Odr_fun) ill_Delivery_ServiceElectronic_delivery, "electronic_delivery"},
1020  {-1, -1, -1, -1, (Odr_fun) 0, 0}
1021  };
1022  if (!odr_initmember(o, p, sizeof(**p)))
1023  return odr_missing(o, opt, name);
1024  if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
1025  return 1;
1026  if (o->direction == ODR_DECODE)
1027  *p = 0;
1028  return odr_missing(o, opt, name);
1029 }
1030 
1032 {
1033  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1034  return odr_missing(o, opt, name) && odr_ok (o);
1035  return
1037  &(*p)->e_delivery_mode, ODR_CONTEXT, 0, 0, "e_delivery_mode") &&
1039  &(*p)->e_delivery_parameters, ODR_CONTEXT, 1, 0, "e_delivery_parameters") &&
1040  odr_sequence_end(o);
1041 }
1042 
1044 {
1045  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1046  return odr_missing(o, opt, name) && odr_ok (o);
1047  return
1049  &(*p)->document_type_id, ODR_CONTEXT, 2, 0, "document_type_id") &&
1051  &(*p)->document_type_parameters, ODR_CONTEXT, 3, 0, "document_type_parameters") &&
1052  odr_sequence_end(o);
1053 }
1054 
1056 {
1057  static Odr_arm arm[] = {
1059  (Odr_fun) ill_System_Address, "e_delivery_address"},
1061  (Odr_fun) ill_System_Id, "e_delivery_id"},
1062  {-1, -1, -1, -1, (Odr_fun) 0, 0}
1063  };
1064  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1065  return odr_missing(o, opt, name) && odr_ok (o);
1066  return
1068  &(*p)->e_delivery_service, ODR_CONTEXT, 0, 1, "e_delivery_service") &&
1070  &(*p)->document_type, ODR_CONTEXT, 1, 1, "document_type") &&
1072  &(*p)->e_delivery_description, ODR_CONTEXT, 4, 1, "e_delivery_description") &&
1073  odr_constructed_begin(o, &(*p)->u, ODR_CONTEXT, 5, "e_delivery_details") &&
1074  odr_choice(o, arm, &(*p)->u, &(*p)->which, 0) &&
1075  odr_constructed_end(o) &&
1077  &(*p)->name_or_code, ODR_CONTEXT, 6, 1, "name_or_code") &&
1079  &(*p)->delivery_time, ODR_CONTEXT, 7, 1, "delivery_time") &&
1080  odr_sequence_end(o);
1081 }
1082 
1083 int ill_Error_Report(ODR o, ILL_Error_Report **p, int opt, const char *name)
1084 {
1085  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1086  return odr_missing(o, opt, name) && odr_ok (o);
1087  return
1089  &(*p)->correlation_information, ODR_CONTEXT, 0, 0, "correlation_information") &&
1091  &(*p)->report_source, ODR_CONTEXT, 1, 0, "report_source") &&
1093  &(*p)->user_error_report, ODR_CONTEXT, 2, 1, "user_error_report") &&
1095  &(*p)->provider_error_report, ODR_CONTEXT, 3, 1, "provider_error_report") &&
1096  odr_sequence_end(o);
1097 }
1098 
1100 {
1101  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1102  return odr_missing(o, opt, name) && odr_ok (o);
1103  return
1105  &(*p)->cost_estimate, ODR_CONTEXT, 0, 0, "cost_estimate") &&
1107  (odr_sequence_of(o, (Odr_fun) ill_Location_Info, &(*p)->locations,
1108  &(*p)->num_locations, "locations") || odr_ok(o)) &&
1109  odr_sequence_end(o);
1110 }
1111 
1112 int ill_Extension(ODR o, ILL_Extension **p, int opt, const char *name)
1113 {
1114  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1115  return odr_missing(o, opt, name) && odr_ok (o);
1116  return
1118  &(*p)->identifier, ODR_CONTEXT, 0, 0, "identifier") &&
1120  &(*p)->critical, ODR_CONTEXT, 1, 0, "critical") &&
1122  &(*p)->item, ODR_CONTEXT, 2, 0, "item") &&
1123  odr_sequence_end(o);
1124 }
1125 
1126 int ill_General_Problem(ODR o, ILL_General_Problem **p, int opt, const char *name)
1127 {
1128  return odr_enum (o, p, opt, name);
1129 }
1130 
1131 int ill_History_Report(ODR o, ILL_History_Report **p, int opt, const char *name)
1132 {
1133  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1134  return odr_missing(o, opt, name) && odr_ok (o);
1135  return
1137  &(*p)->date_requested, ODR_CONTEXT, 0, 1, "date_requested") &&
1139  &(*p)->author, ODR_CONTEXT, 1, 1, "author") &&
1141  &(*p)->title, ODR_CONTEXT, 2, 1, "title") &&
1143  &(*p)->author_of_article, ODR_CONTEXT, 3, 1, "author_of_article") &&
1145  &(*p)->title_of_article, ODR_CONTEXT, 4, 1, "title_of_article") &&
1147  &(*p)->date_of_last_transition, ODR_CONTEXT, 5, 0, "date_of_last_transition") &&
1149  &(*p)->most_recent_service, ODR_CONTEXT, 6, 0, "most_recent_service") &&
1151  &(*p)->date_of_most_recent_service, ODR_CONTEXT, 7, 0, "date_of_most_recent_service") &&
1153  &(*p)->initiator_of_most_recent_service, ODR_CONTEXT, 8, 0, "initiator_of_most_recent_service") &&
1155  &(*p)->shipped_service_type, ODR_CONTEXT, 9, 1, "shipped_service_type") &&
1157  &(*p)->transaction_results, ODR_CONTEXT, 10, 1, "transaction_results") &&
1159  &(*p)->most_recent_service_note, ODR_CONTEXT, 11, 1, "most_recent_service_note") &&
1160  odr_sequence_end(o);
1161 }
1162 
1164 {
1165  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1166  return odr_missing(o, opt, name) && odr_ok (o);
1167  return
1169  &(*p)->estimated_date_available, ODR_CONTEXT, 0, 0, "estimated_date_available") &&
1171  &(*p)->hold_placed_medium_type, ODR_CONTEXT, 1, 1, "hold_placed_medium_type") &&
1173  (odr_sequence_of(o, (Odr_fun) ill_Location_Info, &(*p)->locations,
1174  &(*p)->num_locations, "locations") || odr_ok(o)) &&
1175  odr_sequence_end(o);
1176 }
1177 
1178 int ill_APDU_Type(ODR o, ILL_APDU_Type **p, int opt, const char *name)
1179 {
1180  return odr_enum (o, p, opt, name);
1181 }
1182 
1183 int ill_Service_Type(ODR o, ILL_Service_Type **p, int opt, const char *name)
1184 {
1185  return odr_enum (o, p, opt, name);
1186 }
1187 
1188 int ill_String(ODR o, ILL_String **p, int opt, const char *name)
1189 {
1190  static Odr_arm arm[] = {
1191  {-1, -1, -1, ILL_String_GeneralString,
1192  (Odr_fun) odr_generalstring, "GeneralString"},
1193  {-1, -1, -1, ILL_String_EDIFACTString,
1194  (Odr_fun) ill_EDIFACTString, "EDIFACTString"},
1195  {-1, -1, -1, -1, (Odr_fun) 0, 0}
1196  };
1197  if (!odr_initmember(o, p, sizeof(**p)))
1198  return odr_missing(o, opt, name);
1199  if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
1200  return 1;
1201  if (o->direction == ODR_DECODE)
1202  *p = 0;
1203  return odr_missing(o, opt, name);
1204 }
1205 
1207 {
1208  return odr_enum (o, p, opt, name);
1209 }
1210 
1211 int ill_ISO_Date(ODR o, ILL_ISO_Date **p, int opt, const char *name)
1212 {
1213  return odr_visiblestring (o, p, opt, name);
1214 }
1215 
1216 int ill_ISO_Time(ODR o, ILL_ISO_Time **p, int opt, const char *name)
1217 {
1218  return odr_visiblestring (o, p, opt, name);
1219 }
1220 
1221 int ill_Item_Id(ODR o, ILL_Item_Id **p, int opt, const char *name)
1222 {
1223  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1224  return odr_missing(o, opt, name) && odr_ok (o);
1225  return
1227  &(*p)->item_type, ODR_CONTEXT, 0, 1, "item_type") &&
1229  &(*p)->held_medium_type, ODR_CONTEXT, 1, 1, "held_medium_type") &&
1231  &(*p)->call_number, ODR_CONTEXT, 2, 1, "call_number") &&
1233  &(*p)->author, ODR_CONTEXT, 3, 1, "author") &&
1235  &(*p)->title, ODR_CONTEXT, 4, 1, "title") &&
1237  &(*p)->sub_title, ODR_CONTEXT, 5, 1, "sub_title") &&
1239  &(*p)->sponsoring_body, ODR_CONTEXT, 6, 1, "sponsoring_body") &&
1241  &(*p)->place_of_publication, ODR_CONTEXT, 7, 1, "place_of_publication") &&
1243  &(*p)->publisher, ODR_CONTEXT, 8, 1, "publisher") &&
1245  &(*p)->series_title_number, ODR_CONTEXT, 9, 1, "series_title_number") &&
1247  &(*p)->volume_issue, ODR_CONTEXT, 10, 1, "volume_issue") &&
1249  &(*p)->edition, ODR_CONTEXT, 11, 1, "edition") &&
1251  &(*p)->publication_date, ODR_CONTEXT, 12, 1, "publication_date") &&
1253  &(*p)->publication_date_of_component, ODR_CONTEXT, 13, 1, "publication_date_of_component") &&
1255  &(*p)->author_of_article, ODR_CONTEXT, 14, 1, "author_of_article") &&
1257  &(*p)->title_of_article, ODR_CONTEXT, 15, 1, "title_of_article") &&
1259  &(*p)->pagination, ODR_CONTEXT, 16, 1, "pagination") &&
1261  &(*p)->national_bibliography_no, ODR_CONTEXT, 17, 1, "national_bibliography_no") &&
1263  &(*p)->iSBN, ODR_CONTEXT, 18, 1, "iSBN") &&
1265  &(*p)->iSSN, ODR_CONTEXT, 19, 1, "iSSN") &&
1267  &(*p)->system_no, ODR_CONTEXT, 20, 1, "system_no") &&
1269  &(*p)->additional_no_letters, ODR_CONTEXT, 21, 1, "additional_no_letters") &&
1271  &(*p)->verification_reference_source, ODR_CONTEXT, 22, 1, "verification_reference_source") &&
1272  odr_sequence_end(o);
1273 }
1274 
1275 int ill_Location_Info(ODR o, ILL_Location_Info **p, int opt, const char *name)
1276 {
1277  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1278  return odr_missing(o, opt, name) && odr_ok (o);
1279  return
1281  &(*p)->location_id, ODR_CONTEXT, 0, 0, "location_id") &&
1283  &(*p)->location_address, ODR_CONTEXT, 1, 1, "location_address") &&
1285  &(*p)->location_note, ODR_CONTEXT, 2, 1, "location_note") &&
1286  odr_sequence_end(o);
1287 }
1288 
1290 {
1291  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1292  return odr_missing(o, opt, name) && odr_ok (o);
1293  return
1295  &(*p)->reason_locs_provided, ODR_CONTEXT, 0, 1, "reason_locs_provided") &&
1297  odr_sequence_of(o, (Odr_fun) ill_Location_Info, &(*p)->locations,
1298  &(*p)->num_locations, "locations") &&
1299  odr_sequence_end(o);
1300 }
1301 
1302 int ill_Medium_Type(ODR o, ILL_Medium_Type **p, int opt, const char *name)
1303 {
1304  return odr_enum (o, p, opt, name);
1305 }
1306 
1308 {
1309  static Odr_arm arm[] = {
1311  (Odr_fun) ill_String, "name_of_person"},
1313  (Odr_fun) ill_String, "name_of_institution"},
1314  {-1, -1, -1, -1, (Odr_fun) 0, 0}
1315  };
1316  if (!odr_initmember(o, p, sizeof(**p)))
1317  return odr_missing(o, opt, name);
1318  if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
1319  return 1;
1320  if (o->direction == ODR_DECODE)
1321  *p = 0;
1322  return odr_missing(o, opt, name);
1323 }
1324 
1326 {
1327  static Odr_arm arm[] = {
1329  (Odr_fun) ill_String, "person_symbol"},
1331  (Odr_fun) ill_String, "institution_symbol"},
1332  {-1, -1, -1, -1, (Odr_fun) 0, 0}
1333  };
1334  if (!odr_initmember(o, p, sizeof(**p)))
1335  return odr_missing(o, opt, name);
1336  if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
1337  return 1;
1338  if (o->direction == ODR_DECODE)
1339  *p = 0;
1340  return odr_missing(o, opt, name);
1341 }
1342 
1344 {
1345  return odr_enum (o, p, opt, name);
1346 }
1347 
1348 int ill_Postal_Address(ODR o, ILL_Postal_Address **p, int opt, const char *name)
1349 {
1350  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1351  return odr_missing(o, opt, name) && odr_ok (o);
1352  return
1354  &(*p)->name_of_person_or_institution, ODR_CONTEXT, 0, 1, "name_of_person_or_institution") &&
1356  &(*p)->extended_postal_delivery_address, ODR_CONTEXT, 1, 1, "extended_postal_delivery_address") &&
1358  &(*p)->street_and_number, ODR_CONTEXT, 2, 1, "street_and_number") &&
1360  &(*p)->post_office_box, ODR_CONTEXT, 3, 1, "post_office_box") &&
1362  &(*p)->city, ODR_CONTEXT, 4, 1, "city") &&
1364  &(*p)->region, ODR_CONTEXT, 5, 1, "region") &&
1366  &(*p)->country, ODR_CONTEXT, 6, 1, "country") &&
1368  &(*p)->postal_code, ODR_CONTEXT, 7, 1, "postal_code") &&
1369  odr_sequence_end(o);
1370 }
1371 
1373 {
1374  static Odr_arm arm[] = {
1376  (Odr_fun) ill_General_Problem, "general_problem"},
1378  (Odr_fun) ill_Transaction_Id_Problem, "transaction_id_problem"},
1380  (Odr_fun) ill_State_Transition_Prohibited, "state_transition_prohibited"},
1381  {-1, -1, -1, -1, (Odr_fun) 0, 0}
1382  };
1383  if (!odr_initmember(o, p, sizeof(**p)))
1384  return odr_missing(o, opt, name);
1385  if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
1386  return 1;
1387  if (o->direction == ODR_DECODE)
1388  *p = 0;
1389  return odr_missing(o, opt, name);
1390 }
1391 
1393 {
1394  return odr_enum (o, p, opt, name);
1395 }
1396 
1398 {
1399  return odr_enum (o, p, opt, name);
1400 }
1401 
1402 int ill_Reason_Unfilled(ODR o, ILL_Reason_Unfilled **p, int opt, const char *name)
1403 {
1404  return odr_enum (o, p, opt, name);
1405 }
1406 
1407 int ill_Report_Source(ODR o, ILL_Report_Source **p, int opt, const char *name)
1408 {
1409  return odr_enum (o, p, opt, name);
1410 }
1411 
1413 {
1414  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1415  return odr_missing(o, opt, name) && odr_ok (o);
1416  return
1418  &(*p)->can_send_RECEIVED, ODR_CONTEXT, 0, 0, "can_send_RECEIVED") &&
1420  &(*p)->can_send_RETURNED, ODR_CONTEXT, 1, 0, "can_send_RETURNED") &&
1422  &(*p)->requester_SHIPPED, ODR_CONTEXT, 2, 0, "requester_SHIPPED") &&
1424  &(*p)->requester_CHECKED_IN, ODR_CONTEXT, 3, 0, "requester_CHECKED_IN") &&
1425  odr_sequence_end(o);
1426 }
1427 
1429 {
1430  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1431  return odr_missing(o, opt, name) && odr_ok (o);
1432  return
1434  &(*p)->can_send_SHIPPED, ODR_CONTEXT, 0, 0, "can_send_SHIPPED") &&
1436  &(*p)->can_send_CHECKED_IN, ODR_CONTEXT, 1, 0, "can_send_CHECKED_IN") &&
1438  &(*p)->responder_RECEIVED, ODR_CONTEXT, 2, 0, "responder_RECEIVED") &&
1440  &(*p)->responder_RETURNED, ODR_CONTEXT, 3, 0, "responder_RETURNED") &&
1441  odr_sequence_end(o);
1442 }
1443 
1444 int ill_Retry_Results(ODR o, ILL_Retry_Results **p, int opt, const char *name)
1445 {
1446  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1447  return odr_missing(o, opt, name) && odr_ok (o);
1448  return
1450  &(*p)->reason_not_available, ODR_CONTEXT, 0, 1, "reason_not_available") &&
1452  &(*p)->retry_date, ODR_CONTEXT, 1, 1, "retry_date") &&
1454  (odr_sequence_of(o, (Odr_fun) ill_Location_Info, &(*p)->locations,
1455  &(*p)->num_locations, "locations") || odr_ok(o)) &&
1456  odr_sequence_end(o);
1457 }
1458 
1459 int ill_Search_Type(ODR o, ILL_Search_Type **p, int opt, const char *name)
1460 {
1461  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1462  return odr_missing(o, opt, name) && odr_ok (o);
1463  return
1465  &(*p)->level_of_service, ODR_CONTEXT, 0, 1, "level_of_service") &&
1467  &(*p)->need_before_date, ODR_CONTEXT, 1, 1, "need_before_date") &&
1469  &(*p)->expiry_flag, ODR_CONTEXT, 2, 0, "expiry_flag") &&
1471  &(*p)->expiry_date, ODR_CONTEXT, 3, 1, "expiry_date") &&
1472  odr_sequence_end(o);
1473 }
1474 
1476 {
1477  return ill_String (o, p, opt, name);
1478 }
1479 
1481 {
1482  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1483  return odr_missing(o, opt, name) && odr_ok (o);
1484  return
1486  &(*p)->system_id, ODR_CONTEXT, 0, 0, "system_id") &&
1488  &(*p)->account_number, ODR_CONTEXT, 1, 1, "account_number") &&
1490  &(*p)->system_address, ODR_CONTEXT, 2, 1, "system_address") &&
1491  odr_sequence_end(o);
1492 }
1493 
1495 {
1496  if (!odr_initmember(o, p, sizeof(**p)))
1497  return odr_missing(o, opt, name);
1498  if (odr_sequence_of(o, (Odr_fun) ill_Send_To_List_Type_s, &(*p)->elements,
1499  &(*p)->num, name))
1500  return 1;
1501  if (o->direction == ODR_DECODE)
1502  *p = 0;
1503  return odr_missing(o, opt, name);
1504 }
1505 
1507 {
1508  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1509  return odr_missing(o, opt, name) && odr_ok (o);
1510  return
1512  &(*p)->date, ODR_CONTEXT, 0, 0, "date") &&
1514  &(*p)->time, ODR_CONTEXT, 1, 1, "time") &&
1515  odr_sequence_end(o);
1516 }
1517 
1519 {
1520  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1521  return odr_missing(o, opt, name) && odr_ok (o);
1522  return
1524  &(*p)->date, ODR_CONTEXT, 0, 0, "date") &&
1526  &(*p)->time, ODR_CONTEXT, 1, 1, "time") &&
1527  odr_sequence_end(o);
1528 }
1529 
1531 {
1532  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1533  return odr_missing(o, opt, name) && odr_ok (o);
1534  return
1536  &(*p)->date_time_of_this_service, ODR_CONTEXT, 0, 0, "date_time_of_this_service") &&
1538  &(*p)->date_time_of_original_service, ODR_CONTEXT, 1, 1, "date_time_of_original_service") &&
1539  odr_sequence_end(o);
1540 }
1541 
1543 {
1544  return ill_Service_Type (o, p, opt, name);
1545 }
1546 
1548 {
1549  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1550  return odr_missing(o, opt, name) && odr_ok (o);
1551  return
1553  &(*p)->aPDU_type, ODR_CONTEXT, 0, 0, "aPDU_type") &&
1555  &(*p)->current_state, ODR_CONTEXT, 1, 0, "current_state") &&
1556  odr_sequence_end(o);
1557 }
1558 
1559 int ill_Status_Report(ODR o, ILL_Status_Report **p, int opt, const char *name)
1560 {
1561  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1562  return odr_missing(o, opt, name) && odr_ok (o);
1563  return
1565  &(*p)->user_status_report, ODR_CONTEXT, 0, 0, "user_status_report") &&
1567  &(*p)->provider_status_report, ODR_CONTEXT, 1, 0, "provider_status_report") &&
1568  odr_sequence_end(o);
1569 }
1570 
1572 {
1573  if (!odr_initmember(o, p, sizeof(**p)))
1574  return odr_missing(o, opt, name);
1575  if (odr_sequence_of(o, (Odr_fun) odr_external, &(*p)->elements,
1576  &(*p)->num, name))
1577  return 1;
1578  if (o->direction == ODR_DECODE)
1579  *p = 0;
1580  return odr_missing(o, opt, name);
1581 }
1582 
1583 int ill_Supply_Details(ODR o, ILL_Supply_Details **p, int opt, const char *name)
1584 {
1585  static Odr_arm arm[] = {
1587  (Odr_fun) ill_Transportation_Mode, "physical_delivery"},
1589  (Odr_fun) ill_Electronic_Delivery_Service, "electronic_delivery"},
1590  {-1, -1, -1, -1, (Odr_fun) 0, 0}
1591  };
1592  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1593  return odr_missing(o, opt, name) && odr_ok (o);
1594  return
1596  &(*p)->date_shipped, ODR_CONTEXT, 0, 1, "date_shipped") &&
1598  &(*p)->date_due, ODR_CONTEXT, 1, 1, "date_due") &&
1600  &(*p)->chargeable_units, ODR_CONTEXT, 2, 1, "chargeable_units") &&
1602  &(*p)->cost, ODR_CONTEXT, 3, 1, "cost") &&
1604  &(*p)->shipped_conditions, ODR_CONTEXT, 4, 1, "shipped_conditions") &&
1605  (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0) || odr_ok(o)) &&
1607  &(*p)->insured_for, ODR_CONTEXT, 6, 1, "insured_for") &&
1609  &(*p)->return_insurance_require, ODR_CONTEXT, 7, 1, "return_insurance_require") &&
1611  (odr_sequence_of(o, (Odr_fun) ill_Units_Per_Medium_Type, &(*p)->no_of_units_per_medium,
1612  &(*p)->num_no_of_units_per_medium, "no_of_units_per_medium") || odr_ok(o)) &&
1613  odr_sequence_end(o);
1614 }
1615 
1617 {
1618  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1619  return odr_missing(o, opt, name) && odr_ok (o);
1620  return
1622  &(*p)->supply_medium_type, ODR_CONTEXT, 0, 0, "supply_medium_type") &&
1624  &(*p)->medium_characteristics, ODR_CONTEXT, 1, 1, "medium_characteristics") &&
1625  odr_sequence_end(o);
1626 }
1627 
1629 {
1630  return odr_enum (o, p, opt, name);
1631 }
1632 
1633 int ill_System_Address(ODR o, ILL_System_Address **p, int opt, const char *name)
1634 {
1635  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1636  return odr_missing(o, opt, name) && odr_ok (o);
1637  return
1639  &(*p)->telecom_service_identifier, ODR_CONTEXT, 0, 1, "telecom_service_identifier") &&
1641  &(*p)->telecom_service_address, ODR_CONTEXT, 1, 1, "telecom_service_address") &&
1642  odr_sequence_end(o);
1643 }
1644 
1645 int ill_System_Id(ODR o, ILL_System_Id **p, int opt, const char *name)
1646 {
1647  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1648  return odr_missing(o, opt, name) && odr_ok (o);
1649  return
1651  &(*p)->person_or_institution_symbol, ODR_CONTEXT, 0, 1, "person_or_institution_symbol") &&
1653  &(*p)->name_of_person_or_institution, ODR_CONTEXT, 1, 1, "name_of_person_or_institution") &&
1654  odr_sequence_end(o);
1655 }
1656 
1658 {
1659  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1660  return odr_missing(o, opt, name) && odr_ok (o);
1661  return
1663  &(*p)->permission_to_forward, ODR_CONTEXT, 0, 0, "permission_to_forward") &&
1665  &(*p)->permission_to_chain, ODR_CONTEXT, 1, 0, "permission_to_chain") &&
1667  &(*p)->permission_to_partition, ODR_CONTEXT, 2, 0, "permission_to_partition") &&
1669  &(*p)->permission_to_change_send_to_list, ODR_CONTEXT, 3, 0, "permission_to_change_send_to_list") &&
1671  &(*p)->initial_requester_address, ODR_CONTEXT, 4, 1, "initial_requester_address") &&
1673  &(*p)->preference, ODR_CONTEXT, 5, 0, "preference") &&
1675  &(*p)->send_to_list, ODR_CONTEXT, 6, 1, "send_to_list") &&
1677  &(*p)->already_tried_list, ODR_CONTEXT, 7, 1, "already_tried_list") &&
1678  odr_sequence_end(o);
1679 }
1680 
1681 int ill_Transaction_Id(ODR o, ILL_Transaction_Id **p, int opt, const char *name)
1682 {
1683  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1684  return odr_missing(o, opt, name) && odr_ok (o);
1685  return
1687  &(*p)->initial_requester_id, ODR_CONTEXT, 0, 1, "initial_requester_id") &&
1689  &(*p)->transaction_group_qualifier, ODR_CONTEXT, 1, 0, "transaction_group_qualifier") &&
1691  &(*p)->transaction_qualifier, ODR_CONTEXT, 2, 0, "transaction_qualifier") &&
1693  &(*p)->sub_transaction_qualifier, ODR_CONTEXT, 3, 1, "sub_transaction_qualifier") &&
1694  odr_sequence_end(o);
1695 }
1696 
1698 {
1699  return odr_enum (o, p, opt, name);
1700 }
1701 
1703 {
1704  return odr_enum (o, p, opt, name);
1705 }
1706 
1708 {
1709  return odr_enum (o, p, opt, name);
1710 }
1711 
1713 {
1714  return ill_String (o, p, opt, name);
1715 }
1716 
1718 {
1719  return odr_enum (o, p, opt, name);
1720 }
1721 
1723 {
1724  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1725  return odr_missing(o, opt, name) && odr_ok (o);
1726  return
1728  &(*p)->reason_unfilled, ODR_CONTEXT, 0, 0, "reason_unfilled") &&
1730  (odr_sequence_of(o, (Odr_fun) ill_Location_Info, &(*p)->locations,
1731  &(*p)->num_locations, "locations") || odr_ok(o)) &&
1732  odr_sequence_end(o);
1733 }
1734 
1736 {
1737  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1738  return odr_missing(o, opt, name) && odr_ok (o);
1739  return
1741  &(*p)->medium, ODR_CONTEXT, 0, 0, "medium") &&
1743  &(*p)->no_of_units, ODR_CONTEXT, 1, 0, "no_of_units") &&
1744  odr_sequence_end(o);
1745 }
1746 
1748 {
1749  static Odr_arm arm[] = {
1751  (Odr_fun) ill_Already_Forwarded, "already_forwarded"},
1753  (Odr_fun) ill_Intermediary_Problem, "intermediary_problem"},
1755  (Odr_fun) ill_Security_Problem, "security_problem"},
1757  (Odr_fun) ill_Unable_To_Perform, "unable_to_perform"},
1758  {-1, -1, -1, -1, (Odr_fun) 0, 0}
1759  };
1760  if (!odr_initmember(o, p, sizeof(**p)))
1761  return odr_missing(o, opt, name);
1762  if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
1763  return 1;
1764  if (o->direction == ODR_DECODE)
1765  *p = 0;
1766  return odr_missing(o, opt, name);
1767 }
1768 
1770 {
1771  if (!odr_sequence_begin(o, p, sizeof(**p), name))
1772  return odr_missing(o, opt, name) && odr_ok (o);
1773  return
1775  &(*p)->reason_will_supply, ODR_CONTEXT, 0, 0, "reason_will_supply") &&
1777  &(*p)->supply_date, ODR_CONTEXT, 1, 1, "supply_date") &&
1779  &(*p)->return_to_address, ODR_CONTEXT, 2, 1, "return_to_address") &&
1781  (odr_sequence_of(o, (Odr_fun) ill_Location_Info, &(*p)->locations,
1782  &(*p)->num_locations, "locations") || odr_ok(o)) &&
1784  &(*p)->electronic_delivery_service, ODR_CONTEXT, 4, 1, "electronic_delivery_service") &&
1785  odr_sequence_end(o);
1786 }
1787 
1788 int ill_EDIFACTString(ODR o, ILL_EDIFACTString **p, int opt, const char *name)
1789 {
1790  return odr_visiblestring (o, p, opt, name);
1791 }
1792 
1793 
#define odr_ok(o)
Definition: odr.h:215
int ill_Renew_Answer(ODR o, ILL_Renew_Answer **p, int opt, const char *name)
Definition: ill-core.c:614
#define ILL_APDU_Shipped
Definition: ill-core.h:335
Odr_int ILL_Supply_Medium_Type
Definition: ill-core.h:260
int ill_Third_Party_Info_Type(ODR o, ILL_Third_Party_Info_Type **p, int opt, const char *name)
Definition: ill-core.c:1657
int ill_Service_Date_this(ODR o, ILL_Service_Date_this **p, int opt, const char *name)
Definition: ill-core.c:1506
Odr_int ILL_Service_Type
Definition: ill-core.h:155
#define odr_explicit_tag(o, t, p, cl, tg, opt, name)
Definition: odr.h:195
#define ILL_Answer_hold_placed_results
Definition: ill-core.h:451
#define ILL_APDU_Renew_Answer
Definition: ill-core.h:346
int ill_Reason_Locs_Provided(ODR o, ILL_Reason_Locs_Provided **p, int opt, const char *name)
Definition: ill-core.c:1392
int ill_Cancel(ODR o, ILL_Cancel **p, int opt, const char *name)
Definition: ill-core.c:323
int ill_Estimate_Results(ODR o, ILL_Estimate_Results **p, int opt, const char *name)
Definition: ill-core.c:1099
Odr_int ILL_Transaction_Type
Definition: ill-core.h:281
int ill_Status_Query(ODR o, ILL_Status_Query **p, int opt, const char *name)
Definition: ill-core.c:748
int ill_Expired(ODR o, ILL_Expired **p, int opt, const char *name)
Definition: ill-core.c:818
int ill_Report_Source(ODR o, ILL_Report_Source **p, int opt, const char *name)
Definition: ill-core.c:1407
#define ILL_APDU_Damaged
Definition: ill-core.h:348
int ill_Renew(ODR o, ILL_Renew **p, int opt, const char *name)
Definition: ill-core.c:580
#define ILL_APDU_Conditional_Reply
Definition: ill-core.h:337
int ill_Extension(ODR o, ILL_Extension **p, int opt, const char *name)
Definition: ill-core.c:1112
#define ILL_Person_Or_Institution_Symbol_institution_symbol
Definition: ill-core.h:1004
int ill_APDU_Type(ODR o, ILL_APDU_Type **p, int opt, const char *name)
Definition: ill-core.c:1178
#define ILL_Provider_Error_Report_general_problem
Definition: ill-core.h:1029
#define ILL_APDU_Status_Query
Definition: ill-core.h:350
int ill_ISO_Date(ODR o, ILL_ISO_Date **p, int opt, const char *name)
Definition: ill-core.c:1211
#define ILL_APDU_Expired
Definition: ill-core.h:352
#define odr_implicit_tag(o, t, p, cl, tg, opt, name)
Definition: odr.h:192
int odr_sequence_begin(ODR o, void *p, int size, const char *name)
Definition: odr_seq.c:15
int ill_State_Transition_Prohibited(ODR o, ILL_State_Transition_Prohibited **p, int opt, const char *name)
Definition: ill-core.c:1547
#define ILL_Electronic_Delivery_Service_e_delivery_address
Definition: ill-core.h:824
int ill_Search_Type(ODR o, ILL_Search_Type **p, int opt, const char *name)
Definition: ill-core.c:1459
int ill_Reason_Unfilled(ODR o, ILL_Reason_Unfilled **p, int opt, const char *name)
Definition: ill-core.c:1402
int ill_Electronic_Delivery_Service_0(ODR o, ILL_Electronic_Delivery_Service_0 **p, int opt, const char *name)
Definition: ill-core.c:1031
char ILL_EDIFACTString
Definition: ill-core.h:302
char * name
Definition: initopt.c:18
int odr_visiblestring(ODR o, char **p, int opt, const char *name)
Definition: odr_use.c:41
int odr_enum(ODR o, Odr_int **p, int opt, const char *name)
Definition: odr_enum.c:19
int ill_Location_Info(ODR o, ILL_Location_Info **p, int opt, const char *name)
Definition: ill-core.c:1275
Odr_int ILL_Unable_To_Perform
Definition: ill-core.h:287
Odr_int ILL_APDU_Type
Definition: ill-core.h:152
int ill_Status_Report(ODR o, ILL_Status_Report **p, int opt, const char *name)
Definition: ill-core.c:1559
int ill_Send_To_List_Type(ODR o, ILL_Send_To_List_Type **p, int opt, const char *name)
Definition: ill-core.c:1494
int ill_Unable_To_Perform(ODR o, ILL_Unable_To_Perform **p, int opt, const char *name)
Definition: ill-core.c:1717
int ill_Service_Date_Time(ODR o, ILL_Service_Date_Time **p, int opt, const char *name)
Definition: ill-core.c:1530
int ill_Responder_Optional_Messages_Type(ODR o, ILL_Responder_Optional_Messages_Type **p, int opt, const char *name)
Definition: ill-core.c:1428
int ill_Transaction_Id(ODR o, ILL_Transaction_Id **p, int opt, const char *name)
Definition: ill-core.c:1681
int ill_User_Error_Report(ODR o, ILL_User_Error_Report **p, int opt, const char *name)
Definition: ill-core.c:1747
int ill_Retry_Results(ODR o, ILL_Retry_Results **p, int opt, const char *name)
Definition: ill-core.c:1444
#define ILL_APDU_ILL_Request
Definition: ill-core.h:333
Odr_int ILL_Medium_Type
Definition: ill-core.h:182
int ill_ISO_Time(ODR o, ILL_ISO_Time **p, int opt, const char *name)
Definition: ill-core.c:1216
#define ILL_Answer_estimate_results
Definition: ill-core.h:452
int ill_Overdue_ExtensionS(ODR o, ILL_Overdue_ExtensionS **p, int opt, const char *name)
Definition: ill-core.c:535
int ill_Checked_In(ODR o, ILL_Checked_In **p, int opt, const char *name)
Definition: ill-core.c:501
int ill_Client_Id(ODR o, ILL_Client_Id **p, int opt, const char *name)
Definition: ill-core.c:894
#define ILL_User_Error_Report_unable_to_perform
Definition: ill-core.h:1296
#define ILL_APDU_Cancel_Reply
Definition: ill-core.h:339
int odr_constructed_begin(ODR o, void *xxp, int zclass, int tag, const char *name)
Definition: odr_cons.c:24
int ill_System_Address(ODR o, ILL_System_Address **p, int opt, const char *name)
Definition: ill-core.c:1633
int ill_Date_Due(ODR o, ILL_Date_Due **p, int opt, const char *name)
Definition: ill-core.c:977
void * odr_malloc(ODR o, size_t size)
Definition: odr_mem.c:31
int odr_any(ODR o, Odr_any **p, int opt, const char *name)
Definition: odr_any.c:23
#define ILL_User_Error_Report_security_problem
Definition: ill-core.h:1295
int ill_Status_Or_Error_Report(ODR o, ILL_Status_Or_Error_Report **p, int opt, const char *name)
Definition: ill-core.c:780
int ill_Cost_Info_Type(ODR o, ILL_Cost_Info_Type **p, int opt, const char *name)
Definition: ill-core.c:924
int ill_Damaged(ODR o, ILL_Damaged **p, int opt, const char *name)
Definition: ill-core.c:682
int ill_Delivery_Address(ODR o, ILL_Delivery_Address **p, int opt, const char *name)
Definition: ill-core.c:989
Odr_int ILL_General_Problem
Definition: ill-core.h:143
int ill_Electronic_Delivery_Service(ODR o, ILL_Electronic_Delivery_Service **p, int opt, const char *name)
Definition: ill-core.c:1055
#define ILL_Answer_retry_results
Definition: ill-core.h:447
#define ILL_Provider_Error_Report_transaction_id_problem
Definition: ill-core.h:1030
int odr_initmember(ODR o, void *p, int size)
Definition: odr_tag.c:44
int ill_Damaged_DetailsSpecific_units(ODR o, ILL_Damaged_DetailsSpecific_units **p, int opt, const char *name)
Definition: ill-core.c:947
int ill_Conditional_Results(ODR o, ILL_Conditional_Results **p, int opt, const char *name)
Definition: ill-core.c:908
int ill_Request(ODR o, ILL_Request **p, int opt, const char *name)
Definition: ill-core.c:66
#define ILL_String_EDIFACTString
Definition: ill-core.h:930
int ill_Units_Per_Medium_Type(ODR o, ILL_Units_Per_Medium_Type **p, int opt, const char *name)
Definition: ill-core.c:1735
int ill_Forward_Notification(ODR o, ILL_Forward_Notification **p, int opt, const char *name)
Definition: ill-core.c:137
int ill_Service_Date_original(ODR o, ILL_Service_Date_original **p, int opt, const char *name)
Definition: ill-core.c:1518
int ill_Already_Tried_List_Type(ODR o, ILL_Already_Tried_List_Type **p, int opt, const char *name)
Definition: ill-core.c:865
int direction
Definition: odr.h:126
int ill_Electronic_Delivery_Service_1(ODR o, ILL_Electronic_Delivery_Service_1 **p, int opt, const char *name)
Definition: ill-core.c:1043
char ILL_ISO_Date
Definition: ill-core.h:167
#define ILL_Provider_Error_Report_state_transition_prohibited
Definition: ill-core.h:1031
int odr_integer(ODR o, Odr_int **p, int opt, const char *name)
Definition: odr_int.c:19
int odr_bool(ODR o, Odr_bool **p, int opt, const char *name)
Definition: odr_bool.c:21
int ill_Hold_Placed_Results(ODR o, ILL_Hold_Placed_Results **p, int opt, const char *name)
Definition: ill-core.c:1163
int ill_Amount(ODR o, ILL_Amount **p, int opt, const char *name)
Definition: ill-core.c:877
int odr_choice(ODR o, Odr_arm arm[], void *p, void *whichp, const char *name)
Definition: odr_choice.c:17
int ill_Will_Supply_Results(ODR o, ILL_Will_Supply_Results **p, int opt, const char *name)
Definition: ill-core.c:1769
#define ILL_Person_Or_Institution_Symbol_person_symbol
Definition: ill-core.h:1003
int odr_generalstring(ODR o, char **p, int opt, const char *name)
Definition: odr_use.c:51
#define ILL_Answer_locations_results
Definition: ill-core.h:449
int ill_Security_Problem(ODR o, ILL_Security_Problem **p, int opt, const char *name)
Definition: ill-core.c:1475
int ill_Reason_No_Report(ODR o, ILL_Reason_No_Report **p, int opt, const char *name)
Definition: ill-core.c:1397
int ill_Intermediary_Problem(ODR o, ILL_Intermediary_Problem **p, int opt, const char *name)
Definition: ill-core.c:1206
Odr_int ILL_Transaction_Results
Definition: ill-core.h:278
#define ODR_EXPLICIT
Definition: odr.h:60
#define ILL_User_Error_Report_already_forwarded
Definition: ill-core.h:1293
#define ILL_APDU_Status_Or_Error_Report
Definition: ill-core.h:351
int odr_external(ODR o, Odr_external **p, int opt, const char *name)
Definition: odr_use.c:15
int ill_String(ODR o, ILL_String **p, int opt, const char *name)
Definition: ill-core.c:1188
int ill_Delivery_Service(ODR o, ILL_Delivery_Service **p, int opt, const char *name)
Definition: ill-core.c:1013
#define ILL_String_GeneralString
Definition: ill-core.h:929
int odr_sequence_of(ODR o, Odr_fun type, void *p, int *num, const char *name)
Definition: odr_seq.c:134
char ILL_AmountString
Definition: ill-core.h:92
int(* Odr_fun)(ODR, char **, int, const char *)
Definition: odr.h:135
int ill_System_Id(ODR o, ILL_System_Id **p, int opt, const char *name)
Definition: ill-core.c:1645
int ill_Requester_Optional_Messages_Type(ODR o, ILL_Requester_Optional_Messages_Type **p, int opt, const char *name)
Definition: ill-core.c:1412
#define ILL_APDU_Returned
Definition: ill-core.h:342
#define ILL_APDU_ILL_Answer
Definition: ill-core.h:336
int ill_Transaction_Id_Problem(ODR o, ILL_Transaction_Id_Problem **p, int opt, const char *name)
Definition: ill-core.c:1697
#define ILL_Supply_Details_electronic_delivery
Definition: ill-core.h:1202
int ill_Lost(ODR o, ILL_Lost **p, int opt, const char *name)
Definition: ill-core.c:650
int ill_Message(ODR o, ILL_Message **p, int opt, const char *name)
Definition: ill-core.c:716
int ill_Current_State(ODR o, ILL_Current_State **p, int opt, const char *name)
Definition: ill-core.c:942
Odr_int ILL_Intermediary_Problem
Definition: ill-core.h:164
int which
Definition: odr.h:142
Definition: odr.h:137
#define ILL_Electronic_Delivery_Service_e_delivery_id
Definition: ill-core.h:825
int ill_Supply_Medium_Info_Type(ODR o, ILL_Supply_Medium_Info_Type **p, int opt, const char *name)
Definition: ill-core.c:1616
ASN.1 Module ISO-10161-ILL-1.
#define ILL_APDU_Overdue
Definition: ill-core.h:344
int ill_Shipped(ODR o, ILL_Shipped **p, int opt, const char *name)
Definition: ill-core.c:173
char ILL_ISO_Time
Definition: ill-core.h:170
int ill_Locations_Results(ODR o, ILL_Locations_Results **p, int opt, const char *name)
Definition: ill-core.c:1289
#define ILL_APDU_Recall
Definition: ill-core.h:341
int odr_null(ODR o, Odr_null **p, int opt, const char *name)
Definition: odr_null.c:19
#define ILL_Supply_Details_physical_delivery
Definition: ill-core.h:1201
int odr_missing(ODR o, int opt, const char *name)
Definition: odr_util.c:82
int ill_Supply_Details(ODR o, ILL_Supply_Details **p, int opt, const char *name)
Definition: ill-core.c:1583
int ill_Unfilled_Results(ODR o, ILL_Unfilled_Results **p, int opt, const char *name)
Definition: ill-core.c:1722
int ill_APDU(ODR o, ILL_APDU **p, int opt, const char *name)
Definition: ill-core.c:12
Odr_int ILL_Reason_Locs_Provided
Definition: ill-core.h:200
Definition: odr.h:124
Odr_int ILL_Report_Source
Definition: ill-core.h:209
int ill_Shipped_Service_Type(ODR o, ILL_Shipped_Service_Type **p, int opt, const char *name)
Definition: ill-core.c:1542
#define ILL_Name_Of_Person_Or_Institution_name_of_institution
Definition: ill-core.h:994
#define ILL_Delivery_Service_physical_delivery
Definition: ill-core.h:801
int ill_Provider_Error_Report(ODR o, ILL_Provider_Error_Report **p, int opt, const char *name)
Definition: ill-core.c:1372
int ill_Supply_Medium_Type(ODR o, ILL_Supply_Medium_Type **p, int opt, const char *name)
Definition: ill-core.c:1628
int odr_sequence_end(ODR o)
Definition: odr_seq.c:61
Odr_int ILL_Current_State
Definition: ill-core.h:104
int ill_AmountString(ODR o, ILL_AmountString **p, int opt, const char *name)
Definition: ill-core.c:889
int ill_Transportation_Mode(ODR o, ILL_Transportation_Mode **p, int opt, const char *name)
Definition: ill-core.c:1712
int ill_Service_Type(ODR o, ILL_Service_Type **p, int opt, const char *name)
Definition: ill-core.c:1183
int opt
Definition: initopt.c:19
int ill_Item_Id(ODR o, ILL_Item_Id **p, int opt, const char *name)
Definition: ill-core.c:1221
int ill_Delivery_ServiceElectronic_delivery(ODR o, ILL_Delivery_ServiceElectronic_delivery **p, int opt, const char *name)
Definition: ill-core.c:1001
#define ODR_APPLICATION
Definition: odr.h:66
#define ODR_IMPLICIT
Definition: odr.h:59
#define ILL_APDU_Message
Definition: ill-core.h:349
int ill_Cancel_Reply(ODR o, ILL_Cancel_Reply **p, int opt, const char *name)
Definition: ill-core.c:355
int odr_oid(ODR o, Odr_oid **p, int opt, const char *name)
Definition: odr_oid.c:20
Odr_int ILL_Reason_Unfilled
Definition: ill-core.h:206
#define ILL_APDU_Renew
Definition: ill-core.h:345
int ill_Conditional_Reply(ODR o, ILL_Conditional_Reply **p, int opt, const char *name)
Definition: ill-core.c:289
int ill_Transaction_Results(ODR o, ILL_Transaction_Results **p, int opt, const char *name)
Definition: ill-core.c:1702
#define ILL_Damaged_Details_complete_document
Definition: ill-core.h:776
int ill_History_Report(ODR o, ILL_History_Report **p, int opt, const char *name)
Definition: ill-core.c:1131
#define ILL_Delivery_Service_electronic_delivery
Definition: ill-core.h:802
#define ILL_APDU_Checked_In
Definition: ill-core.h:343
#define ILL_APDU_Forward_Notification
Definition: ill-core.h:334
int ill_Postal_Address(ODR o, ILL_Postal_Address **p, int opt, const char *name)
Definition: ill-core.c:1348
int ill_Place_On_Hold_Type(ODR o, ILL_Place_On_Hold_Type **p, int opt, const char *name)
Definition: ill-core.c:1343
int ill_Supplemental_Item_Description(ODR o, ILL_Supplemental_Item_Description **p, int opt, const char *name)
Definition: ill-core.c:1571
int ill_EDIFACTString(ODR o, ILL_EDIFACTString **p, int opt, const char *name)
Definition: ill-core.c:1788
int ill_Account_Number(ODR o, ILL_Account_Number **p, int opt, const char *name)
Definition: ill-core.c:848
int ill_Medium_Type(ODR o, ILL_Medium_Type **p, int opt, const char *name)
Definition: ill-core.c:1302
int ill_General_Problem(ODR o, ILL_General_Problem **p, int opt, const char *name)
Definition: ill-core.c:1126
int ill_Recall(ODR o, ILL_Recall **p, int opt, const char *name)
Definition: ill-core.c:429
int ill_Person_Or_Institution_Symbol(ODR o, ILL_Person_Or_Institution_Symbol **p, int opt, const char *name)
Definition: ill-core.c:1325
int odr_constructed_end(ODR o)
Definition: odr_cons.c:148
#define ILL_Answer_will_supply_results
Definition: ill-core.h:450
#define ODR_CONTEXT
Definition: odr.h:67
int ill_Overdue(ODR o, ILL_Overdue **p, int opt, const char *name)
Definition: ill-core.c:547
Odr_int ILL_Reason_No_Report
Definition: ill-core.h:203
Odr_int ILL_Place_On_Hold_Type
Definition: ill-core.h:191
Odr_int ILL_Transaction_Id_Problem
Definition: ill-core.h:275
int ill_Send_To_List_Type_s(ODR o, ILL_Send_To_List_Type_s **p, int opt, const char *name)
Definition: ill-core.c:1480
#define ILL_Damaged_Details_specific_units
Definition: ill-core.h:777
#define ILL_Answer_conditional_results
Definition: ill-core.h:446
ILL_Service_Type ILL_Shipped_Service_Type
Definition: ill-core.h:242
#define ILL_Name_Of_Person_Or_Institution_name_of_person
Definition: ill-core.h:993
#define ILL_APDU_Received
Definition: ill-core.h:340
#define ILL_User_Error_Report_intermediary_problem
Definition: ill-core.h:1294
int ill_Already_Forwarded(ODR o, ILL_Already_Forwarded **p, int opt, const char *name)
Definition: ill-core.c:853
int ill_Transaction_Type(ODR o, ILL_Transaction_Type **p, int opt, const char *name)
Definition: ill-core.c:1707
int ill_Damaged_Details(ODR o, ILL_Damaged_Details **p, int opt, const char *name)
Definition: ill-core.c:959
#define ILL_Answer_unfilled_results
Definition: ill-core.h:448
int ill_Error_Report(ODR o, ILL_Error_Report **p, int opt, const char *name)
Definition: ill-core.c:1083
#define ODR_DECODE
Definition: odr.h:95
int ill_Returned(ODR o, ILL_Returned **p, int opt, const char *name)
Definition: ill-core.c:461
#define ILL_APDU_Cancel
Definition: ill-core.h:338
int ill_Answer(ODR o, ILL_Answer **p, int opt, const char *name)
Definition: ill-core.c:225
int odr_implicit_settag(ODR o, int zclass, int tag)
Definition: odr_tag.c:32
int ill_Name_Of_Person_Or_Institution(ODR o, ILL_Name_Of_Person_Or_Institution **p, int opt, const char *name)
Definition: ill-core.c:1307
int ill_Received(ODR o, ILL_Received **p, int opt, const char *name)
Definition: ill-core.c:389
#define ILL_APDU_Lost
Definition: ill-core.h:347