From: Sebastian Hammer Date: Mon, 10 Jun 1996 08:53:31 +0000 (+0000) Subject: Added Summary,OPAC,ResourceReport X-Git-Tag: YAZ.1.8~727 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=bf6c973ee6b5864bdb95d7d953fdcac75ea1b060 Added Summary,OPAC,ResourceReport --- diff --git a/asn/Makefile b/asn/Makefile index eeceaab..c7ede65 100644 --- a/asn/Makefile +++ b/asn/Makefile @@ -1,7 +1,7 @@ # Copyright (C) 1994, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile,v 1.22 1996-05-22 08:35:36 adam Exp $ +# $Id: Makefile,v 1.23 1996-06-10 08:53:31 quinn Exp $ SHELL=/bin/sh INCLUDE=-I../include -I. @@ -11,7 +11,7 @@ DEFS=$(INCLUDE) LIB=$(LIBDIR)/libasn.a LIBS=-lodr -lasn PO = proto.o diagbib1.o zget.o prt-rsc.o prt-acc.o prt-exp.o prt-ext.o \ - prt-grs.o prt-exd.o prt-dia.o prt-esp.o + prt-grs.o prt-exd.o prt-dia.o prt-esp.o prt-arc.o CPP=$(CC) -E RANLIB=ranlib diff --git a/asn/proto.c b/asn/proto.c index 6d61a12..53791b3 100644 --- a/asn/proto.c +++ b/asn/proto.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: proto.c,v $ - * Revision 1.47 1996-05-29 15:47:50 quinn + * Revision 1.48 1996-06-10 08:53:33 quinn + * Added Summary,OPAC,ResourceReport + * + * Revision 1.47 1996/05/29 15:47:50 quinn * Fixed in bug DiagRecs decoder. Thanks to Linda Harris. * * Revision 1.46 1996/04/10 11:39:42 quinn @@ -271,7 +274,7 @@ int z_Unit(ODR o, Z_Unit **p, int opt) if (!odr_sequence_begin(o, p, sizeof(**p))) return opt && odr_ok(o); return - odr_implicit(o, odr_visiblestring, &(*p)->unitSystem, ODR_CONTEXT, + odr_explicit(o, odr_visiblestring, &(*p)->unitSystem, ODR_CONTEXT, 1, 1) && odr_explicit(o, z_StringOrNumeric, &(*p)->unitType, ODR_CONTEXT, 2, 1) && @@ -1733,6 +1736,35 @@ int z_SortRequest(ODR o, Z_SortRequest **p, int opt) odr_sequence_end(o); } +/* ---------------------- Resource Report ---------------- */ + +int z_ResourceReportRequest(ODR o, Z_ResourceReportRequest **p, int opt) +{ + if (!odr_sequence_begin(o, p, sizeof(**p))) + return opt && odr_ok(o); + return + z_ReferenceId(o, &(*p)->referenceId, 1) && + odr_implicit(o, z_ReferenceId, &(*p)->opId, ODR_CONTEXT, 210, 1) && + odr_implicit(o, odr_oid, &(*p)->prefResourceReportFormat, ODR_CONTEXT, + 49, 1) && + z_OtherInformation(o, &(*p)->otherInfo, 1) && + odr_sequence_end(o); +} + +int z_ResourceReportResponse(ODR o, Z_ResourceReportResponse **p, int opt) +{ + if (!odr_sequence_begin(o, p, sizeof(**p))) + return opt && odr_ok(o); + return + z_ReferenceId(o, &(*p)->referenceId, 1) && + odr_implicit(o, odr_integer, &(*p)->resourceReportStatus, + ODR_CONTEXT, 50, 0) && + odr_implicit(o, z_External, &(*p)->resourceReport, ODR_CONTEXT, + 51, 1) && + z_OtherInformation(o, &(*p)->otherInfo, 1) && + odr_sequence_end(o); +} + /* ------------------------ APDU ------------------------- */ int z_APDU(ODR o, Z_APDU **p, int opt) @@ -1762,6 +1794,10 @@ int z_APDU(ODR o, Z_APDU **p, int opt) z_ResourceControlResponse}, {ODR_IMPLICIT, ODR_CONTEXT, 32, Z_APDU_triggerResourceControlRequest, z_TriggerResourceControlRequest}, + {ODR_IMPLICIT, ODR_CONTEXT, 33, Z_APDU_resourceReportRequest, + z_ResourceReportRequest}, + {ODR_IMPLICIT, ODR_CONTEXT, 34, Z_APDU_resourceReportResponse, + z_ResourceReportResponse}, {ODR_IMPLICIT, ODR_CONTEXT, 35, Z_APDU_scanRequest, z_ScanRequest}, {ODR_IMPLICIT, ODR_CONTEXT, 36, Z_APDU_scanResponse, z_ScanResponse}, {ODR_IMPLICIT, ODR_CONTEXT, 43, Z_APDU_sortRequest, z_SortRequest}, diff --git a/asn/prt-ext.c b/asn/prt-ext.c index 27d8db9..a7773ab 100644 --- a/asn/prt-ext.c +++ b/asn/prt-ext.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: prt-ext.c,v $ - * Revision 1.8 1996-02-20 12:51:44 quinn + * Revision 1.9 1996-06-10 08:53:36 quinn + * Added Summary,OPAC,ResourceReport + * + * Revision 1.8 1996/02/20 12:51:44 quinn * Completed SCAN. Fixed problems with EXTERNAL. * * Revision 1.7 1995/10/12 10:34:38 quinn @@ -50,6 +53,8 @@ static Z_ext_typeent type_table[] = {VAL_ITEMORDER, Z_External_itemOrder, z_ItemOrder}, {VAL_DIAG1, Z_External_diag1, z_DiagnosticFormat}, {VAL_ESPEC1, Z_External_espec1, z_Espec1}, + {VAL_SUMMARY, Z_External_summary, z_BriefBib}, + {VAL_OPAC, Z_External_OPAC, z_OPACRecord}, {VAL_NONE, 0, 0} }; @@ -89,6 +94,8 @@ int z_External(ODR o, Z_External **p, int opt) {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_External_itemOrder, z_ItemOrder}, {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_External_diag1, z_DiagnosticFormat}, {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_External_espec1, z_Espec1}, + {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_External_summary, z_BriefBib}, + {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_External_OPAC, z_OPACRecord}, {-1, -1, -1, -1, 0} };