1 /** \file z-rrf2.c
2     \brief ASN.1 Module ResourceReport-Format-Resource-2
3 
4     Generated automatically by YAZ ASN.1 Compiler 0.4
5 */
6 #if HAVE_CONFIG_H
7 #include <config.h>
8 #endif
9 
10 #include <yaz/z-rrf2.h>
11 
z_ResourceReport2(ODR o,Z_ResourceReport2 ** p,int opt,const char * name)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
17 		odr_implicit_settag(o, ODR_CONTEXT, 1) &&
18 		(odr_sequence_of(o, (Odr_fun) z_Estimate2, &(*p)->estimates,
19 		  &(*p)->num_estimates, "estimates") || odr_ok(o)) &&
20 		odr_implicit_tag(o, z_InternationalString,
21 			&(*p)->message, ODR_CONTEXT, 2, 1, "message") &&
22 		odr_sequence_end(o);
23 }
24 
z_Estimate2(ODR o,Z_Estimate2 ** p,int opt,const char * name)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
30 		odr_explicit_tag(o, z_StringOrNumeric,
31 			&(*p)->type, ODR_CONTEXT, 1, 0, "type") &&
32 		odr_implicit_tag(o, z_IntUnit,
33 			&(*p)->value, ODR_CONTEXT, 2, 0, "value") &&
34 		odr_sequence_end(o);
35 }
36