Possible compatibility problems with earlier versions marked with '*'.
+--- 1.8.6 2002/MM/DD
+
+Added patch by Rustam T. Usmanov that implements Z39.50 duplicate
+detection service (Z39.50-1995 Amendment 2) and Language Negotiation (3).
+See:
+ http://lcweb.loc.gov/z3950/agency/amend/am2.html
+ http://lcweb.loc.gov/z3950/agency/defns/charneg-3.html
+
--- 1.8.5 2002/02/03
New YAZ client features: Command completion and new commands:
YAZ_VERSION=$(shell date -r$(YAZSRCDIR)/CVS +"CVS%Y%m%d")
else
YAZSRCDIR=$(shell pwd)
-YAZ_VERSION=1.8.5
+YAZ_VERSION=1.8.6
endif
configure: stamp-configure
-<!-- $Id: credits.xml,v 1.5 2002-01-25 13:38:00 adam Exp $ -->
+<!-- $Id: credits.xml,v 1.6 2002-02-11 23:25:26 adam Exp $ -->
<appendix id="credits"><title>Credits</title>
<para>
This appendix lists individuals that have contributed in the development
Mike Taylor
</para></listitem>
<listitem><para>
+ Rustam T. Usmanov
+ </para></listitem>
+ <listitem><para>
Charles Woodfield
</para></listitem>
<listitem><para>
<!ENTITY comstack "<acronym>COMSTACK</acronym>">
<!ENTITY zoom "<acronym>ZOOM</acronym>">
]>
-<!-- $Id: yaz.xml,v 1.17 2002-01-11 20:16:47 adam Exp $ -->
+<!-- $Id: yaz.xml,v 1.18 2002-02-11 23:25:26 adam Exp $ -->
<book id="yaz">
<bookinfo>
<title>YAZ User's Guide and Reference</title>
</copyright>
<abstract><simpara>
This document is the programmer's guide and reference to the &yaz;
- package version 1.8.5. &yaz; is a compact toolkit that provides
+ package version 1.8.6. &yaz; is a compact toolkit that provides
access to the Z39.50 protocol, as well as a set of higher-level
tools for implementing the server and client roles, respectively.
The documentation can be used on its own, or as a reference when
-## $Id: Makefile.am,v 1.12 2001-10-23 21:00:19 adam Exp $
+## $Id: Makefile.am,v 1.13 2002-02-11 23:25:26 adam Exp $
pkginclude_HEADERS= backend.h ccl.h comstack.h \
d1_attset.h d1_map.h data1.h diagbib1.h sortspec.h \
z-acckrb1.h z-core.h z-date.h z-diag1.h z-espec1.h z-estask.h z-exp.h \
z-grs.h z-opac.h z-rrf1.h z-rrf2.h z-sum.h z-sutrs.h z-uifr1.h \
z-univ.h zes-expi.h zes-exps.h zes-order.h zes-pquery.h \
- zes-psched.h zes-admin.h zes-pset.h zes-update.h zes-update0.h zoom.h
+ zes-psched.h zes-admin.h zes-pset.h zes-update.h zes-update0.h \
+ zoom.h z-charneg.h
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*
- * $Id: oid.h,v 1.9 2002-01-29 13:47:33 adam Exp $
+ * $Id: oid.h,v 1.10 2002-02-11 23:25:26 adam Exp $
*/
#ifndef OID_H
CLASS_VARSET,
CLASS_SCHEMA,
CLASS_TAGSET,
- CLASS_GENERAL
+ CLASS_GENERAL,
+ CLASS_NEGOT
} oid_class;
typedef enum oid_value
VAL_ADMINSERVICE,
VAL_HOLDINGS,
VAL_HUNMARC,
-/* add new types here... */
+ VAL_CHARNEG3,
+ VAL_LIB1,
+
+ VAL_VIRT,
+ VAL_UCS2,
+ VAL_UCS4,
+ VAL_UTF16,
+ VAL_UTF8,
+/* 110 */
/* VAL_DYNAMIC must have highest value */
VAL_DYNAMIC,
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: proto.h,v $
- * Revision 1.1 2001-10-23 21:00:19 adam
+ * Revision 1.2 2002-02-11 23:25:26 adam
+ * Rustam's patch
+ *
+ * Revision 1.1 2001/10/23 21:00:19 adam
* Old Z39.50 codecs gone. Added ZOOM. WRBUF MARC display util.
*
* Revision 1.7 2001/09/24 21:51:55 adam
#include <yaz/z-date.h>
#include <yaz/z-univ.h>
#include <yaz/zes-update0.h>
+#include <yaz/z-charneg.h>
YAZ_BEGIN_CDECL
/*
- * Copyright (c) 1995-1999, Index Data.
+ * Copyright (c) 1995-2002, 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,
#define Z_External_universeReport 18
#define Z_External_ESAdmin 19
#define Z_External_update0 20
+#define Z_External_userInfo1 21
+#define Z_External_charSetandLanguageNegotiation 22
+#define Z_External_acfPrompt1 23
+#define Z_External_acfDes1 24
+#define Z_External_acfKrb1 25
union
{
/* Generic types */
Z_UniverseReport *universeReport;
Z_Admin *adminService;
Z_IU0Update *update0;
+ Z_OtherInformation *userInfo1;
+ Z_CharSetandLanguageNegotiation *charNeg3;
+ Z_PromptObject1 *acfPrompt1;
+ Z_DES_RN_Object *acfDes1;
+ Z_KRBObject *acfKrb1;
} u;
};
/*
* Current software version.
*
- * $Id: yaz-version.h,v 1.12 2002-01-11 20:17:03 adam Exp $
+ * $Id: yaz-version.h,v 1.13 2002-02-11 23:25:26 adam Exp $
*/
#ifndef YAZ_VERSION
-#define YAZ_VERSION "1.8.5"
+#define YAZ_VERSION "1.8.6"
#include <yaz/yaz-date.h>
#ifdef WIN32
* Copyright (c) 1995-2002, Index Data
* See the file LICENSE for details.
*
- * $Id: oid.c,v 1.52 2002-01-29 13:47:33 adam Exp $
+ * $Id: oid.c,v 1.53 2002-02-11 23:25:26 adam Exp $
*/
/*
"thesaurus-tagset"},
{PROTO_Z3950, CLASS_TAGSET, VAL_EXPLAIN, {14,1000,81,2,-1},
"Explain-tagset"},
+ {PROTO_Z3950, CLASS_NEGOT, VAL_CHARNEG3, {15,3,-1},
+ "CharSetandLanguageNegotiation-3"},
+ {PROTO_GENERAL, CLASS_GENERAL, VAL_UCS2, {1,0,10646,1,0,2,-1},
+ "UCS-2"},
+ {PROTO_GENERAL, CLASS_GENERAL, VAL_UCS4, {1,0,10646,1,0,4,-1},
+ "UCS-4"},
+ {PROTO_GENERAL, CLASS_GENERAL, VAL_UTF16, {1,0,10646,1,0,5,-1},
+ "UTF-16"},
+ {PROTO_GENERAL, CLASS_GENERAL, VAL_UTF8, {1,0,10646,1,0,8,-1},
+ "UTF-8"},
{PROTO_NOP, CLASS_NOP, VAL_NOP, {-1}, 0 }
};
# makefile.mak - makefile for MS NMAKE
-# $Id: makefile,v 1.32 2002-01-30 22:02:03 adam Exp $
+# $Id: makefile,v 1.33 2002-02-11 23:25:26 adam Exp $
#
# Programmed by
# HL: Heikki Levanto, Index Data
ESADMIN_H_FILES = $(INCLDIR)\yaz\zes-admin.h
ESADMIN_C_FILES = $(Z3950_C_DIR)\zes-admin.c
+# Files generated from esadmin.asn
+CHARNEG_H_FILES = $(INCLDIR)\yaz\z-charneg.h
+CHARNEG_C_FILES = $(Z3950_C_DIR)\z-charneg.c
+
# Files created from z3950v3.asn
Z3950V3_H_FILES= \
$(INCLDIR)\yaz\z-accdes1.h \
Z3950V3_FILES= $(Z3950V3_C_FILES) $(Z3950V3_H_FILES)
ILL_CORE_FILES= $(ILL_CORE_C_FILES) $(ILL_CORE_H_FILES)
ITEM_REQ_FILES= $(ITEM_REQ_C_FILES) $(ITEM_REQ_H_FILES)
+CHARNEG_FILES = $(CHARNEG_C_FILES) $(CHARNEG_H_FILES)
GENERATED_C_FILES= \
$(Z3950V3_C_FILES) \
$(ESUPDATE_C_FILES) \
$(UNIVRES_C_FILES) \
$(DATETIME_C_FILES) \
- $(ESADMIN_C_FILES)
+ $(ESADMIN_C_FILES) \
+ $(CHARNEG_C_FILES)
GENERATED_H_FILES= \
$(Z3950V3_H_FILES) \
$(ESUPDATE_H_FILES) \
$(UNIVRES_H_FILES) \
$(DATETIME_H_FILES) \
- $(ESADMIN_H_FILES)
+ $(ESADMIN_H_FILES) \
+ $(CHARNEG_H_FILES)
generated_files: \
$(GENERATED_H_FILES) \
$(TCL) $(TCLOPT) -d z.tcl esadmin.asn
@cd $(WINDIR)
+$(CHARNEG_FILES): $(Z3950DIR)\charneg-3.asn
+ @cd $(Z3950DIR)
+ $(TCL) $(TCLOPT) -d z.tcl charneg-3.asn
+ @cd $(WINDIR)
+
$(ILL_CORE_FILES): $(ILLDIR)\ill9702.asn
@cd $(ILLDIR)
$(TCL) $(TCLOPT) -d ill.tcl ill9702.asn
###########################################################
#
# $Log: makefile,v $
-# Revision 1.32 2002-01-30 22:02:03 adam
+# Revision 1.33 2002-02-11 23:25:26 adam
+# Rustam's patch
+#
+# Revision 1.32 2002/01/30 22:02:03 adam
# WIN32 updates for YAZ client.
#
# Revision 1.31 2001/12/30 22:21:11 adam
VALUE "Comments", "Z39.50 C Library\0"
VALUE "CompanyName", "Index Data\0"
VALUE "FileDescription", "YAZ Toolkit\0"
- VALUE "FileVersion", "1, 8, 5, 0\0"
+ VALUE "FileVersion", "1, 8, 6, 0\0"
VALUE "InternalName", "YAZ\0"
VALUE "LegalCopyright", "Copyright © 1995-2002 Index Data\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "yaz.rc\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Index Data YAZ Toolkit\0"
- VALUE "ProductVersion", "1, 8, 5, 0\0"
+ VALUE "ProductVersion", "1, 8, 6, 0\0"
VALUE "SpecialBuild", "\0"
END
END
Name: yaz
-Version: 1.8.5
+Version: 1.8.6
Release: 1
Copyright: YAZ License
Group: Development/Libraries
-## $Id: Makefile.am,v 1.7 2001-10-23 21:00:20 adam Exp $
+## $Id: Makefile.am,v 1.8 2002-02-11 23:25:27 adam Exp $
INCLUDES=-I$(top_srcdir)/include
noinst_LTLIBRARIES = libz39.50.la
tabdatadir = $(pkgdatadir)/z39.50
-tabdata_DATA=datetime.asn esupdate.asn univres.asn z3950v3.asn z.tcl esadmin.asn
+tabdata_DATA=datetime.asn esupdate.asn univres.asn z3950v3.asn z.tcl \
+ esadmin.asn charneg-3.asn
EXTRA_DIST=$(tabdata_DATA)
LIBS =
z-diag1.c z-espec1.c z-estask.c z-exp.c z-grs.c z-opac.c z-uifr1.c \
z-rrf1.c z-rrf2.c z-sum.c z-sutrs.c \
zes-expi.c zes-exps.c zes-order.c zes-pquery.c zes-psched.c \
- zes-pset.c zes-update0.c z-date.c z-univ.c zes-update.c zes-admin.c prt-ext.c
+ zes-pset.c zes-update0.c z-date.c z-univ.c zes-update.c zes-admin.c \
+ z-charneg.c \
+ prt-ext.c
# Rules for Z39.50 V3
$(srcdir)/z-accdes1.c \
$(top_srcdir)/include/yaz/zes-admin.h: \
$(srcdir)/z.tcl $(srcdir)/esadmin.asn $(YAZCOMP)
cd $(srcdir); ../util/yaz-comp -d z.tcl -i yaz -I ../include $(YCFLAGS) esadmin.asn
+
+# Charset negotiation
+$(srcdir)/z-charneg.c : $(srcdir)/charneg-3.asn
+ cd $(srcdir); ../util/yaz-comp -d z.tcl -i yaz -I ../include $(YCFLAGS) charneg-3.asn
--- /dev/null
+NegotiationRecordDefinition-charSetandLanguageNegotiation-3\r
+{Z39-50-negotiationRecordDefinition CharSetandLanguageNegotiation-3 (3)}\r
+DEFINITIONS ::= BEGIN\r
+IMPORTS LanguageCode FROM RecordSyntax-explain;\r
+\r
+CharSetandLanguageNegotiation ::= CHOICE{\r
+ proposal [1] IMPLICIT OriginProposal,\r
+ response [2] IMPLICIT TargetResponse}\r
+--\r
+-- For character sets:\r
+-- Origin proposes one, two, or all three of the following, in order of\r
+-- preference:\r
+-- (a) 2022 character sets.\r
+-- (b) 10646 character set.\r
+-- (c) Private character set.\r
+--\r
+-- The target responds with one of (a), (b), or (c), indicating the\r
+-- character set(s) to be supported for all name and message strings.\r
+--\r
+-- If the origin includes (a),\r
+-- the origin proposes:\r
+-- (1) A proposed environment: 7-bit, 8-bit, or no-preference.\r
+-- (2) A set of iso 2022 registration numbers.\r
+-- (3) One or more proposed initial sets of registration numbers,\r
+-- for c0, c1, g0, g1, g2 and g3. These must come from (2).\r
+-- (4) The proposed encoding level.\r
+-- And if the target selects (a), it responds with:\r
+-- (1) A selected environment: 7-bit or 8-bit.\r
+-- (2) A subset of the set of iso 2022 registration numbers proposed\r
+-- by the origin.\r
+-- (3) The initial set of registrations, which must come from (2)\r
+-- but need not be from the set of initial registrations proposed\r
+-- by the origin.\r
+-- (4) The encoding level; less than or equal to that proposed.\r
+--\r
+-- If the origin includes (b),\r
+-- The origin proposes:\r
+-- (1) (optionally) A list of collections (i.e. subsets of characters from the\r
+-- complete 10646 definition).\r
+-- (2) An implementation level.\r
+-- (3) Syntax/form: e.g. ucs-2, ucs-4, utf-8, utf-16.\r
+-- And if the target selects (b), it responds by choosing a subset of the\r
+-- collections proposed by the origin in (1) and an implementation level less\r
+-- than or equal to that proposed by the origin in (2).\r
+--\r
+-- If the origin includes (c), the origin proposes one of the following:\r
+-- (1) A list of private character sets, by one or more object\r
+-- identifiers.\r
+-- (2) A list of private character sets, by an EXTERNAL.\r
+-- (3) An indication to use a private, previously agreed upon\r
+-- character set.\r
+-- And if the target selects (c):\r
+-- - If the origin proposed (1), the target should respond with (1), and\r
+-- the list of object identifiers should be a subset of the list that\r
+-- the origin included.\r
+-- - If the origin proposed (2), the target should respond with (2), using\r
+-- the same EXTERNAL definition (but not necessarily the same content)\r
+-- used by the origin.\r
+-- - If the origin proposed (3), the target should respond with (3).\r
+--\r
+-- For Languages:\r
+-- The origin optionally proposes one or more language codes. The target\r
+-- response may include a single language code, which indicates the\r
+-- language to be used for all message strings. The target may include or\r
+-- omit this, whether or not the origin included a proposed set, and the\r
+-- language code indicated need not be from among those proposed.\r
+--\r
+--\r
+\r
+OriginProposal ::= SEQUENCE {\r
+ proposedCharSets [1] IMPLICIT SEQUENCE OF CHOICE{\r
+ -- Each should occur at most once, and in order of preference\r
+ -- (the "order of preference" is the reason why this is\r
+ -- "SEQUENCE OF CHOICE" rather than just "SEQUENCE")\r
+ iso2022 [1] Iso2022,\r
+ iso10646 [2] IMPLICIT Iso10646,\r
+ private [3] PrivateCharacterSet} OPTIONAL,\r
+ -- proposedCharSets must be omitted\r
+ -- if origin proposes version 2\r
+ proposedlanguages [2] IMPLICIT SEQUENCE OF LanguageCode OPTIONAL,\r
+ recordsInSelectedCharSets [3] IMPLICIT BOOLEAN OPTIONAL\r
+ -- default 'false'. See rule 6 above.\r
+ }\r
+\r
+TargetResponse ::= SEQUENCE{\r
+ selectedCharSets [1] CHOICE{\r
+ iso2022 [1] Iso2022,\r
+ iso10646 [2] IMPLICIT Iso10646,\r
+ private [3] PrivateCharacterSet,\r
+ none [4] IMPLICIT NULL\r
+ -- If selected, no negotiation\r
+ -- is assumed to be in force\r
+ -- for character sets.\r
+ } OPTIONAL,\r
+ -- Omitted if and only if proposedCharSets\r
+ -- was Omitted in the request.\r
+ selectedLanguage [2] IMPLICIT LanguageCode OPTIONAL,\r
+ recordsInSelectedCharSets [3] IMPLICIT BOOLEAN OPTIONAL\r
+ -- Omitted if and only if 'recordsInSelectedCharSets' was omitted\r
+ -- in the request. See rule 6 above.\r
+ }\r
+\r
+\r
+PrivateCharacterSet ::= CHOICE{\r
+ viaOid [1] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER,\r
+ externallySpecified [2] IMPLICIT EXTERNAL,\r
+ previouslyAgreedUpon [3] IMPLICIT NULL}\r
+\r
+-- IMPORTED\r
+-- LanguageCode ::= GeneralString -- from ANSI Z39.53-1994\r
+\r
+-- Definition of ISO2022\r
+-- For ISO 2022, the following is negotiated:\r
+-- 1) The environment: 7-bit or 8-bit;\r
+-- 2) a set of registration numbers (from the ISO Register of coded\r
+-- character sets) for graphical and control character sets;\r
+-- 3) g0, g1, g2, g3, c0, c1, the registration numbers of the graphical and\r
+-- control character sets that are initially designated to g0, g1, etc.\r
+-- The origin submits one or more sequences of values for\r
+-- g0, g1, g2, g3, c0, c1 (for each sequence: at least one of\r
+-- g0 and g1 must be included; g2 and g3 are optional and\r
+-- may be included only if g1 is included;\r
+-- c0 should be included; and c1 is optional); the target\r
+-- selects one of the proposed sequences.\r
+-- 4) gleft: which of g0, g1, g2 or g3, initially has GL shift status in\r
+-- an 8-bit environment or has shift status in a 7-bit environment; and\r
+-- 5) gright: which of g1, g2 or g3 initially has GR shift status in an\r
+-- 8-bit environment.\r
+\r
+Iso2022 ::= CHOICE{\r
+ originProposal [1] IMPLICIT SEQUENCE{\r
+ proposedEnvironment [0] Environment OPTIONAL,\r
+ -- omitted means no preference\r
+ proposedSets [1] IMPLICIT SEQUENCE OF INTEGER,\r
+ proposedInitialSets [2] IMPLICIT SEQUENCE OF\r
+ InitialSet,\r
+ proposedLeftAndRight [3] IMPLICIT LeftAndRight},\r
+ targetResponse [2] IMPLICIT SEQUENCE{\r
+ selectedEnvironment [0] Environment,\r
+ selectedSets [1] IMPLICIT SEQUENCE OF INTEGER,\r
+ selectedinitialSet [2] IMPLICIT InitialSet,\r
+ selectedLeftAndRight [3] IMPLICIT LeftAndRight}}\r
+\r
+Environment ::= CHOICE{\r
+ sevenBit [1] IMPLICIT NULL,\r
+ eightBit [2] IMPLICIT NULL}\r
+\r
+InitialSet::= SEQUENCE{\r
+ g0 [0] IMPLICIT INTEGER OPTIONAL,\r
+ g1 [1] IMPLICIT INTEGER OPTIONAL,\r
+ -- one of g0 and g1 must be included\r
+ g2 [2] IMPLICIT INTEGER OPTIONAL,\r
+ g3 [3] IMPLICIT INTEGER OPTIONAL,\r
+ --g2 and/or g3 may be included\r
+ -- only if g1 was included\r
+ c0 [4] IMPLICIT INTEGER,\r
+ c1 [5] IMPLICIT INTEGER OPTIONAL}\r
+\r
+LeftAndRight ::= SEQUENCE{\r
+ gLeft [3] IMPLICIT INTEGER{\r
+ g0 (0),\r
+ g1 (1),\r
+ g2 (2),\r
+ g3 (3)},\r
+ gRight [4] IMPLICIT INTEGER{\r
+ g1 (1),\r
+ g2 (2),\r
+ g3 (3)} OPTIONAL}\r
+\r
+-- Definition of Iso10646\r
+--\r
+-- The 10646 object identifier looks like:\r
+-- 1.0.10646.1.implementationLevel.repertoireSubset.arc1.arc2. ....\r
+--\r
+-- (The second '1' is for "part 1" of 10646.)\r
+--\r
+-- ImplementationLevel is 1-3\r
+--\r
+-- repertoireSubset is 0 or 1, for 'all' or 'collections'.\r
+-- The arcs are present only if repertoireSubset is 'collections',\r
+-- in which case arc1, arc2, etc., are the\r
+-- identifiers of collections of character repertoires.\r
+--\r
+-- There is a second 10646 oid, for specifying syntax/form:\r
+-- 1.0.10646.1.0.form\r
+--\r
+-- (The second '0' represents "transfer syntax".)\r
+--\r
+-- where values of form include:\r
+-- 2: ucs-2\r
+-- 4: ucs-4\r
+-- 5: utf-16\r
+-- 8: utf-8\r
+\r
+Iso10646 ::= SEQUENCE{\r
+ collections [1] IMPLICIT OBJECT IDENTIFIER OPTIONAL,\r
+ --oid of form 1.0.10646.1.implementationLevel\r
+ -- .repertoireSubset.arc1.arc2. ....\r
+ -- Target to choose a subset of the collections\r
+ -- proposed by the origin, and an implementation level\r
+ -- less than or equal to that proposed.\r
+ --\r
+ -- when 'collections' is omitted,\r
+ -- 'implementationLevel' defaults to 3.\r
+ --\r
+ encodingLevel [2] IMPLICIT OBJECT IDENTIFIER\r
+ -- oid of form 1.0.10646.1.0.form\r
+ -- where value of 'form' is 2, 4, 5, or 8\r
+ -- for ucs-2, ucs-4, utf-16, utf-8\r
+ }\r
+END
\ No newline at end of file
* Copyright (c) 1995-2001, Index Data.
* See the file LICENSE for details.
*
- * $Id: prt-ext.c,v 1.2 2001-11-13 23:00:43 adam Exp $
+ * $Id: prt-ext.c,v 1.3 2002-02-11 23:25:27 adam Exp $
*/
#include <yaz/proto.h>
{VAL_DATETIME, Z_External_dateTime, (Odr_fun)z_DateTime},
{VAL_UNIVERSE_REPORT, Z_External_universeReport,(Odr_fun)z_UniverseReport},
{VAL_ADMINSERVICE, Z_External_ESAdmin, (Odr_fun)z_Admin},
+ {VAL_USERINFO1, Z_External_userInfo1, (Odr_fun) z_OtherInformation},
+ {VAL_CHARNEG3, Z_External_charSetandLanguageNegotiation, (Odr_fun)
+ z_CharSetandLanguageNegotiation},
+ {VAL_PROMPT1, Z_External_acfPrompt1, (Odr_fun) z_PromptObject1},
+ {VAL_DES1, Z_External_acfDes1, (Odr_fun) z_DES_RN_Object},
+ {VAL_KRB1, Z_External_acfKrb1, (Odr_fun) z_KRBObject},
{VAL_NONE, 0, 0}
};
(Odr_fun)z_Admin, 0},
{ODR_EXPLICIT, ODR_CONTEXT, 0, Z_External_update0,
(Odr_fun)z_IU0Update, 0},
+ {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_External_userInfo1,
+ (Odr_fun)z_OtherInformation, 0},
+ {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_External_charSetandLanguageNegotiation,
+ (Odr_fun)z_CharSetandLanguageNegotiation, 0},
+ {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_External_acfPrompt1,
+ (Odr_fun)z_PromptObject1, 0},
+ {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_External_acfDes1,
+ (Odr_fun)z_DES_RN_Object, 0},
+ {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_External_acfKrb1,
+ (Odr_fun)z_KRBObject, 0},
{-1, -1, -1, -1, 0, 0}
};
# YC Sample Config File for Z39.50
-# $Id: z.tcl,v 1.5 2001-03-07 13:24:40 adam Exp $
+# $Id: z.tcl,v 1.6 2002-02-11 23:25:27 adam Exp $
# ----------------------------------------------------------
# Prefix Specifications
#
set map($m,OriginPartToKeep) ESAdminOriginPartToKeep
set map($m,OriginPartNotToKeep) ESAdminOriginPartNotToKeep
set map($m,TargetPart) ESAdminTargetPart
+# ----
+set m NegotiationRecordDefinition-charSetandLanguageNegotiation-3
+set filename($m) z-charneg
# ----------------------------------------------------------
# "Constructed" types defined by means of C-types are declared here.
segmentRequest [45] IMPLICIT Segment,
extendedServicesRequest [46] IMPLICIT ExtendedServicesRequest,
extendedServicesResponse [47] IMPLICIT ExtendedServicesResponse,
- close [48] IMPLICIT Close}
+ close [48] IMPLICIT Close,
+ duplicateDetectionRequest [49] IMPLICIT DuplicateDetectionRequest,
+ duplicateDetectionResponse [50] IMPLICIT DuplicateDetectionResponse}
-- Initialize APDUs
level-1Segmentation (11),
level-2Segmentation (12),
concurrentOperations (13),
- namedResultSets (14)}
+ namedResultSets (14),
+ encapsulation (15),
+ resultCount (16),
+ negotiationModel (17),
+ duplicateDetection (18),
+ queryType104 (19)}
-- end auxiliary definitions for Init PDUs
peerAbort (8),
unspecified (9)}
+--Duplicate detection APDUs
+DuplicateDetectionRequest ::= SEQUENCE {
+ referenceId ReferenceId OPTIONAL,
+ inputResultSetIds [3] IMPLICIT SEQUENCE OF InternationalString,
+ outputResultSetName [4] IMPLICIT InternationalString,
+ applicablePortionOfRecord [5] IMPLICIT EXTERNAL OPTIONAL,
+ duplicateDetectionCriteria [6] IMPLICIT SEQUENCE OF
+ DuplicateDetectionCriterion OPTIONAL,
+ clustering [7] IMPLICIT BOOLEAN OPTIONAL,
+ -- 'true' means "clustered".
+ -- This parameter may be omitted
+ -- only if retentionCriteria CHOICE is
+ -- 'numberOfEntries' and its value is 1.
+ retentionCriteria [8] IMPLICIT SEQUENCE OF
+ RetentionCriterion,
+ sortCriteria [9] IMPLICIT SEQUENCE OF
+ SortCriterion OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
+
+DuplicateDetectionCriterion ::= CHOICE{
+ levelOfMatch [1] IMPLICIT INTEGER,
+ -- a percentage; 1-100.
+ caseSensitive [2] IMPLICIT NULL,
+ punctuationSensitive [3] IMPLICIT NULL,
+ regularExpression [4] IMPLICIT EXTERNAL,
+ rsDuplicates [5] IMPLICIT NULL
+ -- values 6-100 reserved for future assignment.
+ }
+
+RetentionCriterion ::= CHOICE{
+ numberOfEntries [1] IMPLICIT INTEGER,
+ -- greater than 0
+ percentOfEntries [2] IMPLICIT INTEGER,
+ -- 1-100,
+ duplicatesOnly [3] IMPLICIT NULL,
+ -- should not be chosen
+ -- if clustering is 'true'
+ discardRsDuplicates [4] IMPLICIT NULL
+ -- values 5-100 reserved for future assignment.
+ }
+
+SortCriterion ::= CHOICE{
+ mostComprehensive [1] IMPLICIT NULL,
+ leastConmprehensive [2] IMPLICIT NULL,
+ mostRecent [3] IMPLICIT NULL,
+ oldest [4] IMPLICIT NULL,
+ leastCost [5] IMPLICIT NULL,
+ preferredDatabases [6] IMPLICIT
+ SEQUENCE OF InternationalString
+ -- values 7-100 reserved for future assignment.
+}
+
+DuplicateDetectionResponse ::= SEQUENCE {
+ referenceId ReferenceId OPTIONAL,
+ status [3] IMPLICIT INTEGER{
+ success (0),
+ failure (1)},
+ resultSetCount [4] IMPLICIT INTEGER OPTIONAL,
+ diagnostics [5] IMPLICIT SEQUENCE OF DiagRec OPTIONAL,
+ otherInfo OtherInformation OPTIONAL}
-- Global auxiliary definitions
ReferenceId ::= [2] IMPLICIT OCTET STRING
/*
- * Copyright (c) 1999-2001, Index Data
+ * Copyright (c) 1999-2002, Index Data
* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
- * $Log: otherinfo.c,v $
- * Revision 1.5 2001-09-24 21:51:56 adam
- * New Z39.50 OID utilities: yaz_oidval_to_z3950oid, yaz_str_to_z3950oid
- * and yaz_z3950oid_to_str.
- *
- * Revision 1.4 1999/11/30 13:47:12 adam
- * Improved installation. Moved header files to include/yaz.
- *
- * Revision 1.3 1999/11/10 09:06:40 adam
- * Fixed yaz_oi_update so that it ignores NULL pointer.
- *
- * Revision 1.2 1999/09/13 12:51:35 adam
- * Fixed bug in yaz_oi_update and added delete option.
- *
- * Revision 1.1 1999/06/08 10:10:16 adam
- * New sub directory zutil. Moved YAZ Compiler to be part of YAZ tree.
- *
- * Revision 1.1 1999/04/26 07:25:25 adam
- * Implemented OtherInfo utility.
- *
+ * $Id: otherinfo.c,v 1.6 2002-02-11 23:25:27 adam Exp $
*/
#include <stdio.h>
case Z_APDU_deleteResultSetResponse:
*oip = &apdu->u.deleteResultSetResponse->otherInfo;
break;
+ case Z_APDU_duplicateDetectionRequest:
+ *oip = &apdu->u.duplicateDetectionRequest->otherInfo;
+ break;
+ case Z_APDU_duplicateDetectionResponse:
+ *oip = &apdu->u.duplicateDetectionResponse->otherInfo;
+ break;
default:
*oip = 0;
break;
/*
- * Copyright (c) 1995-2001, Index Data.
+ * Copyright (c) 1995-2002, Index Data.
* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
- * $Log: zget.c,v $
- * Revision 1.10 2001-09-24 21:48:46 adam
- * Setting v1,v2,search and present options for init request.
- *
- * Revision 1.9 2001/05/18 11:42:03 adam
- * YAZ Build date for WIN32.
- *
- * Revision 1.8 2001/05/17 14:16:15 adam
- * Added EXTERNAL handling for item update0 (1.0).
- *
- * Revision 1.7 2001/05/16 07:22:56 adam
- * YAZ CVS Date part of implementationVersion in init{request,Response}.
- *
- * Revision 1.6 2001/03/25 21:55:13 adam
- * Added odr_intdup. Ztest server returns TaskPackage for ItemUpdate.
- *
- * Revision 1.5 2001/03/13 18:11:38 adam
- * Altered zget_ExtendedServicesRequest - sets waitAction to waitIfPossible.
- *
- * Revision 1.4 2001/02/21 13:46:54 adam
- * C++ fixes.
- *
- * Revision 1.3 2000/03/20 19:06:25 adam
- * Added Segment request for fronend server. Work on admin for client.
- *
- * Revision 1.2 1999/11/30 13:47:12 adam
- * Improved installation. Moved header files to include/yaz.
- *
- * Revision 1.1 1999/06/08 10:10:16 adam
- * New sub directory zutil. Moved YAZ Compiler to be part of YAZ tree.
- *
- * Revision 1.17 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.16 1998/08/19 16:10:05 adam
- * Changed som member names of DeleteResultSetRequest/Response.
- *
- * Revision 1.15 1998/03/31 15:13:19 adam
- * Development towards compiled ASN.1.
- *
- * Revision 1.14 1998/02/11 11:53:32 adam
- * Changed code so that it compiles as C++.
- *
- * Revision 1.13 1998/01/29 13:13:39 adam
- * Function zget_presentRequest fills resultSetId with "default" instead
- * of "Default".
- *
- * Revision 1.12 1997/10/29 12:00:37 adam
- * Routine zget_SearchRequest fills resultSetName member with "default"
- * instead of "Default".
- *
- * Revision 1.11 1997/05/02 08:39:10 quinn
- * New PDUs added, thanks to Ronald van der Meer
- *
- * Revision 1.10 1996/01/02 08:57:23 quinn
- * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
- *
- * Revision 1.9 1995/09/29 17:11:55 quinn
- * Smallish
- *
- * Revision 1.8 1995/09/27 15:02:43 quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.7 1995/06/15 07:44:52 quinn
- * Moving to v3.
- *
- * Revision 1.6 1995/06/14 15:26:37 quinn
- * *** empty log message ***
- *
- * Revision 1.5 1995/06/07 14:42:30 quinn
- * Fixed CLOSE
- *
- * Revision 1.4 1995/06/07 14:36:25 quinn
- * Added CLOSE
- *
- * Revision 1.3 1995/06/05 10:52:06 quinn
- * Fixed some negligences.
- *
- * Revision 1.2 1995/05/30 10:15:49 quinn
- * Added our implementor's ID
- *
- * Revision 1.1 1995/05/22 11:30:20 quinn
- * Adding Z39.50-1992 stuff to proto.c. Adding zget.c
- *
- *
+ * $Id: zget.c,v 1.11 2002-02-11 23:25:27 adam Exp $
*/
#include <yaz/proto.h>
return r;
}
+Z_DuplicateDetectionRequest *zget_DuplicateDetectionRequest(ODR o)
+{
+ Z_DuplicateDetectionRequest *r = (Z_DuplicateDetectionRequest *)
+ odr_malloc(o, sizeof(*r));
+
+ r->referenceId = 0;
+ r->num_inputResultSetIds = 0;
+ r->inputResultSetIds = 0;
+ r->outputResultSetName = 0;
+ r->applicablePortionOfRecord = 0;
+ r->num_duplicateDetectionCriteria = 0;
+ r->duplicateDetectionCriteria = 0;
+ r->clustering = 0;
+ r->num_retentionCriteria = 0;
+ r->retentionCriteria = 0;
+ r->num_sortCriteria = 0;
+ r->sortCriteria = 0;
+ r->otherInfo = 0;
+ return r;
+}
+
+Z_DuplicateDetectionResponse *zget_DuplicateDetectionResponse(ODR o)
+{
+ Z_DuplicateDetectionResponse *r = (Z_DuplicateDetectionResponse *)
+ odr_malloc(o, sizeof(*r));
+
+ r->referenceId = 0;
+ r->status = odr_intdup(o, Z_DuplicateDetectionResponse_success);
+ r->resultSetCount = 0;
+ r->num_diagnostics = 0;
+ r->diagnostics = 0;
+ r->otherInfo = 0;
+ return r;
+}
+
Z_APDU *zget_APDU(ODR o, int which)
{
Z_APDU *r = (Z_APDU *)odr_malloc(o, sizeof(*r));
-
+
switch (r->which = which)
{
- case Z_APDU_initRequest:
- r->u.initRequest = zget_InitRequest(o);
- break;
- case Z_APDU_initResponse:
- r->u.initResponse = zget_InitResponse(o);
- break;
- case Z_APDU_searchRequest:
- r->u.searchRequest = zget_SearchRequest(o);
- break;
- case Z_APDU_searchResponse:
- r->u.searchResponse = zget_SearchResponse(o);
- break;
- case Z_APDU_presentRequest:
- r->u.presentRequest = zget_PresentRequest(o);
- break;
- case Z_APDU_presentResponse:
- r->u.presentResponse = zget_PresentResponse(o);
- break;
- case Z_APDU_deleteResultSetRequest:
- r->u.deleteResultSetRequest = zget_DeleteResultSetRequest(o);
- break;
- case Z_APDU_deleteResultSetResponse:
- r->u.deleteResultSetResponse = zget_DeleteResultSetResponse(o);
- break;
- case Z_APDU_scanRequest:
- r->u.scanRequest = zget_ScanRequest(o);
- break;
- case Z_APDU_scanResponse:
- r->u.scanResponse = zget_ScanResponse(o);
- break;
- case Z_APDU_triggerResourceControlRequest:
- r->u.triggerResourceControlRequest =
- zget_TriggerResourceControlRequest(o);
- break;
- case Z_APDU_resourceControlRequest:
- r->u.resourceControlRequest = zget_ResourceControlRequest(o);
- break;
- case Z_APDU_resourceControlResponse:
- r->u.resourceControlResponse = zget_ResourceControlResponse(o);
- break;
- case Z_APDU_segmentRequest:
- r->u.segmentRequest = zget_Segment(o);
- break;
- case Z_APDU_close:
- r->u.close = zget_Close(o);
- break;
- case Z_APDU_accessControlRequest:
- r->u.accessControlRequest = zget_AccessControlRequest(o);
- break;
- case Z_APDU_accessControlResponse:
- r->u.accessControlResponse = zget_AccessControlResponse(o);
- break;
- case Z_APDU_resourceReportRequest:
- r->u.resourceReportRequest = zget_ResourceReportRequest(o);
- break;
- case Z_APDU_resourceReportResponse:
- r->u.resourceReportResponse = zget_ResourceReportResponse(o);
- break;
- case Z_APDU_sortRequest:
- r->u.sortRequest = zget_SortRequest(o);
- break;
- case Z_APDU_sortResponse:
- r->u.sortResponse = zget_SortResponse(o);
- break;
- case Z_APDU_extendedServicesRequest:
- r->u.extendedServicesRequest = zget_ExtendedServicesRequest(o);
- break;
- case Z_APDU_extendedServicesResponse:
- r->u.extendedServicesResponse = zget_ExtendedServicesResponse(o);
- break;
- default:
- fprintf(stderr, "Bad APDU-type to zget_APDU");
- exit(1);
+ case Z_APDU_initRequest:
+ r->u.initRequest = zget_InitRequest(o);
+ break;
+ case Z_APDU_initResponse:
+ r->u.initResponse = zget_InitResponse(o);
+ break;
+ case Z_APDU_searchRequest:
+ r->u.searchRequest = zget_SearchRequest(o);
+ break;
+ case Z_APDU_searchResponse:
+ r->u.searchResponse = zget_SearchResponse(o);
+ break;
+ case Z_APDU_presentRequest:
+ r->u.presentRequest = zget_PresentRequest(o);
+ break;
+ case Z_APDU_presentResponse:
+ r->u.presentResponse = zget_PresentResponse(o);
+ break;
+ case Z_APDU_deleteResultSetRequest:
+ r->u.deleteResultSetRequest = zget_DeleteResultSetRequest(o);
+ break;
+ case Z_APDU_deleteResultSetResponse:
+ r->u.deleteResultSetResponse = zget_DeleteResultSetResponse(o);
+ break;
+ case Z_APDU_scanRequest:
+ r->u.scanRequest = zget_ScanRequest(o);
+ break;
+ case Z_APDU_scanResponse:
+ r->u.scanResponse = zget_ScanResponse(o);
+ break;
+ case Z_APDU_triggerResourceControlRequest:
+ r->u.triggerResourceControlRequest =
+ zget_TriggerResourceControlRequest(o);
+ break;
+ case Z_APDU_resourceControlRequest:
+ r->u.resourceControlRequest = zget_ResourceControlRequest(o);
+ break;
+ case Z_APDU_resourceControlResponse:
+ r->u.resourceControlResponse = zget_ResourceControlResponse(o);
+ break;
+ case Z_APDU_segmentRequest:
+ r->u.segmentRequest = zget_Segment(o);
+ break;
+ case Z_APDU_close:
+ r->u.close = zget_Close(o);
+ break;
+ case Z_APDU_accessControlRequest:
+ r->u.accessControlRequest = zget_AccessControlRequest(o);
+ break;
+ case Z_APDU_accessControlResponse:
+ r->u.accessControlResponse = zget_AccessControlResponse(o);
+ break;
+ case Z_APDU_resourceReportRequest:
+ r->u.resourceReportRequest = zget_ResourceReportRequest(o);
+ break;
+ case Z_APDU_resourceReportResponse:
+ r->u.resourceReportResponse = zget_ResourceReportResponse(o);
+ break;
+ case Z_APDU_sortRequest:
+ r->u.sortRequest = zget_SortRequest(o);
+ break;
+ case Z_APDU_sortResponse:
+ r->u.sortResponse = zget_SortResponse(o);
+ break;
+ case Z_APDU_extendedServicesRequest:
+ r->u.extendedServicesRequest = zget_ExtendedServicesRequest(o);
+ break;
+ case Z_APDU_extendedServicesResponse:
+ r->u.extendedServicesResponse = zget_ExtendedServicesResponse(o);
+ case Z_APDU_duplicateDetectionRequest:
+ r->u.duplicateDetectionRequest = zget_DuplicateDetectionRequest(o);
+ break;
+ case Z_APDU_duplicateDetectionResponse:
+ r->u.duplicateDetectionResponse = zget_DuplicateDetectionResponse(o);
+ break;
+ default:
+ fprintf(stderr, "Bad APDU-type to zget_APDU");
+ exit(1);
}
return r;
}