--- (IN PROGRESS)
+Major restructure of YAZ source. All source in libyaz is in src directory.
+Programs in client (yaz-client), ztest (yaz-ztest), zoom (zoom programs),
+util (utility programs such as ASN.1 compiler, yaz-marcdump).
+
+Added man page for utility yaz-marcdump (used to be called marcdump).
+yaz-marcdump is installed by 'make install'.
+
+Fixed a memory leak in Generic Frontend Server that occurred when decoding
+of incoming package failed.
+
+Fixed a potential DOS attack vulnerability in COMSTACK/ODR.
+
Change prototype of odr_perror: add const to message string.
New function yaz_log_reopen which reopens log file (for log rotate, etc.)
Fix bad reference in UNIX comstack in function cs_addrstr.
-Fix for AIX compile.
+Fix for compilation on AIX.
The generic front-end server (server/seshigh.c) now supports returning
Init diagnostics to the client in User-information-field, in
## Copyright (C) 1994-2003, Index Data
## All rights reserved.
-## $Id: Makefile.am,v 1.22 2003-05-06 12:07:33 adam Exp $
+## $Id: Makefile.am,v 1.23 2003-10-27 12:21:21 adam Exp $
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = util odr comstack z39.50 ill zutil ccl cql server include lib client ztest zoom doc etc
+SUBDIRS = src include test util client ztest zoom doc etc
aclocaldir=$(datadir)/aclocal
-YAZ toolkit - $Id: README,v 1.43 2003-02-20 21:23:47 adam Exp $
+YAZ toolkit - $Id: README,v 1.44 2003-10-27 12:21:21 adam Exp $
Copyright (C) 1995-2003, Index Data ApS.
See the file LICENSE for details.
doc Documentation.
-util Various little utility functions. Logging, memory debugging,
- primitive ISO 2709 presentation for the yaz-client, etc. You'll
- find the ASN.1 Compiler for YAZ here as well (yaz-comp).
+src Source for the YAZ library.
-odr Open Data Representation. This module implements the BER
- encoding rules.
-
-z39.50 codecs for the Z39.50 protocol. This module does the same job
- as the old 'asn' module except that the source files are
- auto-generated using an YAZ' ASN.1 Compiler (yaz-comp).
-
-zutil This module implements a collection of Z39.50 and SRW utilities,
- such as query parsing, etc.
-
-ill Codecs for the ISO ILL protocol.
-
-comstack This module implements the transport transparency
- stack (COMSTACK). The comstack implements a generic interface
- for exchanging BER-encoded records over a network. It supports
- the 'American' mode of exchanging the records straight over
- TCP/IP, and uses Peter Furniss' XTIMOSI package over RFC1006.
- Look for documentation in the file comstack.man.
-
-zoom An implementation of Mike Taylors Z39.50 Object Oriented
- Model : ZOOM. If you'd like to build Z39.50 client applications
- in C this may be good start. You'll find example programs in
- this directory too.
-
-server This is the implementation of the Z39.50 server frontend. It
- provides event-handling and server managament functions,
- and calls the backend primitives (best documentation of these
- is in the file include/yaz/backend.h).
-
-ccl CCL parser.
-
-cql CQL parser.
+util Utility programs, ASN.1 compiler, MARC dump utility, and others.
client A demonstration client for testing the protocol. It's bug'n
ugly. But, it supports many features.
ztest A demonstration server that implements a backend.
-include/yaz The various header files.
+etc Various configuration files.
-lib The libraries. Primarily libyaz.la. The makefile gathers the
- libraries from previous modules into libyaz.la.
+include/yaz The various header files.
To get more information or assistance, send mail to yaz-help@indexdata.dk.
Even better, sign on to the YAZ mailing list here:
+++ /dev/null
-## $Id: Makefile.am,v 1.7 2002-09-11 21:25:57 adam Exp $
-
-noinst_LTLIBRARIES=libasn.la
-
-libasn_la_SOURCES = proto.c prt-rsc.c prt-acc.c prt-exp.c prt-grs.c prt-exd.c \
- prt-dia.c prt-esp.c prt-arc.c prt-add.c prt-dat.c prt-univ.c
-
-pkginclude_HEADERS = \
- prt-acc.h prt-add.h prt-arc.h prt-dat.h prt-dia.h prt-esp.h prt-exd.h \
- prt-exp.h prt-ext.h prt-grs.h prt-proto.h prt-rsc.h prt-univ.h
-
-AM_CPPFLAGS=-I$(top_srcdir)/include
+++ /dev/null
-/*
- * Copyright (c) 1995-1999, Index Data
- * See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Log: proto.c,v $
- * Revision 1.61 1999-11-30 13:47:10 adam
- * Improved installation. Moved header files to include/yaz.
- *
- * Revision 1.60 1999/06/11 16:45:59 adam
- * Fixed minor bug in ScanRequest encoder.
- *
- * Revision 1.59 1999/04/21 11:46:00 adam
- * Fixed bug in {en,de}coder for OtherInformation.
- *
- * Revision 1.58 1999/04/20 09:56:47 adam
- * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
- * Modified all encoders/decoders to reflect this change.
- *
- * Revision 1.57 1998/10/20 13:55:37 quinn
- * Fixed Scan bug in asn and client
- *
- * Revision 1.56 1998/08/19 16:10:04 adam
- * Changed som member names of DeleteResultSetRequest/Response.
- *
- * Revision 1.55 1998/02/11 11:53:32 adam
- * Changed code so that it compiles as C++.
- *
- * Revision 1.54 1996/11/11 13:14:46 adam
- * Fixed tagging bug in z_ProximityOperator.
- *
- * Revision 1.53 1996/10/09 15:54:55 quinn
- * Added SearchInfoReport
- *
- * Revision 1.52 1996/10/08 12:56:57 adam
- * Bug fix: tagging of type 101 query.
- *
- * Revision 1.51 1996/07/26 14:07:21 quinn
- * Small
- *
- * Revision 1.50 1996/07/26 13:36:15 quinn
- * Various smallish
- *
- * Revision 1.49 1996/07/06 19:58:28 quinn
- * System headerfiles gathered in yconfig
- *
- * 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
- * Fixed bug in UserInfo
- *
- * Revision 1.45 1996/02/23 10:00:25 quinn
- * Fixes to SCAN
- *
- * Revision 1.44 1996/02/20 12:51:41 quinn
- * Completed SCAN. Fixed problems with EXTERNAL.
- *
- * Revision 1.43 1996/02/10 12:22:49 quinn
- * Work on SCAN
- *
- * Revision 1.42 1996/01/22 09:46:31 quinn
- * Added Sort PDU. Moved StringList to main protocol file.
- *
- * Revision 1.41 1996/01/10 15:21:24 quinn
- * Added links to access control PDUs
- *
- * Revision 1.40 1996/01/02 11:46:40 quinn
- * Changed 'operator' to 'roperator' to avoid C++ conflict.
- *
- * Revision 1.39 1995/09/29 17:11:53 quinn
- * Smallish
- *
- * Revision 1.38 1995/09/27 15:02:40 quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.37 1995/08/21 09:10:15 quinn
- * Smallish fixes to suppport new formats.
- *
- * Revision 1.36 1995/08/15 11:59:39 quinn
- * Updated External
- *
- * Revision 1.35 1995/08/10 08:53:59 quinn
- * Added Explain
- *
- * Revision 1.34 1995/06/19 17:01:48 quinn
- * This should bring us in sync with the version distributed as 1.0b
- *
- * Revision 1.33 1995/06/19 13:39:56 quinn
- * *** empty log message ***
- *
- * Revision 1.32 1995/06/19 12:37:28 quinn
- * Fixed a bug in the compspec.
- *
- * Revision 1.31 1995/06/16 13:15:56 quinn
- * Fixed Defaultdiagformat.
- *
- * Revision 1.30 1995/06/15 15:42:01 quinn
- * Fixed some v3 bugs
- *
- * Revision 1.29 1995/06/15 07:44:49 quinn
- * Moving to v3.
- *
- * Revision 1.28 1995/06/14 15:26:35 quinn
- * *** empty log message ***
- *
- * Revision 1.27 1995/06/07 14:36:22 quinn
- * Added CLOSE
- *
- * Revision 1.26 1995/06/02 09:49:13 quinn
- * Adding access control
- *
- * Revision 1.25 1995/05/25 11:00:08 quinn
- * *** empty log message ***
- *
- * Revision 1.24 1995/05/22 13:58:18 quinn
- * Fixed an ODR_NULLVAL.
- *
- * Revision 1.23 1995/05/22 11:30:18 quinn
- * Adding Z39.50-1992 stuff to proto.c. Adding zget.c
- *
- * Revision 1.22 1995/05/17 08:40:56 quinn
- * Added delete. Fixed some sequence_begins. Smallish.
- *
- * Revision 1.21 1995/05/16 08:50:24 quinn
- * License, documentation, and memory fixes
- *
- * Revision 1.20 1995/05/15 11:55:25 quinn
- * Smallish.
- *
- * Revision 1.19 1995/04/11 11:58:35 quinn
- * Fixed bug.
- *
- * Revision 1.18 1995/04/11 11:52:02 quinn
- * Fixed possible buf in proto.c
- *
- * Revision 1.17 1995/04/10 10:22:22 quinn
- * Added SCAN.
- *
- * Revision 1.16 1995/03/30 10:26:43 quinn
- * Added Term structure
- *
- * Revision 1.15 1995/03/30 09:08:39 quinn
- * Added Resource control protocol
- *
- * Revision 1.14 1995/03/29 08:06:13 quinn
- * Added a few v3 elements
- *
- * Revision 1.13 1995/03/20 11:26:52 quinn
- * *** empty log message ***
- *
- * Revision 1.12 1995/03/20 09:45:09 quinn
- * Working towards v3
- *
- * Revision 1.11 1995/03/17 10:17:25 quinn
- * Added memory management.
- *
- * Revision 1.10 1995/03/15 11:17:40 quinn
- * Fixed some return-checks from choice.. need better ay to handle those..
- *
- * Revision 1.9 1995/03/15 08:37:06 quinn
- * Fixed protocol bugs.
- *
- * Revision 1.8 1995/03/14 16:59:24 quinn
- * Fixed OPTIONAL flag in attributeelement
- *
- * Revision 1.7 1995/03/07 16:29:33 quinn
- * Added authentication stuff.
- *
- * Revision 1.6 1995/03/01 14:46:03 quinn
- * Fixed protocol bug in 8777query.
- *
- * Revision 1.5 1995/02/14 11:54:22 quinn
- * Fixing include.
- *
- * Revision 1.4 1995/02/10 15:54:30 quinn
- * Small adjustments.
- *
- * Revision 1.3 1995/02/09 15:51:39 quinn
- * Works better now.
- *
- * Revision 1.2 1995/02/06 21:26:07 quinn
- * Repaired this evening's damages..
- *
- * Revision 1.1 1995/02/06 16:44:47 quinn
- * First hack at Z/SR protocol
- *
- */
-
-#include <yaz/odr.h>
-
-#include <yaz/proto.h>
-
-/* ---------------------- GLOBAL DEFS ------------------- */
-
-/*
- * We'll use a general octetstring here, since string operations are
- * clumsy on long strings.
- */
-int z_SUTRS(ODR o, Odr_oct **p, int opt, const char *name)
-{
- return odr_implicit(o, odr_octetstring, p, ODR_UNIVERSAL,
- ODR_GENERALSTRING, opt);
-}
-
-int z_ReferenceId(ODR o, Z_ReferenceId **p, int opt, const char *name)
-{
- return odr_implicit(o, odr_octetstring, (Odr_oct**) p, ODR_CONTEXT, 2,
- opt);
-}
-
-int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt, const char *name)
-{
- return odr_implicit(o, odr_visiblestring, (char **) p, ODR_CONTEXT, 105,
- opt);
-}
-
-int z_ResultSetId(ODR o, char **p, int opt, const char *name)
-{
- return odr_implicit(o, odr_visiblestring, (char **) p, ODR_CONTEXT, 31,
- opt);
-}
-
-int z_ElementSetName(ODR o, char **p, int opt, const char *name)
-{
- return odr_implicit(o, odr_visiblestring, p, ODR_CONTEXT, 103, opt);
-}
-
-int z_UserInformationField(ODR o, Z_External **p, int opt, const char *name)
-{
- return odr_explicit(o, z_External, (Z_External **)p, ODR_CONTEXT,
- 11, opt);
-}
-
-int z_InternationalString(ODR o, char **p, int opt, const char *name)
-{
- return odr_generalstring(o, p, opt, 0);
-}
-
-int z_InfoCategory(ODR o, Z_InfoCategory **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_oid, &(*p)->categoryTypeId, ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, odr_integer, &(*p)->categoryValue, ODR_CONTEXT, 2,
- 0) &&
- odr_sequence_end(o);
-}
-
-int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p, int opt,
- const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_OtherInfo_characterInfo,
- odr_visiblestring, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_OtherInfo_binaryInfo,
- (Odr_fun)odr_octetstring, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_OtherInfo_externallyDefinedInfo,
- (Odr_fun)z_External, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 5, Z_OtherInfo_oid,
- (Odr_fun)odr_oid, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_sequence_begin(o, p, sizeof(**p), name))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InfoCategory, &(*p)->category, ODR_CONTEXT, 1, 1) &&
- odr_choice(o, arm, &(*p)->information, &(*p)->which, name) &&
- odr_sequence_end(o);
-}
-
-int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt,
- const char *name)
-{
- if (!odr_initmember (o, p, sizeof(**p)))
- return opt && odr_ok(o);
- odr_implicit_settag(o, ODR_CONTEXT, 201);
- if (odr_sequence_of(o, (Odr_fun)z_OtherInformationUnit, &(*p)->list,
- &(*p)->num_elements, name))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_StringOrNumeric_string,
- odr_visiblestring, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_StringOrNumeric_numeric,
- (Odr_fun)odr_integer, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_StringOrNumeric *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-/*
- * check tagging!!
- */
-int z_Unit(ODR o, Z_Unit **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_explicit(o, z_InternationalString, &(*p)->unitSystem, ODR_CONTEXT,
- 1, 1) &&
- odr_explicit(o, z_StringOrNumeric, &(*p)->unitType, ODR_CONTEXT,
- 2, 1) &&
- odr_explicit(o, z_StringOrNumeric, &(*p)->unit, ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, odr_integer, &(*p)->scaleFactor, ODR_CONTEXT, 4, 1) &&
- odr_sequence_end(o);
-}
-
-int z_IntUnit(ODR o, Z_IntUnit **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_integer, &(*p)->value, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_Unit, &(*p)->unitUsed, ODR_CONTEXT, 2, 0) &&
- odr_sequence_end(o);
-}
-
-int z_StringList(ODR o, Z_StringList **p, int opt, const char *name)
-{
- if (o->direction == ODR_DECODE)
- *p = (Z_StringList *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_sequence_of(o, (Odr_fun)z_InternationalString, &(*p)->strings,
- &(*p)->num_strings, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-/* ---------------------- INITIALIZE SERVICE ------------------- */
-
-#if 1
-int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_visiblestring(o, &(*p)->user, 0, 0) &&
- odr_visiblestring(o, &(*p)->password, 0, 0) &&
- odr_visiblestring(o, &(*p)->account, 0, 0) &&
- odr_sequence_end(o);
-}
-#endif
-
-int z_IdPass(ODR o, Z_IdPass **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_visiblestring, &(*p)->groupId, ODR_CONTEXT, 0,
- 1) &&
- odr_implicit(o, odr_visiblestring, &(*p)->userId, ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, odr_visiblestring, &(*p)->password, ODR_CONTEXT, 2,
- 1) &&
- odr_sequence_end(o);
-}
-
-int z_StrAuthentication(ODR o, char **p, int opt, const char *name)
-{
- return odr_visiblestring(o, p, opt, 0);
-}
-
-int z_IdAuthentication(ODR o, Z_IdAuthentication **p, int opt,
- const char *name)
-{
- static Odr_arm arm[] =
- {
- {-1, -1, -1, Z_IdAuthentication_open, z_StrAuthentication, 0},
- {-1, -1, -1, Z_IdAuthentication_idPass, (Odr_fun)z_IdPass, 0},
- {-1, -1, -1, Z_IdAuthentication_anonymous, (Odr_fun)odr_null, 0},
- {-1, -1, -1, Z_IdAuthentication_other, (Odr_fun)z_External, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_IdAuthentication *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
-
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_InitRequest(ODR o, Z_InitRequest **p, int opt, const char *name)
-{
- Z_InitRequest *pp;
-
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- pp = *p;
- return
- z_ReferenceId(o, &pp->referenceId, 1, 0) &&
- odr_implicit(o, odr_bitstring, &pp->protocolVersion,
- ODR_CONTEXT, 3, 0) &&
- odr_implicit(o, odr_bitstring, &pp->options, ODR_CONTEXT, 4, 0) &&
- odr_implicit(o, odr_integer, &pp->preferredMessageSize, ODR_CONTEXT,
- 5, 0) &&
- odr_implicit(o, odr_integer, &pp->maximumRecordSize,
- ODR_CONTEXT, 6, 0) &&
- odr_explicit(o, z_IdAuthentication, &pp->idAuthentication,
- ODR_CONTEXT, 7, 1) &&
- odr_implicit(o, odr_visiblestring, &pp->implementationId,
- ODR_CONTEXT, 110, 1) &&
- odr_implicit(o, odr_visiblestring, &pp->implementationName,
- ODR_CONTEXT, 111, 1) &&
- odr_implicit(o, odr_visiblestring, &pp->implementationVersion,
- ODR_CONTEXT, 112, 1) &&
- z_UserInformationField(o, &pp->userInformationField, 1, 0) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_InitResponse(ODR o, Z_InitResponse **p, int opt, const char *name)
-{
- Z_InitResponse *pp;
-
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- pp = *p;
- return
- z_ReferenceId(o, &pp->referenceId, 1, 0) &&
- odr_implicit(o, odr_bitstring, &pp->protocolVersion,
- ODR_CONTEXT, 3, 0) &&
- odr_implicit(o, odr_bitstring, &pp->options, ODR_CONTEXT, 4, 0) &&
- odr_implicit(o, odr_integer, &pp->preferredMessageSize,
- ODR_CONTEXT, 5, 0) &&
- odr_implicit(o, odr_integer, &pp->maximumRecordSize,
- ODR_CONTEXT, 6, 0) &&
- odr_implicit(o, odr_bool, &pp->result, ODR_CONTEXT, 12, 0) &&
- odr_implicit(o, odr_visiblestring, &pp->implementationId,
- ODR_CONTEXT, 110, 1) &&
- odr_implicit(o, odr_visiblestring, &pp->implementationName,
- ODR_CONTEXT, 111, 1) &&
- odr_implicit(o, odr_visiblestring, &pp->implementationVersion,
- ODR_CONTEXT, 112, 1) &&
- z_UserInformationField(o, &pp->userInformationField, 1, 0) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-/* ------------------ RESOURCE CONTROL ----------------*/
-
-int z_TriggerResourceControlRequest(ODR o, Z_TriggerResourceControlRequest **p,
- int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_ReferenceId(o, &(*p)->referenceId, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->requestedAction, ODR_CONTEXT,
- 46, 0) &&
- odr_implicit(o, odr_oid, &(*p)->prefResourceReportFormat,
- ODR_CONTEXT, 47, 1) &&
- odr_implicit(o, odr_bool, &(*p)->resultSetWanted, ODR_CONTEXT,
- 48, 1) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_ResourceControlRequest(ODR o, Z_ResourceControlRequest **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_ReferenceId(o, &(*p)->referenceId, 1, 0) &&
- odr_implicit(o, odr_bool, &(*p)->suspendedFlag, ODR_CONTEXT, 39, 1)&&
- odr_explicit(o, z_External, &(*p)->resourceReport, ODR_CONTEXT,
- 40, 1) &&
- odr_implicit(o, odr_integer, &(*p)->partialResultsAvailable,
- ODR_CONTEXT, 41, 1) &&
- odr_implicit(o, odr_bool, &(*p)->responseRequired, ODR_CONTEXT,
- 42, 0) &&
- odr_implicit(o, odr_bool, &(*p)->triggeredRequestFlag,
- ODR_CONTEXT, 43, 1) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_ResourceControlResponse(ODR o, Z_ResourceControlResponse **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_ReferenceId(o, &(*p)->referenceId, 1, 0) &&
- odr_implicit(o, odr_bool, &(*p)->continueFlag, ODR_CONTEXT, 44, 0) &&
- odr_implicit(o, odr_bool, &(*p)->resultSetWanted, ODR_CONTEXT,
- 45, 1) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-/* ------------------------ SEARCH SERVICE ----------------------- */
-
-int z_DatabaseSpecificUnit(ODR o, Z_DatabaseSpecificUnit **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_DatabaseName(o, &(*p)->databaseName, 0, 0) &&
- z_ElementSetName(o, &(*p)->elementSetName, 0, 0) &&
- odr_sequence_end(o);
-}
-
-int z_DatabaseSpecific(ODR o, Z_DatabaseSpecific **p, int opt,
- const char *name)
-{
- if (o->direction == ODR_DECODE)
- *p = (Z_DatabaseSpecific *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
-
- odr_implicit_settag(o, ODR_CONTEXT, 1);
- if (odr_sequence_of(o, (Odr_fun)z_DatabaseSpecificUnit, &(*p)->elements,
- &(*p)->num_elements, 0))
- return 1;
- *p = 0;
- return 0;
-}
-
-int z_ElementSetNames(ODR o, Z_ElementSetNames **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_ElementSetNames_generic,
- z_ElementSetName, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ElementSetNames_databaseSpecific,
- (Odr_fun)z_DatabaseSpecific, 0},
- {-1, -1, -1, -1, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_ElementSetNames *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt && odr_ok(o);
-
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return 0;
-}
-
-/* ----------------------- RPN QUERY -----------------------*/
-
-int z_ComplexAttribute(ODR o, Z_ComplexAttribute **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit_settag(o, ODR_CONTEXT, 1) &&
- odr_sequence_of(o, (Odr_fun)z_StringOrNumeric, &(*p)->list,
- &(*p)->num_list, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 2) &&
- (odr_sequence_of(o, (Odr_fun)odr_integer, &(*p)->semanticAction,
- &(*p)->num_semanticAction, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_AttributeElement(ODR o, Z_AttributeElement **p, int opt,
- const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 121, Z_AttributeValue_numeric,
- (Odr_fun)odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 224, Z_AttributeValue_complex,
- (Odr_fun)z_ComplexAttribute, 0},
- {-1, -1, -1, -1, 0, 0}
- };
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_oid, &(*p)->attributeSet, ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, odr_integer, &(*p)->attributeType, ODR_CONTEXT,
- 120, 0) &&
- odr_choice(o, arm, &(*p)->value, &(*p)->which, 0) &&
- odr_sequence_end(o);
-}
-
-int z_Term(ODR o, Z_Term **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 45, Z_Term_general,
- (Odr_fun)odr_octetstring, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 215, Z_Term_numeric,
- (Odr_fun)odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 216, Z_Term_characterString,
- odr_visiblestring, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 217, Z_Term_oid, (Odr_fun)odr_oid, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 218, Z_Term_dateTime, odr_cstring, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 219, Z_Term_external,
- (Odr_fun) z_External, 0},
- /* add intUnit here */
- {ODR_IMPLICIT, ODR_CONTEXT, 221, Z_Term_null, (Odr_fun)odr_null, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction ==ODR_DECODE)
- *p = (Z_Term *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_AttributesPlusTerm(ODR o, Z_AttributesPlusTerm **p, int opt,
- const char *name)
-{
- if (!(odr_implicit_settag(o, ODR_CONTEXT, 102) &&
- odr_sequence_begin(o, p, sizeof(**p), 0)))
- return opt && odr_ok(o);
- return
- odr_implicit_settag(o, ODR_CONTEXT, 44) &&
- odr_sequence_of(o, (Odr_fun)z_AttributeElement, &(*p)->attributeList,
- &(*p)->num_attributes, 0) &&
- z_Term(o, &(*p)->term, 0, 0) &&
- odr_sequence_end(o);
-}
-
-int z_ResultSetPlusAttributes(ODR o, Z_ResultSetPlusAttributes **p, int opt,
- const char *name)
-{
- if (!(odr_implicit_settag(o, ODR_CONTEXT, 214) &&
- odr_sequence_begin(o, p, sizeof(**p), 0)))
- return opt && odr_ok(o);
- return
- z_ResultSetId(o, &(*p)->resultSet, 0, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 44) &&
- odr_sequence_of(o, (Odr_fun)z_AttributeElement, &(*p)->attributeList,
- &(*p)->num_attributes, 0) &&
- odr_sequence_end(o);
-}
-
-int z_ProximityOperator(ODR o, Z_ProximityOperator **p, int opt,
- const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ProxCode_known,
- (Odr_fun)odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_ProxCode_private,
- (Odr_fun)odr_integer, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_bool, &(*p)->exclusion, ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, odr_integer, &(*p)->distance, ODR_CONTEXT, 2, 0) &&
- odr_implicit(o, odr_bool, &(*p)->ordered, ODR_CONTEXT, 3, 0) &&
- odr_implicit(o, odr_integer, &(*p)->relationType, ODR_CONTEXT, 4, 0) &&
- odr_constructed_begin(o, &(*p)->proximityUnitCode,
- ODR_CONTEXT, 5, 0) &&
- odr_choice(o, arm, &(*p)->proximityUnitCode, &(*p)->which, 0) &&
- odr_constructed_end(o) &&
- odr_sequence_end(o);
-}
-
-int z_Operator(ODR o, Z_Operator **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_Operator_and, (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Operator_or, (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_Operator_and_not,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_Operator_prox,
- (Odr_fun)z_ProximityOperator, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!*p && o->direction != ODR_DECODE)
- return opt;
- if (!odr_constructed_begin(o, p, ODR_CONTEXT, 46, 0))
- return opt && odr_ok(o);
- if (o->direction == ODR_DECODE)
- *p = (Z_Operator *)odr_malloc(o, sizeof(**p));
-
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0) &&
- odr_constructed_end(o))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_Operand(ODR o, Z_Operand **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {-1, -1, -1, Z_Operand_APT, (Odr_fun)z_AttributesPlusTerm, 0},
- {-1, -1, -1, Z_Operand_resultSetId, (Odr_fun)z_ResultSetId, 0},
- {-1, -1, -1, Z_Operand_resultAttr,
- (Odr_fun)z_ResultSetPlusAttributes, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_Operand *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_RPNStructure(ODR o, Z_RPNStructure **p, int opt, const char *name);
-
-int z_Complex(ODR o, Z_Complex **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_RPNStructure(o, &(*p)->s1, 0, 0) &&
- z_RPNStructure(o, &(*p)->s2, 0, 0) &&
- z_Operator(o, &(*p)->roperator, 0, 0) &&
- odr_sequence_end(o);
-}
-
-int z_RPNStructure(ODR o, Z_RPNStructure **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_RPNStructure_simple,
- (Odr_fun)z_Operand, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_RPNStructure_complex,
- (Odr_fun)z_Complex, 0},
- {-1 -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_RPNStructure *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_RPNQuery(ODR o, Z_RPNQuery **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_oid(o, &(*p)->attributeSetId, 0, 0) &&
- z_RPNStructure(o, &(*p)->RPNStructure, 0, 0) &&
- odr_sequence_end(o);
-}
-
-/* -----------------------END RPN QUERY ----------------------- */
-
-int z_Query(ODR o, Z_Query **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Query_type_1,
- (Odr_fun)z_RPNQuery, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_Query_type_2,
- (Odr_fun)odr_octetstring, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 101, Z_Query_type_101,
- (Odr_fun)z_RPNQuery, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_Query *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_SearchRequest(ODR o, Z_SearchRequest **p, int opt, const char *name)
-{
- Z_SearchRequest *pp;
-
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- pp = *p;
- return
- z_ReferenceId(o, &pp->referenceId, 1, 0) &&
- odr_implicit(o, odr_integer, &pp->smallSetUpperBound, ODR_CONTEXT,
- 13, 0) &&
- odr_implicit(o, odr_integer, &pp->largeSetLowerBound, ODR_CONTEXT,
- 14, 0) &&
- odr_implicit(o, odr_integer, &pp->mediumSetPresentNumber, ODR_CONTEXT,
- 15, 0) &&
- odr_implicit(o, odr_bool, &pp->replaceIndicator, ODR_CONTEXT, 16, 1) &&
- odr_implicit(o, odr_visiblestring, &pp->resultSetName, ODR_CONTEXT,
- 17, 9) &&
- odr_implicit_settag(o, ODR_CONTEXT, 18) &&
- odr_sequence_of(o, z_DatabaseName, &pp->databaseNames,
- &pp->num_databaseNames, 0) &&
- odr_explicit(o, z_ElementSetNames, &pp->smallSetElementSetNames,
- ODR_CONTEXT, 100, 1) &&
- odr_explicit(o, z_ElementSetNames, &pp->mediumSetElementSetNames,
- ODR_CONTEXT, 101, 1) &&
- odr_implicit(o, odr_oid, &pp->preferredRecordSyntax,
- ODR_CONTEXT, 104, 1) &&
- odr_explicit(o, z_Query, &pp->query, ODR_CONTEXT, 21, 0) &&
- odr_implicit_tag(o, z_OtherInformation, &(*p)->additionalSearchInfo,
- ODR_CONTEXT, 203, 1, 0) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-/* ------------------------ RECORD ------------------------- */
-
-int z_DatabaseRecord(ODR o, Z_DatabaseRecord **p, int opt, const char *name)
-{
- return z_External(o, (Z_External **) p, opt, 0);
-}
-
-int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt,
- const char *name)
-{
- static Odr_arm arm[] =
- {
- {-1, -1, -1, Z_DiagForm_v2AddInfo, odr_visiblestring, 0},
- {-1, -1, -1, Z_DiagForm_v3AddInfo, z_InternationalString, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, ODR_VISIBLESTRING, Z_DiagForm_v2AddInfo,
- odr_visiblestring, 0}, /* To cater to a bug in the CNIDR servers */
- {-1, -1, -1, -1, 0, 0}
- };
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_oid(o, &(*p)->diagnosticSetId, 1, 0) && /* SHOULD NOT BE OPT! */
- odr_integer(o, &(*p)->condition, 0, 0) &&
- /*
- * I no longer recall what server tagged the addinfo.. but it isn't
- * hurting anyone, so...
- * We need to turn it into a choice, or something, because of
- * that damn generalstring in v3.
- */
- odr_choice(o, arm, &(*p)->addinfo, &(*p)->which, 0) &&
- odr_sequence_end(o);
-}
-
-int z_DiagRec(ODR o, Z_DiagRec **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {-1, -1, -1, Z_DiagRec_defaultFormat, (Odr_fun)z_DefaultDiagFormat, 0},
- {-1, -1, -1, Z_DiagRec_externallyDefined, (Odr_fun)z_External, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_DiagRec *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_DiagRecs(ODR o, Z_DiagRecs **p, int opt, const char *name)
-{
- if (o->direction == ODR_DECODE)
- *p = (Z_DiagRecs *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
-
- if (odr_sequence_of(o, (Odr_fun)z_DiagRec, &(*p)->diagRecs,
- &(*p)->num_diagRecs, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_NamePlusRecord(ODR o, Z_NamePlusRecord **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_EXPLICIT, ODR_CONTEXT, 1, Z_NamePlusRecord_databaseRecord,
- (Odr_fun)z_DatabaseRecord, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_NamePlusRecord_surrogateDiagnostic,
- (Odr_fun)z_DiagRec, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_DatabaseName, &(*p)->databaseName, ODR_CONTEXT,
- 0, 1) &&
- odr_constructed_begin(o, &(*p)->u, ODR_CONTEXT, 1, 0) &&
- odr_choice(o, arm, &(*p)->u, &(*p)->which, 0) &&
- odr_constructed_end(o) &&
- odr_sequence_end(o);
-}
-
-int z_NamePlusRecordList(ODR o, Z_NamePlusRecordList **p, int opt,
- const char *name)
-{
- if (o->direction == ODR_DECODE)
- *p = (Z_NamePlusRecordList *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_sequence_of(o, (Odr_fun)z_NamePlusRecord, &(*p)->records,
- &(*p)->num_records, 0))
- return 1;
- *p = 0;
- return 0;
-}
-
-int z_Records(ODR o, Z_Records **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 28, Z_Records_DBOSD,
- (Odr_fun)z_NamePlusRecordList, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 130, Z_Records_NSD,
- (Odr_fun)z_DiagRec, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 205, Z_Records_multipleNSD,
- (Odr_fun)z_DiagRecs, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_Records *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-/* ------------------------ ACCESS CTRL SERVICE ----------------------- */
-
-int z_AccessControlRequest(ODR o, Z_AccessControlRequest **p, int opt,
- const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 37, Z_AccessRequest_simpleForm,
- (Odr_fun)odr_octetstring, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_AccessRequest_externallyDefined,
- (Odr_fun)z_External, 0},
- {-1, -1, -1, -1, 0, 0}
- };
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_ReferenceId(o, &(*p)->referenceId, 1, 0) &&
- odr_choice(o, arm, &(*p)->u, &(*p)->which, 0) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_AccessControlResponse(ODR o, Z_AccessControlResponse **p, int opt,
- const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 38, Z_AccessResponse_simpleForm,
- (Odr_fun)odr_octetstring, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_AccessResponse_externallyDefined,
- (Odr_fun)z_External, 0},
- {-1, -1, -1, -1, 0, 0}
- };
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_ReferenceId(o, &(*p)->referenceId, 1, 0) &&
- odr_choice(o, arm, &(*p)->u, &(*p)->which, 0) &&
- odr_explicit(o, z_DiagRec, &(*p)->diagnostic, ODR_CONTEXT, 223, 1) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-/* ------------------------ SCAN SERVICE -------------------- */
-
-int z_AttributeList(ODR o, Z_AttributeList **p, int opt, const char *name)
-{
- if (o->direction == ODR_DECODE)
- *p = (Z_AttributeList *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
-
- odr_implicit_settag(o, ODR_CONTEXT, 44);
- if (odr_sequence_of(o, (Odr_fun)z_AttributeElement, &(*p)->attributes,
- &(*p)->num_attributes, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-/*
- * This is a temporary hack. We don't know just *what* old version of the
- * protocol willow uses, so we'll just patiently wait for them to update
- */
-static int willow_scan = 0;
-
-int z_WillowAttributesPlusTerm(ODR o, Z_AttributesPlusTerm **p, int opt,
- const char *name)
-{
- if (!*p && o->direction != ODR_DECODE)
- return opt;
- if (!odr_constructed_begin(o, p, ODR_CONTEXT, 4, 0))
- {
- o->t_class = -1;
- return opt && odr_ok(o);
- }
- if (!odr_constructed_begin(o, p, ODR_CONTEXT, 1, 0))
- return 0;
- if (!odr_constructed_begin(o, p, ODR_UNIVERSAL, ODR_SEQUENCE, 0))
- return 0;
- if (!odr_implicit_settag(o, ODR_CONTEXT, 44))
- return 0;
- if (o->direction == ODR_DECODE)
- *p = (Z_AttributesPlusTerm*)odr_malloc(o, sizeof(**p));
- if (!odr_sequence_of(o, (Odr_fun)z_AttributeElement, &(*p)->attributeList,
- &(*p)->num_attributes, 0))
- return 0;
- if (!odr_sequence_end(o) || !odr_sequence_end(o))
- return 0;
- if (!z_Term(o, &(*p)->term, 0, 0))
- return 0;
- if (!odr_constructed_end(o))
- return 0;
- willow_scan = 1;
- return 1;
-}
-
-int z_AlternativeTerm(ODR o, Z_AlternativeTerm **p, int opt, const char *name)
-{
- if (o->direction == ODR_DECODE)
- *p = (Z_AlternativeTerm *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- {
- o->t_class = -1;
- return opt && odr_ok(o);
- }
-
- if (odr_sequence_of(o, (Odr_fun)z_AttributesPlusTerm, &(*p)->terms,
- &(*p)->num_terms, 0))
- return 1;
- *p = 0;
- return opt && !o->error;
-}
-
-int z_ByDatabase(ODR o, Z_ByDatabase **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_DatabaseName(o, &(*p)->db, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->num, ODR_CONTEXT, 1, 1) &&
- z_OtherInformation(o, &(*p)->otherDbInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_ByDatabaseList(ODR o, Z_ByDatabaseList **p, int opt, const char *name)
-{
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_sequence_of(o, (Odr_fun)z_ByDatabase, &(*p)->elements,
- &(*p)->num_elements, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_ScanOccurrences(ODR o, Z_ScanOccurrences **p, int opt, const char *name)
-{
- Odr_arm arm[] =
- {
- {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_ScanOccurrences_global,
- (Odr_fun)odr_integer, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 3, Z_ScanOccurrences_byDatabase,
- (Odr_fun)z_ByDatabaseList, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_OccurrenceByAttributesElem(ODR o, Z_OccurrenceByAttributesElem **p,
- int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_explicit(o, z_AttributeList, &(*p)->attributes, ODR_CONTEXT,
- 1, 1) &&
- z_ScanOccurrences(o, &(*p)->occurrences, 1, 0) &&
- z_OtherInformation(o, &(*p)->otherOccurInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_OccurrenceByAttributes(ODR o, Z_OccurrenceByAttributes **p, int opt, const char *name)
-{
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (!odr_sequence_of(o, (Odr_fun)z_OccurrenceByAttributesElem,
- &(*p)->elements, &(*p)->num_elements, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_TermInfo(ODR o, Z_TermInfo **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- (willow_scan ?
- odr_implicit(o, z_Term, &(*p)->term, ODR_CONTEXT, 1, 0) :
- z_Term(o, &(*p)->term, 0, 0)) &&
- odr_implicit(o, z_InternationalString, &(*p)->displayTerm, ODR_CONTEXT,
- 0, 1) &&
- z_AttributeList(o, &(*p)->suggestedAttributes, 1, 0) &&
- odr_implicit(o, z_AlternativeTerm, &(*p)->alternativeTerm,
- ODR_CONTEXT, 4, 1) &&
- odr_implicit(o, odr_integer, &(*p)->globalOccurrences, ODR_CONTEXT,
- 2, 1) &&
- odr_implicit(o, z_OccurrenceByAttributes, &(*p)->byAttributes,
- ODR_CONTEXT, 3, 1) &&
- z_OtherInformation(o, &(*p)->otherTermInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_Entry(ODR o, Z_Entry **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Entry_termInfo,
- (Odr_fun)z_TermInfo, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_Entry_surrogateDiagnostic,
- (Odr_fun)z_DiagRec, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_Entry *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
-
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_ListEntries (ODR o, Z_ListEntries **p, int opt, const char *name)
-{
- if (!odr_sequence_begin (o, p, sizeof(**p), 0))
- return opt && odr_ok (o);
- return
- odr_implicit_settag (o, ODR_CONTEXT, 1) &&
- (odr_sequence_of(o, (Odr_fun) z_Entry, &(*p)->entries,
- &(*p)->num_entries, 0) || odr_ok(o)) &&
- odr_implicit_settag (o, ODR_CONTEXT, 2) &&
- (odr_sequence_of(o, (Odr_fun) z_DiagRec,
- &(*p)->nonsurrogateDiagnostics,
- &(*p)->num_nonsurrogateDiagnostics, 0)
- || odr_ok(o)) &&
- odr_sequence_end (o);
-}
-
-int z_ScanRequest(ODR o, Z_ScanRequest **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- willow_scan = 0;
- return
- z_ReferenceId(o, &(*p)->referenceId, 1, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 3) &&
- odr_sequence_of(o, z_DatabaseName, &(*p)->databaseNames,
- &(*p)->num_databaseNames, 0) &&
- odr_oid(o, &(*p)->attributeSet, 1, 0) &&
- (z_AttributesPlusTerm(o, &(*p)->termListAndStartPoint, 1, 0) ?
- ((*p)->termListAndStartPoint ? 1 :
- z_WillowAttributesPlusTerm(o, &(*p)->termListAndStartPoint, 0, 0))
- : 0) &&
- odr_implicit(o, odr_integer, &(*p)->stepSize, ODR_CONTEXT, 5, 1) &&
- odr_implicit(o, odr_integer, &(*p)->numberOfTermsRequested,
- ODR_CONTEXT, 6, 0) &&
- odr_implicit(o, odr_integer, &(*p)->preferredPositionInResponse,
- ODR_CONTEXT, 7, 1) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, "otherInfo") &&
- odr_sequence_end(o);
-}
-
-int z_ScanResponse(ODR o, Z_ScanResponse **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_ReferenceId(o, &(*p)->referenceId, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->stepSize, ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, odr_integer, &(*p)->scanStatus, ODR_CONTEXT, 4, 0) &&
- odr_implicit(o, odr_integer, &(*p)->numberOfEntriesReturned,
- ODR_CONTEXT, 5, 0) &&
- odr_implicit(o, odr_integer, &(*p)->positionOfTerm,
- ODR_CONTEXT, 6, 1) &&
- odr_implicit(o, z_ListEntries, &(*p)->entries, ODR_CONTEXT, 7, 1) &&
- odr_implicit(o, odr_oid, &(*p)->attributeSet, ODR_CONTEXT, 8, 1) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-/* ------------------------ SEARCHRESPONSE ----------------*/
-
-int z_NumberOfRecordsReturned(ODR o, int **p, int opt, const char *name)
-{
- return odr_implicit(o, odr_integer, p, ODR_CONTEXT, 24, opt);
-}
-
-int z_NextResultSetPosition(ODR o, int **p, int opt, const char *name)
-{
- return odr_implicit(o, odr_integer, p, ODR_CONTEXT, 25, opt);
-}
-
-int z_PresentStatus(ODR o, int **p, int opt, const char *name)
-{
- return odr_implicit(o, odr_integer, p, ODR_CONTEXT, 27, opt);
-}
-
-int z_SearchResponse(ODR o, Z_SearchResponse **p, int opt, const char *name)
-{
- Z_SearchResponse *pp;
-
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- pp = *p;
- return
- z_ReferenceId(o, &pp->referenceId, 1, 0) &&
- odr_implicit(o, odr_integer, &pp->resultCount, ODR_CONTEXT, 23, 0) &&
- z_NumberOfRecordsReturned(o, &pp->numberOfRecordsReturned, 0, 0) &&
- z_NextResultSetPosition(o, &pp->nextResultSetPosition, 0, 0) &&
- odr_implicit(o, odr_bool, &pp->searchStatus, ODR_CONTEXT, 22, 0) &&
- odr_implicit(o, odr_integer, &pp->resultSetStatus,
- ODR_CONTEXT, 26, 1) &&
- z_PresentStatus(o, &pp->presentStatus, 1, 0) &&
- z_Records(o, &pp->records, 1, 0) &&
- odr_implicit(o, z_OtherInformation, &(*p)->additionalSearchInfo,
- ODR_CONTEXT, 203, 1) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-/* --------------------- PRESENT SERVICE ---------------------- */
-
-int z_ElementSpec(ODR o, Z_ElementSpec **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ElementSpec_elementSetName,
- odr_visiblestring, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_ElementSpec_externalSpec,
- (Odr_fun)z_External, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_ElementSpec *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
-
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_Specification(ODR o, Z_Specification **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_oid, &(*p)->schema, ODR_CONTEXT, 1, 1) &&
- z_ElementSpec(o, &(*p)->elementSpec, 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_DbSpecific(ODR o, Z_DbSpecific **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_explicit(o, z_DatabaseName, &(*p)->databaseName, ODR_CONTEXT,
- 1, 0) &&
- odr_implicit(o, z_Specification, &(*p)->spec, ODR_CONTEXT, 2, 0) &&
- odr_sequence_end(o);
-}
-
-int z_CompSpec(ODR o, Z_CompSpec **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_bool, &(*p)->selectAlternativeSyntax, ODR_CONTEXT,
- 1, 0) &&
- odr_implicit(o, z_Specification, &(*p)->generic, ODR_CONTEXT, 2, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 3) &&
- (odr_sequence_of(o, (Odr_fun)z_DbSpecific, &(*p)->dbSpecific,
- &(*p)->num_dbSpecific, 0) || odr_ok(o)) &&
- odr_implicit_settag(o, ODR_CONTEXT, 4) &&
- (odr_sequence_of(o, (Odr_fun)odr_oid, &(*p)->recordSyntax,
- &(*p)->num_recordSyntax, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_RecordComposition(ODR o, Z_RecordComposition **p, int opt,
- const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_EXPLICIT, ODR_CONTEXT, 19, Z_RecordComp_simple,
- (Odr_fun)z_ElementSetNames, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 209, Z_RecordComp_complex,
- (Odr_fun)z_CompSpec, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_RecordComposition *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
-
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_Range(ODR o, Z_Range **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_integer, &(*p)->startingPosition,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->numberOfRecords,
- ODR_CONTEXT, 2, 0) &&
- odr_sequence_end(o);
-}
-
-int z_PresentRequest(ODR o, Z_PresentRequest **p, int opt, const char *name)
-{
- Z_PresentRequest *pp;
-
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- pp = *p;
- return
- z_ReferenceId(o, &pp->referenceId, 1, 0) &&
- z_ResultSetId(o, &pp->resultSetId, 0, 0) &&
- odr_implicit(o, odr_integer, &pp->resultSetStartPoint,
- ODR_CONTEXT, 30, 0) &&
- odr_implicit(o, odr_integer, &pp->numberOfRecordsRequested,
- ODR_CONTEXT, 29, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 212) &&
- (odr_sequence_of(o, (Odr_fun)z_Range, &(*p)->additionalRanges,
- &(*p)->num_ranges, 0) || odr_ok(o)) &&
- z_RecordComposition(o, &(*p)->recordComposition, 1, 0) &&
- odr_implicit(o, odr_oid, &(*p)->preferredRecordSyntax, ODR_CONTEXT,
- 104, 1) &&
- odr_implicit(o, odr_integer, &(*p)->maxSegmentCount, ODR_CONTEXT,
- 204, 1) &&
- odr_implicit(o, odr_integer, &(*p)->maxRecordSize, ODR_CONTEXT,
- 206, 1) &&
- odr_implicit(o, odr_integer, &(*p)->maxSegmentSize, ODR_CONTEXT,
- 207, 1) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_PresentResponse(ODR o, Z_PresentResponse **p, int opt, const char *name)
-{
- Z_PresentResponse *pp;
-
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- pp = *p;
- return
- z_ReferenceId(o, &pp->referenceId, 1, 0) &&
- z_NumberOfRecordsReturned(o, &pp->numberOfRecordsReturned, 0, 0) &&
- z_NextResultSetPosition(o, &pp->nextResultSetPosition, 0, 0) &&
- z_PresentStatus(o, &pp->presentStatus, 0, 0) &&
- z_Records(o, &pp->records, 1, 0) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-/* ----------------------DELETE -------------------------- */
-
-int z_DeleteSetStatus(ODR o, int **p, int opt, const char *name)
-{
- return odr_implicit(o, odr_integer, p, ODR_CONTEXT, 33, opt);
-}
-
-int z_ListStatus(ODR o, Z_ListStatus **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_ResultSetId(o, &(*p)->id, 0, 0) &&
- z_DeleteSetStatus(o, &(*p)->status, 0, 0) &&
- odr_sequence_end(o);
-}
-
-int z_DeleteResultSetRequest(ODR o, Z_DeleteResultSetRequest **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_ReferenceId(o, &(*p)->referenceId, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->deleteFunction, ODR_CONTEXT, 32,
- 0) &&
- (odr_sequence_of(o, z_ResultSetId, &(*p)->resultSetList,
- &(*p)->num_resultSetList, 0) || odr_ok(o)) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_ListStatuses (ODR o, Z_ListStatuses **p, int opt, const char *name)
-{
- if (!odr_initmember (o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_sequence_of (o, (Odr_fun) z_ListStatus, &(*p)->elements,
- &(*p)->num, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_DeleteResultSetResponse(ODR o, Z_DeleteResultSetResponse **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_ReferenceId(o, &(*p)->referenceId, 1, 0) &&
- odr_implicit(o, z_DeleteSetStatus, &(*p)->deleteOperationStatus,
- ODR_CONTEXT, 0, 0) &&
- odr_implicit (o, z_ListStatuses,
- &(*p)->deleteListStatuses, ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, odr_integer, &(*p)->numberNotDeleted, ODR_CONTEXT,
- 34, 1) &&
- odr_implicit (o, z_ListStatuses,
- &(*p)->bulkStatuses, ODR_CONTEXT, 35, 1) &&
- odr_implicit(o, odr_visiblestring, &(*p)->deleteMessage, ODR_CONTEXT,
- 36, 1) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-/* ------------------------ SEGMENT SERVICE -------------- */
-
-int z_Segment(ODR o, Z_Segment **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_ReferenceId(o, &(*p)->referenceId, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->numberOfRecordsReturned,
- ODR_CONTEXT, 24, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 0) &&
- odr_sequence_of(o, (Odr_fun)z_NamePlusRecord, &(*p)->segmentRecords,
- &(*p)->num_segmentRecords, 0) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-/* ------------------------ CLOSE SERVICE ---------------- */
-
-int z_Close(ODR o, Z_Close **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_ReferenceId(o, &(*p)->referenceId, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->closeReason, ODR_CONTEXT, 211, 0)
- &&
- odr_implicit(o, odr_visiblestring, &(*p)->diagnosticInformation,
- ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, odr_oid, &(*p)->resourceReportFormat, ODR_CONTEXT,
- 4, 1) &&
- odr_implicit(o, z_External, &(*p)->resourceReport, ODR_CONTEXT,
- 5, 1) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-/* ------------------------ APDU ------------------------- */
-
-int z_Permissions(ODR o, Z_Permissions **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->userId, ODR_CONTEXT,
- 1, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 2) &&
- odr_sequence_of(o, (Odr_fun)odr_integer, &(*p)->allowableFunctions,
- &(*p)->num_allowableFunctions, 0) &&
- odr_sequence_end(o);
-}
-
-int z_ExtendedServicesRequest(ODR o, Z_ExtendedServicesRequest **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_ReferenceId(o, &(*p)->referenceId, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->function, ODR_CONTEXT, 3, 0) &&
- odr_implicit(o, odr_oid, &(*p)->packageType, ODR_CONTEXT, 4, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->packageName,
- ODR_CONTEXT, 5, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->userId,
- ODR_CONTEXT, 6, 1) &&
- odr_implicit(o, z_IntUnit, &(*p)->retentionTime,
- ODR_CONTEXT, 7, 1) &&
- odr_implicit(o, z_Permissions, &(*p)->permissions,
- ODR_CONTEXT, 8, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->description,
- ODR_CONTEXT, 9, 1) &&
- odr_implicit(o, z_External, &(*p)->taskSpecificParameters,
- ODR_CONTEXT, 10, 1) &&
- odr_implicit(o, odr_integer, &(*p)->waitAction,
- ODR_CONTEXT, 11, 0) &&
- z_ElementSetName(o, &(*p)->elements, 1, 0) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_ExtendedServicesResponse(ODR o, Z_ExtendedServicesResponse **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_ReferenceId(o, &(*p)->referenceId, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->operationStatus, ODR_CONTEXT,
- 3, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 4) &&
- (odr_sequence_of(o, (Odr_fun)z_DiagRec, &(*p)->diagnostics,
- &(*p)->num_diagnostics, 0) || odr_ok(o)) &&
- odr_implicit(o, z_External, &(*p)->taskPackage, ODR_CONTEXT, 5, 1) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-/* ------------------------ SORT ------------------------- */
-
-int z_SortAttributes(ODR o, Z_SortAttributes **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_oid(o, &(*p)->id, 0, 0) &&
- z_AttributeList(o, &(*p)->list, 0, 0) &&
- odr_sequence_end(o);
-}
-
-int z_SortKey(ODR o, Z_SortKey **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_SortKey_sortField,
- z_InternationalString, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_SortKey_elementSpec,
- (Odr_fun)z_Specification, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_SortKey_sortAttributes,
- (Odr_fun)z_SortAttributes, 0},
- {-1, -1, -1, -1, 0}
- };
-
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_SortDbSpecific(ODR o, Z_SortDbSpecific **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_DatabaseName(o, &(*p)->databaseName, 0, 0) &&
- z_SortKey(o, &(*p)->dbSort, 0, 0) &&
- odr_sequence_end(o);
-}
-
-int z_SortDbSpecificList(ODR o, Z_SortDbSpecificList **p, int opt,
- const char *name)
-{
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_sequence_of(o, (Odr_fun)z_SortDbSpecific, &(*p)->dbSpecific,
- &(*p)->num_dbSpecific, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_SortElement(ODR o, Z_SortElement **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_EXPLICIT, ODR_CONTEXT, 1, Z_SortElement_generic,
- (Odr_fun)z_SortKey, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_SortElement_databaseSpecific,
- (Odr_fun)z_SortDbSpecificList, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_SortMissingValueAction(ODR o, Z_SortMissingValueAction **p, int opt,
- const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_SortMissingValAct_abort,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_SortMissingValAct_null,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_SortMissingValAct_valData,
- (Odr_fun)odr_octetstring, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_SortKeySpec(ODR o, Z_SortKeySpec **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_SortElement(o, &(*p)->sortElement, 0, 0) &&
- odr_implicit(o, odr_integer, &(*p)->sortRelation, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->caseSensitivity,
- ODR_CONTEXT, 2, 0) &&
- odr_explicit(o, z_SortMissingValueAction, &(*p)->missingValueAction,
- ODR_CONTEXT, 3, 1) &&
- odr_sequence_end(o);
-}
-
-int z_SortResponse(ODR o, Z_SortResponse **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_ReferenceId(o, &(*p)->referenceId, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->sortStatus, ODR_CONTEXT,
- 3, 0) &&
- odr_implicit(o, odr_integer, &(*p)->resultSetStatus, ODR_CONTEXT,
- 4, 1) &&
- odr_implicit(o, z_DiagRecs, &(*p)->diagnostics, ODR_CONTEXT, 5, 1) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_SortKeySpecList(ODR o, Z_SortKeySpecList **p, int opt, const char *name)
-{
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_sequence_of(o, (Odr_fun)z_SortKeySpec, &(*p)->specs,
- &(*p)->num_specs, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_SortRequest(ODR o, Z_SortRequest **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_ReferenceId(o, &(*p)->referenceId, 1, 0) &&
- odr_implicit(o, z_StringList, &(*p)->inputResultSetNames,
- ODR_CONTEXT, 3, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->sortedResultSetName,
- ODR_CONTEXT, 4, 0) &&
- odr_implicit(o, z_SortKeySpecList, &(*p)->sortSequence, ODR_CONTEXT,
- 5, 0) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-/* ---------------------- Resource Report ---------------- */
-
-int z_ResourceReportRequest(ODR o, Z_ResourceReportRequest **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_ReferenceId(o, &(*p)->referenceId, 1, 0) &&
- 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, 0) &&
- odr_sequence_end(o);
-}
-
-int z_ResourceReportResponse(ODR o, Z_ResourceReportResponse **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- z_ReferenceId(o, &(*p)->referenceId, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->resourceReportStatus,
- ODR_CONTEXT, 50, 0) &&
- odr_explicit(o, z_External, &(*p)->resourceReport, ODR_CONTEXT,
- 51, 1) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-/* ------------------------ APDU ------------------------- */
-
-int z_APDU(ODR o, Z_APDU **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 20, Z_APDU_initRequest,
- (Odr_fun)z_InitRequest, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 21, Z_APDU_initResponse,
- (Odr_fun)z_InitResponse, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 22, Z_APDU_searchRequest,
- (Odr_fun)z_SearchRequest, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 23, Z_APDU_searchResponse,
- (Odr_fun)z_SearchResponse, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 24, Z_APDU_presentRequest,
- (Odr_fun)z_PresentRequest, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 25, Z_APDU_presentResponse,
- (Odr_fun)z_PresentResponse, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 26, Z_APDU_deleteResultSetRequest,
- (Odr_fun)z_DeleteResultSetRequest, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 27, Z_APDU_deleteResultSetResponse,
- (Odr_fun)z_DeleteResultSetResponse, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 28, Z_APDU_accessControlRequest,
- (Odr_fun)z_AccessControlRequest, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 29, Z_APDU_accessControlResponse,
- (Odr_fun)z_AccessControlResponse, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 30, Z_APDU_resourceControlRequest,
- (Odr_fun)z_ResourceControlRequest, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 31, Z_APDU_resourceControlResponse,
- (Odr_fun)z_ResourceControlResponse, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 32, Z_APDU_triggerResourceControlRequest,
- (Odr_fun)z_TriggerResourceControlRequest, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 33, Z_APDU_resourceReportRequest,
- (Odr_fun)z_ResourceReportRequest, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 34, Z_APDU_resourceReportResponse,
- (Odr_fun)z_ResourceReportResponse, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 35, Z_APDU_scanRequest,
- (Odr_fun)z_ScanRequest, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 36, Z_APDU_scanResponse,
- (Odr_fun)z_ScanResponse, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 43, Z_APDU_sortRequest,
- (Odr_fun)z_SortRequest, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 44, Z_APDU_sortResponse,
- (Odr_fun)z_SortResponse, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 45, Z_APDU_segmentRequest,
- (Odr_fun)z_Segment, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 46, Z_APDU_extendedServicesRequest,
- (Odr_fun)z_ExtendedServicesRequest, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 47, Z_APDU_extendedServicesResponse,
- (Odr_fun)z_ExtendedServicesResponse},
- {ODR_IMPLICIT, ODR_CONTEXT, 48, Z_APDU_close,
- (Odr_fun)z_Close, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_APDU *)odr_malloc(o, sizeof(**p));
- odr_setlenlen(o, 5);
- if (!odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
- {
- if (o->direction == ODR_DECODE)
- *p = 0;
- return opt && odr_ok(o);
- }
- return 1;
-}
+++ /dev/null
-/*
- * Copyright (c) 1995-1999, Index Data.
- * See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Log: prt-acc.c,v $
- * Revision 1.9 1999-11-30 13:47:11 adam
- * Improved installation. Moved header files to include/yaz.
- *
- * Revision 1.8 1999/04/20 09:56:47 adam
- * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
- * Modified all encoders/decoders to reflect this change.
- *
- * Revision 1.7 1998/02/11 11:53:32 adam
- * Changed code so that it compiles as C++.
- *
- * Revision 1.6 1998/01/05 09:04:57 adam
- * Fixed bugs in encoders/decoders - Not operator (!) missing.
- *
- * Revision 1.5 1995/09/29 17:11:53 quinn
- * Smallish
- *
- * Revision 1.4 1995/09/27 15:02:41 quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.3 1995/08/15 11:59:41 quinn
- * Updated External
- *
- * Revision 1.2 1995/06/05 10:52:05 quinn
- * Fixed some negligences.
- *
- * Revision 1.1 1995/06/02 09:49:15 quinn
- * Adding access control
- *
- *
- */
-
-#include <yaz/proto.h>
-
-int z_Encryption1(ODR o, Z_Encryption1 **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_octetstring, &(*p)->cryptType,
- ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, odr_octetstring, &(*p)->credential,
- ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, odr_octetstring, &(*p)->data, ODR_CONTEXT, 3, 0) &&
- odr_sequence_end(o);
-}
-
-int z_EnumeratedPrompt1(ODR o, Z_EnumeratedPrompt1 **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_integer, &(*p)->type, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, odr_visiblestring, &(*p)->suggestedString, ODR_CONTEXT,
- 2, 1) &&
- odr_sequence_end(o);
-}
-
-int z_PromptId1(ODR o, Z_PromptId1 **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_PromptId1_enumeratedPrompt,
- (Odr_fun)z_EnumeratedPrompt1, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_PromptId1_nonEnumeratedPrompt,
- odr_visiblestring, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_PromptId1 *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_PromptInfo1(ODR o, Z_PromptInfo1 **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Challenge1_character,
- odr_visiblestring, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_Challenge1_encrypted,
- (Odr_fun)z_Encryption1, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_PromptInfo1 *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_ChallengeUnit1(ODR o, Z_ChallengeUnit1 **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_explicit(o, z_PromptId1, &(*p)->promptId, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, odr_visiblestring, &(*p)->defaultResponse,
- ODR_CONTEXT, 2, 1) &&
- odr_explicit(o, z_PromptInfo1, &(*p)->promptInfo,
- ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, odr_visiblestring, &(*p)->regExpr,
- ODR_CONTEXT, 4, 1) &&
- odr_implicit(o, odr_null, &(*p)->responseRequired,
- ODR_CONTEXT, 5, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 6) &&
- (odr_sequence_of(o, odr_visiblestring, &(*p)->allowedValues,
- &(*p)->num_values, 0) || odr_ok(o)) &&
- odr_implicit(o, odr_null, &(*p)->shouldSave, ODR_CONTEXT, 7, 1) &&
- odr_implicit(o, odr_integer, &(*p)->dataType, ODR_CONTEXT, 8, 1) &&
- odr_implicit(o, z_External, &(*p)->diagnostic, ODR_CONTEXT, 9, 1) &&
- odr_sequence_end(o);
-}
-
-int z_Challenge1(ODR o, Z_Challenge1 **p, int opt, const char *name)
-{
- if (o->direction == ODR_ENCODE)
- *p = (Z_Challenge1 *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_sequence_of(o, (Odr_fun)z_ChallengeUnit1, &(*p)->list,
- &(*p)->num_challenges, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_ResponseUnit1(ODR o, Z_ResponseUnit1 **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Response1_string,
- odr_visiblestring, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_Response1_accept,
- (Odr_fun)odr_bool, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_Response1_acknowledge,
- (Odr_fun)odr_null, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 4, Z_Response1_diagnostic,
- (Odr_fun)z_DiagRec, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 5, Z_Response1_encrypted,
- (Odr_fun)z_Encryption1, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_explicit(o, z_PromptId1, &(*p)->promptId, ODR_CONTEXT, 1, 0) &&
- odr_constructed_begin(o, p, ODR_CONTEXT, 2, 0) &&
- odr_choice(o, arm, &(*p)->u, &(*p)->which, 0) &&
- odr_constructed_end(o) &&
- odr_sequence_end(o);
-}
-
-int z_Response1(ODR o, Z_Response1 **p, int opt, const char *name)
-{
- if (o->direction == ODR_ENCODE)
- *p = (Z_Response1 *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_sequence_of(o, (Odr_fun)z_ResponseUnit1, &(*p)->list,
- &(*p)->num_responses, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_PromptObject1(ODR o, Z_PromptObject1 **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_PromptObject1_challenge,
- (Odr_fun)z_Challenge1, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_PromptObject1_response,
- (Odr_fun)z_Response1, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_PromptObject1 *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
+++ /dev/null
-/*
- * Copyright (c) 1995, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: prt-acc.h,v $
- * Revision 1.1 2000-10-03 12:55:50 adam
- * Removed several auto-generated files from CVS.
- *
- * Revision 1.1 1999/11/30 13:47:11 adam
- * Improved installation. Moved header files to include/yaz.
- *
- * Revision 1.9 1999/04/20 09:56:48 adam
- * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
- * Modified all encoders/decoders to reflect this change.
- *
- * Revision 1.8 1997/09/01 08:49:51 adam
- * New windows NT/95 port using MSV5.0. To export DLL functions the
- * YAZ_EXPORT modifier was added. Defined in yconfig.h.
- *
- * Revision 1.7 1997/05/14 06:53:46 adam
- * C++ support.
- *
- * Revision 1.6 1996/01/02 08:57:35 quinn
- * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
- *
- * Revision 1.5 1995/09/29 17:12:09 quinn
- * Smallish
- *
- * Revision 1.4 1995/09/27 15:02:49 quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.3 1995/08/17 12:45:16 quinn
- * Fixed minor problems with GRS-1. Added support in c&s.
- *
- * Revision 1.2 1995/08/15 12:00:13 quinn
- * Updated External
- *
- * Revision 1.1 1995/06/02 09:49:49 quinn
- * Add access control
- *
- *
- */
-
-#ifndef PRT_ACC_H
-#define PRT_ACC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct Z_Encryption1
-{
- Odr_oct *cryptType; /* OPTIONAL */
- Odr_oct *credential; /* OPTIONAL */
- Odr_oct *data;
-} Z_Encryption1;
-
-typedef struct Z_EnumeratedPrompt1
-{
- int *type;
-#define Z_Prompt1_groupId 0
-#define Z_Prompt1_userId 1
-#define Z_Prompt1_password 2
-#define Z_Prompt1_newPassword 3
-#define Z_Prompt1_copyright 4
- char *suggestedString; /* OPTIONAL */
-} Z_EnumeratedPrompt1;
-
-typedef struct Z_PromptId1
-{
- int which;
-#define Z_PromptId1_enumeratedPrompt 0
-#define Z_PromptId1_nonEnumeratedPrompt 1
- union
- {
- Z_EnumeratedPrompt1 *enumeratedPrompt;
- char *nonEnumeratedPrompt;
- } u;
-} Z_PromptId1;
-
-typedef struct Z_PromptInfo1
-{
- int which;
-#define Z_Challenge1_character 0
-#define Z_Challenge1_encrypted 1
- union
- {
- char *character;
- Z_Encryption1 *encrypted;
- } u;
-} Z_PromptInfo1;
-
-typedef struct Z_ChallengeUnit1
-{
- Z_PromptId1 *promptId;
- char *defaultResponse; /* OPTIONAL */
- Z_PromptInfo1 *promptInfo; /* OPTIONAL */
- char *regExpr; /* OPTIONAL */
- Odr_null *responseRequired; /* OPTIONAL */
- int num_values;
- char **allowedValues; /* OPTIONAL */
- Odr_null *shouldSave; /* OPTIONAL */
- int *dataType; /* OPTIONAL */
-#define Z_ChalDataType_integer 1
-#define Z_ChalDataType_date 2
-#define Z_ChalDataType_float 3
-#define Z_ChalDataType_alphaNumeric 4
-#define Z_ChalDataType_urlUrn 5
-#define Z_ChalDataType_boolean 6
- Z_External *diagnostic; /* OPTIONAL */
-} Z_ChallengeUnit1;
-
-typedef struct Z_Challenge1
-{
- int num_challenges;
- Z_ChallengeUnit1 **list;
-} Z_Challenge1;
-
-typedef struct Z_ResponseUnit1
-{
- Z_PromptId1 *promptId;
- int which;
-#define Z_Response1_string 0
-#define Z_Response1_accept 1
-#define Z_Response1_acknowledge 2
-#define Z_Response1_diagnostic 3
-#define Z_Response1_encrypted 4
- union
- {
- char *string;
- bool_t *accept;
- Odr_null *acknowledge;
- Z_DiagRec *diagnostic;
- Z_Encryption1 *encrypted;
- } u;
-} Z_ResponseUnit1;
-
-typedef struct Z_Response1
-{
- int num_responses;
- Z_ResponseUnit1 **list;
-} Z_Response1;
-
-typedef struct Z_PromptObject1
-{
- int which;
-#define Z_PromptObject1_challenge 0
-#define Z_PromptObject1_response 1
- union
- {
- Z_Challenge1 *challenge;
- Z_Response1 *response;
- } u;
-} Z_PromptObject1;
-
-YAZ_EXPORT int z_PromptObject1(ODR o, Z_PromptObject1 **p, int opt,
- const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-/*
- * Copyright (c) 1995-1999, Index Data
- * See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Log: prt-add.c,v $
- * Revision 1.6 1999-11-30 13:47:11 adam
- * Improved installation. Moved header files to include/yaz.
- *
- * Revision 1.5 1999/04/20 09:56:47 adam
- * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
- * Modified all encoders/decoders to reflect this change.
- *
- * Revision 1.4 1998/02/11 11:53:32 adam
- * Changed code so that it compiles as C++.
- *
- * Revision 1.3 1998/01/05 09:04:57 adam
- * Fixed bugs in encoders/decoders - Not operator (!) missing.
- *
- * Revision 1.2 1997/04/30 08:52:02 quinn
- * Null
- *
- * Revision 1.1 1996/10/10 11:52:18 quinn
- * Added SearchResult additionalInfo
- *
- *
- */
-
-#include <yaz/proto.h>
-
-int z_ResultsByDBList (ODR o, Z_ResultsByDBList **p, int opt, const char *name)
-{
- if (!odr_initmember (o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_sequence_of (o, z_DatabaseName, &(*p)->elements,
- &(*p)->num, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_ResultsByDB_elem (ODR o, Z_ResultsByDB_elem **p, int opt,
- const char *name)
-{
- static Odr_arm arm[] = {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ResultsByDB_all,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_ResultsByDB_list,
- (Odr_fun)z_ResultsByDBList, 0},
- {-1, -1, -1, -1, 0, 0}
- };
- if (!odr_sequence_begin (o, p, sizeof(**p), 0))
- return opt && odr_ok (o);
- return
- odr_constructed_begin (o, &(*p)->u, ODR_CONTEXT, 1, 0) &&
- odr_choice (o, arm, &(*p)->u, &(*p)->which, 0) &&
- odr_constructed_end (o) &&
- odr_implicit (o, odr_integer,
- &(*p)->count, ODR_CONTEXT, 2, 1) &&
- odr_implicit (o, z_InternationalString,
- &(*p)->resultSetName, ODR_CONTEXT, 3, 1) &&
- odr_sequence_end (o);
-}
-
-int z_ResultsByDB (ODR o, Z_ResultsByDB **p, int opt, const char *name)
-{
- if (!odr_initmember (o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_sequence_of (o, (Odr_fun)z_ResultsByDB_elem, &(*p)->elements,
- &(*p)->num, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_QueryExpressionTerm (ODR o, Z_QueryExpressionTerm **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin (o, p, sizeof(**p), 0))
- return opt && odr_ok (o);
- return
- odr_explicit (o, z_Term,
- &(*p)->queryTerm, ODR_CONTEXT, 1, 0) &&
- odr_implicit (o, z_InternationalString,
- &(*p)->termComment, ODR_CONTEXT, 2, 1) &&
- odr_sequence_end (o);
-}
-
-int z_QueryExpression (ODR o, Z_QueryExpression **p, int opt,
- const char *name)
-{
- static Odr_arm arm[] = {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_QueryExpression_term,
- (Odr_fun)z_QueryExpressionTerm, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_QueryExpression_query,
- (Odr_fun)z_Query, 0},
- {-1, -1, -1, -1, 0, 0}
- };
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_SearchInfoReport_elem (ODR o, Z_SearchInfoReport_elem **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin (o, p, sizeof(**p), 0))
- return opt && odr_ok (o);
- return
- odr_implicit (o, z_InternationalString,
- &(*p)->subqueryId, ODR_CONTEXT, 1, 1) &&
- odr_implicit (o, odr_bool,
- &(*p)->fullQuery, ODR_CONTEXT, 2, 0) &&
- odr_explicit (o, z_QueryExpression,
- &(*p)->subqueryExpression, ODR_CONTEXT, 3, 1) &&
- odr_explicit (o, z_QueryExpression,
- &(*p)->subqueryInterpretation, ODR_CONTEXT, 4, 1) &&
- odr_explicit (o, z_QueryExpression,
- &(*p)->subqueryRecommendation, ODR_CONTEXT, 5, 1) &&
- odr_implicit (o, odr_integer,
- &(*p)->subqueryCount, ODR_CONTEXT, 6, 1) &&
- odr_implicit (o, z_IntUnit,
- &(*p)->subqueryWeight, ODR_CONTEXT, 7, 1) &&
- odr_implicit (o, z_ResultsByDB,
- &(*p)->resultsByDB, ODR_CONTEXT, 8, 1) &&
- odr_sequence_end (o);
-}
-
-int z_SearchInfoReport (ODR o, Z_SearchInfoReport **p, int opt,
- const char *name)
-{
- if (!odr_initmember (o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_sequence_of (o, (Odr_fun)z_SearchInfoReport_elem, &(*p)->elements,
- &(*p)->num, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
+++ /dev/null
-/*
- * Copyright (c) 1995, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: prt-add.h,v $
- * Revision 1.1 2000-10-03 12:55:50 adam
- * Removed several auto-generated files from CVS.
- *
- * Revision 1.1 1999/11/30 13:47:11 adam
- * Improved installation. Moved header files to include/yaz.
- *
- * Revision 1.4 1999/04/20 09:56:48 adam
- * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
- * Modified all encoders/decoders to reflect this change.
- *
- * Revision 1.3 1997/05/14 06:53:46 adam
- * C++ support.
- *
- * Revision 1.2 1997/04/30 08:52:09 quinn
- * Null
- *
- * Revision 1.1 1996/10/10 11:51:58 quinn
- * Added SerchResult additional info
- *
- *
- */
-
-#ifndef PRT_ADD_H
-#define PRT_ADD_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct Z_QueryExpressionTerm
-{
- Z_Term *queryTerm;
- char *termComment; /* OPTIONAL */
-} Z_QueryExpressionTerm;
-
-typedef struct Z_QueryExpression
-{
- int which;
-#define Z_QueryExpression_term 1
-#define Z_QueryExpression_query 2
- union {
- Z_QueryExpressionTerm *term;
- Z_Query *query;
- } u;
-} Z_QueryExpression;
-
-typedef struct Z_ResultsByDBList
-{
- int num;
- Z_DatabaseName **elements;
-} Z_ResultsByDBList;
-
-typedef struct Z_ResultsByDB_elem
-{
- int which;
-#define Z_ResultsByDB_all 1
-#define Z_ResultsByDB_list 2
- union {
- Odr_null *all;
- Z_ResultsByDBList *list;
- } u;
- int *count; /* OPTIONAL */
- char *resultSetName; /* OPTIONAL */
-} Z_ResultsByDB_elem;
-
-typedef struct Z_ResultsByDB
-{
- int num;
- Z_ResultsByDB_elem **elements;
-} Z_ResultsByDB;
-
-typedef struct Z_SearchInfoReport_elem
-{
- char *subqueryId; /* OPTIONAL */
- bool_t *fullQuery;
- Z_QueryExpression *subqueryExpression; /* OPTIONAL */
- Z_QueryExpression *subqueryInterpretation; /* OPTIONAL */
- Z_QueryExpression *subqueryRecommendation; /* OPTIONAL */
- int *subqueryCount; /* OPTIONAL */
- Z_IntUnit *subqueryWeight; /* OPTIONAL */
- Z_ResultsByDB *resultsByDB; /* OPTIONAL */
-} Z_SearchInfoReport_elem;
-
-typedef struct Z_SearchInfoReport
-{
- int num;
- Z_SearchInfoReport_elem **elements;
-} Z_SearchInfoReport;
-
-int z_SearchInfoReport (ODR o, Z_SearchInfoReport **p, int opt,
- const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-/*
- * Copyright (c) 1995-1999, Index Data.
- * See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Log: prt-arc.c,v $
- * Revision 1.4 1999-11-30 13:47:11 adam
- * Improved installation. Moved header files to include/yaz.
- *
- * Revision 1.3 1999/04/20 09:56:47 adam
- * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
- * Modified all encoders/decoders to reflect this change.
- *
- * Revision 1.2 1998/02/11 11:53:32 adam
- * Changed code so that it compiles as C++.
- *
- * Revision 1.1 1996/06/10 08:55:20 quinn
- * Added Summary, OPAC
- *
- *
- */
-
-#include <yaz/proto.h>
-
-/* ----------------------- Summary Record --------------- */
-
-int z_FormatSpec(ODR o, Z_FormatSpec **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->type,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->size, ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, odr_integer, &(*p)->bestPosn, ODR_CONTEXT, 3, 1) &&
- odr_sequence_end(o);
-}
-
-int z_BriefBib(ODR o, Z_BriefBib **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->title,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->author,
- ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->callNumber,
- ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->recordType,
- ODR_CONTEXT, 4, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->bibliographicLevel,
- ODR_CONTEXT, 5, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 6) &&
- (odr_sequence_of(o, (Odr_fun)z_FormatSpec, &(*p)->format,
- &(*p)->num_format, 0) ||
- odr_ok(o)) &&
- odr_implicit(o, z_InternationalString, &(*p)->publicationPlace,
- ODR_CONTEXT, 7, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->publicationDate,
- ODR_CONTEXT, 8, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->targetSystemKey,
- ODR_CONTEXT, 9, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->satisfyingElement,
- ODR_CONTEXT, 10, 1) &&
- odr_implicit(o, odr_integer, &(*p)->rank,
- ODR_CONTEXT, 11, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->documentId,
- ODR_CONTEXT, 12, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->abstract,
- ODR_CONTEXT, 13, 1) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-/* ----------------------- Summary Record --------------- */
-
-int z_CircRecord(ODR o, Z_CircRecord **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_bool, &(*p)->availableNow, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->availabilityDate,
- ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->availableThru,
- ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->restrictions,
- ODR_CONTEXT, 4, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->itemId,
- ODR_CONTEXT, 5, 1) &&
- odr_implicit(o, odr_bool, &(*p)->renewable, ODR_CONTEXT, 6, 0) &&
- odr_implicit(o, odr_bool, &(*p)->onHold, ODR_CONTEXT, 7, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->enumAndChron,
- ODR_CONTEXT, 8, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->midspine,
- ODR_CONTEXT, 9, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->temporaryLocation,
- ODR_CONTEXT, 10, 1) &&
- odr_sequence_end(o);
-}
-
-int z_Volume(ODR o, Z_Volume **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->enumeration,
- ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->chronology,
- ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->enumAndChron,
- ODR_CONTEXT, 3, 1) &&
- odr_sequence_end(o);
-}
-
-int z_HoldingsAndCircData(ODR o, Z_HoldingsAndCircData **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->typeOfRecord,
- ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->encodingLevel,
- ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->format,
- ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->receiptAcqStatus,
- ODR_CONTEXT, 4, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->generalRetention,
- ODR_CONTEXT, 5, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->completeness,
- ODR_CONTEXT, 6, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->dateOfReport,
- ODR_CONTEXT, 7, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->nucCode,
- ODR_CONTEXT, 8, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->localLocation,
- ODR_CONTEXT, 9, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->shelvingLocation,
- ODR_CONTEXT, 10, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->callNumber,
- ODR_CONTEXT, 11, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->shelvingData,
- ODR_CONTEXT, 12, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->copyNumber,
- ODR_CONTEXT, 13, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->publicNote,
- ODR_CONTEXT, 14, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->reproductionNote,
- ODR_CONTEXT, 15, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->termsUseRepro,
- ODR_CONTEXT, 16, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->enumAndChron,
- ODR_CONTEXT, 17, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 18) &&
- (odr_sequence_of(o, (Odr_fun)z_Volume, &(*p)->volumes,
- &(*p)->num_volumes, 0) ||
- odr_ok(o)) &&
- odr_implicit_settag(o, ODR_CONTEXT, 19) &&
- (odr_sequence_of(o, (Odr_fun)z_CircRecord, &(*p)->circulationData,
- &(*p)->num_circulationData, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_HoldingsRecord(ODR o, Z_HoldingsRecord **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_HoldingsRecord_marcHoldingsRecord,
- (Odr_fun)z_External, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_HoldingsRecord_holdingsAndCirc,
- (Odr_fun)z_HoldingsAndCircData, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_OPACRecord(ODR o, Z_OPACRecord **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_External, &(*p)->bibliographicRecord,
- ODR_CONTEXT, 1, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 2) &&
- (odr_sequence_of(o, (Odr_fun)z_HoldingsRecord, &(*p)->holdingsData,
- &(*p)->num_holdingsData, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
+++ /dev/null
-/*
- * Copyright (c) 1995,1996 Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- */
-
-#ifndef PRT_ARC_H
-#define PRT_ARC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* ------------------- Summary Record --------------------- */
-
-typedef struct Z_FormatSpec
-{
- char *type;
- int *size; /* OPTIONAL */
- int *bestPosn; /* OPTIONAL */
-} Z_FormatSpec;
-
-typedef struct Z_BriefBib
-{
- char *title;
- char *author; /* OPTIONAL */
- char *callNumber; /* OPTIONAL */
- char *recordType; /* OPTIONAL */
- char *bibliographicLevel; /* OPTIONAL */
- int num_format;
- Z_FormatSpec **format; /* OPTIONAL */
- char *publicationPlace; /* OPTIONAL */
- char *publicationDate; /* OPTIONAL */
- char *targetSystemKey; /* OPTIONAL */
- char *satisfyingElement; /* OPTIONAL */
- int *rank; /* OPTIONAL */
- char *documentId; /* OPTIONAL */
- char *abstract; /* OPTIONAL */
- Z_OtherInformation *otherInfo; /* OPTIONAL */
-} Z_BriefBib;
-
-/* ------------------- OPAC Record --------------------- */
-
-typedef struct Z_CircRecord
-{
- bool_t *availableNow;
- char *availabilityDate; /* OPTIONAL */
- char *availableThru; /* OPTIONAL */
- char *restrictions; /* OPTIONAL */
- char *itemId; /* OPTIONAL */
- bool_t *renewable;
- bool_t *onHold;
- char *enumAndChron; /* OPTIONAL */
- char *midspine; /* OPTIONAL */
- char *temporaryLocation; /* OPTIONAL */
-} Z_CircRecord;
-
-typedef struct Z_Volume
-{
- char *enumeration; /* OPTIONAL */
- char *chronology; /* OPTIONAL */
- char *enumAndChron; /* OPTIONAL */
-} Z_Volume;
-
-typedef struct Z_HoldingsAndCircData
-{
- char *typeOfRecord; /* OPTIONAL */
- char *encodingLevel; /* OPTIONAL */
- char *format; /* OPTIONAL */
- char *receiptAcqStatus; /* OPTIONAL */
- char *generalRetention; /* OPTIONAL */
- char *completeness; /* OPTIONAL */
- char *dateOfReport; /* OPTIONAL */
- char *nucCode; /* OPTIONAL */
- char *localLocation; /* OPTIONAL */
- char *shelvingLocation; /* OPTIONAL */
- char *callNumber; /* OPTIONAL */
- char *shelvingData; /* OPTIONAL */
- char *copyNumber; /* OPTIONAL */
- char *publicNote; /* OPTIONAL */
- char *reproductionNote; /* OPTIONAL */
- char *termsUseRepro; /* OPTIONAL */
- char *enumAndChron; /* OPTIONAL */
- int num_volumes;
- Z_Volume **volumes; /* OPTIONAL */
- int num_circulationData;
- Z_CircRecord **circulationData;/* OPTIONAL */
-} Z_HoldingsAndCircData;
-
-typedef struct Z_HoldingsRecord
-{
- int which;
-#define Z_HoldingsRecord_marcHoldingsRecord 0
-#define Z_HoldingsRecord_holdingsAndCirc 1
- union
- {
- Z_External *marcHoldingsRecord;
- Z_HoldingsAndCircData *holdingsAndCirc;
- } u;
-} Z_HoldingsRecord;
-
-typedef struct Z_OPACRecord
-{
- Z_External *bibliographicRecord; /* OPTIONAL */
- int num_holdingsData;
- Z_HoldingsRecord **holdingsData; /* OPTIONAL */
-} Z_OPACRecord;
-
-YAZ_EXPORT int z_BriefBib(ODR o, Z_BriefBib **p, int opt, const char *name);
-YAZ_EXPORT int z_OPACRecord(ODR o, Z_OPACRecord **p, int opt,
- const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-/*
- * This file is part of the YAZ toolkit:
- * Copyright (c) 1998-1999, Index Data.
- * See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * Contribution by Ronald van Der Meer (RVDM):
- * Databasix Information Systems B.V., Utrecht, The Netherlands.
- *
- * $Log: prt-dat.c,v $
- * Revision 1.4 1999-11-30 13:47:11 adam
- * Improved installation. Moved header files to include/yaz.
- *
- * Revision 1.3 1999/04/20 09:56:47 adam
- * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
- * Modified all encoders/decoders to reflect this change.
- *
- * Revision 1.2 1998/02/11 11:53:32 adam
- * Changed code so that it compiles as C++.
- *
- * Revision 1.1 1998/02/10 15:31:46 adam
- * Implemented date and time structure. Changed the Update Extended
- * Service.
- *
- */
-
-#include <yaz/proto.h>
-
-int z_MonthAndDay(ODR o, Z_MonthAndDay **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_integer, &(*p)->month, ODR_CONTEXT, 2, 0) &&
- odr_implicit(o, odr_integer, &(*p)->day, ODR_CONTEXT, 3, 1) &&
- odr_sequence_end(o);
-}
-
-int z_Quarter(ODR o, Z_Quarter **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Quarter_first,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_Quarter_second,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_Quarter_third,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_Quarter_fourth,
- (Odr_fun)odr_null, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_Season(ODR o, Z_Season **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Season_winter,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_Season_spring,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_Season_summer,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_Season_autumn,
- (Odr_fun)odr_null, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_PartOfYear(ODR o, Z_PartOfYear **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_PartOfYear_monthAndDay,
- (Odr_fun) z_MonthAndDay, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_PartOfYear_julianDay,
- (Odr_fun) odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_PartOfYear_weekNumber,
- (Odr_fun) odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_PartOfYear_quarter,
- (Odr_fun) z_Quarter, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 5, Z_PartOfYear_season,
- (Odr_fun) z_Season, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_Era(ODR o, Z_Era **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Era_decade, (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_Era_century, (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_Era_millennium, (Odr_fun)odr_null, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_DateFlags(ODR o, Z_DateFlags **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_null, &(*p)->circa, ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, z_Era, &(*p)->era, ODR_CONTEXT, 2, 1) &&
- odr_sequence_end(o);
-}
-
-int z_Date(ODR o, Z_Date **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_integer, &(*p)->year, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_PartOfYear, &(*p)->partOfYear, ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, z_DateFlags, &(*p)->flags, ODR_CONTEXT, 2, 1) &&
- odr_sequence_end(o);
-}
-
-int z_Zone(ODR o, Z_Zone **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Zone_local, (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_Zone_utc, (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_Zone_utcOffset,
- (Odr_fun)odr_integer, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_Time(ODR o, Z_Time **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_integer, &(*p)->hour, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->minute, ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, odr_integer, &(*p)->second, ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, z_IntUnit, &(*p)->partOfSecond, ODR_CONTEXT, 4, 1) &&
- odr_implicit(o, z_Zone, &(*p)->zone, ODR_CONTEXT, 5, 1) &&
- odr_sequence_end(o);
-}
-
-int z_DateTime(ODR o, Z_DateTime **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_Date, &(*p)->z3950Date, ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, z_Time, &(*p)->z3950Time, ODR_CONTEXT, 2, 1) &&
- odr_sequence_end(o);
-}
-
+++ /dev/null
-/*
- * This file is part of the YAZ toolkit:
- * Copyright (c) 1998, Index Data.
- * See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * Contribution by Ronald van Der Meer (RVDM):
- * Databasix Information Systems B.V., Utrecht, The Netherlands.
- *
- * $Log: prt-dat.h,v $
- * Revision 1.1 2000-10-03 12:55:50 adam
- * Removed several auto-generated files from CVS.
- *
- * Revision 1.1 1999/11/30 13:47:11 adam
- * Improved installation. Moved header files to include/yaz.
- *
- * Revision 1.2 1999/04/20 09:56:48 adam
- * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
- * Modified all encoders/decoders to reflect this change.
- *
- * Revision 1.1 1998/02/10 15:31:52 adam
- * Implemented date and time structure. Changed the Update Extended
- * Service.
- *
- */
-
-#ifndef __PRT_DAT_H
-#define __PRT_DAT_H
-
-#include <yaz/yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct Z_MonthAndDay
-{
- int *month;
- int *day; /* OPTIONAL */
-} Z_MonthAndDay;
-
-typedef struct Z_Quarter
-{
- int which;
-#define Z_Quarter_first 0
-#define Z_Quarter_second 1
-#define Z_Quarter_third 2
-#define Z_Quarter_fourth 3
- union
- {
- Odr_null *first;
- Odr_null *second;
- Odr_null *third;
- Odr_null *fourth;
- } u;
-} Z_Quarter;
-
-typedef struct Z_Season
-{
- int which;
-#define Z_Season_winter 0
-#define Z_Season_spring 1
-#define Z_Season_summer 2
-#define Z_Season_autumn 3
- union
- {
- Odr_null *winter;
- Odr_null *spring;
- Odr_null *summer;
- Odr_null *autumn;
- } u;
-} Z_Season;
-
-typedef struct Z_PartOfYear
-{
- int which;
-#define Z_PartOfYear_monthAndDay 0
-#define Z_PartOfYear_julianDay 1
-#define Z_PartOfYear_weekNumber 2
-#define Z_PartOfYear_quarter 3
-#define Z_PartOfYear_season 4
- union
- {
- Z_MonthAndDay *monthAndDay;
- int *julianDay;
- int *weekNumber;
- Z_Quarter *quarter;
- Z_Season *season;
- } u;
-} Z_PartOfYear;
-
-typedef struct Z_Era
-{
- int which;
-#define Z_Era_decade 0
-#define Z_Era_century 1
-#define Z_Era_millennium 2
- union
- {
- Odr_null *decade;
- Odr_null *century;
- Odr_null *millennium;
- } u;
-} Z_Era;
-
-typedef struct Z_DateFlags
-{
- Odr_null *circa; /* OPTIONAL */
- Z_Era *era; /* OPTIONAL */
-} Z_DateFlags;
-
-typedef struct Z_Date
-{
- int *year;
- Z_PartOfYear *partOfYear; /* OPTIONAL */
- Z_DateFlags *flags; /* OPTIONAL */
-} Z_Date;
-
-typedef struct Z_Zone
-{
- int which;
-#define Z_Zone_local 0
-#define Z_Zone_utc 1
-#define Z_Zone_utcOffset 2
- union
- {
- Odr_null *local;
- Odr_null *utc;
- int *utcOffset;
- } u;
-} Z_Zone;
-
-typedef struct Z_Time
-{
- int *hour;
- int *minute; /* OPTIONAL */
- int *second; /* OPTIONAL */
- Z_IntUnit *partOfSecond; /* OPTIONAL */
- Z_Zone *zone; /* OPTIONAL */
-} Z_Time;
-
-typedef struct Z_DateTime
-{
- Z_Date *z3950Date; /* OPTIONAL */
- Z_Time *z3950Time; /* OPTIONAL */
-} Z_DateTime;
-
-YAZ_EXPORT int z_DateTime(ODR o, Z_DateTime **p, int opt, const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-/*
- * Copyright (c) 1995-1999, Index Data.
- * See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Log: prt-dia.c,v $
- * Revision 1.7 1999-11-30 13:47:11 adam
- * Improved installation. Moved header files to include/yaz.
- *
- * Revision 1.6 1999/04/20 09:56:47 adam
- * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
- * Modified all encoders/decoders to reflect this change.
- *
- * Revision 1.5 1998/02/11 11:53:32 adam
- * Changed code so that it compiles as C++.
- *
- * Revision 1.4 1996/01/22 09:46:34 quinn
- * Added Sort PDU. Moved StringList to main protocol file.
- *
- * Revision 1.3 1995/09/29 17:11:54 quinn
- * Smallish
- *
- * Revision 1.2 1995/09/27 15:02:41 quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.1 1995/08/29 11:19:31 quinn
- * Added Diagnostic Format
- *
- *
- */
-
-#include <yaz/proto.h>
-
-int z_TooMany(ODR o, Z_TooMany **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_integer, &(*p)->tooManyWhat, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->max, ODR_CONTEXT, 2, 1) &&
- odr_sequence_end(o);
-}
-
-int z_BadSpec(ODR o, Z_BadSpec **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_Specification, &(*p)->spec, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_DatabaseName, &(*p)->db, ODR_CONTEXT, 2, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 3) &&
- (odr_sequence_of(o, (Odr_fun)z_Specification, &(*p)->goodOnes,
- &(*p)->num_goodOnes, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_DbUnavailWhy(ODR o, Z_DbUnavailWhy **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_integer, &(*p)->reasonCode, ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->message, ODR_CONTEXT,
- 2, 1) &&
- odr_sequence_end(o);
-}
-
-int z_DbUnavail(ODR o, Z_DbUnavail **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_DatabaseName, &(*p)->db, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_DbUnavailWhy, &(*p)->why, ODR_CONTEXT, 2, 0) &&
- odr_sequence_end(o);
-}
-
-int z_Attribute(ODR o, Z_Attribute **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_oid, &(*p)->id, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->type, ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, odr_integer, &(*p)->value, ODR_CONTEXT, 3, 1) &&
- odr_explicit(o, z_Term, &(*p)->term, ODR_CONTEXT, 4, 1) &&
- odr_sequence_end(o);
-}
-
-int z_AttCombo(ODR o, Z_AttCombo **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_AttributeList, &(*p)->unsupportedCombination,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 2) &&
- (odr_sequence_of(o, (Odr_fun)z_AttributeList, &(*p)->alternatives,
- &(*p)->num_alternatives, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_DiagTerm(ODR o, Z_DiagTerm **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_integer, &(*p)->problem, ODR_CONTEXT, 1, 1) &&
- odr_explicit(o, z_Term, &(*p)->term, ODR_CONTEXT, 2, 0) &&
- odr_sequence_end(o);
-}
-
-int z_Proximity(ODR o, Z_Proximity **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Proximity_resultSets,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_Proximity_badSet,
- (Odr_fun)z_InternationalString, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_Proximity_relation,
- (Odr_fun)odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_Proximity_unit,
- (Odr_fun)odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 5, Z_Proximity_distance,
- (Odr_fun)odr_integer, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 6, Z_Proximity_attributes,
- (Odr_fun)z_AttributeList, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 7, Z_Proximity_ordered,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 8, Z_Proximity_exclusion,
- (Odr_fun)odr_null, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_Proximity *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_AttrListList(ODR o, Z_AttrListList **p, int opt, const char *name)
-{
- if (o->direction == ODR_DECODE)
- *p = (Z_AttrListList *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_sequence_of(o, (Odr_fun)z_AttributeList, &(*p)->lists,
- &(*p)->num_lists, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_Scan(ODR o, Z_Scan **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_ScanD_nonZeroStepSize,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ScanD_specifiedStepSize,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_ScanD_termList1,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_ScanD_termList2,
- (Odr_fun)z_AttrListList, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 5, Z_ScanD_posInResponse,
- (Odr_fun)odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 6, Z_ScanD_resources,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 7, Z_ScanD_endOfList,
- (Odr_fun)odr_null, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_Scan *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_Sort(ODR o, Z_Sort **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_SortD_sequence,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_SortD_noRsName,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_SortD_tooMany,
- (Odr_fun)odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_SortD_incompatible,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_SortD_generic,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 5, Z_SortD_dbSpecific,
- (Odr_fun)odr_null, 0},
-#if 0
- {ODR_EXPLICIT, ODR_CONTEXT, 6, Z_SortD_sortElement,
- (Odr_fun)z_SortElement, 0},
-#endif
- {ODR_IMPLICIT, ODR_CONTEXT, 7, Z_SortD_key,
- (Odr_fun)odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 8, Z_SortD_action,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 9, Z_SortD_illegal,
- (Odr_fun)odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 10, Z_SortD_inputTooLarge,
- (Odr_fun)z_StringList, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 11, Z_SortD_aggregateTooLarge,
- (Odr_fun)odr_null, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_Sort *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_Segmentation(ODR o, Z_Segmentation **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_SegmentationD_segments,
- (Odr_fun)odr_null, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_Segmentation *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_ExtServices(ODR o, Z_ExtServices **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_ExtServicesD_req,
- (Odr_fun)odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ExtServicesD_permission,
- (Odr_fun)odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_ExtServicesD_immediate,
- (Odr_fun)odr_integer, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_ExtServices *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_OidList(ODR o, Z_OidList **p, int opt, const char *name)
-{
- if (o->direction == ODR_DECODE)
- *p = (Z_OidList *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_sequence_of(o, (Odr_fun)odr_oid, &(*p)->oids, &(*p)->num_oids, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_AccessCtrl(ODR o, Z_AccessCtrl **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_AccessCtrlD_noUser,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_AccessCtrlD_refused,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_AccessCtrlD_simple,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_AccessCtrlD_oid,
- (Odr_fun)z_OidList, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 5, Z_AccessCtrlD_alternative,
- (Odr_fun)z_OidList, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 6, Z_AccessCtrlD_pwdInv,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 7, Z_AccessCtrlD_pwdExp,
- (Odr_fun)odr_null, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_AccessCtrl *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_RecordSyntax(ODR o, Z_RecordSyntax **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_oid, &(*p)->unsupportedSyntax,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 2) &&
- (odr_sequence_of(o, (Odr_fun)odr_oid, &(*p)->suggestedAlternatives,
- &(*p)->num_suggestedAlternatives, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_DiagFormat(ODR o, Z_DiagFormat **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1000, Z_DiagFormat_tooMany,
- (Odr_fun)z_TooMany, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1001, Z_DiagFormat_badSpec,
- (Odr_fun)z_BadSpec, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1002, Z_DiagFormat_dbUnavail,
- (Odr_fun)z_DbUnavail, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1003, Z_DiagFormat_unSupOp,
- (Odr_fun)odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1004, Z_DiagFormat_attribute,
- (Odr_fun)z_Attribute, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1005, Z_DiagFormat_attCombo,
- (Odr_fun)z_AttCombo, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1006, Z_DiagFormat_term,
- (Odr_fun)z_DiagTerm, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 1007, Z_DiagFormat_proximity,
- (Odr_fun)z_Proximity, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 1008, Z_DiagFormat_scan,
- (Odr_fun)z_Scan, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 1009, Z_DiagFormat_sort,
- (Odr_fun)z_Sort, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 1010, Z_DiagFormat_segmentation,
- (Odr_fun)z_Segmentation, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 1011, Z_DiagFormat_extServices,
- (Odr_fun)z_ExtServices, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 1012, Z_DiagFormat_accessCtrl,
- (Odr_fun)z_AccessCtrl, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1013, Z_DiagFormat_recordSyntax,
- (Odr_fun)z_RecordSyntax, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_DiagFormat *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_Diagnostic(ODR o, Z_Diagnostic **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Diagnostic_defaultDiagRec,
- (Odr_fun)z_DefaultDiagFormat, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_Diagnostic_explicitDiagnostic,
- (Odr_fun)z_DiagFormat, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_Diagnostic *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_DiagnosticUnit(ODR o, Z_DiagnosticUnit **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_explicit(o, z_Diagnostic, &(*p)->diagnostic, ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->message,
- ODR_CONTEXT, 2, 1) &&
- odr_sequence_end(o);
-}
-
-int z_DiagnosticFormat(ODR o, Z_DiagnosticFormat **p, int opt,
- const char *name)
-{
- if (o->direction == ODR_DECODE)
- *p = (Z_DiagnosticFormat *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_sequence_of(o, (Odr_fun)z_DiagnosticUnit, &(*p)->diagnostics,
- &(*p)->num_diagnostics, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
+++ /dev/null
-/*
- * Copyright (c) 1995-1998, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- */
-
-#ifndef PRT_DIA_H
-#define PRT_DIA_H
-
-#include <yaz/yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct Z_TooMany
-{
- int *tooManyWhat;
-#define Z_TooMany_argumentWords 1
-#define Z_TooMany_truncatedWords 2
-#define Z_TooMany_booleanOperators 3
-#define Z_TooMany_incompleteSubfields 4
-#define Z_TooMany_characters 5
-#define Z_TooMany_recordsRetrieved 6
-#define Z_TooMany_databasesSpecified 7
-#define Z_TooMany_resultSetsCreated 8
-#define Z_TooMany_indexTermsProcessed 9
- int *max; /* OPTIONAL */
-} Z_TooMany;
-
-typedef struct Z_BadSpec
-{
- Z_Specification *spec;
- char *db; /* OPTIONAL */
- int num_goodOnes;
- Z_Specification **goodOnes; /* OPTIONAL */
-} Z_BadSpec;
-
-typedef struct Z_DbUnavailWhy
-{
- int *reasonCode; /* OPTIONAL */
-#define Z_DbUnavail_doesNotExist 0
-#define Z_DbUnavail_existsButUnavail 1
-#define Z_DbUnavail_locked 2
-#define Z_DbUnavail_accessDenied 3
- char *message; /* OPTIONAL */
-} Z_DbUnavailWhy;
-
-typedef struct Z_DbUnavail
-{
- char *db;
- Z_DbUnavailWhy *why; /* OPTIONAL */
-} Z_DbUnavail;
-
-typedef struct Z_Attribute
-{
- Odr_oid *id;
- int *type; /* OPTIONAL */
- int *value; /* OPTIONAL */
- Z_Term *term; /* OPTIONAL */
-} Z_Attribute;
-
-typedef struct Z_AttCombo
-{
- Z_AttributeList *unsupportedCombination;
- int num_alternatives;
- Z_AttributeList **alternatives; /* OPTIONAL */
-} Z_AttCombo;
-
-typedef struct Z_DiagTerm
-{
- int *problem; /* OPTIONAL */
-#define Z_DiagtermProb_codedValue 1
-#define Z_DiagtermProb_unparsable 2
-#define Z_DiagtermProb_tooShort 3
-#define Z_DiagtermProb_type 4
- Z_Term *term;
-} Z_DiagTerm;
-
-typedef struct Z_Proximity
-{
- int which;
-#define Z_Proximity_resultSets 0
-#define Z_Proximity_badSet 1
-#define Z_Proximity_relation 2
-#define Z_Proximity_unit 3
-#define Z_Proximity_distance 4
-#define Z_Proximity_attributes 5
-#define Z_Proximity_ordered 6
-#define Z_Proximity_exclusion 7
- union
- {
- Odr_null *resultSets;
- char *badSet;
- int *relation;
- int *unit;
- int *distance;
- Z_AttributeList *attributes;
- Odr_null *ordered;
- Odr_null *exclusion;
- } u;
-} Z_Proximity;
-
-typedef struct Z_AttrListList
-{
- int num_lists;
- Z_AttributeList *lists;
-} Z_AttrListList;
-
-typedef struct Z_Scan
-{
- int which;
-#define Z_ScanD_nonZeroStepSize 0
-#define Z_ScanD_specifiedStepSize 1
-#define Z_ScanD_termList1 2
-#define Z_ScanD_termList2 3
-#define Z_ScanD_posInResponse 4
-#define Z_ScanD_resources 5
-#define Z_ScanD_endOfList 6
- union
- {
- Odr_null *nonZeroStepSize;
- Odr_null *specifiedStepSize;
- Odr_null *termList1;
- Z_AttrListList *termList2;
- int *posInResponse;
-#define Z_ScanPosInRsp_mustBeOne 1
-#define Z_ScanPosInRsp_mustBePositive 2
-#define Z_ScanPosInRsp_mustBeNonNegative 3
-#define Z_ScanPosInRsp_other 4
- Odr_null *resources;
- Odr_null *endOfList;
- } u;
-} Z_Scan;
-
-typedef struct Z_Sort
-{
- int which;
-#define Z_SortD_sequence 0
-#define Z_SortD_noRsName 1
-#define Z_SortD_tooMany 2
-#define Z_SortD_incompatible 3
-#define Z_SortD_generic 4
-#define Z_SortD_dbSpecific 5
-#define Z_SortD_sortElement 6
-#define Z_SortD_key 7
-#define Z_SortD_action 8
-#define Z_SortD_illegal 9
-#define Z_SortD_inputTooLarge 10
-#define Z_SortD_aggregateTooLarge 11
- union
- {
- Odr_null *sequence;
- Odr_null *noRsName;
- int *tooMany;
- Odr_null *incompatible;
- Odr_null *generic;
- Odr_null *dbSpecific;
- int *key;
-#define Z_SortKey_tooMany 1
-#define Z_SortKey_duplicate 2
- Odr_null *action;
- int *illegal;
-#define Z_SortIllegal_relation 1
-#define Z_SortIllegal_case 2
-#define Z_SortIllegal_action 3
-#define Z_SortIllegal_sort 4
- Z_StringList *inputTooLarge;
- Odr_null *aggregateTooLarge;
- } u;
-} Z_Sort;
-
-typedef struct Z_Segmentation
-{
- int which;
-#define Z_SegmentationD_segments 0
- union
- {
- Odr_null *segments;
- } u;
-} Z_Segmentation;
-
-typedef struct Z_ExtServices
-{
- int which;
-#define Z_ExtServicesD_req 0
-#define Z_ExtServicesD_permission 1
-#define Z_ExtServicesD_immediate 2
- union
- {
- int *req;
-#define Z_ExtSrvReq_nameInUse 1
-#define Z_ExtSrvReq_noSuchname 2
-#define Z_ExtSrvReq_quota 3
-#define Z_ExtSrvReq_type 4
- int *permission;
-#define Z_ExtSrvPerm_id 1
-#define Z_ExtSrvPerm_modifyDelete 2
- int *immediate;
-#define Z_ExtSrvImm_failed 1
-#define Z_ExtSrvImm_service 2
-#define Z_ExtSrvImm_parameters 3
- } u;
-} Z_ExtServices;
-
-typedef struct Z_OidList
-{
- int num_oids;
- Odr_oid **oids;
-} Z_OidList;
-
-typedef struct Z_AccessCtrl
-{
- int which;
-#define Z_AccessCtrlD_noUser 0
-#define Z_AccessCtrlD_refused 1
-#define Z_AccessCtrlD_simple 2
-#define Z_AccessCtrlD_oid 3
-#define Z_AccessCtrlD_alternative 4
-#define Z_AccessCtrlD_pwdInv 5
-#define Z_AccessCtrlD_pwdExp 6
- union
- {
- Odr_null *noUser;
- Odr_null *refused;
- Odr_null *simple;
- Z_OidList *oid;
- Z_OidList *alternative;
- Odr_null *pwdInv;
- Odr_null *pwdExp;
- } u;
-} Z_AccessCtrl;
-
-typedef struct Z_RecordSyntax
-{
- Odr_oid *unsupportedSyntax;
- int num_suggestedAlternatives; /* OPTIONAL */
- Odr_oid **suggestedAlternatives; /* OPTIONAL */
-} Z_RecordSyntax;
-
-typedef struct Z_DiagFormat
-{
- int which;
-#define Z_DiagFormat_tooMany 0
-#define Z_DiagFormat_badSpec 1
-#define Z_DiagFormat_dbUnavail 2
-#define Z_DiagFormat_unSupOp 3
-#define Z_DiagFormat_attribute 4
-#define Z_DiagFormat_attCombo 5
-#define Z_DiagFormat_term 6
-#define Z_DiagFormat_proximity 7
-#define Z_DiagFormat_scan 8
-#define Z_DiagFormat_sort 9
-#define Z_DiagFormat_segmentation 10
-#define Z_DiagFormat_extServices 11
-#define Z_DiagFormat_accessCtrl 12
-#define Z_DiagFormat_recordSyntax 13
- union
- {
- Z_TooMany *tooMany;
- Z_BadSpec *badSpec;
- Z_DbUnavail *dbUnavail;
- int *unSupOp;
-#define Z_UnSupOp_and 0
-#define Z_UnSupOp_or 1
-#define Z_UnSupOp_and_not 2
-#define Z_UnSupOp_prox 3
- Z_Attribute *attribute;
- Z_AttributeList *attCombo;
- Z_DiagTerm *term;
- Z_Proximity *proximity;
- Z_Scan *scan;
- Z_Sort *sort;
- Z_Segmentation *segmentation;
- Z_ExtServices *extServices;
- Z_AccessCtrl *accessCtrl;
- Z_RecordSyntax *recordSyntax;
- } u;
-} Z_DiagFormat;
-
-typedef struct Z_Diagnostic
-{
- int which;
-#define Z_Diagnostic_defaultDiagRec 0
-#define Z_Diagnostic_explicitDiagnostic 1
- union
- {
- Z_DefaultDiagFormat *defaultDiagRec;
- Z_DiagFormat *explicitDiagnostic;
- } u;
-} Z_Diagnostic;
-
-typedef struct Z_DiagnosticUnit
-{
- Z_Diagnostic *diagnostic; /* OPTIONAL */
- char *message; /* OPTIONAL */
-} Z_DiagnosticUnit;
-
-typedef struct Z_DiagnosticFormat
-{
- int num_diagnostics;
- Z_DiagnosticUnit **diagnostics;
-} Z_DiagnosticFormat;
-
-YAZ_EXPORT int z_DiagnosticFormat(ODR o, Z_DiagnosticFormat **p, int opt,
- const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-/*
- * Copyright (c) 1995-1999, Index Data.
- * See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Log: prt-esp.c,v $
- * Revision 1.5 1999-11-30 13:47:11 adam
- * Improved installation. Moved header files to include/yaz.
- *
- * Revision 1.4 1999/04/20 09:56:47 adam
- * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
- * Modified all encoders/decoders to reflect this change.
- *
- * Revision 1.3 1998/02/11 11:53:32 adam
- * Changed code so that it compiles as C++.
- *
- * Revision 1.2 1998/02/10 15:31:46 adam
- * Implemented date and time structure. Changed the Update Extended
- * Service.
- *
- * Revision 1.1 1995/10/12 10:34:37 quinn
- * Added Espec-1.
- *
- *
- */
-
-#include <yaz/proto.h>
-
-int z_OccurValues(ODR o, Z_OccurValues **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_integer, &(*p)->start, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->howMany, ODR_CONTEXT, 2, 1) &&
- odr_sequence_end(o);
-}
-
-int z_Occurrences(ODR o, Z_Occurrences **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Occurrences_all,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_Occurrences_last,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_Occurrences_values,
- (Odr_fun)z_OccurValues, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_Occurrences *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_SpecificTag(ODR o, Z_SpecificTag **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_oid, &(*p)->schemaId, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, odr_integer, &(*p)->tagType, ODR_CONTEXT, 1, 1) &&
- odr_explicit(o, z_StringOrNumeric, &(*p)->tagValue, ODR_CONTEXT,
- 2, 0) &&
- odr_explicit(o, z_Occurrences, &(*p)->occurrences,
- ODR_CONTEXT, 3, 1) &&
- odr_sequence_end(o);
-}
-
-int z_ETagUnit(ODR o, Z_ETagUnit **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ETagUnit_specificTag,
- (Odr_fun)z_SpecificTag, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_ETagUnit_wildThing,
- (Odr_fun)z_Occurrences, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_ETagUnit_wildPath,
- (Odr_fun)odr_null, 0},
- {-1, -1, -1 -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_ETagUnit *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_ETagPath(ODR o, Z_ETagPath **p, int opt, const char *name)
-{
- if (o->direction == ODR_DECODE)
- *p = (Z_ETagPath *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_sequence_of(o, (Odr_fun)z_ETagUnit, &(*p)->tags,
- &(*p)->num_tags, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_SimpleElement(ODR o, Z_SimpleElement **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_ETagPath, &(*p)->path, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_Variant, &(*p)->variantRequest,
- ODR_CONTEXT, 2, 1) &&
- odr_sequence_end(o);
-}
-
-int z_CompoPrimitives(ODR o, Z_CompoPrimitives **p, int opt, const char *name)
-{
- if (o->direction == ODR_DECODE)
- *p = (Z_CompoPrimitives *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_sequence_of(o, z_InternationalString, &(*p)->primitives,
- &(*p)->num_primitives, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_CompoSpecs(ODR o, Z_CompoSpecs **p, int opt, const char *name)
-{
- if (o->direction == ODR_DECODE)
- *p = (Z_CompoSpecs *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_sequence_of(o, (Odr_fun)z_SimpleElement, &(*p)->specs,
- &(*p)->num_specs, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_CompositeElement(ODR o, Z_CompositeElement **p, int opt,
- const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_CompoElement_primitives,
- (Odr_fun)z_CompoPrimitives, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_CompoElement_specs,
- (Odr_fun)z_CompoSpecs, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_constructed_begin(o, &(*p)->elementList, ODR_CONTEXT, 1, 0) &&
- odr_choice(o, arm, &(*p)->elementList, &(*p)->which, 0) &&
- odr_constructed_end(o) &&
- odr_implicit(o, z_ETagPath, &(*p)->deliveryTag, ODR_CONTEXT, 2, 0) &&
- odr_implicit(o, z_Variant, &(*p)->variantRequest, ODR_CONTEXT, 3, 1) &&
- odr_sequence_end(o);
-}
-
-int z_ElementRequest(ODR o, Z_ElementRequest **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ERequest_simpleElement,
- (Odr_fun)z_SimpleElement, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_ERequest_compositeElement,
- (Odr_fun)z_CompositeElement, 0},
- {-1, -1, -1 -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_ElementRequest *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_Espec1(ODR o, Z_Espec1 **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit_settag(o, ODR_CONTEXT, 1) &&
- (odr_sequence_of(o, z_InternationalString, &(*p)->elementSetNames,
- &(*p)->num_elementSetNames, 0) || odr_ok(o)) &&
- odr_implicit(o, odr_oid, &(*p)->defaultVariantSetId,
- ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, z_Variant, &(*p)->defaultVariantRequest,
- ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, odr_integer, &(*p)->defaultTagType,
- ODR_CONTEXT, 4, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 5) &&
- (odr_sequence_of(o, (Odr_fun)z_ElementRequest, &(*p)->elements,
- &(*p)->num_elements, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
+++ /dev/null
-/*
- * Copyright (c) 1995, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- */
-
-#ifndef PRT_ESP_H
-#define PRT_ESP_H
-
-#include <yaz/yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct Z_OccurValues
-{
- int *start;
- int *howMany; /* OPTIONAL */
-} Z_OccurValues;
-
-typedef struct Z_Occurrences
-{
- int which;
-#define Z_Occurrences_all 0
-#define Z_Occurrences_last 1
-#define Z_Occurrences_values 2
- union
- {
- Odr_null *all;
- Odr_null *last;
- Z_OccurValues *values;
- } u;
-} Z_Occurrences;
-
-typedef struct Z_SpecificTag
-{
- Odr_oid *schemaId; /* OPTIONAL */
- int *tagType; /* OPTIONAL */
- Z_StringOrNumeric *tagValue;
- Z_Occurrences *occurrences; /* OPTIONAL */
-} Z_SpecificTag;
-
-typedef struct Z_ETagUnit
-{
- int which;
-#define Z_ETagUnit_specificTag 0
-#define Z_ETagUnit_wildThing 1
-#define Z_ETagUnit_wildPath 2
- union
- {
- Z_SpecificTag *specificTag;
- Z_Occurrences *wildThing;
- Odr_null *wildPath;
- } u;
-} Z_ETagUnit;
-
-typedef struct Z_ETagPath
-{
- int num_tags;
- Z_ETagUnit **tags;
-} Z_ETagPath;
-
-typedef struct Z_SimpleElement
-{
- Z_ETagPath *path;
- Z_Variant *variantRequest; /* OPTIONAL */
-} Z_SimpleElement;
-
-typedef struct Z_CompoPrimitives
-{
- int num_primitives;
- char **primitives;
-} Z_CompoPrimitives;
-
-typedef struct Z_CompoSpecs
-{
- int num_specs;
- Z_SimpleElement **specs;
-} Z_CompoSpecs;
-
-typedef struct Z_CompositeElement
-{
- int which;
-#define Z_CompoElement_primitives 0
-#define Z_CompoElement_specs 1
- union
- {
- Z_CompoPrimitives *primitives;
- Z_CompoSpecs *specs;
- } elementList;
- Z_ETagPath *deliveryTag;
- Z_Variant *variantRequest;
-} Z_CompositeElement;
-
-typedef struct Z_ElementRequest
-{
- int which;
-#define Z_ERequest_simpleElement 0
-#define Z_ERequest_compositeElement 1
- union
- {
- Z_SimpleElement *simpleElement;
- Z_CompositeElement *compositeElement;
- } u;
-} Z_ElementRequest;
-
-typedef struct Z_Espec1
-{
- int num_elementSetNames;
- char **elementSetNames; /* OPTIONAL */
- Odr_oid *defaultVariantSetId; /* OPTIONAL */
- Z_Variant *defaultVariantRequest; /* OPTIONAL */
- int *defaultTagType; /* OPTIONAL */
- int num_elements;
- Z_ElementRequest **elements; /* OPTIONAL */
-} Z_Espec1;
-
-YAZ_EXPORT int z_Espec1(ODR o, Z_Espec1 **p, int opt, const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-/*
- * Copyright (c) 1995-1999, Index Data.
- * See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Log: prt-exd.c,v $
- * Revision 1.11 1999-11-30 13:47:11 adam
- * Improved installation. Moved header files to include/yaz.
- *
- * Revision 1.10 1999/05/26 13:49:12 adam
- * DB Update implemented in client (very basic).
- *
- * Revision 1.9 1999/04/20 09:56:48 adam
- * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
- * Modified all encoders/decoders to reflect this change.
- *
- * Revision 1.8 1998/02/11 11:53:32 adam
- * Changed code so that it compiles as C++.
- *
- * Revision 1.7 1998/02/10 15:31:46 adam
- * Implemented date and time structure. Changed the Update Extended
- * Service.
- *
- * Revision 1.6 1998/01/05 09:04:57 adam
- * Fixed bugs in encoders/decoders - Not operator (!) missing.
- *
- * Revision 1.5 1997/04/30 08:52:02 quinn
- * Null
- *
- * Revision 1.4 1996/10/10 12:35:12 quinn
- * Added Update extended service.
- *
- * Revision 1.3 1995/09/29 17:11:54 quinn
- * Smallish
- *
- * Revision 1.2 1995/09/27 15:02:41 quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.1 1995/08/21 09:16:32 quinn
- * Added Extended services + Item Order
- *
- *
- */
-
-#include <yaz/proto.h>
-
-int z_TaskPackage(ODR o, Z_TaskPackage **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_oid, &(*p)->packageType, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->packageName,
- ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->userId,
- ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, z_IntUnit, &(*p)->retentionTime, ODR_CONTEXT, 4, 1) &&
- odr_implicit(o, z_Permissions, &(*p)->permissions,
- ODR_CONTEXT, 5, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->description,
- ODR_CONTEXT, 6, 1) &&
- odr_implicit(o, odr_octetstring, &(*p)->targetReference,
- ODR_CONTEXT, 7, 0) &&
- odr_implicit(o, odr_generalizedtime, &(*p)->creationDateTime,
- ODR_CONTEXT, 8, 1) &&
- odr_implicit(o, odr_integer, &(*p)->taskStatus,
- ODR_CONTEXT, 9, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 10) &&
- (odr_sequence_of(o, (Odr_fun)z_DiagRec, &(*p)->packageDiagnostics,
- &(*p)->num_packageDiagnostics, 0) || odr_ok(o)) &&
- odr_implicit(o, z_External, &(*p)->taskSpecificParameters,
- ODR_CONTEXT, 11, 0) &&
- odr_sequence_end(o);
-}
-
-/* ----------------------- ITEM ORDER --------------------- */
-
-int z_IOTargetPart(ODR o, Z_IOTargetPart **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_External, &(*p)->itemRequest, ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, z_External, &(*p)->statusOrErrorReport, ODR_CONTEXT,
- 2, 0) &&
- odr_implicit(o, odr_integer, &(*p)->auxiliaryStatus, ODR_CONTEXT,
- 3, 1) &&
- odr_sequence_end(o);
-}
-
-int z_IOResultSetItem(ODR o, Z_IOResultSetItem **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->resultSetId, ODR_CONTEXT,
- 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->item, ODR_CONTEXT, 2, 1) &&
- odr_sequence_end(o);
-}
-
-int z_IOOriginPartNotToKeep(ODR o, Z_IOOriginPartNotToKeep **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_IOResultSetItem, &(*p)->resultSetItem, ODR_CONTEXT,
- 1, 0) &&
- odr_implicit(o, z_External, &(*p)->itemRequest, ODR_CONTEXT, 2, 1) &&
- odr_sequence_end(o);
-}
-
-int z_IOContact(ODR o, Z_IOContact **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->name, ODR_CONTEXT,
- 1, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->phone, ODR_CONTEXT,
- 2, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->email, ODR_CONTEXT,
- 3, 1) &&
- odr_sequence_end(o);
-}
-
-int z_IOCreditCardInfo(ODR o, Z_IOCreditCardInfo **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->nameOnCard, ODR_CONTEXT,
- 1, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->expirationDate,
- ODR_CONTEXT, 2, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->cardNumber, ODR_CONTEXT,
- 3, 0) &&
- odr_sequence_end(o);
-}
-
-int z_IOBilling(ODR o, Z_IOBilling **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_IOBilling_billInvoice,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_IOBilling_prepay,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_IOBilling_depositAccount,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_IOBilling_creditCard,
- (Odr_fun)z_IOCreditCardInfo, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_IOBilling_cardInfoPreviouslySupplied,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 5, Z_IOBilling_privateKnown,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 6, Z_IOBilling_privateNotKnown,
- (Odr_fun)z_External, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_constructed_begin(o, &(*p)->paymentMethod,
- ODR_CONTEXT, 1, 0) &&
- odr_choice(o, arm, &(*p)->paymentMethod, &(*p)->which, 0) &&
- odr_constructed_end(o) &&
- odr_implicit(o, z_InternationalString, &(*p)->customerReference,
- ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->customerPONumber,
- ODR_CONTEXT, 3, 1) &&
- odr_sequence_end(o);
-}
-
-int z_IOOriginPartToKeep(ODR o, Z_IOOriginPartToKeep **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_External, &(*p)->supplDescription,
- ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, z_IOContact, &(*p)->contact, ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, z_IOBilling, &(*p)->addlBilling,
- ODR_CONTEXT, 3, 1) &&
- odr_sequence_end(o);
-}
-
-int z_IORequest(ODR o, Z_IORequest **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_IOOriginPartToKeep, &(*p)->toKeep,
- ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, z_IOOriginPartNotToKeep, &(*p)->notToKeep,
- ODR_CONTEXT, 2, 0) &&
- odr_sequence_end(o);
-}
-
-int z_IOTaskPackage(ODR o, Z_IOTaskPackage **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_IOOriginPartToKeep, &(*p)->originPart,
- ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, z_IOTargetPart, &(*p)->targetPart,
- ODR_CONTEXT, 2, 0) &&
- odr_sequence_end(o);
-}
-
-int z_ItemOrder(ODR o, Z_ItemOrder **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ItemOrder_esRequest,
- (Odr_fun)z_IORequest, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_ItemOrder_taskPackage,
- (Odr_fun)z_IOTaskPackage, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (o->direction == ODR_DECODE)
- *p = (Z_ItemOrder *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-/* ----------------------- ITEM UPDATE -------------------- */
-
-int z_IUSuppliedRecordsId (ODR o, Z_IUSuppliedRecordsId **p, int opt,
- const char *name)
-{
- static Odr_arm arm[] = {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_IUSuppliedRecordsId_timeStamp,
- odr_generalizedtime, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_IUSuppliedRecordsId_versionNumber,
- z_InternationalString, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_IUSuppliedRecordsId_previousVersion,
- (Odr_fun)odr_external, 0},
- {-1, -1, -1, -1, 0, 0}
- };
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_IUCorrelationInfo (ODR o, Z_IUCorrelationInfo **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin (o, p, sizeof(**p), 0))
- return opt && odr_ok (o);
- return
- odr_implicit (o, z_InternationalString,
- &(*p)->note, ODR_CONTEXT, 1, 1) &&
- odr_implicit (o, odr_integer,
- &(*p)->id, ODR_CONTEXT, 2, 1) &&
- odr_sequence_end (o);
-}
-
-int z_IUSuppliedRecords_elem (ODR o, Z_IUSuppliedRecords_elem **p, int opt,
- const char *name)
-{
- static Odr_arm arm[] = {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_IUSuppliedRecords_number,
- (Odr_fun)odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_IUSuppliedRecords_string,
- (Odr_fun)z_InternationalString, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_IUSuppliedRecords_opaque,
- (Odr_fun)odr_octetstring, 0},
- {-1, -1, -1, -1, 0, 0}
- };
- if (!odr_sequence_begin (o, p, sizeof(**p), 0))
- return opt && odr_ok (o);
- return
- ((odr_constructed_begin (o, &(*p)->u, ODR_CONTEXT, 1, 0) &&
- odr_choice (o, arm, &(*p)->u, &(*p)->which, 0) &&
- odr_constructed_end (o)) || odr_ok(o)) &&
- odr_explicit (o, z_IUSuppliedRecordsId,
- &(*p)->supplementalId, ODR_CONTEXT, 2, 1) &&
- odr_implicit (o, z_IUCorrelationInfo,
- &(*p)->correlationInfo, ODR_CONTEXT, 3, 1) &&
- odr_implicit (o, z_External,
- &(*p)->record, ODR_CONTEXT, 4, 0) &&
- odr_sequence_end (o);
-}
-
-int z_IUSuppliedRecords (ODR o, Z_IUSuppliedRecords **p, int opt,
- const char *name)
-{
- if (!odr_initmember (o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_sequence_of (o, (Odr_fun)z_IUSuppliedRecords_elem, &(*p)->elements,
- &(*p)->num, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_IUTaskPackageRecordStructure (ODR o, Z_IUTaskPackageRecordStructure **p,
- int opt, const char *name)
-{
- static Odr_arm arm[] = {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_IUTaskPackageRecordStructure_record,
- (Odr_fun)odr_external, 0},
- {ODR_EXPLICIT, ODR_CONTEXT, 2,
- Z_IUTaskPackageRecordStructure_surrogateDiagnostics,
- (Odr_fun)z_DiagRecs, 0},
- {-1, -1, -1, -1, 0, 0}
- };
- if (!odr_sequence_begin (o, p, sizeof(**p), 0))
- return opt && odr_ok (o);
- return
- ((odr_constructed_begin (o, &(*p)->u, ODR_CONTEXT, 1, 0) &&
- odr_choice (o, arm, &(*p)->u, &(*p)->which, 0) &&
- odr_constructed_end (o)) || odr_ok(o)) &&
- odr_implicit (o, z_IUCorrelationInfo,
- &(*p)->correlationInfo, ODR_CONTEXT, 2, 1) &&
- odr_implicit (o, odr_integer,
- &(*p)->recordStatus, ODR_CONTEXT, 3, 0) &&
- odr_implicit (o, z_DiagRecs,
- &(*p)->supplementalDiagnostics, ODR_CONTEXT, 4, 1) &&
- odr_sequence_end (o);
-}
-
-int z_IUOriginPartToKeep (ODR o, Z_IUOriginPartToKeep **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin (o, p, sizeof(**p), 0))
- return opt && odr_ok (o);
- return
- odr_implicit (o, odr_integer,
- &(*p)->action, ODR_CONTEXT, 1, 0) &&
- odr_implicit (o, z_InternationalString,
- &(*p)->databaseName, ODR_CONTEXT, 2, 0) &&
- odr_implicit (o, odr_oid,
- &(*p)->schema, ODR_CONTEXT, 3, 1) &&
- odr_implicit (o, z_InternationalString,
- &(*p)->elementSetName, ODR_CONTEXT, 4, 1) &&
- odr_implicit (o, odr_external,
- &(*p)->actionQualifier, ODR_CONTEXT, 5, 1) &&
- odr_sequence_end (o);
-}
-
-int z_IUTargetPart (ODR o, Z_IUTargetPart **p, int opt, const char *name)
-{
- if (!odr_sequence_begin (o, p, sizeof(**p), 0))
- return opt && odr_ok (o);
- return
- odr_implicit (o, odr_integer,
- &(*p)->updateStatus, ODR_CONTEXT, 1, 0) &&
- odr_implicit_settag (o, ODR_CONTEXT, 2) &&
- (odr_sequence_of(o, (Odr_fun)z_DiagRec, &(*p)->globalDiagnostics,
- &(*p)->num_globalDiagnostics, 0) || odr_ok(o)) &&
- odr_implicit_settag (o, ODR_CONTEXT, 3) &&
- odr_sequence_of(o, (Odr_fun)z_IUTaskPackageRecordStructure,
- &(*p)->taskPackageRecords,
- &(*p)->num_taskPackageRecords, 0) &&
- odr_sequence_end (o);
-}
-
-int z_IUUpdateEsRequest (ODR o, Z_IUUpdateEsRequest **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin (o, p, sizeof(**p), 0))
- return opt && odr_ok (o);
- return
- odr_explicit (o, z_IUOriginPartToKeep,
- &(*p)->toKeep, ODR_CONTEXT, 1, 0) &&
- odr_explicit (o, z_IUSuppliedRecords,
- &(*p)->notToKeep, ODR_CONTEXT, 2, 0) &&
- odr_sequence_end (o);
-}
-
-int z_IUUpdateTaskPackage (ODR o, Z_IUUpdateTaskPackage **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin (o, p, sizeof(**p), 0))
- return opt && odr_ok (o);
- return
- odr_explicit (o, z_IUOriginPartToKeep,
- &(*p)->originPart, ODR_CONTEXT, 1, 0) &&
- odr_explicit (o, z_IUTargetPart,
- &(*p)->targetPart, ODR_CONTEXT, 2, 0) &&
- odr_sequence_end (o);
-}
-
-int z_IUUpdate (ODR o, Z_IUUpdate **p, int opt, const char *name)
-{
- static Odr_arm arm[] = {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_IUUpdate_esRequest,
- (Odr_fun)z_IUUpdateEsRequest, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_IUUpdate_taskPackage,
- (Odr_fun)z_IUUpdateTaskPackage, 0},
- {-1, -1, -1, -1, 0, 0}
- };
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
+++ /dev/null
-/*
- * Copyright (c) 1995-1998, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- */
-
-#ifndef PRT_EXD_H
-#define PRT_EXD_H
-
-#include <yaz/yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct Z_TaskPackage
-{
- Odr_oid *packageType;
- char *packageName; /* OPTIONAL */
- char *userId; /* OPTIONAL */
- Z_IntUnit *retentionTime; /* OPTIONAL */
- Z_Permissions *permissions; /* OPTIONAL */
- char *description; /* OPTIONAL */
- Odr_oct *targetReference;
- char *creationDateTime; /* OPTIONAL */
- int *taskStatus;
-#define Z_TaskPackage_pending 0
-#define Z_TaskPackage_active 1
-#define Z_TaskPackage_complete 2
-#define Z_TaskPackage_aborted 3
- int num_packageDiagnostics;
- Z_DiagRec **packageDiagnostics; /* OPTIONAL */
- Z_External *taskSpecificParameters;
-} Z_TaskPackage;
-
-int z_TaskPackage(ODR o, Z_TaskPackage **p, int opt, const char *name);
-
-/* ----------------------- ITEM ORDER ------------------------- */
-
-typedef struct Z_IOTargetPart
-{
- Z_External *itemRequest; /* OPTIONAL */
- Z_External *statusOrErrorReport;
- int *auxiliaryStatus; /* OPTIONAL */
-#define Z_IOTargetPart_notReceived 1
-#define Z_IOTargetPart_loanQueue 2
-#define Z_IOTargetPart_forwarded 3
-#define Z_IOTargetPart_unfilledCopyright 4
-#define Z_IOTargetPart_filledCopyright 1
-} Z_IOTargetPart;
-
-typedef struct Z_IOResultSetItem
-{
- char *resultSetId;
- int *item;
-} Z_IOResultSetItem;
-
-typedef struct Z_IOOriginPartNotToKeep
-{
- Z_IOResultSetItem *resultSetItem; /* OPTIONAL */
- Z_External *itemRequest; /* OPTIONAL */
-} Z_IOOriginPartNotToKeep;
-
-typedef struct Z_IOContact
-{
- char *name; /* OPTIONAL */
- char *phone; /* OPTIONAL */
- char *email; /* OPTIONAL */
-} Z_IOContact;
-
-typedef struct Z_IOCreditCardInfo
-{
- char *nameOnCard;
- char *expirationDate;
- char *cardNumber;
-} Z_IOCreditCardInfo;
-
-typedef struct Z_IOBilling
-{
- int which;
-#define Z_IOBilling_billInvoice 0
-#define Z_IOBilling_prepay 1
-#define Z_IOBilling_depositAccount 2
-#define Z_IOBilling_creditCard 3
-#define Z_IOBilling_cardInfoPreviouslySupplied 4
-#define Z_IOBilling_privateKnown 5
-#define Z_IOBilling_privateNotKnown 6
- union
- {
- Odr_null *noinfo;
- Z_IOCreditCardInfo *creditCard;
- Z_External *privateNotKnown;
- } paymentMethod;
- char *customerReference; /* OPTIONAL */
- char *customerPONumber; /* OPTIONAL */
-} Z_IOBilling;
-
-typedef struct Z_IOOriginPartToKeep
-{
- Z_External *supplDescription; /* OPTIONAL */
- Z_IOContact *contact; /* OPTIONAL */
- Z_IOBilling *addlBilling; /* OPTIONAL */
-} Z_IOOriginPartToKeep;
-
-typedef struct Z_IORequest
-{
- Z_IOOriginPartToKeep *toKeep; /* OPTIONAL */
- Z_IOOriginPartNotToKeep *notToKeep;
-} Z_IORequest;
-
-typedef struct Z_IOTaskPackage
-{
- Z_IOOriginPartToKeep *originPart; /* OPTIONAL */
- Z_IOTargetPart *targetPart;
-} Z_IOTaskPackage;
-
-typedef struct Z_ItemOrder
-{
- int which;
-#define Z_ItemOrder_esRequest 0
-#define Z_ItemOrder_taskPackage 1
- union
- {
- Z_IORequest *esRequest;
- Z_IOTaskPackage *taskPackage;
- } u;
-} Z_ItemOrder;
-
-int z_ItemOrder(ODR o, Z_ItemOrder **p, int opt, const char *name);
-
-/* ----------------------- ITEM UPDATE ------------------------ */
-
-typedef struct Z_IUSuppliedRecordsId
-{
- int which;
-#define Z_IUSuppliedRecordsId_timeStamp 1
-#define Z_IUSuppliedRecordsId_versionNumber 2
-#define Z_IUSuppliedRecordsId_previousVersion 3
- union {
- char *timeStamp;
- char *versionNumber;
- Odr_external *previousVersion;
- } u;
-} Z_IUSuppliedRecordsId;
-
-typedef struct Z_IUCorrelationInfo
-{
- char *note; /* OPTIONAL */
- int *id; /* OPTIONAL */
-} Z_IUCorrelationInfo;
-
-typedef struct Z_IUSuppliedRecords_elem
-{
- int which;
-#define Z_IUSuppliedRecords_number 1
-#define Z_IUSuppliedRecords_string 2
-#define Z_IUSuppliedRecords_opaque 3
- union {
- int *number;
- char *string;
- Odr_oct *opaque;
- } u; /* OPTIONAL */
- Z_IUSuppliedRecordsId *supplementalId; /* OPTIONAL */
- Z_IUCorrelationInfo *correlationInfo; /* OPTIONAL */
- Z_External *record;
-} Z_IUSuppliedRecords_elem;
-
-typedef struct Z_IUSuppliedRecords
-{
- int num;
- Z_IUSuppliedRecords_elem **elements;
-} Z_IUSuppliedRecords;
-
-typedef struct Z_IUOriginPartToKeep
-{
- int *action;
-#define Z_IUOriginPartToKeep_recordInsert 1
-#define Z_IUOriginPartToKeep_recordReplace 2
-#define Z_IUOriginPartToKeep_recordDelete 3
-#define Z_IUOriginPartToKeep_elementUpdate 4
-#define Z_IUOriginPartToKeep_specialUpdate 5
- char *databaseName;
- Odr_oid *schema; /* OPTIONAL */
- char *elementSetName; /* OPTIONAL */
- Odr_external *actionQualifier; /* OPTIONAL */
-} Z_IUOriginPartToKeep;
-
-typedef struct Z_IUTaskPackageRecordStructure
-{
- int which;
-#define Z_IUTaskPackageRecordStructure_record 1
-#define Z_IUTaskPackageRecordStructure_surrogateDiagnostics 2
- union {
- Odr_external *record;
- Z_DiagRecs *surrogateDiagnostics;
- } u; /* OPTIONAL */
- Z_IUCorrelationInfo *correlationInfo; /* OPTIONAL */
- int *recordStatus;
-#define Z_IUTaskPackageRecordStructureS_success 1
-#define Z_IUTaskPackageRecordStructureS_queued 2
-#define Z_IUTaskPackageRecordStructureS_inProcess 3
-#define Z_IUTaskPackageRecordStructureS_failure 4
- Z_DiagRecs *supplementalDiagnostics; /* OPTIONAL */
-} Z_IUTaskPackageRecordStructure;
-
-typedef struct Z_IUTargetPart
-{
- int *updateStatus;
-#define Z_IUTargetPart_success 1
-#define Z_IUTargetPart_partial 2
-#define Z_IUTargetPart_failure 3
- int num_globalDiagnostics;
- Z_DiagRec **globalDiagnostics; /* OPTIONAL */
- int num_taskPackageRecords;
- Z_IUTaskPackageRecordStructure **taskPackageRecords;
-} Z_IUTargetPart;
-
-typedef struct Z_IUUpdateEsRequest
-{
- Z_IUOriginPartToKeep *toKeep;
- Z_IUSuppliedRecords *notToKeep;
-} Z_IUUpdateEsRequest;
-
-typedef struct Z_IUUpdateTaskPackage
-{
- Z_IUOriginPartToKeep *originPart;
- Z_IUTargetPart *targetPart;
-} Z_IUUpdateTaskPackage;
-
-typedef struct Z_IUUpdate
-{
- int which;
-#define Z_IUUpdate_esRequest 1
-#define Z_IUUpdate_taskPackage 2
- union {
- Z_IUUpdateEsRequest *esRequest;
- Z_IUUpdateTaskPackage *taskPackage;
- } u;
-} Z_IUUpdate;
-
-YAZ_EXPORT int z_IUUpdate(ODR o, Z_IUUpdate **p, int opt, const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-/*
- * Copyright (c) 1995-1999, Index Data.
- * See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Log: prt-exp.c,v $
- * Revision 1.13 1999-11-30 13:47:11 adam
- * Improved installation. Moved header files to include/yaz.
- *
- * Revision 1.12 1999/04/20 09:56:48 adam
- * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
- * Modified all encoders/decoders to reflect this change.
- *
- * Revision 1.11 1999/03/18 12:57:13 adam
- * Fixed bug in TargetInfo encoder/decoder.
- *
- * Revision 1.10 1998/05/18 13:06:52 adam
- * Changed the way attribute sets are handled by the retriaval module.
- * Extended Explain conversion / schema.
- * Modified server and client to work with ASN.1 compiled protocol handlers.
- *
- * Revision 1.9 1998/02/11 11:53:32 adam
- * Changed code so that it compiles as C++.
- *
- * Revision 1.8 1996/01/02 11:46:41 quinn
- * Changed 'operator' to 'roperator' to avoid C++ conflict.
- *
- * Revision 1.7 1995/12/14 16:28:07 quinn
- * More explain stuff.
- *
- * Revision 1.6 1995/12/14 11:09:09 quinn
- * Fixed bug in tagging.
- *
- * Revision 1.5 1995/12/05 11:15:50 quinn
- * Work.
- *
- * Revision 1.4 1995/09/29 17:11:54 quinn
- * Smallish
- *
- * Revision 1.3 1995/09/27 15:02:42 quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.2 1995/08/15 11:59:43 quinn
- * Updated External
- *
- * Revision 1.1 1995/08/10 08:54:02 quinn
- * Added Explain
- *
- *
- */
-
-#include <yaz/proto.h>
-
-int z_LanguageCode(ODR o, char **p, int opt, const char *name);
-int z_CommonInfo(ODR o, Z_CommonInfo **p, int opt, const char *name);
-int z_HumanStringUnit(ODR o, Z_HumanStringUnit **p, int opt, const char *name);
-int z_HumanString(ODR o, Z_HumanString **p, int opt, const char *name);
-int z_IconObjectUnit(ODR o, Z_IconObjectUnit **p, int opt, const char *name);
-int z_IconObject(ODR o, Z_IconObject **p, int opt, const char *name);
-int z_ContactInfo(ODR o, Z_ContactInfo **p, int opt, const char *name);
-int z_NetworkAddressIA(ODR o, Z_NetworkAddressIA **p, int opt,
- const char *name);
-int z_NetworkAddressOPA(ODR o, Z_NetworkAddressOPA **p, int opt,
- const char *name);
-int z_NetworkAddressOther(ODR o, Z_NetworkAddressOther **p, int opt,
- const char *name);
-int z_NetworkAddress(ODR o, Z_NetworkAddress **p, int opt, const char *name);
-int z_AccessInfo(ODR o, Z_AccessInfo **p, int opt, const char *name);
-int z_QueryTypeDetails(ODR o, Z_QueryTypeDetails **p, int opt,
- const char *name);
-int z_PrivateCapOperator(ODR o, Z_PrivateCapOperator **p, int opt,
- const char *name);
-int z_PrivateCapabilities(ODR o, Z_PrivateCapabilities **p, int opt,
- const char *name);
-int z_RpnCapabilities(ODR o, Z_RpnCapabilities **p, int opt, const char *name);
-int z_Iso8777Capabilities(ODR o, Z_Iso8777Capabilities **p, int opt,
- const char *name);
-int z_ProxSupportPrivate(ODR o, Z_ProxSupportPrivate **p, int opt,
- const char *name);
-int z_ProxSupportUnit(ODR o, Z_ProxSupportUnit **p, int opt, const char *name);
-int z_ProximitySupport(ODR o, Z_ProximitySupport **p, int opt,
- const char *name);
-int z_SearchKey(ODR o, Z_SearchKey **p, int opt, const char *name);
-int z_AccessRestrictionsUnit(ODR o, Z_AccessRestrictionsUnit **p, int opt,
- const char *name);
-int z_AccessRestrictions(ODR o, Z_AccessRestrictions **p, int opt,
- const char *name);
-int z_CostsOtherCharge(ODR o, Z_CostsOtherCharge **p, int opt,
- const char *name);
-int z_Costs(ODR o, Z_Costs **p, int opt, const char *name);
-int z_Charge(ODR o, Z_Charge **p, int opt, const char *name);
-int z_DatabaseList(ODR o, Z_DatabaseList **p, int opt, const char *name);
-int z_AttributeCombinations(ODR o, Z_AttributeCombinations **p, int opt,
- const char *name);
-int z_AttributeCombination(ODR o, Z_AttributeCombination **p, int opt,
- const char *name);
-int z_AttributeValueList(ODR o, Z_AttributeValueList **p, int opt,
- const char *name);
-int z_AttributeOccurrence(ODR o, Z_AttributeOccurrence **p, int opt,
- const char *name);
-int z_AttributeValue(ODR o, Z_AttributeValue **p, int opt, const char *name);
-int z_TargetInfo(ODR o, Z_TargetInfo **p, int opt, const char *name);
-int z_DatabaseInfo(ODR o, Z_DatabaseInfo **p, int opt, const char *name);
-int z_TagTypeMapping(ODR o, Z_TagTypeMapping **p, int opt, const char *name);
-int z_SchemaInfo(ODR o, Z_SchemaInfo **p, int opt, const char *name);
-int z_ElementInfo(ODR o, Z_ElementInfo **p, int opt, const char *name);
-int z_PathUnit(ODR o, Z_PathUnit **p, int opt, const char *name);
-int z_Path(ODR o, Z_Path **p, int opt, const char *name);
-int z_ElementInfoList(ODR o, Z_Path **p, int opt, const char *name);
-int z_ElementDataType(ODR o, Z_ElementDataType **p, int opt, const char *name);
-int z_TagSetInfoElements(ODR o, Z_TagSetInfoElements **p, int opt,
- const char *name);
-int z_TagSetInfo(ODR o, Z_TagSetInfo **p, int opt, const char *name);
-int z_RecordSyntaxInfo(ODR o, Z_RecordSyntaxInfo **p, int opt,
- const char *name);
-int z_AttributeSetInfo(ODR o, Z_AttributeSetInfo **p, int opt,
- const char *name);
-int z_AttributeType(ODR o, Z_AttributeType **p, int opt, const char *name);
-int z_AttributeDescription(ODR o, Z_AttributeDescription **p, int opt,
- const char *name);
-int z_TermListElement(ODR o, Z_TermListElement **p, int opt, const char *name);
-int z_TermListInfo(ODR o, Z_TermListInfo **p, int opt, const char *name);
-int z_ExtendedServicesInfo(ODR o, Z_ExtendedServicesInfo **p, int opt,
- const char *name);
-int z_AttributeDetails(ODR o, Z_AttributeDetails **p, int opt,
- const char *name);
-int z_AttributeSetDetails(ODR o, Z_AttributeSetDetails **p, int opt,
- const char *name);
-int z_AttributeTypeDetails(ODR o, Z_AttributeTypeDetails **p, int opt,
- const char *name);
-int z_OmittedAttributeInterpretation(ODR o,
- Z_OmittedAttributeInterpretation **p,
- int opt, const char *name);
-int z_EScanInfo(ODR o, Z_EScanInfo **p, int opt, const char *name);
-int z_TermListDetails(ODR o, Z_TermListDetails **p, int opt, const char *name);
-int z_ElementSetDetails(ODR o, Z_ElementSetDetails **p, int opt,
- const char *name);
-int z_RetrievalRecordDetails(ODR o, Z_RetrievalRecordDetails **p, int opt,
- const char *name);
-int z_PerElementDetails(ODR o, Z_PerElementDetails **p, int opt,
- const char *name);
-int z_RecordTag(ODR o, Z_RecordTag **p, int opt, const char *name);
-int z_SortDetails(ODR o, Z_SortDetails **p, int opt, const char *name);
-int z_SortKeyDetails(ODR o, Z_SortKeyDetails **p, int opt, const char *name);
-int z_ProcessingInformation(ODR o, Z_ProcessingInformation **p, int opt,
- const char *name);
-int z_VariantSetInfo(ODR o, Z_VariantSetInfo **p, int opt, const char *name);
-int z_VariantClass(ODR o, Z_VariantClass **p, int opt, const char *name);
-int z_VariantType(ODR o, Z_VariantType **p, int opt, const char *name);
-int z_VariantValue(ODR o, Z_VariantValue **p, int opt, const char *name);
-int z_ValueSetEnumerated(ODR o, Z_ValueSetEnumerated **p, int opt,
- const char *name);
-int z_ValueSet(ODR o, Z_ValueSet **p, int opt, const char *name);
-int z_ValueRange(ODR o, Z_ValueRange **p, int opt, const char *name);
-int z_ValueDescription(ODR o, Z_ValueDescription **p, int opt,
- const char *name);
-int z_UnitInfo(ODR o, Z_UnitInfo **p, int opt, const char *name);
-int z_UnitType(ODR o, Z_UnitType **p, int opt, const char *name);
-int z_Units(ODR o, Z_Units **p, int opt, const char *name);
-int z_CategoryList(ODR o, Z_CategoryList **p, int opt, const char *name);
-int z_CategoryInfo(ODR o, Z_CategoryInfo **p, int opt, const char *name);
-int z_ExplainRecord(ODR o, Z_ExplainRecord **p, int opt, const char *name);
-
-int z_LanguageCode(ODR o, char **p, int opt, const char *name)
-{
- return z_InternationalString(o, p, opt, 0);
-}
-
-int z_CommonInfo(ODR o, Z_CommonInfo **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_generalizedtime, &(*p)->dateAdded,
- ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, odr_generalizedtime, &(*p)->dateChanged,
- ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, odr_generalizedtime, &(*p)->expiry,
- ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, z_LanguageCode, &(*p)->humanStringLanguage,
- ODR_CONTEXT, 3, 1) &&
- z_OtherInformation(o, &(*p)->otherInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_HumanStringUnit(ODR o, Z_HumanStringUnit **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_LanguageCode, &(*p)->language, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->text, ODR_CONTEXT,
- 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_HumanString(ODR o, Z_HumanString **p, int opt, const char *name)
-{
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_sequence_of(o, (Odr_fun)z_HumanStringUnit, &(*p)->strings,
- &(*p)->num_strings, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_IconObjectUnit(ODR o, Z_IconObjectUnit **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_IconObjectUnit_ianaType,
- z_InternationalString, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_IconObjectUnit_z3950type,
- z_InternationalString, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_IconObjectUnit_otherType,
- z_InternationalString, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_constructed_begin(o, &(*p)->bodyType, ODR_CONTEXT, 1, 0) &&
- odr_choice(o, arm, &(*p)->bodyType, &(*p)->which, 0) &&
- odr_constructed_end(o) &&
- odr_implicit(o, odr_octetstring, &(*p)->content, ODR_CONTEXT, 2, 0) &&
- odr_sequence_end(o);
-}
-
-int z_IconObject(ODR o, Z_IconObject **p, int opt, const char *name)
-{
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_sequence_of(o, (Odr_fun)z_IconObjectUnit, &(*p)->elements,
- &(*p)->num, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_ContactInfo(ODR o, Z_ContactInfo **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->name,
- ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->address,
- ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->email,
- ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->phone,
- ODR_CONTEXT, 4, 1) &&
- odr_sequence_end(o);
-}
-
-int z_NetworkAddressIA(ODR o, Z_NetworkAddressIA **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt;
- return
- odr_implicit(o, z_InternationalString, &(*p)->hostAddress,
- ODR_CONTEXT, 0, 0) &&
- odr_implicit(o, odr_integer, &(*p)->port, ODR_CONTEXT, 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_NetworkAddressOPA(ODR o, Z_NetworkAddressOPA **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt;
- return
- odr_implicit(o, z_InternationalString, &(*p)->pSel,
- ODR_CONTEXT, 0, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->sSel,
- ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->tSel,
- ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->nSap,
- ODR_CONTEXT, 3, 0) &&
- odr_sequence_end(o);
-}
-
-int z_NetworkAddressOther(ODR o, Z_NetworkAddressOther **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt;
- return
- odr_implicit(o, z_InternationalString, &(*p)->type,
- ODR_CONTEXT, 0, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->address,
- ODR_CONTEXT, 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_NetworkAddress(ODR o, Z_NetworkAddress **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_NetworkAddress_iA,
- (Odr_fun)z_NetworkAddressIA, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_NetworkAddress_oPA,
- (Odr_fun)z_NetworkAddressOPA, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_NetworkAddress_other,
- (Odr_fun)z_NetworkAddressOther, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_AccessInfo(ODR o, Z_AccessInfo **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit_settag(o, ODR_CONTEXT, 0) &&
- (odr_sequence_of(o, (Odr_fun)z_QueryTypeDetails,
- &(*p)->queryTypesSupported,
- &(*p)->num_queryTypesSupported, 0) || odr_ok(o)) &&
- odr_implicit_settag(o, ODR_CONTEXT, 1) &&
- (odr_sequence_of(o, (Odr_fun)odr_oid, &(*p)->diagnosticsSets,
- &(*p)->num_diagnosticsSets, 0) || odr_ok(o)) &&
- odr_implicit_settag(o, ODR_CONTEXT, 2) &&
- (odr_sequence_of(o, (Odr_fun)odr_oid, &(*p)->attributeSetIds,
- &(*p)->num_attributeSetIds, 0) || odr_ok(o)) &&
- odr_implicit_settag(o, ODR_CONTEXT, 3) &&
- (odr_sequence_of(o, (Odr_fun)odr_oid, &(*p)->schemas,
- &(*p)->num_schemas, 0) ||
- odr_ok(o)) &&
- odr_implicit_settag(o, ODR_CONTEXT, 4) &&
- (odr_sequence_of(o, (Odr_fun)odr_oid, &(*p)->recordSyntaxes,
- &(*p)->num_recordSyntaxes, 0) || odr_ok(o)) &&
- odr_implicit_settag(o, ODR_CONTEXT, 5) &&
- (odr_sequence_of(o, (Odr_fun)odr_oid, &(*p)->resourceChallenges,
- &(*p)->num_resourceChallenges, 0) || odr_ok(o)) &&
- odr_implicit(o, z_AccessRestrictions, &(*p)->restrictedAccess,
- ODR_CONTEXT, 6, 1) &&
- odr_implicit(o, z_Costs, &(*p)->costInfo, ODR_CONTEXT, 8, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 9) &&
- (odr_sequence_of(o, (Odr_fun)odr_oid, &(*p)->variantSets,
- &(*p)->num_variantSets, 0) || odr_ok(o)) &&
- odr_implicit_settag(o, ODR_CONTEXT, 10) &&
- (odr_sequence_of(o, (Odr_fun)z_ElementSetName, &(*p)->elementSetNames,
- &(*p)->num_elementSetNames, 0) || odr_ok(o)) &&
- odr_implicit_settag(o, ODR_CONTEXT, 11) &&
- (odr_sequence_of(o, (Odr_fun)z_InternationalString, &(*p)->unitSystems,
- &(*p)->num_unitSystems, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_QueryTypeDetails(ODR o, Z_QueryTypeDetails **p, int opt,
- const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_QueryTypeDetails_private,
- (Odr_fun)z_PrivateCapabilities, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_QueryTypeDetails_rpn,
- (Odr_fun)z_RpnCapabilities, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_QueryTypeDetails_iso8777,
- (Odr_fun)z_Iso8777Capabilities, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_QueryTypeDetails_z39_58,
- (Odr_fun)z_HumanString, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_QueryTypeDetails_erpn,
- (Odr_fun)z_RpnCapabilities, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 5, Z_QueryTypeDetails_rankedList,
- (Odr_fun)z_HumanString, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_PrivateCapOperator(ODR o, Z_PrivateCapOperator **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->roperator,
- ODR_CONTEXT, 0, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 1, 1) &&
- odr_sequence_end(o);
-}
-
-int z_PrivateCapabilities(ODR o, Z_PrivateCapabilities **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit_settag(o, ODR_CONTEXT, 0) &&
- (odr_sequence_of(o, (Odr_fun)z_PrivateCapOperator, &(*p)->operators,
- &(*p)->num_operators, 0) || odr_ok(o)) &&
- odr_implicit_settag(o, ODR_CONTEXT, 1) &&
- (odr_sequence_of(o, (Odr_fun)z_SearchKey, &(*p)->searchKeys,
- &(*p)->num_searchKeys, 0) || odr_ok(o)) &&
- odr_implicit_settag(o, ODR_CONTEXT, 2) &&
- (odr_sequence_of(o, (Odr_fun)z_HumanString, &(*p)->description,
- &(*p)->num_description, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_RpnCapabilities(ODR o, Z_RpnCapabilities **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit_settag(o, ODR_CONTEXT, 0) &&
- (odr_sequence_of(o, (Odr_fun)odr_integer, &(*p)->operators,
- &(*p)->num_operators, 0) || odr_ok(o)) &&
- odr_implicit(o, odr_bool, &(*p)->resultSetAsOperandSupported,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, odr_bool, &(*p)->restrictionOperandSupported,
- ODR_CONTEXT, 2, 0) &&
- odr_implicit(o, z_ProximitySupport, &(*p)->proximity, ODR_CONTEXT,
- 3, 1) &&
- odr_sequence_end(o);
-}
-
-int z_Iso8777Capabilities(ODR o, Z_Iso8777Capabilities **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit_settag(o, ODR_CONTEXT, 0) &&
- odr_sequence_of(o, (Odr_fun)z_SearchKey, &(*p)->searchKeys,
- &(*p)->num_searchKeys, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->restrictions, ODR_CONTEXT,
- 1, 1) &&
- odr_sequence_end(o);
-}
-
-int z_ProxSupportPrivate(ODR o, Z_ProxSupportPrivate **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_integer, &(*p)->unit, ODR_CONTEXT, 0, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 1, 1) &&
- odr_sequence_end(o);
-}
-
-int z_ProxSupportUnit(ODR o, Z_ProxSupportUnit **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ProxSupportUnit_known,
- (Odr_fun)odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_ProxSupportUnit_private,
- (Odr_fun)z_ProxSupportPrivate, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_ProximitySupport(ODR o, Z_ProximitySupport **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_bool, &(*p)->anySupport, ODR_CONTEXT, 0, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 1) &&
- (odr_sequence_of(o, (Odr_fun)z_ProxSupportUnit, &(*p)->unitsSupported,
- &(*p)->num_unitsSupported, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_SearchKey(ODR o, Z_SearchKey **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->searchKey,
- ODR_CONTEXT, 0, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 1, 1) &&
- odr_sequence_end(o);
-}
-
-int z_AccessRestrictionsUnit(ODR o, Z_AccessRestrictionsUnit **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_explicit(o, odr_integer, &(*p)->accessType, ODR_CONTEXT, 0, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->accessText, ODR_CONTEXT, 1, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 2) &&
- (odr_sequence_of(o, (Odr_fun)odr_oid, &(*p)->accessChallenges,
- &(*p)->num_accessChallenges, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_AccessRestrictions(ODR o, Z_AccessRestrictions **p, int opt,
- const char *name)
-{
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_sequence_of(o, (Odr_fun)z_AccessRestrictionsUnit, &(*p)->elements,
- &(*p)->num, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_CostsOtherCharge(ODR o, Z_CostsOtherCharge **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_HumanString, &(*p)->forWhat, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_Charge, &(*p)->charge, ODR_CONTEXT, 2, 1) &&
- odr_sequence_end(o);
-}
-
-int z_Costs(ODR o, Z_Costs **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_Charge, &(*p)->connectCharge, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_Charge, &(*p)->connectTime, ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, z_Charge, &(*p)->displayCharge, ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, z_Charge, &(*p)->searchCharge, ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, z_Charge, &(*p)->subscriptCharge, ODR_CONTEXT, 4, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 5) &&
- (odr_sequence_of(o, (Odr_fun)z_CostsOtherCharge, &(*p)->otherCharges,
- &(*p)->num_otherCharges, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_Charge(ODR o, Z_Charge **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_IntUnit, &(*p)->cost, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_Unit, &(*p)->perWhat, ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->text, ODR_CONTEXT, 3, 1) &&
- odr_sequence_end(o);
-}
-
-int z_DatabaseList(ODR o, Z_DatabaseList **p, int opt, const char *name)
-{
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_sequence_of(o, z_DatabaseName, &(*p)->databases,
- &(*p)->num_databases, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_AttributeCombinations(ODR o, Z_AttributeCombinations **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_oid, &(*p)->defaultAttributeSet,
- ODR_CONTEXT, 0, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 1) &&
- odr_sequence_of(o, (Odr_fun)z_AttributeCombination,
- &(*p)->legalCombinations,
- &(*p)->num_legalCombinations, 0) &&
- odr_sequence_end(o);
-}
-
-int z_AttributeCombination(ODR o, Z_AttributeCombination **p, int opt,
- const char *name)
-{
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_sequence_of(o, (Odr_fun)z_AttributeOccurrence, &(*p)->occurrences,
- &(*p)->num_occurrences, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_AttributeValueList(ODR o, Z_AttributeValueList **p, int opt,
- const char *name)
-{
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_sequence_of(o, (Odr_fun)z_StringOrNumeric, &(*p)->attributes,
- &(*p)->num_attributes, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_AttributeOccurrence(ODR o, Z_AttributeOccurrence **p, int opt,
- const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_AttributeOcc_any_or_none,
- (Odr_fun)odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_AttributeOcc_specific,
- (Odr_fun)z_AttributeValueList, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_oid, &(*p)->attributeSet, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, odr_integer, &(*p)->attributeType,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, odr_null, &(*p)->mustBeSupplied, ODR_CONTEXT, 2, 1) &&
- odr_choice(o, arm, &(*p)->attributeValues, &(*p)->which, 0) &&
- odr_sequence_end(o);
-}
-
-int z_AttributeValue(ODR o, Z_AttributeValue **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_explicit(o, z_StringOrNumeric, &(*p)->value, ODR_CONTEXT, 0, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 1, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 2) &&
- (odr_sequence_of(o, (Odr_fun)z_StringOrNumeric, &(*p)->subAttributes,
- &(*p)->num_subAttributes, 0) || odr_ok(o)) &&
- odr_implicit_settag(o, ODR_CONTEXT, 3) &&
- (odr_sequence_of(o, (Odr_fun)z_StringOrNumeric, &(*p)->superAttributes,
- &(*p)->num_superAttributes, 0) || odr_ok(o)) &&
- odr_implicit(o, odr_null, &(*p)->partialSupport, ODR_CONTEXT, 4, 1) &&
- odr_sequence_end(o);
-}
-
-
-
-int z_TargetInfo(ODR o, Z_TargetInfo **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_CommonInfo, &(*p)->commonInfo,
- ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->name,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->recentNews,
- ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, z_IconObject, &(*p)->icon,
- ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, odr_bool, &(*p)->namedResultSets,
- ODR_CONTEXT, 4, 0) &&
- odr_implicit(o, odr_bool, &(*p)->multipleDBsearch,
- ODR_CONTEXT, 5, 0) &&
- odr_implicit(o, odr_integer, &(*p)->maxResultSets,
- ODR_CONTEXT, 6, 1) &&
- odr_implicit(o, odr_integer, &(*p)->maxResultSize,
- ODR_CONTEXT, 7, 1) &&
- odr_implicit(o, odr_integer, &(*p)->maxTerms,
- ODR_CONTEXT, 8, 1) &&
- odr_implicit(o, z_IntUnit, &(*p)->timeoutInterval,
- ODR_CONTEXT, 9, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->welcomeMessage,
- ODR_CONTEXT, 10, 1) &&
- odr_implicit(o, z_ContactInfo, &(*p)->contactInfo,
- ODR_CONTEXT, 11, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 12, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 13) &&
- (odr_sequence_of(o, z_InternationalString, &(*p)->nicknames,
- &(*p)->num_nicknames, 0) || odr_ok(o)) &&
- odr_implicit(o, z_HumanString, &(*p)->usageRest,
- ODR_CONTEXT, 14, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->paymentAddr,
- ODR_CONTEXT, 15, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->hours, ODR_CONTEXT, 16, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 17) &&
- (odr_sequence_of(o, (Odr_fun)z_DatabaseList, &(*p)->dbCombinations,
- &(*p)->num_dbCombinations, 0) || odr_ok(o)) &&
- odr_implicit_settag(o, ODR_CONTEXT, 18) &&
- (odr_sequence_of(o, (Odr_fun)z_NetworkAddress, &(*p)->addresses,
- &(*p)->num_addresses, 0) || odr_ok(o)) &&
- odr_implicit_settag (o, ODR_CONTEXT, 101) &&
- (odr_sequence_of(o, (Odr_fun) z_InternationalString, &(*p)->languages,
- &(*p)->num_languages, 0) || odr_ok(o)) &&
- odr_implicit(o, z_AccessInfo, &(*p)->commonAccessInfo,
- ODR_CONTEXT, 19, 1) &&
- odr_sequence_end(o);
-}
-
-int z_DatabaseInfo(ODR o, Z_DatabaseInfo **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_DatabaseInfo_actualNumber,
- (Odr_fun)odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_DatabaseInfo_approxNumber,
- (Odr_fun)odr_integer, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_CommonInfo, &(*p)->commonInfo, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_DatabaseName, &(*p)->name, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, odr_null, &(*p)->explainDatabase, ODR_CONTEXT, 2, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 3) &&
- (odr_sequence_of(o, z_DatabaseName, &(*p)->nicknames,
- &(*p)->num_nicknames, 0) || odr_ok(o)) &&
- odr_implicit(o, z_IconObject, &(*p)->icon, ODR_CONTEXT, 4, 1) &&
- odr_implicit(o, odr_bool, &(*p)->userFee, ODR_CONTEXT, 5, 0) &&
- odr_implicit(o, odr_bool, &(*p)->available, ODR_CONTEXT, 6, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->titleString,
- ODR_CONTEXT, 7, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 8) &&
- (odr_sequence_of(o, (Odr_fun)z_HumanString, &(*p)->keywords,
- &(*p)->num_keywords, 0) || odr_ok(o)) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 9, 1) &&
- odr_implicit(o, z_DatabaseList, &(*p)->associatedDbs,
- ODR_CONTEXT, 10, 1) &&
- odr_implicit(o, z_DatabaseList, &(*p)->subDbs, ODR_CONTEXT, 11, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->disclaimers,
- ODR_CONTEXT, 12, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->news, ODR_CONTEXT, 13, 1) &&
- ((odr_constructed_begin(o, &(*p)->u.actualNumber,
- ODR_CONTEXT, 14, 0) &&
- odr_choice(o, arm, &(*p)->u.actualNumber, &(*p)->which, 0) &&
- odr_constructed_end(o)) || odr_ok(o)) &&
- odr_implicit(o, z_HumanString, &(*p)->defaultOrder,
- ODR_CONTEXT, 15, 1) &&
- odr_implicit(o, odr_integer, &(*p)->avRecordSize,
- ODR_CONTEXT, 16, 1) &&
- odr_implicit(o, odr_integer, &(*p)->maxRecordSize,
- ODR_CONTEXT, 17, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->hours, ODR_CONTEXT, 18, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->bestTime, ODR_CONTEXT, 19, 1) &&
- odr_implicit(o, odr_generalizedtime, &(*p)->lastUpdate,
- ODR_CONTEXT, 20, 1) &&
- odr_implicit(o, z_IntUnit, &(*p)->updateInterval,
- ODR_CONTEXT, 21, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->coverage, ODR_CONTEXT, 22, 1) &&
- odr_implicit(o, odr_bool, &(*p)->proprietary, ODR_CONTEXT, 23, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->copyrightText,
- ODR_CONTEXT, 24, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->copyrightNotice,
- ODR_CONTEXT, 25, 1) &&
- odr_implicit(o, z_ContactInfo, &(*p)->producerContactInfo,
- ODR_CONTEXT, 26, 1) &&
- odr_implicit(o, z_ContactInfo, &(*p)->supplierContactInfo,
- ODR_CONTEXT, 27, 1) &&
- odr_implicit(o, z_ContactInfo, &(*p)->submissionContactInfo,
- ODR_CONTEXT, 28, 1) &&
- odr_implicit(o, z_AccessInfo, &(*p)->accessInfo, ODR_CONTEXT, 29, 1) &&
- odr_sequence_end(o);
-}
-
-int z_TagTypeMapping(ODR o, Z_TagTypeMapping **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt;
- return
- odr_implicit(o, odr_integer, &(*p)->tagType, ODR_CONTEXT, 0, 0) &&
- odr_implicit(o, odr_oid, &(*p)->tagSet, ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, odr_null, &(*p)->defaultTagType, ODR_CONTEXT, 2, 1) &&
- odr_sequence_end(o);
-}
-
-int z_SchemaInfo(ODR o, Z_SchemaInfo **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_CommonInfo, &(*p)->commonInfo, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, odr_oid, &(*p)->schema, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->name, ODR_CONTEXT,
- 2, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 3, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 4) &&
- (odr_sequence_of(o, (Odr_fun)z_TagTypeMapping, &(*p)->tagTypeMapping,
- &(*p)->num_tagTypeMapping, 0) || odr_ok(o)) &&
- odr_implicit_settag(o, ODR_CONTEXT, 5) &&
- (odr_sequence_of(o, (Odr_fun)z_ElementInfo, &(*p)->recordStructure,
- &(*p)->num_recordStructure, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_ElementInfo(ODR o, Z_ElementInfo **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->elementName,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_Path, &(*p)->elementTagPath, ODR_CONTEXT, 2, 0) &&
- odr_explicit(o, z_ElementDataType, &(*p)->dataType,
- ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, odr_bool, &(*p)->required, ODR_CONTEXT, 4, 0) &&
- odr_implicit(o, odr_bool, &(*p)->repeatable, ODR_CONTEXT, 5, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 6, 1) &&
- odr_sequence_end(o);
-}
-
-int z_PathUnit(ODR o, Z_PathUnit **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt;
- return
- odr_implicit(o, odr_integer, &(*p)->tagType, ODR_CONTEXT, 1, 0) &&
- odr_explicit(o, z_StringOrNumeric, &(*p)->tagValue,
- ODR_CONTEXT, 2, 0) &&
- odr_sequence_end(o);
-}
-
-int z_Path(ODR o, Z_Path **p, int opt, const char *name)
-{
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- odr_implicit_settag(o, ODR_CONTEXT, 201);
- if (odr_sequence_of(o, (Odr_fun)z_OtherInformationUnit, &(*p)->list,
- &(*p)->num, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_ElementInfoList(ODR o, Z_Path **p, int opt, const char *name)
-{
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- odr_implicit_settag(o, ODR_CONTEXT, 201);
- if (odr_sequence_of(o, (Odr_fun)z_OtherInformationUnit, &(*p)->list,
- &(*p)->num, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_ElementDataType(ODR o, Z_ElementDataType **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_ElementDataType_primitive,
- (Odr_fun)odr_integer, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ElementDataType_structured,
- (Odr_fun)z_ElementInfoList, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_TagSetInfoElements(ODR o, Z_TagSetInfoElements **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt;
- return
- odr_implicit(o, z_InternationalString, &(*p)->elementname,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 2) &&
- (odr_sequence_of(o, z_InternationalString, &(*p)->nicknames,
- &(*p)->num_nicknames, 0) || odr_ok(o)) &&
- odr_explicit(o, z_StringOrNumeric, &(*p)->elementTag,
- ODR_CONTEXT, 3, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 4, 1) &&
- odr_implicit(o, odr_integer, &(*p)->dataType, ODR_CONTEXT, 5, 1) &&
- z_OtherInformation(o, &(*p)->otherTagInfo, 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_TagSetInfo(ODR o, Z_TagSetInfo **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_CommonInfo, &(*p)->commonInfo, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, odr_oid, &(*p)->tagSet, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->name,
- ODR_CONTEXT, 2, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 3, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 4) &&
- (odr_sequence_of(o, (Odr_fun)z_TagSetInfoElements, &(*p)->elements,
- &(*p)->num_elements, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_RecordSyntaxInfo(ODR o, Z_RecordSyntaxInfo **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_CommonInfo, &(*p)->commonInfo, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, odr_oid, &(*p)->recordSyntax, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->name,
- ODR_CONTEXT, 2, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 3) &&
- (odr_sequence_of(o, (Odr_fun)odr_oid, &(*p)->transferSyntaxes,
- &(*p)->num_transferSyntaxes, 0) || odr_ok(o)) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 4, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->asn1Module,
- ODR_CONTEXT, 5, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 6) &&
- (odr_sequence_of(o, (Odr_fun)z_ElementInfo, &(*p)->abstractStructure,
- &(*p)->num_abstractStructure, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_AttributeSetInfo(ODR o, Z_AttributeSetInfo **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_CommonInfo, &(*p)->commonInfo, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, odr_oid, &(*p)->attributeSet, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->name,
- ODR_CONTEXT, 2, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 3) &&
- (odr_sequence_of(o, (Odr_fun)z_AttributeType, &(*p)->attributes,
- &(*p)->num_attributes, 0) || odr_ok(o)) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 4, 1) &&
- odr_sequence_end(o);
-}
-
-int z_AttributeType(ODR o, Z_AttributeType **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->name,
- ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, odr_integer, &(*p)->attributeType,
- ODR_CONTEXT, 2, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 3) &&
- odr_sequence_of(o, (Odr_fun)z_AttributeDescription,
- &(*p)->attributeValues,
- &(*p)->num_attributeValues, 0) &&
- odr_sequence_end(o);
-}
-
-int z_AttributeDescription(ODR o, Z_AttributeDescription **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->name,
- ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 1, 1) &&
- odr_explicit(o, z_StringOrNumeric, &(*p)->attributeValue,
- ODR_CONTEXT, 2, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 3) &&
- (odr_sequence_of(o, (Odr_fun)z_StringOrNumeric,
- &(*p)->equivalentAttributes,
- &(*p)->num_equivalentAttributes, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_TermListElement(ODR o, Z_TermListElement **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->name,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->title, ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, odr_integer, &(*p)->searchCost, ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, odr_bool, &(*p)->scanable, ODR_CONTEXT, 4, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 5) &&
- (odr_sequence_of(o, z_InternationalString, &(*p)->broader,
- &(*p)->num_broader, 0) || odr_ok(o)) &&
- odr_implicit_settag(o, ODR_CONTEXT, 6) &&
- (odr_sequence_of(o, z_InternationalString, &(*p)->narrower,
- &(*p)->num_narrower, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_TermListInfo(ODR o, Z_TermListInfo **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_CommonInfo, &(*p)->commonInfo, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_DatabaseName, &(*p)->databaseName,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 2) &&
- (odr_sequence_of(o, (Odr_fun)z_TermListElement, &(*p)->termLists,
- &(*p)->num_termLists, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_ExtendedServicesInfo(ODR o, Z_ExtendedServicesInfo **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_CommonInfo, &(*p)->commonInfo, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, odr_oid, &(*p)->type, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->name,
- ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, odr_bool, &(*p)->privateType, ODR_CONTEXT, 3, 0) &&
- odr_implicit(o, odr_bool, &(*p)->restrictionsApply,
- ODR_CONTEXT, 5, 0) &&
- odr_implicit(o, odr_bool, &(*p)->feeApply, ODR_CONTEXT, 6, 0) &&
- odr_implicit(o, odr_bool, &(*p)->available, ODR_CONTEXT, 7, 0) &&
- odr_implicit(o, odr_bool, &(*p)->retentionSupported,
- ODR_CONTEXT, 8, 0) &&
- odr_implicit(o, odr_integer, &(*p)->waitAction, ODR_CONTEXT, 9, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 10, 1) &&
- odr_implicit(o, z_External, &(*p)->specificExplain,
- ODR_CONTEXT, 11, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->esASN,
- ODR_CONTEXT, 12, 1) &&
- odr_sequence_end(o);
-}
-
-int z_AttributeDetails(ODR o, Z_AttributeDetails **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_CommonInfo, &(*p)->commonInfo, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_DatabaseName, &(*p)->databaseName,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 2) &&
- (odr_sequence_of(o, (Odr_fun)z_AttributeSetDetails,
- &(*p)->attributesBySet,
- &(*p)->num_attributesBySet, 0) && odr_ok(o)) &&
- odr_implicit(o, z_AttributeCombinations, &(*p)->attributeCombinations,
- ODR_CONTEXT, 3, 1) &&
- odr_sequence_end(o);
-}
-
-int z_AttributeSetDetails(ODR o, Z_AttributeSetDetails **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_oid, &(*p)->attributeSet,
- ODR_CONTEXT, 0, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 1) &&
- odr_sequence_of(o, (Odr_fun)z_AttributeTypeDetails,
- &(*p)->attributesByType,
- &(*p)->num_attributesByType, 0) &&
- odr_sequence_end(o);
-}
-
-int z_AttributeTypeDetails(ODR o, Z_AttributeTypeDetails **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_integer, &(*p)->attributeType,
- ODR_CONTEXT, 0, 0) &&
- odr_implicit(o, z_OmittedAttributeInterpretation,
- &(*p)->defaultIfOmitted,
- ODR_CONTEXT, 1, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 2) &&
- (odr_sequence_of(o, (Odr_fun)z_AttributeValue, &(*p)->attributeValues,
- &(*p)->num_attributeValues, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_OmittedAttributeInterpretation(ODR o,
- Z_OmittedAttributeInterpretation **p,
- int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_explicit(o, z_StringOrNumeric, &(*p)->defaultValue,
- ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->defaultDescription,
- ODR_CONTEXT, 1, 1) &&
- odr_sequence_end(o);
-}
-
-int z_EScanInfo(ODR o, Z_EScanInfo **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_integer, &(*p)->maxStepSize, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->collatingSequence,
- ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, odr_bool, &(*p)->increasing, ODR_CONTEXT, 2, 1) &&
- odr_sequence_end(o);
-}
-
-int z_TermListDetails(ODR o, Z_TermListDetails **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_CommonInfo, &(*p)->commonInfo, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->termListName,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, z_AttributeCombinations, &(*p)->attributes,
- ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, z_EScanInfo, &(*p)->scanInfo, ODR_CONTEXT, 4, 1) &&
- odr_implicit(o, odr_integer, &(*p)->estNumberTerms,
- ODR_CONTEXT, 5, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 6) &&
- (odr_sequence_of(o, (Odr_fun)z_Term, &(*p)->sampleTerms,
- &(*p)->num_sampleTerms, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_ElementSetDetails(ODR o, Z_ElementSetDetails **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_CommonInfo, &(*p)->commonInfo, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_DatabaseName, &(*p)->databaseName,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_ElementSetName, &(*p)->elementSetName,
- ODR_CONTEXT, 2, 0) &&
- odr_implicit(o, odr_oid, &(*p)->recordSyntax, ODR_CONTEXT, 3, 0) &&
- odr_implicit(o, odr_oid, &(*p)->schema, ODR_CONTEXT, 4, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 5, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 6) &&
- (odr_sequence_of(o, (Odr_fun)z_PerElementDetails,
- &(*p)->detailsPerElement,
- &(*p)->num_detailsPerElement, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_RetrievalRecordDetails(ODR o, Z_RetrievalRecordDetails **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_CommonInfo, &(*p)->commonInfo, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_DatabaseName, &(*p)->databaseName,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, odr_oid, &(*p)->schema, ODR_CONTEXT, 2, 0) &&
- odr_implicit(o, odr_oid, &(*p)->recordSyntax, ODR_CONTEXT, 3, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 4, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 5) &&
- (odr_sequence_of(o, (Odr_fun)z_PerElementDetails,
- &(*p)->detailsPerElement,
- &(*p)->num_detailsPerElement, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_PerElementDetails(ODR o, Z_PerElementDetails **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->name,
- ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_RecordTag, &(*p)->recordTag, ODR_CONTEXT, 1, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 2) &&
- (odr_sequence_of(o, (Odr_fun)z_Path, &(*p)->schemaTags,
- &(*p)->num_schemaTags, 0) ||
- odr_ok(o)) &&
- odr_implicit(o, odr_integer, &(*p)->maxSize, ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, odr_integer, &(*p)->minSize, ODR_CONTEXT, 4, 1) &&
- odr_implicit(o, odr_integer, &(*p)->avgSize, ODR_CONTEXT, 5, 1) &&
- odr_implicit(o, odr_integer, &(*p)->fixedSize, ODR_CONTEXT, 6, 1) &&
- odr_implicit(o, odr_bool, &(*p)->repeatable, ODR_CONTEXT, 8, 0) &&
- odr_implicit(o, odr_bool, &(*p)->required, ODR_CONTEXT, 9, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 12, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->contents, ODR_CONTEXT, 13, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->billingInfo,
- ODR_CONTEXT, 14, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->restrictions,
- ODR_CONTEXT, 15, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 16) &&
- (odr_sequence_of(o, z_InternationalString, &(*p)->alternateNames,
- &(*p)->num_alternateNames, 0) || odr_ok(o)) &&
- odr_implicit_settag(o, ODR_CONTEXT, 17) &&
- (odr_sequence_of(o, z_InternationalString, &(*p)->genericNames,
- &(*p)->num_genericNames, 0) || odr_ok(o)) &&
- odr_implicit(o, z_AttributeCombinations, &(*p)->searchAccess,
- ODR_CONTEXT, 18, 1) &&
- odr_sequence_end(o);
-}
-
-int z_RecordTag(ODR o, Z_RecordTag **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_explicit(o, z_StringOrNumeric, &(*p)->qualifier,
- ODR_CONTEXT, 0, 1) &&
- odr_explicit(o, z_StringOrNumeric, &(*p)->tagValue,
- ODR_CONTEXT, 1, 0) &&
- odr_sequence_end(o);
-}
-
-int z_SortDetails(ODR o, Z_SortDetails **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_CommonInfo, &(*p)->commonInfo, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_DatabaseName, &(*p)->databaseName,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 2) &&
- (odr_sequence_of(o, (Odr_fun)z_SortKeyDetails, &(*p)->sortKeys,
- &(*p)->num_sortKeys, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_SortKeyDetails (ODR o, Z_SortKeyDetails **p, int opt, const char *name)
-{
- static Odr_arm arm[] = {
- {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_SortKeyDetails_character,
- (Odr_fun) odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_SortKeyDetails_numeric,
- (Odr_fun) odr_null, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_SortKeyDetails_structured,
- (Odr_fun) z_HumanString, 0},
- {-1, -1, -1, -1, (Odr_fun) 0, 0}
- };
- if (!odr_sequence_begin (o, p, sizeof(**p), 0))
- return opt && odr_ok (o);
- return
- odr_implicit (o, z_HumanString,
- &(*p)->description, ODR_CONTEXT, 0, 1) &&
- odr_implicit_settag (o, ODR_CONTEXT, 1) &&
- (odr_sequence_of(o, (Odr_fun) z_Specification,
- &(*p)->elementSpecifications,
- &(*p)->num_elementSpecifications, 0) || odr_ok(o)) &&
- odr_implicit (o, z_AttributeCombinations,
- &(*p)->attributeSpecifications, ODR_CONTEXT, 2, 1) &&
- ((odr_constructed_begin (o, &(*p)->u, ODR_CONTEXT, 3, 0) &&
- odr_choice (o, arm, &(*p)->u, &(*p)->which, 0) &&
- odr_constructed_end (o)) || odr_ok(o)) &&
- odr_implicit (o, odr_integer,
- &(*p)->caseSensitivity, ODR_CONTEXT, 4, 1) &&
- odr_sequence_end (o);
-}
-
-int z_ProcessingInformation(ODR o, Z_ProcessingInformation **p, int opt,
- const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_CommonInfo, &(*p)->commonInfo, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_DatabaseName, &(*p)->databaseName,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, odr_integer, &(*p)->processingContext,
- ODR_CONTEXT, 2, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->name,
- ODR_CONTEXT, 3, 0) &&
- odr_implicit(o, odr_oid, &(*p)->oid, ODR_CONTEXT, 4, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 5, 1) &&
- odr_implicit(o, z_External, &(*p)->instructions, ODR_CONTEXT, 6, 1) &&
- odr_sequence_end(o);
-}
-
-int z_VariantSetInfo(ODR o, Z_VariantSetInfo **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_CommonInfo, &(*p)->commonInfo, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, odr_oid, &(*p)->variantSet, ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->name,
- ODR_CONTEXT, 2, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 3) &&
- (odr_sequence_of(o, (Odr_fun)z_VariantClass, &(*p)->variants,
- &(*p)->num_variants, 0) || odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_VariantClass(ODR o, Z_VariantClass **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->name,
- ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, odr_integer, &(*p)->variantClass, ODR_CONTEXT, 2, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 3) &&
- odr_sequence_of(o, (Odr_fun)z_VariantType, &(*p)->variantTypes,
- &(*p)->num_variantTypes, 0) &&
- odr_sequence_end(o);
-}
-
-int z_VariantType(ODR o, Z_VariantType **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->name,
- ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 1, 1) &&
- odr_implicit(o, odr_integer, &(*p)->variantType,
- ODR_CONTEXT, 2, 0) &&
- odr_implicit(o, z_VariantValue, &(*p)->variantValue,
- ODR_CONTEXT, 3, 1) &&
- odr_sequence_end(o);
-}
-
-int z_VariantValue(ODR o, Z_VariantValue **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_explicit(o, odr_integer, &(*p)->dataType, ODR_CONTEXT, 0, 0) &&
- odr_explicit(o, z_ValueSet, &(*p)->values, ODR_CONTEXT, 1, 1) &&
- odr_sequence_end(o);
-}
-
-int z_ValueSetEnumerated(ODR o, Z_ValueSetEnumerated **p, int opt,
- const char *name)
-{
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_sequence_of(o, (Odr_fun)z_ValueDescription, &(*p)->elements,
- &(*p)->num, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_ValueSet(ODR o, Z_ValueSet **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_ValueSet_range,
- (Odr_fun)z_ValueRange, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ValueSet_enumerated,
- (Odr_fun)z_ValueSetEnumerated, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_ValueRange(ODR o, Z_ValueRange **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_explicit(o, z_ValueDescription, &(*p)->lower, ODR_CONTEXT, 0, 1) &&
- odr_explicit(o, z_ValueDescription, &(*p)->upper, ODR_CONTEXT, 1, 1) &&
- odr_sequence_end(o);
-}
-
-int z_ValueDescription(ODR o, Z_ValueDescription **p, int opt,
- const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_NONE, -1, -1, Z_ValueDescription_integer,
- (Odr_fun)odr_integer, 0},
- {ODR_NONE, -1, -1, Z_ValueDescription_string,
- (Odr_fun)z_InternationalString, 0},
- {ODR_NONE, -1, -1, Z_ValueDescription_octets,
- (Odr_fun)odr_octetstring, 0},
- {ODR_NONE, -1, -1, Z_ValueDescription_oid,
- (Odr_fun)odr_oid, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ValueDescription_unit,
- (Odr_fun)z_Unit, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_ValueDescription_valueAndUnit,
- (Odr_fun)z_IntUnit, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_UnitInfo(ODR o, Z_UnitInfo **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_CommonInfo, &(*p)->commonInfo, ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->unitSystem,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 2, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 3) &&
- (odr_sequence_of(o, (Odr_fun)z_UnitType, &(*p)->units,
- &(*p)->num_units, 0) ||
- odr_ok(o)) &&
- odr_sequence_end(o);
-}
-
-int z_UnitType(ODR o, Z_UnitType **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->name,
- ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 1, 1) &&
- odr_explicit(o, z_StringOrNumeric, &(*p)->unitType,
- ODR_CONTEXT, 2, 0) &&
- odr_implicit_settag(o, ODR_CONTEXT, 3) &&
- odr_sequence_of(o, (Odr_fun)z_Units, &(*p)->units,
- &(*p)->num_units, 0) &&
- odr_sequence_end(o);
-}
-
-int z_Units(ODR o, Z_Units **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->name,
- ODR_CONTEXT, 0, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 1, 1) &&
- odr_explicit(o, z_StringOrNumeric, &(*p)->unit,
- ODR_CONTEXT, 2, 0) &&
- odr_sequence_end(o);
-}
-
-int z_CategoryList(ODR o, Z_CategoryList **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_CommonInfo, &(*p)->commonInfo, ODR_CONTEXT, 0, 1) &&
- odr_implicit_settag(o, ODR_CONTEXT, 1) &&
- odr_sequence_of(o, (Odr_fun)z_CategoryInfo, &(*p)->categories,
- &(*p)->num_categories, 0) &&
- odr_sequence_end(o);
-}
-
-int z_CategoryInfo(ODR o, Z_CategoryInfo **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, z_InternationalString, &(*p)->category,
- ODR_CONTEXT, 1, 0) &&
- odr_implicit(o, z_InternationalString, &(*p)->originalCategory,
- ODR_CONTEXT, 2, 1) &&
- odr_implicit(o, z_HumanString, &(*p)->description,
- ODR_CONTEXT, 3, 1) &&
- odr_implicit(o, z_InternationalString, &(*p)->asn1Module,
- ODR_CONTEXT, 4, 1) &&
- odr_sequence_end(o);
-}
-
-int z_ExplainRecord(ODR o, Z_ExplainRecord **p, int opt, const char *name)
-{
- static Odr_arm arm[] =
- {
- {ODR_IMPLICIT, ODR_CONTEXT, 0, Z_Explain_targetInfo,
- (Odr_fun)z_TargetInfo, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Explain_databaseInfo,
- (Odr_fun)z_DatabaseInfo, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_Explain_schemaInfo,
- (Odr_fun)z_SchemaInfo, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_Explain_tagSetInfo,
- (Odr_fun)z_TagSetInfo, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_Explain_recordSyntaxInfo,
- (Odr_fun)z_RecordSyntaxInfo, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 5, Z_Explain_attributeSetInfo,
- (Odr_fun)z_AttributeSetInfo, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 6, Z_Explain_termListInfo,
- (Odr_fun)z_TermListInfo, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 7, Z_Explain_extendedServicesInfo,
- (Odr_fun)z_ExtendedServicesInfo, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 8, Z_Explain_attributeDetails,
- (Odr_fun)z_AttributeDetails, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 9, Z_Explain_termListDetails,
- (Odr_fun)z_TermListDetails, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 10, Z_Explain_elementSetDetails,
- (Odr_fun)z_ElementSetDetails, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 11, Z_Explain_retrievalRecordDetails,
- (Odr_fun)z_RetrievalRecordDetails, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 12, Z_Explain_sortDetails,
- (Odr_fun)z_SortDetails, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 13, Z_Explain_processing,
- (Odr_fun)z_ProcessingInformation, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 14, Z_Explain_variants,
- (Odr_fun)z_VariantSetInfo, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 15, Z_Explain_units,
- (Odr_fun)z_UnitInfo, 0},
- {ODR_IMPLICIT, ODR_CONTEXT, 100, Z_Explain_categoryList,
- (Odr_fun)z_CategoryList, 0},
- {-1, -1, -1, -1, 0, 0}
- };
-
- if (!odr_initmember(o, p, sizeof(**p)))
- return opt && odr_ok(o);
- if (odr_choice(o, arm, &(*p)->u, &(*p)->which, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
+++ /dev/null
-/*
- * Copyright (c) 1995-1998, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- */
-
-#ifndef PRT_EXP_H
-#define PRT_EXP_H
-
-#include <yaz/yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct Z_CommonInfo
-{
- char *dateAdded; /* OPTIONAL */
- char *dateChanged; /* OPTIONAL */
- char *expiry; /* OPTIONAL */
- char *humanStringLanguage; /* OPTIONAL */
- Z_OtherInformation *otherInfo; /* OPTIONAL */
-} Z_CommonInfo;
-
-typedef struct Z_HumanStringUnit
-{
- char *language; /* OPTIONAL */
- char *text;
-} Z_HumanStringUnit;
-
-typedef struct Z_HumanString
-{
- int num_strings;
- Z_HumanStringUnit **strings;
-} Z_HumanString;
-
-typedef struct Z_IconObjectUnit
-{
- int which;
-#define Z_IconObjectUnit_ianaType 0
-#define Z_IconObjectUnit_z3950type 1
-#define Z_IconObjectUnit_otherType 2
- char *bodyType;
- Odr_oct *content;
-} Z_IconObjectUnit;
-
-typedef struct Z_IconObject
-{
- int num;
- Z_IconObjectUnit **elements;
-} Z_IconObject;
-
-typedef struct Z_ContactInfo
-{
- char *name; /* OPTIONAL */
- Z_HumanString *description; /* OPTIONAL */
- Z_HumanString *address; /* OPTIONAL */
- char *email; /* OPTIONAL */
- char *phone; /* OPTIONAL */
-} Z_ContactInfo;
-
-typedef struct Z_NetworkAddressIA
-{
- char *hostAddress;
- int *port;
-} Z_NetworkAddressIA;
-
-typedef struct Z_NetworkAddressOPA
-{
- char *pSel;
- char *sSel; /* OPTIONAL */
- char *tSel; /* OPTIONAL */
- char *nSap;
-} Z_NetworkAddressOPA;
-
-typedef struct Z_NetworkAddressOther
-{
- char *type;
- char *address;
-} Z_NetworkAddressOther;
-
-typedef struct Z_NetworkAddress
-{
- int which;
-#define Z_NetworkAddress_iA 0
-#define Z_NetworkAddress_oPA 1
-#define Z_NetworkAddress_other 2
- union
- {
- Z_NetworkAddressIA *internetAddress;
- Z_NetworkAddressOPA *osiPresentationAddress;
- Z_NetworkAddressOther *other;
- } u;
-} Z_NetworkAddress;
-
-typedef struct Z_PrivateCapOperator
-{
- char *roperator;
- Z_HumanString *description; /* OPTIONAL */
-} Z_PrivateCapOperator;
-
-typedef struct Z_SearchKey
-{
- char *searchKey;
- Z_HumanString *description; /* OPTIONAL */
-} Z_SearchKey;
-
-typedef struct Z_PrivateCapabilities
-{
- int num_operators;
- Z_PrivateCapOperator **operators; /* OPTIONAL */
- int num_searchKeys;
- Z_SearchKey **searchKeys; /* OPTIONAL */
- int num_description;
- Z_HumanString **description; /* OPTIONAL */
-} Z_PrivateCapabilities;
-
-typedef struct Z_ProxSupportPrivate
-{
- int *unit;
- Z_HumanString *description; /* OPTIONAL */
-} Z_ProxSupportPrivate;
-
-typedef struct Z_ProxSupportUnit
-{
- int which;
-#define Z_ProxSupportUnit_known 0
-#define Z_ProxSupportUnit_private 1
- union
- {
- int *known;
- Z_ProxSupportPrivate *zprivate;
- } u;
-} Z_ProxSupportUnit;
-
-typedef struct Z_ProximitySupport
-{
- bool_t *anySupport;
- int num_unitsSupported;
- Z_ProxSupportUnit **unitsSupported; /* OPTIONAL */
-} Z_ProximitySupport;
-
-typedef struct Z_RpnCapabilities
-{
- int num_operators;
- int **operators; /* OPTIONAL */
- bool_t *resultSetAsOperandSupported;
- bool_t *restrictionOperandSupported;
- Z_ProximitySupport *proximity; /* OPTIONAL */
-} Z_RpnCapabilities;
-
-typedef struct Z_Iso8777Capabilities
-{
- int num_searchKeys;
- Z_SearchKey **searchKeys;
- Z_HumanString *restrictions; /* OPTIONAL */
-} Z_Iso8777Capabilities;
-
-typedef struct Z_QueryTypeDetails
-{
- int which;
-#define Z_QueryTypeDetails_private 0
-#define Z_QueryTypeDetails_rpn 1
-#define Z_QueryTypeDetails_iso8777 2
-#define Z_QueryTypeDetails_z39_58 3
-#define Z_QueryTypeDetails_erpn 4
-#define Z_QueryTypeDetails_rankedList 5
- union
- {
- Z_PrivateCapabilities *zprivate;
- Z_RpnCapabilities *rpn;
- Z_Iso8777Capabilities *iso8777;
- Z_HumanString *z3958;
- Z_RpnCapabilities *erpn;
- Z_HumanString *rankedList;
- } u;
-} Z_QueryTypeDetails;
-
-typedef struct Z_AccessRestrictionsUnit
-{
- int *accessType;
-#define Z_AccessRestrictionsUnit_any 0
-#define Z_AccessRestrictionsUnit_search 1
-#define Z_AccessRestrictionsUnit_present 2
-#define Z_AccessRestrictionsUnit_specific_elements 3
-#define Z_AccessRestrictionsUnit_extended_services 4
-#define Z_AccessRestrictionsUnit_by_database 5
- Z_HumanString *accessText; /* OPTIONAL */
- int num_accessChallenges;
- Odr_oid **accessChallenges; /* OPTIONAL */
-} Z_AccessRestrictionsUnit;
-
-typedef struct Z_AccessRestrictions
-{
- int num;
- Z_AccessRestrictionsUnit **elements;
-} Z_AccessRestrictions;
-
-typedef struct Z_Charge
-{
- Z_IntUnit *cost;
- Z_Unit *perWhat; /* OPTIONAL */
- Z_HumanString *text; /* OPTIONAL */
-} Z_Charge;
-
-typedef struct Z_CostsOtherCharge
-{
- Z_HumanString *forWhat;
- Z_Charge *charge;
-} Z_CostsOtherCharge;
-
-typedef struct Z_Costs
-{
- Z_Charge *connectCharge; /* OPTIONAL */
- Z_Charge *connectTime; /* OPTIONAL */
- Z_Charge *displayCharge; /* OPTIONAL */
- Z_Charge *searchCharge; /* OPTIONAL */
- Z_Charge *subscriptCharge; /* OPTIONAL */
- int num_otherCharges;
- Z_CostsOtherCharge **otherCharges; /* OPTIONAL */
-} Z_Costs;
-
-typedef struct Z_AccessInfo
-{
- int num_queryTypesSupported;
- Z_QueryTypeDetails **queryTypesSupported; /* OPTIONAL */
- int num_diagnosticsSets;
- Odr_oid **diagnosticsSets; /* OPTIONAL */
- int num_attributeSetIds;
- Odr_oid **attributeSetIds; /* OPTIONAL */
- int num_schemas;
- Odr_oid **schemas; /* OPTIONAL */
- int num_recordSyntaxes;
- Odr_oid **recordSyntaxes; /* OPTIONAL */
- int num_resourceChallenges;
- Odr_oid **resourceChallenges; /* OPTIONAL */
- Z_AccessRestrictions *restrictedAccess; /* OPTIONAL */
- Z_Costs *costInfo; /* OPTIONAL */
- int num_variantSets;
- Odr_oid **variantSets; /* OPTIONAL */
- int num_elementSetNames;
- char **elementSetNames; /* OPTIONAL */
- int num_unitSystems;
- char **unitSystems; /* OPTIONAL */
-} Z_AccessInfo;
-
-typedef struct Z_DatabaseList
-{
- int num_databases;
- Z_DatabaseName **databases;
-} Z_DatabaseList;
-
-typedef struct Z_AttributeValueList
-{
- int num_attributes;
- Z_StringOrNumeric **attributes;
-} Z_AttributeValueList;
-
-typedef struct Z_AttributeOccurrence
-{
- Odr_oid *attributeSet; /* OPTIONAL */
- int *attributeType;
- Odr_null *mustBeSupplied; /* OPTIONAL */
- int which;
-#define Z_AttributeOcc_any_or_none 0
-#define Z_AttributeOcc_specific 1
- union
- {
- Odr_null *any_or_none;
- Z_AttributeValueList *specific;
- } attributeValues;
-} Z_AttributeOccurrence;
-
-typedef struct Z_AttributeCombination
-{
- int num_occurrences;
- Z_AttributeOccurrence **occurrences;
-} Z_AttributeCombination;
-
-typedef struct Z_AttributeCombinations
-{
- Odr_oid *defaultAttributeSet;
- int num_legalCombinations;
- Z_AttributeCombination **legalCombinations;
-} Z_AttributeCombinations;
-
-typedef struct Z_AttributeValue
-{
- Z_StringOrNumeric *value;
- Z_HumanString *description; /* OPTIONAL */
- int num_subAttributes;
- Z_StringOrNumeric **subAttributes; /* OPTIONAL */
- int num_superAttributes;
- Z_StringOrNumeric **superAttributes; /* OPTIONAL */
- Odr_null *partialSupport; /* OPTIONAL */
-} Z_AttributeValue;
-
-typedef struct Z_TargetInfo
-{
- Z_CommonInfo *commonInfo; /* OPTIONAL */
- /*
- * key elements
- */
- char *name;
- /*
- * non-key brief elements
- */
- Z_HumanString *recentNews; /* OPTIONAL */
- Z_IconObject *icon; /* OPTIONAL */
- bool_t *namedResultSets;
- bool_t *multipleDBsearch;
- int *maxResultSets; /* OPTIONAL */
- int *maxResultSize; /* OPTIONAL */
- int *maxTerms; /* OPTIONAL */
- Z_IntUnit *timeoutInterval; /* OPTIONAL */
- Z_HumanString *welcomeMessage; /* OPTIONAL */
- /*
- * non-brief elements
- */
- Z_ContactInfo *contactInfo; /* OPTIONAL */
- Z_HumanString *description; /* OPTIONAL */
- int num_nicknames;
- char **nicknames;
- Z_HumanString *usageRest; /* OPTIONAL */
- Z_HumanString *paymentAddr; /* OPTIONAL */
- Z_HumanString *hours; /* OPTIONAL */
- int num_dbCombinations;
- Z_DatabaseList **dbCombinations; /* OPTIONAL */
- int num_addresses;
- Z_NetworkAddress **addresses; /* OPTIONAL */
- int num_languages;
- char **languages; /* OPTIONAL */
-
- Z_AccessInfo *commonAccessInfo; /* OPTIONAL */
-} Z_TargetInfo;
-
-typedef struct Z_DatabaseInfo
-{
- Z_CommonInfo *commonInfo; /* OPTIONAL */
- /*
- * Key elements
- */
- Z_DatabaseName *name;
- /*
- * Non-key elements.
- */
- Odr_null *explainDatabase; /* OPTIONAL */
- int num_nicknames;
- Z_DatabaseName **nicknames; /* OPTIONAL */
- Z_IconObject *icon; /* OPTIONAL */
- bool_t *userFee;
- bool_t *available;
- Z_HumanString *titleString; /* OPTIONAL */
- /*
- * Non-brief elements.
- */
- int num_keywords;
- Z_HumanString **keywords; /* OPTIONAL */
- Z_HumanString *description; /* OPTIONAL */
- Z_DatabaseList *associatedDbs; /* OPTIONAL */
- Z_DatabaseList *subDbs; /* OPTIONAL */
- Z_HumanString *disclaimers; /* OPTIONAL */
- Z_HumanString *news; /* OPTIONAL */
-
-#if 1
- int which;
- union {
- int *actualNumber;
- int *approxNumber;
-#define Z_DatabaseInfo_actualNumber 1
-#define Z_DatabaseInfo_approxNumber 2
- } u; /* OPT */
-
-#else
- int recordCount_which;
-#define Z_DatabaseInfo_actualNumber 0
-#define Z_DatabaseInfo_approxNumber 1
- int *recordCount; /* OPTIONAL */
-#endif
- Z_HumanString *defaultOrder; /* OPTIONAL */
- int *avRecordSize; /* OPTIONAL */
- int *maxRecordSize; /* OPTIONAL */
- Z_HumanString *hours; /* OPTIONAL */
- Z_HumanString *bestTime; /* OPTIONAL */
- char *lastUpdate; /* OPTIONAL */
- Z_IntUnit *updateInterval; /* OPTIONAL */
- Z_HumanString *coverage; /* OPTIONAL */
- bool_t *proprietary; /* OPTIONAL */
- Z_HumanString *copyrightText; /* OPTIONAL */
- Z_HumanString *copyrightNotice; /* OPTIONAL */
- Z_ContactInfo *producerContactInfo; /* OPTIONAL */
- Z_ContactInfo *supplierContactInfo; /* OPTIONAL */
- Z_ContactInfo *submissionContactInfo; /* OPTIONAL */
- Z_AccessInfo *accessInfo; /* OPTIONAL */
-} Z_DatabaseInfo;
-
-typedef struct Z_TagTypeMapping
-{
- int *tagType;
- Odr_oid *tagSet; /* OPTIONAL */
- Odr_null *defaultTagType; /* OPTIONAL */
-} Z_TagTypeMapping;
-
-typedef struct Z_PathUnit
-{
- int *tagType;
- Z_StringOrNumeric *tagValue;
-} Z_PathUnit;
-
-typedef struct Z_Path
-{
- int num;
- Z_PathUnit **list;
-} Z_Path;
-
-struct Z_ElementDataType;
-typedef struct Z_ElementDataType Z_ElementDataType;
-
-typedef struct Z_ElementInfo
-{
- char *elementName;
- Z_Path *elementTagPath;
- Z_ElementDataType *dataType; /* OPTIONAL */
- bool_t *required;
- bool_t *repeatable;
- Z_HumanString *description; /* OPTIONAL */
-} Z_ElementInfo;
-
-typedef struct Z_ElementInfoList
-{
- int num;
- Z_ElementInfo **list;
-} Z_ElementInfoList;
-
-struct Z_ElementDataType
-{
- int which;
-#define Z_ElementDataType_primitive 0
-#define Z_ElementDataType_structured 1
- union
- {
- int *primitive;
-#define Z_PrimitiveDataType_octetString 0
-#define Z_PrimitiveDataType_numeric 1
-#define Z_PrimitiveDataType_date 2
-#define Z_PrimitiveDataType_external 3
-#define Z_PrimitiveDataType_string 4
-#define Z_PrimitiveDataType_trueOrFalse 5
-#define Z_PrimitiveDataType_oid 6
-#define Z_PrimitiveDataType_intUnit 7
-#define Z_PrimitiveDataType_empty 8
-#define Z_PrimitiveDataType_noneOfTheAbove 100
- Z_ElementInfoList *structured;
- } u;
-};
-
-typedef struct Z_TagSetInfoElements
-{
- char *elementname;
- int num_nicknames;
- char **nicknames; /* OPTIONAL */
- Z_StringOrNumeric *elementTag;
- Z_HumanString *description; /* OPTIONAL */
- int *dataType; /* OPTIONAL */
- /* (value as in Z_PrimitiveElement) */
- Z_OtherInformation *otherTagInfo; /* OPTIONAL */
-} Z_TagSetInfoElements;
-
-typedef struct Z_SchemaInfo
-{
- Z_CommonInfo *commonInfo; /* OPTIONAL */
- /*
- * Key elements
- */
- Odr_oid *schema;
- /*
- * Non-key elements
- */
- char *name;
- /*
- * Non-brief elements
- */
- Z_HumanString *description; /* OPTIONAL */
- int num_tagTypeMapping;
- Z_TagTypeMapping **tagTypeMapping; /* OPTIONAL */
- int num_recordStructure;
- Z_ElementInfo **recordStructure; /* OPTIONAL */
-} Z_SchemaInfo;
-
-
-typedef struct Z_TagSetInfo
-{
- Z_CommonInfo *commonInfo; /* OPTIONAL */
- /*
- * Key elements
- */
- Odr_oid *tagSet;
- /*
- * Non-key elements
- */
- char *name;
- /*
- * Non-brief elements
- */
- Z_HumanString *description; /* OPTIONAL */
- int num_elements;
- Z_TagSetInfoElements **elements; /* OPTIONAL */
-} Z_TagSetInfo;
-
-typedef struct Z_RecordSyntaxInfo
-{
- Z_CommonInfo *commonInfo; /* OPTIONAL */
- /*
- * Key elements
- */
- Odr_oid *recordSyntax;
- /*
- * Non-key elements
- */
- char *name;
- /*
- * Non-brief elements
- */
- int num_transferSyntaxes;
- Odr_oid **transferSyntaxes; /* OPTIONAL */
- Z_HumanString *description; /* OPTIONAL */
- char *asn1Module; /* OPTIONAL */
- int num_abstractStructure;
- Z_ElementInfo **abstractStructure; /* OPTIONAL */
-} Z_RecordSyntaxInfo;
-
-typedef struct Z_AttributeDescription
-{
- char *name; /* OPTIONAL */
- Z_HumanString *description; /* OPTIONAL */
- Z_StringOrNumeric *attributeValue;
- int num_equivalentAttributes;
- Z_StringOrNumeric **equivalentAttributes; /* OPTIONAL */
-} Z_AttributeDescription;
-
-typedef struct Z_AttributeType
-{
- char *name; /* OPTIONAL */
- Z_HumanString *description; /* OPTIONAL */
- int *attributeType;
- int num_attributeValues;
- Z_AttributeDescription **attributeValues;
-} Z_AttributeType;
-
-typedef struct Z_AttributeSetInfo
-{
- Z_CommonInfo *commonInfo; /* OPTIONAL */
- /*
- * Key elements
- */
- Odr_oid *attributeSet;
- /*
- * Non-key elements
- */
- char *name;
- /*
- * Non-brief elements
- */
- int num_attributes;
- Z_AttributeType **attributes; /* OPTIONAL */
- Z_HumanString *description; /* OPTIONAL */
-} Z_AttributeSetInfo;
-
-typedef struct Z_TermListElement
-{
- char *name;
- Z_HumanString *title; /* OPTIONAL */
- int *searchCost; /* OPTIONAL */
-#define Z_TermListElement_optimized 0
-#define Z_TermListElement_normal 1
-#define Z_TermListElement_expensive 2
-#define Z_TermListElement_filter 3
- bool_t *scanable;
- int num_broader;
- char **broader; /* OPTIONAL */
- int num_narrower;
- char **narrower; /* OPTIONAL */
-} Z_TermListElement;
-
-typedef struct Z_TermListInfo
-{
- Z_CommonInfo *commonInfo; /* OPTIONAL */
- /*
- * Key elements
- */
- Z_DatabaseName *databaseName;
- /*
- * Non-key elements
- */
- int num_termLists;
- Z_TermListElement **termLists;
-} Z_TermListInfo;
-
-typedef struct Z_ExtendedServicesInfo
-{
- Z_CommonInfo *commonInfo; /* OPTIONAL */
- /*
- * Key elements
- */
- Odr_oid *type;
- /*
- * Non-key elements
- */
- char *name; /* OPTIONAL */
- bool_t *privateType;
- bool_t *restrictionsApply;
- bool_t *feeApply;
- bool_t *available;
- bool_t *retentionSupported;
- int *waitAction;
-#define Z_ExtendedServicesInfo_waitSupported 1
-#define Z_ExtendedServicesInfo_waitAlways 2
-#define Z_ExtendedServicesInfo_waitNotSupported 3
-#define Z_ExtendedServicesInfo_depends 4
-#define Z_ExtendedServicesInfo_notSaying 5
- /*
- * Non-brief elements
- */
- Z_HumanString *description; /* OPTIONAL */
- Z_External *specificExplain; /* OPTIONAL */
- char *esASN; /* OPTIONAL */
-} Z_ExtendedServicesInfo;
-
-typedef struct Z_OmittedAttributeInterpretation
-{
- Z_StringOrNumeric *defaultValue; /* OPTIONAL */
- Z_HumanString *defaultDescription; /* OPTIONAL */
-} Z_OmittedAttributeInterpretation;
-
-typedef struct Z_AttributeTypeDetails
-{
- int *attributeType;
- Z_OmittedAttributeInterpretation *defaultIfOmitted; /* OPTIONAL */
- int num_attributeValues;
- Z_AttributeValue **attributeValues; /* OPTIONAL */
-} Z_AttributeTypeDetails;
-
-typedef struct Z_AttributeSetDetails
-{
- Odr_oid *attributeSet;
- int num_attributesByType;
- Z_AttributeTypeDetails **attributesByType;
-} Z_AttributeSetDetails;
-
-typedef struct Z_AttributeDetails
-{
- Z_CommonInfo *commonInfo; /* OPTIONAL */
- /*
- * Key details
- */
- Z_DatabaseName *databaseName;
- /*
- * Non-brief elements
- */
- int num_attributesBySet;
- Z_AttributeSetDetails **attributesBySet; /* OPTIONAL */
- Z_AttributeCombinations *attributeCombinations; /* OPTIONAL */
-} Z_AttributeDetails;
-
-typedef struct Z_EScanInfo
-{
- int *maxStepSize; /* OPTIONAL */
- Z_HumanString *collatingSequence; /* OPTIONAL */
- bool_t *increasing; /* OPTIONAL */
-} Z_EScanInfo;
-
-typedef struct Z_TermListDetails
-{
- Z_CommonInfo *commonInfo; /* OPTIONAL */
- /*
- * Key elements
- */
- char *termListName;
- /*
- * Non-brief elements
- */
- Z_HumanString *description; /* OPTIONAL */
- Z_AttributeCombinations *attributes; /* OPTIONAL */
- Z_EScanInfo *scanInfo; /* OPTIONAL */
- int *estNumberTerms; /* OPTIONAL */
- int num_sampleTerms;
- Z_Term **sampleTerms; /* OPTIONAL */
-} Z_TermListDetails;
-
-typedef struct Z_RecordTag
-{
- Z_StringOrNumeric *qualifier; /* OPTIONAL */
- Z_StringOrNumeric *tagValue;
-} Z_RecordTag;
-
-typedef struct Z_PerElementDetails
-{
- char *name; /* OPTIONAL */
- Z_RecordTag *recordTag; /* OPTIONAL */
- int num_schemaTags;
- Z_Path **schemaTags; /* OPTIONAL */
- int *maxSize; /* OPTIONAL */
- int *minSize; /* OPTIONAL */
- int *avgSize; /* OPTIONAL */
- int *fixedSize; /* OPTIONAL */
- bool_t *repeatable;
- bool_t *required;
- Z_HumanString *description; /* OPTIONAL */
- Z_HumanString *contents; /* OPTIONAL */
- Z_HumanString *billingInfo; /* OPTIONAL */
- Z_HumanString *restrictions; /* OPTIONAL */
- int num_alternateNames;
- char **alternateNames; /* OPTIONAL */
- int num_genericNames;
- char **genericNames; /* OPTIONAL */
- Z_AttributeCombinations *searchAccess; /* OPTIONAL */
-} Z_PerElementDetails;
-
-typedef struct Z_ElementSetDetails
-{
- Z_CommonInfo *commonInfo; /* OPTIONAL */
- /*
- * Key elements
- */
- Z_DatabaseName *databaseName;
- char *elementSetName;
- Odr_oid *recordSyntax;
- /*
- * Brief elements
- */
- Odr_oid *schema;
- /*
- * Non-brief elements
- */
- Z_HumanString *description; /* OPTIONAL */
- int num_detailsPerElement;
- Z_PerElementDetails **detailsPerElement; /* OPTIONAL */
-} Z_ElementSetDetails;
-
-typedef struct Z_RetrievalRecordDetails
-{
- Z_CommonInfo *commonInfo; /* OPTIONAL */
- /*
- * Key elements
- */
- Z_DatabaseName *databaseName;
- Odr_oid *schema;
- Odr_oid *recordSyntax;
- /*
- * Non-brief elements
- */
- Z_HumanString *description; /* OPTIONAL */
- int num_detailsPerElement;
- Z_PerElementDetails **detailsPerElement; /* OPTIONAL */
-} Z_RetrievalRecordDetails;
-
-typedef struct Z_SortKeyDetails
-{
- Z_HumanString *description; /* OPTIONAL */
- int num_elementSpecifications;
- Z_Specification **elementSpecifications; /* OPTIONAL */
- Z_AttributeCombinations *attributeSpecifications; /* OPTIONAL */
- int which;
-#define Z_SortKeyDetails_character 0
-#define Z_SortKeyDetails_numeric 1
-#define Z_SortKeyDetails_structured 2
- union
- {
- Odr_null *character;
- Odr_null *numeric;
- Z_HumanString *structured;
- } u;
- int *caseSensitivity; /* OPTIONAL */
-#define Z_SortKeyDetails_always 0
-#define Z_SortKeyDetails_never 1
-#define Z_SortKeyDetails_default_yes 2
-#define Z_SortKeyDetails_default_no 3
-} Z_SortKeyDetails;
-
-typedef struct Z_SortDetails
-{
- Z_CommonInfo *commonInfo; /* OPTIONAL */
- /*
- * Key elements
- */
- Z_DatabaseName *databaseName;
- /*
- * Non-brief elements
- */
- int num_sortKeys;
- Z_SortKeyDetails **sortKeys; /* OPTIONAL */
-} Z_SortDetails;
-
-typedef struct Z_ProcessingInformation
-{
- Z_CommonInfo *commonInfo; /* OPTIONAL */
- /*
- * Key elements
- */
- Z_DatabaseName *databaseName;
- int *processingContext;
-#define Z_ProcessingInformation_access 0
-#define Z_ProcessingInformation_search 1
-#define Z_ProcessingInformation_retrieval 2
-#define Z_ProcessingInformation_record_presentation 3
-#define Z_ProcessingInformation_record_handling 4
- char *name;
- Odr_oid *oid;
- /*
- * Non-brief elements
- */
- Z_HumanString *description; /* OPTIONAL */
- Z_External *instructions; /* OPTIONAL */
-} Z_ProcessingInformation;
-
-typedef struct Z_ValueDescription
-{
- int which;
-#define Z_ValueDescription_integer 0
-#define Z_ValueDescription_string 1
-#define Z_ValueDescription_octets 2
-#define Z_ValueDescription_oid 3
-#define Z_ValueDescription_unit 4
-#define Z_ValueDescription_valueAndUnit 5
- union
- {
- int *integer;
- char *string;
- Odr_oct *octets;
- Odr_oid *oid;
- Z_Unit *unit;
- Z_IntUnit *valueAndUnit;
- } u;
-} Z_ValueDescription;
-
-typedef struct Z_ValueRange
-{
- Z_ValueDescription *lower; /* OPTIONAL */
- Z_ValueDescription *upper; /* OPTIONAL */
-} Z_ValueRange;
-
-typedef struct Z_ValueSetEnumerated
-{
- int num;
- Z_ValueDescription **elements;
-} Z_ValueSetEnumerated;
-
-typedef struct Z_ValueSet
-{
- int which;
-#define Z_ValueSet_range 0
-#define Z_ValueSet_enumerated 1
- union
- {
- Z_ValueRange *range;
- Z_ValueSetEnumerated *enumerated;
- } u;
-} Z_ValueSet;
-
-typedef struct Z_VariantValue
-{
- int *dataType;
- Z_ValueSet *values; /* OPTIONAL */
-} Z_VariantValue;
-
-typedef struct Z_VariantType
-{
- char *name; /* OPTIONAL */
- Z_HumanString *description; /* OPTIONAL */
- int *variantType;
- Z_VariantValue *variantValue; /* OPTIONAL */
-} Z_VariantType;
-
-typedef struct Z_VariantClass
-{
- char *name; /* OPTIONAL */
- Z_HumanString *description; /* OPTIONAL */
- int *variantClass;
- int num_variantTypes;
- Z_VariantType **variantTypes;
-} Z_VariantClass;
-
-typedef struct Z_VariantSetInfo
-{
- Z_CommonInfo *commonInfo; /* OPTIONAL */
- /*
- * Key elements
- */
- Odr_oid *variantSet;
- /*
- * Brief elements
- */
- char *name;
- /*
- * Non-brief elements
- */
- int num_variants;
- Z_VariantClass **variants; /* OPTIONAL */
-} Z_VariantSetInfo;
-
-typedef struct Z_Units
-{
- char *name; /* OPTIONAL */
- Z_HumanString *description; /* OPTIONAL */
- Z_StringOrNumeric *unit;
-} Z_Units;
-
-typedef struct Z_UnitType
-{
- char *name; /* OPTIONAL */
- Z_HumanString *description; /* OPTIONAL */
- Z_StringOrNumeric *unitType;
- int num_units;
- Z_Units **units;
-} Z_UnitType;
-
-typedef struct Z_UnitInfo
-{
- Z_CommonInfo *commonInfo; /* OPTIONAL */
- /*
- * Key elements
- */
- char *unitSystem;
- /*
- * Non-brief elements
- */
- Z_HumanString *description; /* OPTIONAL */
- int num_units;
- Z_UnitType **units; /* OPTIONAL */
-} Z_UnitInfo;
-
-typedef struct Z_CategoryInfo
-{
- char *category;
- char *originalCategory; /* OPTIONAL */
- Z_HumanString *description; /* OPTIONAL */
- char *asn1Module; /* OPTIONAL */
-} Z_CategoryInfo;
-
-typedef struct Z_CategoryList
-{
- Z_CommonInfo *commonInfo; /* OPTIONAL */
- int num_categories;
- Z_CategoryInfo **categories;
-} Z_CategoryList;
-
-typedef struct Z_ExplainRecord
-{
- int which;
-#define Z_Explain_targetInfo 0
-#define Z_Explain_databaseInfo 1
-#define Z_Explain_schemaInfo 2
-#define Z_Explain_tagSetInfo 3
-#define Z_Explain_recordSyntaxInfo 4
-#define Z_Explain_attributeSetInfo 5
-#define Z_Explain_termListInfo 6
-#define Z_Explain_extendedServicesInfo 7
-#define Z_Explain_attributeDetails 8
-#define Z_Explain_termListDetails 9
-#define Z_Explain_elementSetDetails 10
-#define Z_Explain_retrievalRecordDetails 11
-#define Z_Explain_sortDetails 12
-#define Z_Explain_processing 13
-#define Z_Explain_variants 14
-#define Z_Explain_units 15
-#define Z_Explain_categoryList 16
- union
- {
- Z_TargetInfo *targetInfo;
- Z_DatabaseInfo *databaseInfo;
- Z_SchemaInfo *schemaInfo;
- Z_TagSetInfo *tagSetInfo;
- Z_RecordSyntaxInfo *recordSyntaxInfo;
- Z_AttributeSetInfo *attributeSetInfo;
- Z_TermListInfo *termListInfo;
- Z_ExtendedServicesInfo *extendedServicesInfo;
- Z_AttributeDetails *attributeDetails;
- Z_TermListDetails *termListDetails;
- Z_ElementSetDetails *elementSetDetails;
- Z_RetrievalRecordDetails *retrievalRecordDetails;
- Z_SortDetails *sortDetails;
- Z_ProcessingInformation *processing;
- Z_VariantSetInfo *variants;
- Z_UnitInfo *units;
- Z_CategoryList *categoryList;
- } u;
-} Z_ExplainRecord;
-
-YAZ_EXPORT int z_ExplainRecord(ODR o, Z_ExplainRecord **p, int opt,
- const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-/*
- * Copyright (c) 1995-1999, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- */
-
-/*
- * Biased-choice External for Z39.50.
- */
-
-#ifndef PRT_EXT_H
-#define PRT_EXT_H
-
-#include <yaz/yconfig.h>
-#include <yaz/oid.h>
-
-
-YAZ_BEGIN_CDECL
-
-/*
- * Used to keep track of known External definitions (a loose approach
- * to DEFINED_BY).
- */
-
-typedef struct Z_ext_typeent
-{
- oid_value dref; /* the direct-reference OID value. */
- int what; /* discriminator value for the external CHOICE */
- Odr_fun fun; /* decoder function */
-} Z_ext_typeent;
-
-struct Z_External
-{
- Odr_oid *direct_reference;
- int *indirect_reference;
- char *descriptor;
- int which;
-/* Generic types */
-#define Z_External_single 0
-#define Z_External_octet 1
-#define Z_External_arbitrary 2
-/* Specific types */
-#define Z_External_sutrs 3
-#define Z_External_explainRecord 4
-#define Z_External_resourceReport1 5
-#define Z_External_resourceReport2 6
-#define Z_External_promptObject1 7
-#define Z_External_grs1 8
-#define Z_External_extendedService 9
-#define Z_External_itemOrder 10
-#define Z_External_diag1 11
-#define Z_External_espec1 12
-#define Z_External_summary 13
-#define Z_External_OPAC 14
-#define Z_External_searchResult1 15
-#define Z_External_update 16
-#define Z_External_dateTime 17
-#define Z_External_universeReport 18
-#define Z_External_ESAdmin 19
- union
- {
- /* Generic types */
- Odr_any *single_ASN1_type;
- Odr_oct *octet_aligned;
- Odr_bitmask *arbitrary;
-
- /* Specific types */
- Z_SUTRS *sutrs;
- Z_ExplainRecord *explainRecord;
- Z_ResourceReport1 *resourceReport1;
- Z_ResourceReport2 *resourceReport2;
- Z_PromptObject1 *promptObject1;
- Z_GenericRecord *grs1;
- Z_TaskPackage *extendedService;
- Z_ItemOrder *itemOrder;
- Z_DiagnosticFormat *diag1;
- Z_Espec1 *espec1;
- Z_BriefBib *summary;
- Z_SearchInfoReport *searchResult1;
- Z_IUUpdate *update;
- Z_DateTime *dateTime;
- Z_UniverseReport *universeReport;
-#ifdef ASN_COMPILED
- Z_Admin *adminService;
-#endif
- } u;
-};
-
-
-YAZ_EXPORT int z_External(ODR o, Z_External **p, int opt, const char *name);
-YAZ_EXPORT Z_ext_typeent *z_ext_getentbyref(oid_value val);
-YAZ_EXPORT Z_External *z_ext_record(ODR o, int format, const char *buf,
- int len);
-
-YAZ_END_CDECL
-
-#endif
+++ /dev/null
-/*
- * Copyright (c) 1995-1999, Index Data.
- * See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Log: prt-grs.c,v $
- * Revision 1.9 1999-11-30 13:47:11 adam
- * Improved installation. Moved header files to include/yaz.
- *
- * Revision 1.8 1999/04/20 09:56:48 adam
- * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
- * Modified all encoders/decoders to reflect this change.
- *
- * Revision 1.7 1998/02/11 11:53:32 adam
- * Changed code so that it compiles as C++.
- *
- * Revision 1.6 1997/05/14 06:53:23 adam
- * C++ support.
- *
- * Revision 1.5 1995/10/18 16:12:20 quinn
- * Added a couple of special cases to handle the WAIS server.
- *
- * Revision 1.4 1995/09/29 17:11:55 quinn
- * Smallish
- *
- * Revision 1.3 1995/09/27 15:02:43 quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.2 1995/08/28 10:58:58 quinn
- * Added extra choice-entry to data to catch visiblestring.
- *
- * Revision 1.1 1995/08/17 12:47:09 quinn
- * Added GRS-1.
- *
- *
- */
-
-#include <yaz/proto.h>
-
-int z_TaggedElement(ODR o, Z_TaggedElement **p, int opt, const char *name);
-int z_ElementData(ODR o, Z_ElementData **p, int opt, const char *name);
-int z_ElementMetaData(ODR o, Z_ElementMetaData **p, int opt, const char *name);
-int z_TagUnit(ODR o, Z_TagUnit **p, int opt, const char *name);
-int z_TagPath(ODR o, Z_TagPath **p, int opt, const char *name);
-int z_Order(ODR o, Z_Order **p, int opt, const char *name);
-int z_Usage(ODR o, Z_Usage **p, int opt, const char *name);
-int z_HitVector(ODR o, Z_HitVector **p, int opt, const char *name);
-int z_Triple(ODR o, Z_Triple **p, int opt, const char *name);
-int z_Variant(ODR o, Z_Variant **p, int opt, const char *name);
-
-int z_GenericRecord(ODR o, Z_GenericRecord **p, int opt, const char *name)
-{
- if (o->direction == ODR_DECODE)
- *p = (Z_GenericRecord *)odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
- if (odr_sequence_of(o, (Odr_fun)z_TaggedElement, &(*p)->elements,
- &(*p)->num_elements, 0))
- return 1;
- *p = 0;
- return opt && odr_ok(o);
-}
-
-int z_TaggedElement(ODR o, Z_TaggedElement **p, int opt, const char *name)
-{
- if (!odr_sequence_begin(o, p, sizeof(**p), 0))
- return opt && odr_ok(o);
- return
- odr_implicit(o, odr_integer, &(*p)->t