00001
00007 #include <yaz/z-rrf2.h>
00008
00009 int z_ResourceReport2 (ODR o, Z_ResourceReport2 **p, int opt, const char *name)
00010 {
00011 if (!odr_sequence_begin (o, p, sizeof(**p), name))
00012 return odr_missing(o, opt, name) && odr_ok (o);
00013 return
00014 odr_implicit_settag (o, ODR_CONTEXT, 1) &&
00015 (odr_sequence_of(o, (Odr_fun) z_Estimate2, &(*p)->estimates,
00016 &(*p)->num_estimates, "estimates") || odr_ok(o)) &&
00017 odr_implicit_tag (o, z_InternationalString,
00018 &(*p)->message, ODR_CONTEXT, 2, 1, "message") &&
00019 odr_sequence_end (o);
00020 }
00021
00022 int z_Estimate2 (ODR o, Z_Estimate2 **p, int opt, const char *name)
00023 {
00024 if (!odr_sequence_begin (o, p, sizeof(**p), name))
00025 return odr_missing(o, opt, name) && odr_ok (o);
00026 return
00027 odr_explicit_tag (o, z_StringOrNumeric,
00028 &(*p)->type, ODR_CONTEXT, 1, 0, "type") &&
00029 odr_implicit_tag (o, z_IntUnit,
00030 &(*p)->value, ODR_CONTEXT, 2, 0, "value") &&
00031 odr_sequence_end (o);
00032 }