-<!-- $Id: zoom.xml,v 1.15 2002-01-02 10:30:25 adam Exp $ -->
+<!-- $Id: zoom.xml,v 1.17 2002-01-28 09:27:48 adam Exp $ -->
<chapter id="zoom"><title>Building clients with ZOOM</title>
<para>
size_t start, size_t count);
ZOOM_record ZOOM_resultset_record (ZOOM_resultset s, size_t pos);
- void *ZOOM_record_get (ZOOM_record rec, const char *type,
- size_t *len);
+ const char *ZOOM_record_get (ZOOM_record rec, const char *type,
+ size_t *len);
ZOOM_record ZOOM_record_clone (ZOOM_record rec);
<variablelist>
<varlistentry><term><literal>database</literal></term>
<listitem><para>Database of record is returned
- as a C null-terminated string. Return type <literal>char *</literal>.
+ as a C null-terminated string. Return type
+ <literal>const char *</literal>.
</para></listitem>
</varlistentry>
<varlistentry><term><literal>syntax</literal></term>
<listitem><para>The transfer syntax (OID) of the record is returned
- as a C null-terminated string. Return type <literal>char *</literal>.
+ as a C null-terminated string. Return type is
+ <literal>const char *</literal>.
</para></listitem>
</varlistentry>
<varlistentry><term><literal>render</literal></term>
<listitem><para>The record is returned in a display friendly
format. Upon completion buffer is returned
- (type <literal>char *</literal>) and length is stored in
+ (type <literal>const char *</literal>) and length is stored in
<literal>*len</literal>.
</para></listitem>
</varlistentry>
<varlistentry><term><literal>raw</literal></term>
<listitem><para>The record is returned in the internal
- YAZ specific format. The raw data is returned as type
+ YAZ specific format. For GRS-1, Explain, and others, t
+ he raw data is returned as type
<literal>Z_External *</literal> which is just the type for
the member <literal>retrievalRecord</literal> in
type <literal>NamePlusRecord</literal>.
+ For SUTRS and octet aligned record (including all MARCs) the
+ octet buffer is returned and the length of the buffer.
</para></listitem>
</varlistentry>
</variablelist>
</para>
</sect2>
</sect1>
- <sect1 id="zoom.options"><title>Options</title>
- <para>
- Most &zoom; objects provide a way to specify options to change behavior.
- From an implementation point of view a set of options is just like
- an associative array / hash array, etc.
- </para>
- <synopsis>
- ZOOM_options ZOOM_options_create (void);
-
- ZOOM_options ZOOM_options_create_with_parent (ZOOM_options parent);
-
- void ZOOM_options_destroy (ZOOM_options opt);
- </synopsis>
- <synopsis>
- const char *ZOOM_options_get (ZOOM_options opt, const char *name);
-
- void ZOOM_options_set (ZOOM_options opt, const char *name,
- const char *v);
- </synopsis>
- <synopsis>
- typedef const char *(*ZOOM_options_callback)
- (void *handle, const char *name);
-
- ZOOM_options_callback
- ZOOM_options_set_callback (ZOOM_options opt,
- ZOOM_options_callback c,
- void *handle);
- </synopsis>
- </sect1>
- <sect1 id="zoom.scan"><title>Scsn</title>
+ <sect1 id="zoom.scan"><title>Scan</title>
<para>
This section describes an interface for Scan. Scan is not an
official part of the ZOOM model yet. The result of a scan operation
void ZOOM_scanset_destroy (ZOOM_scanset scan);
+
+ const char *ZOOM_scanset_option_get (ZOOM_scanset scan,
+ const char *key);
+
+ void ZOOM_scanset_option_set (ZOOM_scanset scan, const char *key,
+ const char *val);
</synopsis>
<para>
The scan set is created by function
of the actual term respectively.
A scan set may be freed by a call to function
<function>ZOOM_scanset_destroy</function>.
- </para>
- </sect1>
+ Functions <function>ZOOM_scanset_option_get</function> and
+ <function>ZOOM_scanset_option_set</function> retrieves and sets
+ an option respectively.
+ </para>
+
+ <table frame="top"><title>ZOOM Scan 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>
+ number</entry><entry>Number of Scan Terms requested in next scan.
+ After scan it holds the actual number of terms returend.
+ </entry><entry>10</entry></row>
+ <row><entry>
+ position</entry><entry>Preferred Position of term in response
+ in next scan; actual position after completion of scan.
+ </entry><entry>1</entry></row>
+ <row><entry>
+ stepSize</entry><entry>Step Size
+ </entry><entry>0</entry></row>
+ <row><entry>
+ scanStatus</entry><entry>An integer indicating the Scan Status
+ of last scan.
+ </entry><entry>0</entry></row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </sect1>
+ <sect1 id="zoom.options"><title>Options</title>
+ <para>
+ Most &zoom; objects provide a way to specify options to change behavior.
+ From an implementation point of view a set of options is just like
+ an associative array / hash array, etc.
+ </para>
+ <synopsis>
+ ZOOM_options ZOOM_options_create (void);
+
+ ZOOM_options ZOOM_options_create_with_parent (ZOOM_options parent);
+
+ void ZOOM_options_destroy (ZOOM_options opt);
+ </synopsis>
+ <synopsis>
+ const char *ZOOM_options_get (ZOOM_options opt, const char *name);
+
+ void ZOOM_options_set (ZOOM_options opt, const char *name,
+ const char *v);
+ </synopsis>
+ <synopsis>
+ typedef const char *(*ZOOM_options_callback)
+ (void *handle, const char *name);
+
+ ZOOM_options_callback
+ ZOOM_options_set_callback (ZOOM_options opt,
+ ZOOM_options_callback c,
+ void *handle);
+ </synopsis>
+ </sect1>
<sect1 id="zoom.events"><title>Events</title>
<para>
If you're developing non-blocking applications, you have to deal