From: Sebastian Hammer Date: Thu, 1 Jun 1995 11:22:17 +0000 (+0000) Subject: Resource control X-Git-Tag: YAZ.1.8~999 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=4b449e2e477bc6feca0b83ce8e8e0bbc205c7e4a Resource control --- diff --git a/asn/prt-rsc.c b/asn/prt-rsc.c new file mode 100644 index 0000000..c548d16 --- /dev/null +++ b/asn/prt-rsc.c @@ -0,0 +1,41 @@ +/* + * Copyright (c) 1995, Index Data. + * See the file LICENSE for details. + * Sebastian Hammer, Adam Dickmeiss + * + * $Log: prt-rsc.c,v $ + * Revision 1.1 1995-06-01 11:22:17 quinn + * Resource control + * + * + */ + +#include + +/* -------------------- Resource 1 ------------------------- */ + +int z_Estimate1(ODR o, Z_Estimate1, int opt) +{ + if (!odr_sequence_begin(o, p, sizeof(**p))) + return opt && odr_ok(o); + return + odr_implicit(o, odr_integer, &(*p)->type, ODR_CONTEXT, 1, 0) && + odr_implicit(o, odr_integer, &(*p)->value, ODR_CONTEXT, 2, 0) && + odr_implicit(o, odr_integer, &(*p)->currencyCode, ODR_CONTEXT, 3, 1) && + odr_sequence-end(o); +} + +int z_ResourceReport1(ODR o, Z_ResourceReport1 **p, int opt) +{ + if (!odr_sequence_begin(o, p, sizeof(**p))) + return opt && odr_ok(o); + return + odr_implicit_settag(o, ODR_CONTEXT, 1) && + odr_sequence_of(o, z_Estimate1, &(*p)->estimates, + &(*p)->num_estimates) && + odr_implicit(o, odr_visiblestring, &(*p)->message, ODR_CONTEXT, 2, 0) && + odr_sequence_end(o); +} + +/* -------------------- Resource 1 ------------------------- */ +