Initial commit
[yaz4j-moved-to-github.git] / dependencies / yaz-2.1.28 / src / z-rrf1.c
1 /** \file z-rrf1.c
2     \brief ASN.1 Module ResourceReport-Format-Resource-1
3
4     Generated automatically by YAZ ASN.1 Compiler 0.4
5 */
6
7 #include <yaz/z-rrf1.h>
8
9 int z_ResourceReport1 (ODR o, Z_ResourceReport1 **p, int opt, const char *name)
10 {
11         if (!odr_sequence_begin (o, p, sizeof(**p), name))
12                 return odr_missing(o, opt, name) && odr_ok (o);
13         return
14                 odr_implicit_settag (o, ODR_CONTEXT, 1) &&
15                 odr_sequence_of(o, (Odr_fun) z_Estimate1, &(*p)->estimates,
16                   &(*p)->num_estimates, "estimates") &&
17                 odr_implicit_tag (o, z_InternationalString,
18                         &(*p)->message, ODR_CONTEXT, 2, 0, "message") &&
19                 odr_sequence_end (o);
20 }
21
22 int z_Estimate1 (ODR o, Z_Estimate1 **p, int opt, const char *name)
23 {
24         if (!odr_sequence_begin (o, p, sizeof(**p), name))
25                 return odr_missing(o, opt, name) && odr_ok (o);
26         return
27                 odr_implicit_tag (o, z_EstimateType,
28                         &(*p)->type, ODR_CONTEXT, 1, 0, "type") &&
29                 odr_implicit_tag (o, odr_integer,
30                         &(*p)->value, ODR_CONTEXT, 2, 0, "value") &&
31                 odr_implicit_tag (o, odr_integer,
32                         &(*p)->currency_code, ODR_CONTEXT, 3, 1, "currency_code") &&
33                 odr_sequence_end (o);
34 }
35
36 int z_EstimateType (ODR o, Z_EstimateType **p, int opt, const char *name)
37 {
38         return odr_integer (o, p, opt, name);
39 }