YAZ  5.23.1
oclc-ill-req-ext.c
Go to the documentation of this file.
1 
6 #if HAVE_CONFIG_H
7 #include <config.h>
8 #endif
9 
10 #include <yaz/oclc-ill-req-ext.h>
11 
13 {
14  if (!odr_sequence_begin(o, p, sizeof(**p), name))
15  return odr_missing(o, opt, name) && odr_ok (o);
16  return
18  &(*p)->clientDepartment, ODR_CONTEXT, 0, 1, "clientDepartment") &&
20  &(*p)->paymentMethod, ODR_CONTEXT, 1, 1, "paymentMethod") &&
22  &(*p)->uniformTitle, ODR_CONTEXT, 2, 1, "uniformTitle") &&
24  &(*p)->dissertation, ODR_CONTEXT, 3, 1, "dissertation") &&
26  &(*p)->issueNumber, ODR_CONTEXT, 4, 1, "issueNumber") &&
28  &(*p)->volume, ODR_CONTEXT, 5, 1, "volume") &&
30  &(*p)->affiliations, ODR_CONTEXT, 6, 1, "affiliations") &&
32  &(*p)->source, ODR_CONTEXT, 7, 1, "source") &&
34 }
35 
36 int ill_SystemNo_s(ODR o, ILL_SystemNo_s **p, int opt, const char *name)
37 {
38  if (!odr_sequence_begin(o, p, sizeof(**p), name))
39  return odr_missing(o, opt, name) && odr_ok (o);
40  return
41  ill_System(o, &(*p)->System, 0, "System") &&
42  ill_RecordNo(o, &(*p)->recordNo, 0, "recordNo") &&
44 }
45 
46 int ill_SystemNo(ODR o, ILL_SystemNo **p, int opt, const char *name)
47 {
48  if (!odr_initmember(o, p, sizeof(**p)))
49  return odr_missing(o, opt, name);
50  if (odr_sequence_of(o, (Odr_fun) ill_SystemNo_s, &(*p)->elements,
51  &(*p)->num, name))
52  return 1;
53  if (o->direction == ODR_DECODE)
54  *p = 0;
55  return odr_missing(o, opt, name);
56 }
57 
58 int ill_System(ODR o, ILL_System **p, int opt, const char *name)
59 {
60  return odr_enum (o, p, opt, name);
61 }
62 
63 int ill_RecordNo(ODR o, ILL_RecordNo **p, int opt, const char *name)
64 {
65  return ill_String (o, p, opt, name);
66 }
#define odr_ok(o)
Definition: odr.h:215
#define odr_explicit_tag(o, t, p, cl, tg, opt, name)
Definition: odr.h:195
int ill_RecordNo(ODR o, ILL_RecordNo **p, int opt, const char *name)
Odr_int ILL_System
int ill_System(ODR o, ILL_System **p, int opt, const char *name)
int odr_sequence_begin(ODR o, void *p, int size, const char *name)
Definition: odr_seq.c:15
char * name
Definition: initopt.c:18
int odr_enum(ODR o, Odr_int **p, int opt, const char *name)
Definition: odr_enum.c:19
int ill_OCLCILLRequestExtension(ODR o, ILL_OCLCILLRequestExtension **p, int opt, const char *name)
int odr_initmember(ODR o, void *p, int size)
Definition: odr_tag.c:44
int direction
Definition: odr.h:126
int ill_SystemNo(ODR o, ILL_SystemNo **p, int opt, const char *name)
int ill_String(ODR o, ILL_String **p, int opt, const char *name)
Definition: ill-core.c:1188
int odr_sequence_of(ODR o, Odr_fun type, void *p, int *num, const char *name)
Definition: odr_seq.c:134
int(* Odr_fun)(ODR, char **, int, const char *)
Definition: odr.h:135
int odr_missing(ODR o, int opt, const char *name)
Definition: odr_util.c:82
Definition: odr.h:124
int odr_sequence_end(ODR o)
Definition: odr_seq.c:61
int opt
Definition: initopt.c:19
ASN.1 Module OCLCILLRequestExtension.
#define ODR_CONTEXT
Definition: odr.h:67
#define ODR_DECODE
Definition: odr.h:95
int ill_SystemNo_s(ODR o, ILL_SystemNo_s **p, int opt, const char *name)