YAZ  5.23.1
z-rrf2.c
Go to the documentation of this file.
1 
6 #if HAVE_CONFIG_H
7 #include <config.h>
8 #endif
9 
10 #include <yaz/z-rrf2.h>
11 
12 int z_ResourceReport2(ODR o, Z_ResourceReport2 **p, int opt, const char *name)
13 {
14  if (!odr_sequence_begin(o, p, sizeof(**p), name))
15  return odr_missing(o, opt, name) && odr_ok (o);
16  return
18  (odr_sequence_of(o, (Odr_fun) z_Estimate2, &(*p)->estimates,
19  &(*p)->num_estimates, "estimates") || odr_ok(o)) &&
21  &(*p)->message, ODR_CONTEXT, 2, 1, "message") &&
23 }
24 
25 int z_Estimate2(ODR o, Z_Estimate2 **p, int opt, const char *name)
26 {
27  if (!odr_sequence_begin(o, p, sizeof(**p), name))
28  return odr_missing(o, opt, name) && odr_ok (o);
29  return
31  &(*p)->type, ODR_CONTEXT, 1, 0, "type") &&
33  &(*p)->value, ODR_CONTEXT, 2, 0, "value") &&
35 }
#define odr_ok(o)
Definition: odr.h:215
int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt, const char *name)
Definition: z-core.c:1603
#define odr_explicit_tag(o, t, p, cl, tg, opt, name)
Definition: odr.h:195
#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 z_Estimate2(ODR o, Z_Estimate2 **p, int opt, const char *name)
Definition: z-rrf2.c:25
ASN.1 Module ResourceReport-Format-Resource-2.
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
int z_InternationalString(ODR o, Z_InternationalString **p, int opt, const char *name)
Definition: z-core.c:1598
#define ODR_CONTEXT
Definition: odr.h:67
int z_IntUnit(ODR o, Z_IntUnit **p, int opt, const char *name)
Definition: z-core.c:1570
int z_ResourceReport2(ODR o, Z_ResourceReport2 **p, int opt, const char *name)
Definition: z-rrf2.c:12
int odr_implicit_settag(ODR o, int zclass, int tag)
Definition: odr_tag.c:32