-<!-- $Id: installation.xml,v 1.6 2001-10-24 21:30:47 adam Exp $ -->
+<!-- $Id: installation.xml,v 1.7 2001-10-26 20:13:44 adam Exp $ -->
<chapter id="installation"><title>Compilation and Installation</title>
- <sect1><title>Introduction</title>
- <para>
- The latest version of the software will generally be found at:
- </para>
- <para>
- <ulink url="http://ftp.indexdata.dk/pub/yaz/">
- http://ftp.indexdata.dk/pub/yaz/</ulink>
- </para>
- <para>
- We have tried our best to keep the software portable, and on many
- platforms, you should be able to compile everything with little or
- no changes.
- So far, the software has been ported to the following platforms with
- little or no difficulties.
+ <sect1><title>Introduction</title>
+ <para>
+ The latest version of the software will generally be found at:
+ </para>
+ <para>
+ <ulink url="http://ftp.indexdata.dk/pub/yaz/">
+ http://ftp.indexdata.dk/pub/yaz/</ulink>
+ </para>
+ <para>
+ We have tried our best to keep the software portable, and on many
+ platforms, you should be able to compile everything with little or
+ no changes.
+ So far, the software has been ported to the following platforms with
+ little or no difficulties.
+
+ <itemizedlist>
+ <listitem><para>Unix systems</para>
+ <itemizedlist>
+ <listitem><para>HP/UX</para></listitem>
+ <listitem><para>SunOS/Solaris</para></listitem>
+ <listitem><para>DEC Unix</para></listitem>
+ <listitem><para>OpenBSD/FreeBSD</para></listitem>
+ <listitem><para>Linux</para></listitem>
+ <listitem><para>IBM AIX</para></listitem>
+ <listitem><para>Data General DG/UX (with some CFLAGS tinkering)
+ </para></listitem>
+ <listitem><para>SGI/IRIX</para></listitem>
+ <listitem><para>DDE Supermax</para></listitem>
+ </itemizedlist></listitem>
+ <listitem><para>Non-unix systems</para>
+ <itemizedlist>
+ <listitem><para>Apple Macintosh (using the Codewarrior programming
+ environment and the GUSI socket libraries)</para></listitem>
+ <listitem><para>MS Windows 95/98/NT/W2K (Win32)</para></listitem>
+ <listitem><para>IBM AS/400</para></listitem>
+ </itemizedlist></listitem>
+ </itemizedlist>
+
+ </para>
+ <para>
+ If you move the software to other platforms, we'd be grateful if you'd
+ let us know about it. If you run into difficulties, we will try to help
+ if we can, and if you solve the problems, we would be happy to include
+ your fixes in the next release. So far, we have mostly avoided
+ #ifdefs for individual platforms, and we'd like to keep it that
+ way as far as it makes sense.
+ </para>
- <itemizedlist>
- <listitem><para>Unix systems</para>
- <itemizedlist>
- <listitem><para>HP/UX</para></listitem>
- <listitem><para>SunOS/Solaris</para></listitem>
- <listitem><para>DEC Unix</para></listitem>
- <listitem><para>OpenBSD/FreeBSD</para></listitem>
- <listitem><para>Linux</para></listitem>
- <listitem><para>IBM AIX</para></listitem>
- <listitem><para>Data General DG/UX (with some CFLAGS tinkering)
- </para></listitem>
- <listitem><para>SGI/IRIX</para></listitem>
- <listitem><para>DDE Supermax</para></listitem>
- </itemizedlist></listitem>
- <listitem><para>Non-unix systems</para>
- <itemizedlist>
- <listitem><para>Apple Macintosh (using the Codewarrior programming
- environment and the GUSI socket libraries)</para></listitem>
- <listitem><para>MS Windows 95/98/NT/W2K (Win32)</para></listitem>
- <listitem><para>IBM AS/400</para></listitem>
- </itemizedlist></listitem>
- </itemizedlist>
+ <para>
+ We maintain a mailing-list for the purpose of announcing new releases and
+ bug-fixes, as well as general discussion. Subscribe by sending mail to
+ <ulink url="mailto:yaz-request@indexdata.dk">
+ yaz-request@indexdata.dk
+ </ulink>.
+ General questions and problems can be directed at
+ <ulink url="mailto:yaz-help@indexdata.dk">
+ yaz-help@indexdata.dk
+ </ulink>, or the address given at the top of this document.
+ </para>
- </para>
- <para>
- If you move the software to other platforms, we'd be grateful if you'd
- let us know about it. If you run into difficulties, we will try to help
- if we can, and if you solve the problems, we would be happy to include
- your fixes in the next release. So far, we have mostly avoided
- #ifdefs for individual platforms, and we'd like to keep it that
- way as far as it makes sense.
- </para>
-
- <para>
- We maintain a mailing-list for the purpose of announcing new releases and
- bug-fixes, as well as general discussion. Subscribe by sending mail to
- <ulink url="mailto:yaz-request@indexdata.dk">
- yaz-request@indexdata.dk
- </ulink>.
- General questions and problems can be directed at
- <ulink url="mailto:yaz-help@indexdata.dk">
- yaz-help@indexdata.dk
- </ulink>, or the address given at the top of this document.
- </para>
-
</sect1>
<sect1 id="installation.unix"><title>UNIX</title>
<varlistentry><term><literal>--enable-tcpd</literal></term>
<listitem><para>The front end server will be built using Wietse's
<ulink url="ftp://ftp.porcupine.org/pub/security/index.html">
- TCP wrapper library</ulink>. It allows you to allow/deny
+ TCP wrapper library</ulink>. It allows you to allow/deny
clients depending on IP number. The TCP wrapper library is
commonly used in Linux/BSD distributions.
</para></listitem>
<varlistentry><term><filename>client/yaz-client</filename></term>
<listitem><para>Z39.50 client for testing the protocol.
- See chapter <link linkend="client">
- YAZ client</link> for more information.
+ See chapter <link linkend="client">
+ YAZ client</link> for more information.
</para></listitem></varlistentry>
<varlistentry><term><filename>yaz-config</filename></term>
<varlistentry><term><filename>zoom/zoomsh</filename></term>
<listitem><para>
A simple shell implemented on top of the
- <link linkend="zoom">ZOOM</link> functions.
+ <link linkend="zoom">ZOOM</link> functions.
The shell is a command line application that allows you to enter
simple commands perform to perform ZOOM operations.
</para></listitem></varlistentry>
<varlistentry><term><filename>zoom/zoomtst1</filename>,
- <filename>zoom/zoomtst2</filename>, ..</term>
+ <filename>zoom/zoomtst2</filename>, ..</term>
<listitem><para>
Several small applications that demonstrates the use of ZOOM.
</para></listitem></varlistentry>
<variablelist>
<varlistentry><term><literal>DEBUG</literal></term>
<listitem><para>
- If set to 1, the software is
- compiled with debugging libraries (code generation is
- multi-threaded debug DLL).
- If set to 0, the software is compiled with release libraries
- (code generation is multi-threaded DLL).
+ If set to 1, the software is
+ compiled with debugging libraries (code generation is
+ multi-threaded debug DLL).
+ If set to 0, the software is compiled with release libraries
+ (code generation is multi-threaded DLL).
</para></listitem>
</varlistentry>
<varlistentry><term><literal>TCL</literal></term>
<listitem><para>
- Specifies the name of the Tcl shell (EXE-file).
- You do not need setting this or installing Tcl unless you wish
- to change or add ASN.1 for &yaz;.
+ Specifies the name of the Tcl shell (EXE-file).
+ You do not need setting this or installing Tcl unless you wish
+ to change or add ASN.1 for &yaz;.
</para></listitem>
</varlistentry>
</variablelist>
If command <filename>nmake</filename> is not found on your system
you probably haven't defined the environment variables required to
use that tool. To fix that, find and run the batch file
- <filename>vcvars32.bat</filename>. You need to run it from within
+ <filename>vcvars32.bat</filename>. You need to run it from within
the command prompt or set the environment variables "globally";
otherwise it doesn't work.
</para>
</para></listitem></varlistentry>
<varlistentry><term><filename>bin/zoomtst1.exe</filename>,
- <filename>bin/zoomtst2.exe</filename>, ..</term>
+ <filename>bin/zoomtst2.exe</filename>, ..</term>
<listitem><para>
Several small applications that demonstrates the use of ZOOM.
</para></listitem></varlistentry>
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document: "yaz.xml"
- sgml-local-catalogs: "../../docbook/docbook.cat"
+ sgml-local-catalogs: nil
sgml-namecase-general:t
End:
-->
-<!-- $Id: zoom.xml,v 1.4 2001-10-24 21:24:38 quinn Exp $ -->
+<!-- $Id: zoom.xml,v 1.5 2001-10-26 20:13:44 adam Exp $ -->
<chapter id="zoom"><title>Building clients with ZOOM</title>
<para>
- &zoom; is an acronym for 'Z39.50 Object-Orientation Model' and is
+ &zoom; is an acronym for 'Z39.50 Object-Orientation Model' and is
an initiative started by Mike Taylor (Mike is from the UK, which
explains the peculiar name of the model). The goal of &zoom; is to
provide a common Z39.50 client API not bound to a particular
<literal>NULL</literal> pointer.
</para>
<sect1 id="zoom.connections"><title>Connections</title>
-
+
<para>The Connection object is a session with a target.
</para>
<synopsis>
#include <yaz/zoom.h>
-
+
Z3950_connection Z3950_connection_new (const char *host, int portnum);
-
+
Z3950_connection Z3950_connection_create (Z3950_options options);
void Z3950_connection_connect(Z3950_connection c, const char *host,
<colspec colwidth="4*" colname="name"></colspec>
<colspec colwidth="7*" colname="description"></colspec>
<colspec colwidth="3*" colname="default"></colspec>
- <thead>
- <row>
- <entry>Option</entry>
- <entry>Description</entry>
- <entry>Default</entry>
- </row>
- </thead>
- <tbody>
- <row><entry>
- implementationName</entry><entry>Name of Your client
- </entry><entry>none</entry></row>
- <row><entry>
- user</entry><entry>Authentication user name
- </entry><entry>none</entry></row>
- <row><entry>
- group</entry><entry>Authentication group name
+ <thead>
+ <row>
+ <entry>Option</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row><entry>
+ implementationName</entry><entry>Name of Your client
+ </entry><entry>none</entry></row>
+ <row><entry>
+ user</entry><entry>Authentication user name
+ </entry><entry>none</entry></row>
+ <row><entry>
+ group</entry><entry>Authentication group name
+ </entry><entry>none</entry></row>
+ <row><entry>
+ pass</entry><entry>Authentication password
</entry><entry>none</entry></row>
- <row><entry>
- pass</entry><entry>Authentication password
- </entry><entry>none</entry></row>
- <row><entry>
- proxy</entry><entry>Proxy host
- </entry><entry>none</entry></row>
- <row><entry>
- async</entry><entry>If true (1) the connection operates in
- asynchronous operation which means that all calls are non-blocking
- except <function>Z3950_event</function>.
- </entry><entry>0</entry></row>
- <row><entry>
- maximumRecordSize</entry><entry> Maximum size of single record.
- </entry><entry>1 MB</entry></row>
- <row><entry>
- preferredMessageSize</entry><entry> Maximum size of multiple records.
- </entry><entry>1 MB</entry></row>
- </tbody>
- </tgroup>
+ <row><entry>
+ proxy</entry><entry>Proxy host
+ </entry><entry>none</entry></row>
+ <row><entry>
+ async</entry><entry>If true (1) the connection operates in
+ asynchronous operation which means that all calls are non-blocking
+ except <function>Z3950_event</function>.
+ </entry><entry>0</entry></row>
+ <row><entry>
+ maximumRecordSize</entry><entry> Maximum size of single record.
+ </entry><entry>1 MB</entry></row>
+ <row><entry>
+ preferredMessageSize</entry><entry> Maximum size of multiple records.
+ </entry><entry>1 MB</entry></row>
+ </tbody>
+ </tgroup>
</table>
<para>
- Function <function>Z3950_connection_host</function> returns
+ Function <function>Z3950_connection_host</function> returns
the host for the connection as specified in a call to
- <function>Z3950_connection_new</function> or
- <function>Z3950_connection_connect</function>.
- This function returns <literal>NULL</literal> if host isn't
- set for the connection.
+ <function>Z3950_connection_new</function> or
+ <function>Z3950_connection_connect</function>.
+ This function returns <literal>NULL</literal> if host isn't
+ set for the connection.
</para>
<synopsis>
int Z3950_connection_error (Z3950_connection c, const char **cp,
const char **addinfo);
</synopsis>
<para>
- Use <function>Z3950_connection_error</function> to check for
- errors for the last operation(s) performed. The function returns
- zero if no errors occurred; non-zero otherwise indicating the error.
- Pointers <parameter>cp</parameter> and <parameter>addinfo</parameter>
- holds messages for the error and additional-info if passed as
- non-<literal>NULL</literal>.
+ Use <function>Z3950_connection_error</function> to check for
+ errors for the last operation(s) performed. The function returns
+ zero if no errors occurred; non-zero otherwise indicating the error.
+ Pointers <parameter>cp</parameter> and <parameter>addinfo</parameter>
+ holds messages for the error and additional-info if passed as
+ non-<literal>NULL</literal>.
</para>
</sect1>
<sect1 id="zoom.search"><title>Search objects</title>
<para>
- Search objects defines how result sets are obtained. They
- act like queries.
+ Search objects defines how result sets are obtained. They
+ act like queries.
</para>
<synopsis>
Z3950_search Z3950_search_create(void);
int Z3950_search_sortby(Z3950_search s, const char *criteria);
</synopsis>
<para>
- Create search objects using <function>Z3950_search_create</function>
- and destroy them by calling <function>Z3950_search_destroy</function>.
- RPN-queries can be specified in <link linkend="PQF">PQF</link>
- notation by using the
- function <function>Z3950_search_prefix</function>. More
- query types will be added later, such as
- <link linkend="CCL">CCL</link> to RPN-mapping, native CCL query,
- etc. In addition to a search, a sort criteria may be set. Function
- <function>Z3950_search_sortby</function> specifies a
- sort criteria using the same string notation for sort as offered by
- the <link linkend="sortspec">YAZ client</link>.
+ Create search objects using <function>Z3950_search_create</function>
+ and destroy them by calling <function>Z3950_search_destroy</function>.
+ RPN-queries can be specified in <link linkend="PQF">PQF</link>
+ notation by using the
+ function <function>Z3950_search_prefix</function>. More
+ query types will be added later, such as
+ <link linkend="CCL">CCL</link> to RPN-mapping, native CCL query,
+ etc. In addition to a search, a sort criteria may be set. Function
+ <function>Z3950_search_sortby</function> specifies a
+ sort criteria using the same string notation for sort as offered by
+ the <link linkend="sortspec">YAZ client</link>.
</para>
</sect1>
<sect1 id="zoom.resultsets"><title>Result sets</title>
<para>
- The result set object is a container for records returned from
- a target.
- search.
+ The result set object is a container for records returned from
+ a target.
</para>
<synopsis>
Z3950_resultset Z3950_connection_search(Z3950_connection,
void Z3950_resultset_destroy(Z3950_resultset r);
</synopsis>
<para>
- Function <function>Z3950_connection_search</function> creates
+ Function <function>Z3950_connection_search</function> creates
a result set given a connection - and search object.
- Destroy a result set by calling
- <function>Z3950_resultset_destroy</function>.
- Simple clients using PQF only may use function
- <function>Z3950_connection_search_pqf</function> instead.
+ Destroy a result set by calling
+ <function>Z3950_resultset_destroy</function>.
+ Simple clients using PQF only may use function
+ <function>Z3950_connection_search_pqf</function> instead.
</para>
<synopsis>
const char *Z3950_resultset_option (Z3950_resultset r,
const char *type, int *len);
</synopsis>
<para>
- Function <function>Z3950_resultset_options</function> sets or
- modifies an option for a result set similar to
+ Function <function>Z3950_resultset_options</function> sets or
+ modifies an option for a result set similar to
<function>Z3950_connection_option</function>.
</para>
<para>
- The number of hits also called result-count is returned by
- function <function>Z3950_resultset_size</function>.
+ The number of hits also called result-count is returned by
+ function <function>Z3950_resultset_size</function>.
</para>
<para>
- Function <function>Z3950_resultset_get</function> is similar to
- <link linkend="zoom.record.get">
+ Function <function>Z3950_resultset_get</function> is similar to
+ <link linkend="zoom.record.get">
<function>Z3950_record_get</function></link> but
- instead of operating on a record object, it operates on a record on
- a given offset within a result set.
+ instead of operating on a record object, it operates on a record on
+ a given offset within a result set.
</para>
<table frame="top"><title>ZOOM Result set Options</title>
<tgroup cols="3">
<colspec colwidth="4*" colname="name"></colspec>
<colspec colwidth="7*" colname="description"></colspec>
<colspec colwidth="2*" colname="default"></colspec>
- <thead>
- <row>
- <entry>Option</entry>
- <entry>Description</entry>
- <entry>Default</entry>
- </row>
- </thead>
- <tbody>
- <row><entry>
- piggyback</entry><entry>True (1) if piggyback should be
- used in searches; false (0) if not.
- </entry><entry>1</entry></row>
- <row><entry>
- start</entry><entry>Offset of first record we wish to
- retrieve from the target. Note first record has offset 0
- unlike the protocol specifications where first record has position
- 1.
- </entry><entry>0</entry></row>
- <row><entry>
- count</entry><entry>Number of records to be retrieved.
- </entry><entry>0</entry></row>
- <row><entry>
- elementSetName</entry><entry>Element-Set name of records.
- Most targets should honor element set name <literal>B</literal>
- and <literal>F</literal> for brief and full respectively.
- </entry><entry>none</entry></row>
- <row><entry>
- preferredRecordSyntax</entry><entry>Preferred Syntax, such as
- <literal>USMARC</literal>, <literal>SUTRS</literal>, etc.
- </entry><entry>none</entry></row>
- <row><entry>
- databaseName</entry><entry>One or more database names
- separated by character plus (<literal>+</literal>).
- </entry><entry>Default</entry></row>
- </tbody>
- </tgroup>
+ <thead>
+ <row>
+ <entry>Option</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row><entry>
+ piggyback</entry><entry>True (1) if piggyback should be
+ used in searches; false (0) if not.
+ </entry><entry>1</entry></row>
+ <row><entry>
+ start</entry><entry>Offset of first record we wish to
+ retrieve from the target. Note first record has offset 0
+ unlike the protocol specifications where first record has position
+ 1.
+ </entry><entry>0</entry></row>
+ <row><entry>
+ count</entry><entry>Number of records to be retrieved.
+ </entry><entry>0</entry></row>
+ <row><entry>
+ elementSetName</entry><entry>Element-Set name of records.
+ Most targets should honor element set name <literal>B</literal>
+ and <literal>F</literal> for brief and full respectively.
+ </entry><entry>none</entry></row>
+ <row><entry>
+ preferredRecordSyntax</entry><entry>Preferred Syntax, such as
+ <literal>USMARC</literal>, <literal>SUTRS</literal>, etc.
+ </entry><entry>none</entry></row>
+ <row><entry>
+ databaseName</entry><entry>One or more database names
+ separated by character plus (<literal>+</literal>).
+ </entry><entry>Default</entry></row>
+ </tbody>
+ </tgroup>
</table>
</sect1>
<sect1 id="zoom.records"><title>Records</title>
<para>
- A record object is a retrival record on the client side -
- created from result sets.
+ A record object is a retrival record on the client side -
+ created from result sets.
</para>
<synopsis>
void Z3950_resultset_records (Z3950_resultset r,
void Z3950_record_destroy (Z3950_record rec);
</synopsis>
<para>
- Records are created by functions
- <function>Z3950_resultset_records</function> or
- <function>Z3950_resultset_record</function>
- and destroyed by <function>Z3950_record_destroy</function>.
+ Records are created by functions
+ <function>Z3950_resultset_records</function> or
+ <function>Z3950_resultset_record</function>
+ and destroyed by <function>Z3950_record_destroy</function>.
</para>
<para>
- A single record is created and returned by function
- <function>Z3950_resultset_record</function> that takes a
- position as argument. First record has position zero.
- If no record could be obtained <literal>NULL</literal> is returned.
+ A single record is created and returned by function
+ <function>Z3950_resultset_record</function> that takes a
+ position as argument. First record has position zero.
+ If no record could be obtained <literal>NULL</literal> is returned.
</para>
<para>
- Function <function>Z3950_resultset_records</function> retrieves
- a number of records from a result set. Options <literal>start</literal>
- and <literal>count</literal> specifies the range of records to
- be returned. Upon completion <literal>recs[0], ..recs[*cnt]</literal>
- holds record objects for the records. These array of records
+ Function <function>Z3950_resultset_records</function> retrieves
+ a number of records from a result set. Options <literal>start</literal>
+ and <literal>count</literal> specifies the range of records to
+ be returned. Upon completion <literal>recs[0], ..recs[*cnt]</literal>
+ holds record objects for the records. These array of records
<literal>recs</literal> should be allocate prior to calling
- <function>Z3950_resultset_records</function>. Note that for
- records that couldn't be retrieved from the target
- <literal>recs[ ..]</literal> is <literal>NULL</literal>.
+ <function>Z3950_resultset_records</function>. Note that for
+ records that couldn't be retrieved from the target
+ <literal>recs[ ..]</literal> is <literal>NULL</literal>.
</para>
<para id="zoom.record.get">
- In order to extract information about a single record,
- <function>Z3950_record_get</function> is provided. The
- function returns a pointer to certain record information. The
- nature (type) of the pointer depends on the <function>type</function>
- given. In addition for certain types, the length
- <literal>len</literal> passed will be set to the size in bytes of
- the returned information. The types <literal>database</literal>,
- <literal>syntax</literal> and <literal>render</literal> are
- supported. More will be added later.
+ In order to extract information about a single record,
+ <function>Z3950_record_get</function> is provided. The
+ function returns a pointer to certain record information. The
+ nature (type) of the pointer depends on the <function>type</function>
+ given. In addition for certain types, the length
+ <literal>len</literal> passed will be set to the size in bytes of
+ the returned information. The types <literal>database</literal>,
+ <literal>syntax</literal> and <literal>render</literal> are
+ supported. More will be added later.
</para>
</sect1>
<sect1 id="zoom.options"><title>Options</title>
<para>
- Most objects in &zoom; allow you to specify options to change
- default behaviour. From an implementation point of view a set of options
- is just like an associate array / hash array, etc.
+ Most objects in &zoom; allow you to specify options to change
+ default behaviour. From an implementation point of view a set of options
+ is just like an associate array / hash array, etc.
</para>
<synopsis>
Z3950_options Z3950_options_create (void);
</sect1>
<sect1 id="zoom.events"><title>Events</title>
<para>
- If you're developing non-blocking applications, you have to deal
- with events.
+ If you're developing non-blocking applications, you have to deal
+ with events.
</para>
<synopsis>
- int Z3950_event (int no, Z3950_connection *cs);
+ int Z3950_event (int no, Z3950_connection *cs);
</synopsis>
<para>
- The <function>Z3950_event</function> executes pending events for
- a number of connections. Supply the number of connections in
- <literal>no</literal> and an array of connections in
- <literal>cs</literal> (<literal>cs[0] ... cs[no-1]</literal>).
- A pending event could be a sending a search, receiving a response,
- etc.
- When an event has a occured for one of the connections, this function
- returns a positive integer <literal>n</literal> denoting that an event
- occurred for connection <literal>cs[n-1]</literal>.
- When no events are pending for the connections, a value of zero is
- returned.
- To make sure all outstanding requests are performed call this function
- repeatedly until zero is returned.
+ The <function>Z3950_event</function> executes pending events for
+ a number of connections. Supply the number of connections in
+ <literal>no</literal> and an array of connections in
+ <literal>cs</literal> (<literal>cs[0] ... cs[no-1]</literal>).
+ A pending event could be a sending a search, receiving a response,
+ etc.
+ When an event has a occured for one of the connections, this function
+ returns a positive integer <literal>n</literal> denoting that an event
+ occurred for connection <literal>cs[n-1]</literal>.
+ When no events are pending for the connections, a value of zero is
+ returned.
+ To make sure all outstanding requests are performed call this function
+ repeatedly until zero is returned.
</para>
</sect1>
</chapter>
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document: "yaz.xml"
- sgml-local-catalogs: "../../docbook/docbook.cat"
+ sgml-local-catalogs: nil
sgml-namecase-general:t
End:
-->