00001
00007 #include <yaz/z-rrf1.h>
00008
00009 int z_ResourceReport1 (ODR o, Z_ResourceReport1 **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_Estimate1, &(*p)->estimates,
00016 &(*p)->num_estimates, "estimates") &&
00017 odr_implicit_tag (o, z_InternationalString,
00018 &(*p)->message, ODR_CONTEXT, 2, 0, "message") &&
00019 odr_sequence_end (o);
00020 }
00021
00022 int z_Estimate1 (ODR o, Z_Estimate1 **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_implicit_tag (o, z_EstimateType,
00028 &(*p)->type, ODR_CONTEXT, 1, 0, "type") &&
00029 odr_implicit_tag (o, odr_integer,
00030 &(*p)->value, ODR_CONTEXT, 2, 0, "value") &&
00031 odr_implicit_tag (o, odr_integer,
00032 &(*p)->currency_code, ODR_CONTEXT, 3, 1, "currency_code") &&
00033 odr_sequence_end (o);
00034 }
00035
00036 int z_EstimateType (ODR o, Z_EstimateType **p, int opt, const char *name)
00037 {
00038 return odr_integer (o, p, opt, name);
00039 }