YAZ  5.23.1
zes-pset.c
Go to the documentation of this file.
1 
6 #if HAVE_CONFIG_H
7 #include <config.h>
8 #endif
9 
10 #include <yaz/zes-pset.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)->toKeep, ODR_CONTEXT, 1, 0, "toKeep") &&
20  &(*p)->notToKeep, ODR_CONTEXT, 2, 1, "notToKeep") &&
22 }
23 
25 {
26  if (!odr_sequence_begin(o, p, sizeof(**p), name))
27  return odr_missing(o, opt, name) && odr_ok (o);
28  return
30  &(*p)->originPart, ODR_CONTEXT, 1, 0, "originPart") &&
32  &(*p)->targetPart, ODR_CONTEXT, 2, 1, "targetPart") &&
34 }
35 
37 {
38  static Odr_arm arm[] = {
43  {-1, -1, -1, -1, (Odr_fun) 0, 0}
44  };
45  if (!odr_initmember(o, p, sizeof(**p)))
46  return odr_missing(o, opt, name);
47  if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
48  return 1;
49  if (o->direction == ODR_DECODE)
50  *p = 0;
51  return odr_missing(o, opt, name);
52 }
53 
55 {
56  if (!odr_sequence_begin(o, p, sizeof(**p), name))
57  return odr_missing(o, opt, name) && odr_ok (o);
58  return
60  &(*p)->originSuppliedResultSet, ODR_CONTEXT, 1, 1, "originSuppliedResultSet") &&
62  &(*p)->replaceOrAppend, ODR_CONTEXT, 2, 1, "replaceOrAppend") &&
64 }
65 
66 int z_PRTargetPart(ODR o, Z_PRTargetPart **p, int opt, const char *name)
67 {
68  if (!odr_sequence_begin(o, p, sizeof(**p), name))
69  return odr_missing(o, opt, name) && odr_ok (o);
70  return
72  &(*p)->targetSuppliedResultSet, ODR_CONTEXT, 1, 1, "targetSuppliedResultSet") &&
74  &(*p)->numberOfRecords, ODR_CONTEXT, 2, 1, "numberOfRecords") &&
76 }
#define odr_ok(o)
Definition: odr.h:215
#define odr_explicit_tag(o, t, p, cl, tg, opt, name)
Definition: odr.h:195
int z_PRPersistentResultSetEsRequest(ODR o, Z_PRPersistentResultSetEsRequest **p, int opt, const char *name)
Definition: zes-pset.c:12
#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
char * name
Definition: initopt.c:18
int odr_initmember(ODR o, void *p, int size)
Definition: odr_tag.c:44
int direction
Definition: odr.h:126
int odr_integer(ODR o, Odr_int **p, int opt, const char *name)
Definition: odr_int.c:19
int odr_choice(ODR o, Odr_arm arm[], void *p, void *whichp, const char *name)
Definition: odr_choice.c:17
int(* Odr_fun)(ODR, char **, int, const char *)
Definition: odr.h:135
#define Z_PRPersistentResultSet_esRequest
Definition: zes-pset.h:51
int which
Definition: odr.h:142
Definition: odr.h:137
int odr_null(ODR o, Odr_null **p, int opt, const char *name)
Definition: odr_null.c:19
int odr_missing(ODR o, int opt, const char *name)
Definition: odr_util.c:82
Definition: odr.h:124
int z_PRPersistentResultSet(ODR o, Z_PRPersistentResultSet **p, int opt, const char *name)
Definition: zes-pset.c:36
int odr_sequence_end(ODR o)
Definition: odr_seq.c:61
int opt
Definition: initopt.c:19
int z_PRPersistentResultSetTaskPackage(ODR o, Z_PRPersistentResultSetTaskPackage **p, int opt, const char *name)
Definition: zes-pset.c:24
#define Z_PRPersistentResultSet_taskPackage
Definition: zes-pset.h:52
#define ODR_IMPLICIT
Definition: odr.h:59
int z_PRTargetPart(ODR o, Z_PRTargetPart **p, int opt, const char *name)
Definition: zes-pset.c:66
int z_InternationalString(ODR o, Z_InternationalString **p, int opt, const char *name)
Definition: z-core.c:1598
ASN.1 Module ESFormat-PersistentResultSet.
#define ODR_CONTEXT
Definition: odr.h:67
int z_PROriginPartNotToKeep(ODR o, Z_PROriginPartNotToKeep **p, int opt, const char *name)
Definition: zes-pset.c:54
#define ODR_DECODE
Definition: odr.h:95