+ In order to extract information about a single record,
+ <function>ZOOM_record_get</function> is provided. The
+ function returns a pointer to certain record information. The
+ nature (type) of the pointer depends on the parameter,
+ <function>type</function>.
+ In addition, for certain types, the length
+ <literal>len</literal> passed will be set to the size in bytes of
+ the returned information.
+ <variablelist>
+ <varlistentry><term><literal>database</literal></term>
+ <listitem><para>Database of record is returned
+ 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 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>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. For GRS-1, Explain, and others, the
+ 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><title>Z39.50 Protocol behavior</title>
+ <para>
+ The functions <function>ZOOM_resultset_record</function> and
+ <function>ZOOM_resultset_records</function> inspects the client-side
+ record cache. Records not found in cache are fetched using
+ Present.
+ The functions may block (and perform network I/O) - even though option
+ <literal>async</literal> is 1, because they return records objects.
+ (and there's no way to return records objects without retrieving them!).
+ </para>
+ <para>
+ There is a trick, however, in the usage of function
+ <function>ZOOM_resultset_records</function> that allows for
+ delayed retrieval (and makes it non-blocking). By passing
+ a null pointer for <parameter>recs</parameter> you're indicating
+ you're not interested in getting records objects
+ <emphasis>now</emphasis>.
+ </para>
+ </sect2>
+ <sect2><title>SRW Protocol behavior</title>
+ <para>
+ The ZOOM driver for SRW treats records returned by a SRW server
+ as if they where Z39.50 records with transfer syntax XML and
+ no element set name or database name.
+ </para>
+ </sect2>
+ </sect1>
+ <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
+ is the <literal>ZOOM_scanset</literal> which is a set of terms
+ returned by a target.
+ </para>
+
+ <para>
+ The Scan interface is Z39.50 only. SRW version 1.0 does not
+ support this.
+ </para>
+
+ <synopsis>
+ ZOOM_scanset ZOOM_connection_scan (ZOOM_connection c,
+ const char *startterm);
+
+ size_t ZOOM_scanset_size(ZOOM_scanset scan);
+
+ const char * ZOOM_scanset_term(ZOOM_scanset scan, size_t pos,
+ int *occ, size_t *len);
+
+
+ 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
+ <function>ZOOM_connection_scan</function> which performs a scan
+ operation on the connection and start term given.
+ If the operation was successful, the size of the scan set can be
+ retrieved by a call to <function>ZOOM_scanset_size</function>.
+ Like result sets, the items are numbered 0,..size-1.
+ To obtain information about a particular scan term, call function
+ <function>ZOOM_scanset_term</function>. This function takes
+ a scan set offset <literal>pos</literal> and returns a pointer
+ to an actual term or <literal>NULL</literal> if non-present.
+ If present, the <literal>occ</literal> and <literal>len</literal>
+ are set to the number of occurrences and the length
+ of the actual term respectively.
+ A scan set may be freed by a call to function
+ <function>ZOOM_scanset_destroy</function>.
+ Functions <function>ZOOM_scanset_option_get</function> and
+ <function>ZOOM_scanset_option_set</function> retrieves and sets
+ an option respectively.