Note need to document:
[yaz-moved-to-github.git] / doc / zoom.xml
1 <!--
2 ### Still to document:
3 ZOOM_connection_errcode(c)
4 ZOOM_connection_errmsg(c)
5 ZOOM_connection_addinfo(c)
6 ZOOM_connection_addinfo(c)
7 ZOOM_connection_diagset(c);
8 ZOOM_diag_str(error)
9 ZOOM_resultset_record_immediate(s, pos)
10 ZOOM_resultset_cache_reset(r)
11 ZOOM_resultset_sort(r, sort_type, sort_spec)
12 ZOOM_resultset_sort1(r, sort_type, sort_spec)
13 ZOOM_options_set_callback(opt, function, handle)
14 ZOOM_options_create_with_parent2(parent1, parent2)
15 ZOOM_options_getl(opt, name, len)
16 ZOOM_options_setl(opt, name, value, len)
17 ZOOM_options_get_bool(opt, name, defa)
18 ZOOM_options_get_int(opt, name, defa)
19 ZOOM_options_set_int(opt, name, value)
20 ZOOM_connection_scan1 (ZOOM_connection c, ZOOM_query startterm)
21 ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn)
22 -->
23 <!-- $Id: zoom.xml,v 1.46 2005-12-21 16:45:38 mike Exp $ -->
24  <chapter id="zoom"><title>ZOOM</title>
25   <para>
26     &zoom; is an acronym for 'Z39.50 Object-Orientation Model' and is
27    an initiative started by Mike Taylor (Mike is from the UK, which
28    explains the peculiar name of the model). The goal of &zoom; is to
29    provide a common Z39.50 client API not bound to a particular
30    programming language or toolkit.
31   </para>
32
33   <note>
34    <para>
35     A recent addition to &yaz; is SRW support. You can now make
36     SRW ZOOM connections by specifying scheme <literal>http://</literal>
37     for the hostname for a connection.
38    </para>
39   </note>
40
41   <para>
42    The lack of a simple Z39.50 client API for &yaz; has become more
43    and more apparent over time. So when the first &zoom; specification
44    became available,
45    an implementation for &yaz; was quickly developed. For the first time, it is
46    now as easy (or easier!) to develop clients than servers with &yaz;. This
47    chapter describes the &zoom; C binding. Before going further, please
48    reconsider whether C is the right programming language for the job.
49    There are other language bindings available for &yaz;, and still
50    more
51    are in active development. See the
52    <ulink url="http://zoom.z3950.org/">ZOOM web-site</ulink> for
53    more information.
54   </para>
55   
56   <para>
57    In order to fully understand this chapter you should read and
58    try the example programs <literal>zoomtst1.c</literal>,
59    <literal>zoomtst2.c</literal>, .. in the <literal>zoom</literal>
60    directory.
61   </para>
62   
63   <para>
64    The C language misses features found in object oriented languages
65    such as C++, Java, etc. For example, you'll have to manually,
66    destroy all objects you create, even though you may think of them as
67    temporary. Most objects has a <literal>_create</literal> - and a
68    <literal>_destroy</literal> variant.
69    All objects are in fact pointers to internal stuff, but you don't see
70    that because of typedefs. All destroy methods should gracefully ignore a
71    <literal>NULL</literal> pointer.
72   </para>
73   <para>
74    In each of the sections below you'll find a sub section called
75    protocol behavior, that describes how the API maps to the Z39.50
76    protocol.
77   </para>
78   <sect1 id="zoom.connections"><title>Connections</title>
79    
80    <para>The Connection object is a session with a target.
81    </para>
82    <synopsis>
83     #include &lt;yaz/zoom.h>
84     
85     ZOOM_connection ZOOM_connection_new (const char *host, int portnum);
86     
87     ZOOM_connection ZOOM_connection_create (ZOOM_options options);
88     
89     void ZOOM_connection_connect(ZOOM_connection c, const char *host,
90                                  int portnum);
91     void ZOOM_connection_destroy (ZOOM_connection c);
92    </synopsis>
93    <para>
94     Connection objects are created with either function
95     <function>ZOOM_connection_new</function> or 
96     <function>ZOOM_connection_create</function>.
97     The former creates and automatically attempts to establish a network
98     connection with the target. The latter doesn't establish
99     a connection immediately, thus allowing you to specify options
100     before establishing network connection using the function
101     <function>ZOOM_connection_connect</function>. 
102     If the port number, <literal>portnum</literal>, is zero, the
103     <literal>host</literal> is consulted for a port specification.
104     If no port is given, 210 is used. A colon denotes the beginning of
105     a port number in the host string. If the host string includes a
106     slash, the following part specifies a database for the connection.
107    </para>
108    <para>
109     You can prefix the host with a scheme followed by colon. The
110     default scheme is <literal>tcp</literal> (Z39.50 protocol).
111     The scheme <literal>http</literal> selects SRW over HTTP.
112    </para>
113    <para>
114     You can prefix the scheme-qualified host-string with one or more
115     comma-separated
116     <literal><parameter>key</parameter>=<parameter>value</parameter></literal>
117     sequences, each of which represents an option to be set into the
118     connection structure <emphasis>before</emphasis> the
119     protocol-level connection is forged and the initialisation
120     handshake takes place.  This facility can be used to provide
121     authentication credentials, as in host-strings such as:
122     <literal>user=admin,password=halfAm4n,tcp:localhost:8017/db</literal>
123    </para>
124    <para>
125     Connection objects should be destroyed using the function
126     <function>ZOOM_connection_destroy</function>.
127    </para>
128    <synopsis>
129     void ZOOM_connection_option_set(ZOOM_connection c,
130                                     const char *key, const char *val);
131
132     void ZOOM_connection_option_setl(ZOOM_connection c,
133                                      const char *key,
134                                      const char *val, int len);
135
136     const char *ZOOM_connection_option_get(ZOOM_connection c,
137                                            const char *key);
138     const char *ZOOM_connection_option_getl(ZOOM_connection c,
139                                             const char *key,
140                                             int *lenp);
141    </synopsis>
142    <para>
143     The functions <function>ZOOM_connection_option_set</function> and
144     <function>ZOOM_connection_option_setl</function> allows you to
145     set an option given by <parameter>key</parameter> to the value
146     <parameter>value</parameter> for the connection. 
147     For <function>ZOOM_connection_option_set</function>, the
148     value is assumed to be a 0-terminated string. Function
149     <function>ZOOM_connection_option_setl</function> specifies a
150     value of a certain size (len).
151    </para>
152    <para>
153     Functions <function>ZOOM_connection_option_get</function> and
154     <function>ZOOM_connection_option_getl</function> returns
155     the value for an option given by <parameter>key</parameter>.
156    </para>
157    <table frame="top"><title>ZOOM Connection Options</title>
158     <tgroup cols="3">
159      <colspec colwidth="4*" colname="name"></colspec>
160      <colspec colwidth="7*" colname="description"></colspec>
161      <colspec colwidth="3*" colname="default"></colspec>
162      <thead>
163       <row>
164        <entry>Option</entry>
165        <entry>Description</entry>
166        <entry>Default</entry>
167       </row>
168      </thead>
169      <tbody>
170       <row><entry>
171         implementationName</entry><entry>Name of Your client
172        </entry><entry>none</entry></row>
173       <row><entry>
174         user</entry><entry>Authentication user name
175        </entry><entry>none</entry></row>
176       <row><entry>
177         group</entry><entry>Authentication group name
178        </entry><entry>none</entry></row>
179       <row><entry>
180         password</entry><entry>Authentication password.
181        </entry><entry>none</entry></row>
182       <row><entry>
183         host</entry><entry>Target host. This setting is "read-only".
184         It's automatically set internally when connecting to a target.
185        </entry><entry>none</entry></row>
186       <row><entry>
187         proxy</entry><entry>Proxy host
188        </entry><entry>none</entry></row>
189       <row><entry>
190         async</entry><entry>If true (1) the connection operates in 
191         asynchronous operation which means that all calls are non-blocking
192         except
193         <link linkend="zoom.events"><function>ZOOM_event</function></link>.
194        </entry><entry>0</entry></row>
195       <row><entry>
196         maximumRecordSize</entry><entry> Maximum size of single record.
197        </entry><entry>1 MB</entry></row>
198       <row><entry>
199         preferredMessageSize</entry><entry> Maximum size of multiple records.
200        </entry><entry>1 MB</entry></row>
201       <row><entry>
202         lang</entry><entry> Language for negotiation.
203        </entry><entry>none</entry></row>
204       <row><entry>
205         charset</entry><entry> Character set for negotiation.
206        </entry><entry>none</entry></row>
207       <row><entry>
208         serverImplementationId</entry><entry>
209         Implementation ID of server.  (The old targetImplementationId
210         option is also supported for the benefit of old applications.)
211        </entry><entry>none</entry></row>
212       <row><entry>
213         targetImplementationName</entry><entry>
214         Implementation Name of server.  (The old
215         targetImplementationName option is also supported for the
216         benefit of old applications.)
217        </entry><entry>none</entry></row>
218       <row><entry>
219         serverImplementationVersion</entry><entry>
220         Implementation Version of server.  (the old
221         targetImplementationVersion option is also supported for the
222         benefit of old applications.)
223        </entry><entry>none</entry></row>
224       <row><entry>
225         databaseName</entry><entry>One or more database names
226         separated by character plus (<literal>+</literal>), which to
227         be used by subsequent search requests on this Connection.
228        </entry><entry>Default</entry></row>
229       <row><entry>
230         piggyback</entry><entry>True (1) if piggyback should be
231         used in searches; false (0) if not.
232        </entry><entry>1</entry></row>
233       <row><entry>
234         smallSetUpperBound</entry><entry>If hits is less than or equal to this
235         value, then target will return all records using small element set name
236        </entry><entry>0</entry></row>
237       <row><entry>
238         largeSetLowerBound</entry><entry>If hits is greater than this
239         value, the target will return no records.
240        </entry><entry>1</entry></row>
241       <row><entry>
242         mediumSetPresentNumber</entry><entry>This value represents
243         the number of records to be returned as part of a search when when
244         hits is less than or equal to large set lower bound and if hits
245         is greater than small set upper bound.
246        </entry><entry>0</entry></row>
247       <row><entry>
248         smallSetElementSetName</entry><entry>
249         The element set name to be used for small result sets.
250        </entry><entry>none</entry></row>
251       <row><entry>
252         mediumSetElementSetName</entry><entry>
253         The element set name to be for medium-sized result sets.
254        </entry><entry>none</entry></row>
255      </tbody>
256     </tgroup>
257    </table>
258    <para>
259     If either option <literal>lang</literal> or <literal>charset</literal>
260     is set, then 
261     <ulink url="http://lcweb.loc.gov/z3950/agency/defns/charneg-3.html">
262      Character Set and Language Negotiation</ulink> is in effect.
263    </para>
264    <synopsis>
265      int ZOOM_connection_error (ZOOM_connection c, const char **cp,
266                                 const char **addinfo);
267      int ZOOM_connection_error_x (ZOOM_connection c, const char **cp,
268                                   const char **addinfo, const char **dset);
269    </synopsis>
270    <para>
271     Function <function>ZOOM_connection_error</function> checks for
272     errors for the last operation(s) performed. The function returns
273     zero if no errors occurred; non-zero otherwise indicating the error.
274     Pointers <parameter>cp</parameter> and <parameter>addinfo</parameter>
275     holds messages for the error and additional-info if passed as
276     non-<literal>NULL</literal>. Function
277     <function>ZOOM_connection_error_x</function> is an extended version
278     of <function>ZOOM_connection_error</function> that is capable of
279     returning name of diagnostic set in <parameter>dset</parameter>.
280    </para>
281    <sect2><title>Z39.50 Protocol behavior</title>
282     <para>
283      The calls <function>ZOOM_connection_new</function> and
284      <function>ZOOM_connection_connect</function> establishes a TCP/IP
285       connection and sends an Initialize Request to the target if
286       possible. In addition, the calls waits for an Initialize Response
287       from the target and the result is inspected (OK or rejected).
288     </para>
289     <para>
290      If <literal>proxy</literal> is set then the client will establish
291      a TCP/IP connection with the peer as specified by the
292      <literal>proxy</literal> host and the hostname as part of the
293      connect calls will be set as part of the Initialize Request.
294      The proxy server will then "forward" the PDU's transparently
295      to the target behind the proxy.
296     </para>
297     <para>
298      For the authentication parameters, if option <literal>user</literal>
299      is set and both options <literal>group</literal> and
300      <literal>pass</literal> are unset, then Open style
301      authentication is used (Version 2/3) in which case the username
302      is usually followed by a slash, then by a password.
303      If either <literal>group</literal>
304      or <literal>pass</literal> is set then idPass authentication
305      (Version 3 only) is used. If none of the options are set, no
306      authentication parameters are set as part of the Initialize Request
307      (obviously).
308     </para>
309     <para>
310      When option <literal>async</literal> is 1, it really means that
311      all network operations are postponed (and queued) until the
312      function <literal>ZOOM_event</literal> is invoked. When doing so
313      it doesn't make sense to check for errors after
314      <literal>ZOOM_connection_new</literal> is called since that
315      operation "connecting - and init" is still incomplete and the
316      API cannot tell the outcome (yet).
317     </para>
318     </sect2>
319    <sect2><title>SRW Protocol behavior</title>
320     <para>
321      The SRW protocol doesn't feature an Inititialize Request, so
322      the connection phase merely establishes a TCP/IP connection
323      with the SOAP service.
324     </para>
325     <para>Most of the ZOOM connection options do not
326      affect SRW and they are ignored. However, future versions
327      of &yaz; might honor <literal>implementationName</literal> and
328      put that as part of User-Agent header for HTTP requests.
329      </para>
330     <para>
331      The <literal>charset</literal> is used in the Content-Type header
332      of HTTP requests.
333     </para>
334    </sect2>
335   </sect1>
336   <sect1 id="zoom.query"><title>Queries</title>
337    <para>
338     Query objects represents queries.
339    </para>
340    <synopsis>
341      ZOOM_query ZOOM_query_create(void);
342
343      void ZOOM_query_destroy(ZOOM_query q);
344
345      int ZOOM_query_prefix(ZOOM_query q, const char *str);
346
347      int ZOOM_query_cql(ZOOM_query s, const char *str);
348
349      int ZOOM_query_sortby(ZOOM_query q, const char *criteria);
350    </synopsis>
351    <para>
352     Create query objects using <function>ZOOM_query_create</function>
353     and destroy them by calling <function>ZOOM_query_destroy</function>.
354     RPN-queries can be specified in <link linkend="PQF">PQF</link>
355     notation by using the
356     function <function>ZOOM_query_prefix</function>.
357     The <function>ZOOM_query_cql</function> specifies a CQL
358     query to be sent to the server/target.
359     More query types will be added in future versions of &yaz;, such as
360     <link linkend="CCL">CCL</link> to RPN-mapping, native CCL query,
361     etc. In addition to a search, a sort criteria may be set. Function
362     <function>ZOOM_query_sortby</function> specifies a 
363     sort criteria using the same string notation for sort as offered by
364     the <link linkend="sortspec">YAZ client</link>.
365    </para>
366    <sect2><title>Protocol behavior</title>
367     <para>
368      The query object is just an interface for the member Query
369      in the SearchRequest. The sortby-function is an interface to the
370      sortSequence member of the SortRequest.
371     </para>
372    </sect2>
373   </sect1>
374   <sect1 id="zoom.resultsets"><title>Result sets</title>
375    <para>
376     The result set object is a container for records returned from
377     a target.
378    </para>
379    <synopsis>
380      ZOOM_resultset ZOOM_connection_search(ZOOM_connection,
381                                            ZOOM_query q);
382
383      ZOOM_resultset ZOOM_connection_search_pqf(ZOOM_connection c,
384                                                const char *q);
385
386      void ZOOM_resultset_destroy(ZOOM_resultset r);
387    </synopsis>
388    <para>
389     Function <function>ZOOM_connection_search</function> creates
390      a result set given a connection and query.
391     Destroy a result set by calling
392     <function>ZOOM_resultset_destroy</function>.
393     Simple clients may using PQF only may use function
394     <function>ZOOM_connection_search_pqf</function> in which case
395     creating query objects is not necessary.
396    </para>
397    <synopsis>
398      void ZOOM_resultset_option_set (ZOOM_resultset r,
399                                       const char *key,
400                                       const char *val);
401
402      const char *ZOOM_resultset_option_get (ZOOM_resultset r,
403                                              const char *key);
404
405      size_t ZOOM_resultset_size (ZOOM_resultset r);
406    </synopsis>
407    <para>
408     Functions <function>ZOOM_resultset_options_set</function> and
409     <function>ZOOM_resultset_get</function> sets and gets an option
410     for a result set similar to <function>ZOOM_connection_option_get</function>
411     and <function>ZOOM_connection_option_set</function>.
412    </para>
413    <para>
414     The number of hits also called result-count is returned by
415     function <function>ZOOM_resultset_size</function>.
416    </para>
417    <table frame="top"><title>ZOOM Result set Options</title>
418     <tgroup cols="3">
419      <colspec colwidth="4*" colname="name"></colspec>
420      <colspec colwidth="7*" colname="description"></colspec>
421      <colspec colwidth="2*" colname="default"></colspec>
422      <thead>
423       <row>
424        <entry>Option</entry>
425        <entry>Description</entry>
426        <entry>Default</entry>
427       </row>
428      </thead>
429      <tbody>
430       <row><entry>
431         start</entry><entry>Offset of first record to be 
432         retrieved from target. First record has offset 0 unlike the
433         protocol specifications where first record has position 1.
434        </entry><entry>0</entry></row>
435       <row><entry>
436         count</entry><entry>Number of records to be retrieved.
437        </entry><entry>0</entry></row>
438       <row><entry>
439         presentChunk</entry><entry>The number of records to be
440         requested from the server in each chunk (present requst).  The
441         value 0 means to request all the records in a single chunk.
442         (The old <literal>step</literal>
443         option is also supported for the benefit of old applications.)
444        </entry><entry>0</entry></row>
445       <row><entry>
446         elementSetName</entry><entry>Element-Set name of records. 
447         Most targets should honor element set name <literal>B</literal>
448         and <literal>F</literal> for brief and full respectively.
449        </entry><entry>none</entry></row>
450       <row><entry>
451         preferredRecordSyntax</entry><entry>Preferred Syntax, such as
452         <literal>USMARC</literal>, <literal>SUTRS</literal>, etc.
453        </entry><entry>none</entry></row>
454       <row><entry>
455         schema</entry><entry>Schema for retrieval, such as
456         <literal>Gils-schema</literal>, <literal>Geo-schema</literal>, etc.
457        </entry><entry>none</entry></row>
458       <row><entry>
459         setname</entry><entry>Name of Result Set (Result Set ID).
460         If this option isn't set, the ZOOM module will automatically
461         allocate a result set name.
462        </entry><entry>default</entry></row>
463      </tbody>
464     </tgroup>
465    </table>
466    <para>
467     For servers that support Search Info report, the following
468     options may be read using <function>ZOOM_resultset_get</function>.
469     This detailed information is read after a successful search has
470     completed.
471    </para>
472    <para>
473     This information is a list of of items, where each item is
474     information about a term or subquery. All items in the list 
475     are prefixed by 
476     <literal>SearchResult.</literal><replaceable>no</replaceable>
477     where no presents the item number (0=first, 1=second). 
478     Read <literal>searchresult.size</literal> to determine the
479     number of items.
480    </para>
481    <table frame="top"><title>Search Info Report options</title>
482     <tgroup cols="2">
483      <colspec colwidth="4*" colname="name"></colspec>
484      <colspec colwidth="7*" colname="description"></colspec>
485      <thead>
486       <row>
487        <entry>Option</entry>
488        <entry>Description</entry>
489       </row>
490      </thead>
491      <tbody>
492       <row>
493        <entry>searchresult.size</entry>
494        <entry>
495         number of search result entries. This option is-nonexistant
496         if no entries are returned by the server.
497        </entry>
498       </row>
499       <row>
500        <entry>searchresult.<replaceable>no</replaceable>.id</entry>
501        <entry>sub query ID</entry>
502       </row>
503       <row>
504        <entry>searchresult.<replaceable>no</replaceable>.count</entry>
505        <entry>result count for item (number of hits)</entry>
506       </row>
507       <row>
508        <entry>searchresult.<replaceable>no</replaceable>.subquery.term</entry>
509        <entry>subquery term</entry>
510       </row>
511       <row>
512        <entry>
513         searchresult.<replaceable>no</replaceable>.interpretation.term
514        </entry>
515        <entry>interpretation term</entry>
516       </row>
517       <row>
518        <entry>
519         searchresult.<replaceable>no</replaceable>.recommendation.term
520        </entry>
521        <entry>recommendation term</entry>
522       </row>
523      </tbody>
524     </tgroup>
525    </table>
526    <sect2>
527     <title>Z39.50 Protocol behavior</title>
528     <para>
529      The creation of a result set involves at least a SearchRequest
530      - SearchResponse protocol handshake. Following that, if a sort
531      criteria was specified as part of the query, a SortRequest -
532      SortResponse handshake takes place. Note that it is necessary to
533      perform sorting before any retrieval takes place, so no records will
534      be returned from the target as part of the SearchResponse because these
535      would be unsorted. Hence, piggyback is disabled when sort criteria
536      are set. Following Search - and a possible sort - Retrieval takes
537      place - as one or more Present Requests/Response pairs being
538      transferred.
539      </para>
540     <para>
541      The API allows for two different modes for retrieval. A high level
542      mode which is somewhat more powerful and a low level one.
543      The low level is enabled when searching on a Connection object
544      for which the settings
545      <literal>smallSetUpperBound</literal>,
546      <literal>mediumSetPresentNumber</literal> and
547      <literal>largeSetLowerBound</literal> are set. The low level mode
548      thus allows you to precisely set how records are returned as part
549      of a search response as offered by the Z39.50 protocol.
550      Since the client may be retrieving records as part of the
551      search response, this mode doesn't work well if sorting is used.
552      </para>
553     <para>
554      The high-level mode allows you to fetch a range of records from
555      the result set with a given start offset. When you use this mode
556      the client will automatically use piggyback if that is possible
557      with the target and perform one or more present requests as needed.
558      Even if the target returns fewer records as part of a present response
559      because of a record size limit, etc. the client will repeat sending
560      present requests. As an example, if option <literal>start</literal>
561      is 0 (default) and <literal>count</literal> is 4, and
562      <literal>piggyback</literal> is 1 (default) and no sorting criteria
563      is specified, then the client will attempt to retrieve the 4
564      records as part the search response (using piggyback). On the other
565      hand, if either <literal>start</literal> is positive or if
566      a sorting criteria is set, or if <literal>piggyback</literal>
567      is 0, then the client will not perform piggyback but send Present
568      Requests instead.
569     </para>
570     <para>
571      If either of the options <literal>mediumSetElementSetName</literal> and
572      <literal>smallSetElementSetName</literal> are unset, the value
573      of option <literal>elementSetName</literal> is used for piggyback
574      searches. This means that for the high-level mode you only have
575      to specify one elementSetName option rather than three.
576      </para>
577    </sect2>
578    <sect2>
579     <title>SRW Protocol behavior</title>
580     <para>
581      Current version of &yaz; does not take advantage of a result set id
582      returned by the SRW server. Future versions might do, however.
583      Since, the ZOOM driver does not save result set IDs any
584      present (retrieval) is transformed to a SRW SearchRetrieveRequest
585      with same query but, possibly, different offsets.
586     </para>
587     <para>
588      Option <literal>schema</literal> specifies SRW schema
589      for retrieval. However, options <literal>elementSetName</literal> and
590      <literal>preferredRecordSyntax</literal> are ignored.
591     </para>
592     <para>
593      Options <literal>start</literal> and <literal>count</literal> 
594      are supported by SRW.
595      The remaining options
596      <literal>piggyback</literal>, 
597      <literal>smallSetUpperBound</literal>, 
598      <literal>largeSetLowerBound</literal>, 
599      <literal>mediumSetPresentNumber</literal>, 
600      <literal>mediumSetElementSetName</literal>,
601       <literal>smallSetElementSetName</literal> are
602      unsupported.
603     </para>
604     <para>
605      SRW supports CQL queries, <emphasis>not</emphasis> PQF.
606      If PQF is used, however, the PQF query is transferred anyway
607      using non-standard element <literal>pQuery</literal> in
608      SRW SearchRetrieveRequest.
609     </para>
610     <para>
611      Unfortunately, SRW does not define a database setting. Hence,
612      <literal>databaseName</literal> is unsupported and ignored.
613      However, the path part in host parameter for functions 
614      <function>ZOOM_connecton_new</function> and
615      <function>ZOOM_connection_connect</function> acts as a
616      database (at least for the &yaz; SRW server).
617     </para>
618    </sect2>
619   </sect1>
620   <sect1 id="zoom.records"><title>Records</title>
621    <para>
622     A record object is a retrieval record on the client side -
623     created from result sets.
624    </para>
625    <synopsis>
626      void ZOOM_resultset_records (ZOOM_resultset r,
627                                   ZOOM_record *recs,
628                                   size_t start, size_t count);
629      ZOOM_record ZOOM_resultset_record (ZOOM_resultset s, size_t pos);
630
631      const char *ZOOM_record_get (ZOOM_record rec, const char *type,
632                                   size_t *len);
633
634      ZOOM_record ZOOM_record_clone (ZOOM_record rec);
635
636      void ZOOM_record_destroy (ZOOM_record rec);
637    </synopsis>
638    <para>
639     References to temporary records are returned by functions 
640     <function>ZOOM_resultset_records</function> or
641     <function>ZOOM_resultset_record</function>.
642     </para>
643    <para>
644     If a persistent reference to a record is desired
645     <function>ZOOM_record_clone</function> should be used.
646     It returns a record reference that should be destroyed
647     by a call to <function>ZOOM_record_destroy</function>.
648    </para>
649    <para>
650     A single record is returned by function
651     <function>ZOOM_resultset_record</function> that takes a 
652     position as argument. First record has position zero.
653     If no record could be obtained <literal>NULL</literal> is returned.
654    </para>
655    <para>
656     Function <function>ZOOM_resultset_records</function> retrieves
657     a number of records from a result set. Parameter <literal>start</literal>
658     and <literal>count</literal> specifies the range of records to
659     be returned. Upon completion array
660     <literal>recs[0], ..recs[count-1]</literal>
661     holds record objects for the records. The array of records
662      <literal>recs</literal> should be allocated prior the call
663     <function>ZOOM_resultset_records</function>. Note that for those
664     records that couldn't be retrieved from the target
665     <literal>recs[ ..]</literal> is set to <literal>NULL</literal>.
666    </para>
667    <para id="zoom.record.get">
668     In order to extract information about a single record,
669     <function>ZOOM_record_get</function> is provided. The
670     function returns a pointer to certain record information. The
671     nature (type) of the pointer depends on the parameter,
672     <parameter>type</parameter>.
673    </para>
674    <para>
675     The <parameter>type</parameter> is a string of the format:
676    </para>
677    <para>
678     <replaceable>form</replaceable>[; charset=<replaceable>from</replaceable>[,<replaceable>to</replaceable>]]
679    </para>
680    <para>
681     where <replaceable>form</replaceable> specifies the format of the
682     returned record, <replaceable>from</replaceable>
683     specifies the character set of the record in its original form
684     (as returned by the server), <replaceable>to</replaceable> specifies
685     the output (returned)
686     character set encoding.
687     If charset is not given, then no character set conversion takes place.
688     If <replaceable>to</replaceable> is omitted UTF-8 is assumed.
689    </para>
690    <para>
691     In addition, for certain types, the length
692     <literal>len</literal> passed will be set to the size in bytes of
693     the returned information. 
694     </para>
695    <para>
696     The following are the supported values for <replaceable>form</replaceable>.
697     <variablelist>
698      <varlistentry><term><literal>database</literal></term>
699       <listitem><para>Database of record is returned
700         as a C null-terminated string. Return type
701         <literal>const char *</literal>. 
702        </para></listitem>
703      </varlistentry>
704      <varlistentry><term><literal>syntax</literal></term>
705       <listitem><para>The transfer syntax of the record is returned
706         as a C null-terminated string containing the symbolic name of
707         the record syntax, e.g. <literal>Usmarc</literal>. Return type
708         is
709         <literal>const char *</literal>. 
710        </para></listitem>
711      </varlistentry>
712      <varlistentry><term><literal>render</literal></term>
713       <listitem><para>The record is returned in a display friendly
714         format. Upon completion buffer is returned
715         (type <literal>const char *</literal>) and length is stored in
716         <literal>*len</literal>.
717        </para></listitem>
718      </varlistentry>
719      <varlistentry><term><literal>raw</literal></term>
720       <listitem><para>The record is returned in the internal
721         YAZ specific format. For GRS-1, Explain, and others, the
722         raw data is returned as type 
723         <literal>Z_External *</literal> which is just the type for
724         the member <literal>retrievalRecord</literal> in
725         type <literal>NamePlusRecord</literal>.
726         For SUTRS and octet aligned record (including all MARCs) the
727         octet buffer is returned and the length of the buffer.
728        </para></listitem>
729      </varlistentry>
730      <varlistentry><term><literal>xml</literal></term>
731       <listitem><para>The record is returned in XML if possible.
732         SRW/SRU and Z39.50 records with transfer syntax XML are
733         returned verbatim. MARC records are returned in
734         <ulink url="http://www.loc.gov/standards/marcxml/">
735          MARCXML
736          </ulink> 
737         (converted from ISO2709 to MARCXML by YAZ).
738         GRS-1 and OPAC records are not supported for this form.
739         Upon completion, the XML buffer is returned
740         (type <literal>const char *</literal>) and length is stored in
741         <literal>*len</literal>.
742        </para></listitem>
743      </varlistentry>
744      <varlistentry><term><literal>opac</literal></term>
745       <listitem><para>OPAC for record is returned in XML.
746        </para></listitem>
747      </varlistentry>
748     </variablelist>
749    </para>
750    <para>
751     Most
752     <ulink url="http://www.loc.gov/marc/">
753      MARC21
754     </ulink>
755     records uses the 
756     <ulink url="http://www.loc.gov/marc/specifications/speccharmarc8.html">
757      MARC-8
758     </ulink>
759     character set encoding.
760     An application that wishes to display in Latin-1 would use
761     <screen>
762      render; charset=marc8,iso-8859-1
763     </screen>
764    </para>
765    <sect2><title>Z39.50 Protocol behavior</title>
766     <para>
767      The functions <function>ZOOM_resultset_record</function> and
768      <function>ZOOM_resultset_records</function> inspects the client-side
769      record cache. Records not found in cache are fetched using
770      Present.
771      The functions may block (and perform network I/O)  - even though option
772      <literal>async</literal> is 1, because they return records objects.
773      (and there's no way to return records objects without retrieving them!).
774      </para>
775     <para>
776      There is a trick, however, in the usage of function
777      <function>ZOOM_resultset_records</function> that allows for
778      delayed retrieval (and makes it non-blocking). By using
779      a null pointer for <parameter>recs</parameter> you're indicating
780      you're not interested in getting records objects
781      <emphasis>now</emphasis>.
782     </para>
783    </sect2>
784    <sect2><title>SRW Protocol behavior</title>
785     <para>
786      The ZOOM driver for SRW treats records returned by a SRW server
787      as if they where Z39.50 records with transfer syntax XML and
788      no element set name or database name.
789     </para>
790    </sect2>
791   </sect1>
792   <sect1 id="zoom.scan"><title>Scan</title>
793    <para>
794     This section describes an interface for Scan. Scan is not an
795     official part of the ZOOM model yet. The result of a scan operation
796     is the <literal>ZOOM_scanset</literal> which is a set of terms
797     returned by a target.
798    </para>
799
800    <para>
801     The Scan interface is Z39.50 only. SRW version 1.0 does not
802     support this.
803    </para>
804
805    <synopsis>
806     ZOOM_scanset ZOOM_connection_scan(ZOOM_connection c,
807                                       const char *startpqf);
808
809     size_t ZOOM_scanset_size(ZOOM_scanset scan);
810
811     const char * ZOOM_scanset_term(ZOOM_scanset scan, size_t pos,
812                                    int *occ, size_t *len);
813
814     const char * ZOOM_scanset_display_term(ZOOM_scanset scan, size_t pos,
815                                            int *occ, size_t *len);
816
817     void ZOOM_scanset_destroy (ZOOM_scanset scan);
818
819     const char *ZOOM_scanset_option_get(ZOOM_scanset scan,
820                                          const char *key);
821
822     void ZOOM_scanset_option_set(ZOOM_scanset scan, const char *key,
823                                  const char *val);
824     </synopsis>
825    <para>
826     The scan set is created by function
827     <function>ZOOM_connection_scan</function> which performs a scan
828     operation on the connection using the specified
829     <parameter>startpqf</parameter>.
830     If the operation was successful, the size of the scan set can be
831     retrieved by a call to <function>ZOOM_scanset_size</function>.
832     Like result sets, the items are numbered 0,..size-1.
833     To obtain information about a particular scan term, call function
834     <function>ZOOM_scanset_term</function>. This function takes
835     a scan set offset <literal>pos</literal> and returns a pointer
836     to a <emphasis>raw term</emphasis> or <literal>NULL</literal> if
837     non-present.
838     If present, the <literal>occ</literal> and <literal>len</literal> 
839     are set to the number of occurrences and the length
840     of the actual term respectively.
841     <function>ZOOM_scanset_display_term</function> is similar to
842     <function>ZOOM_scanset_term</function> except that it returns
843     the <emphasis>display term</emphasis> rather than the raw term.
844     In a few cases, the term is different from display term. Always
845     use the display term for display and the raw term for subsequent
846     scan operations (to get more terms, next scan result, etc).
847    </para>
848    <para>
849     A scan set may be freed by a call to function
850     <function>ZOOM_scanset_destroy</function>.
851     Functions <function>ZOOM_scanset_option_get</function> and
852     <function>ZOOM_scanset_option_set</function> retrieves and sets
853     an option respectively.
854    </para>
855
856    <para>
857     The <parameter>startpqf</parameter> is a subset of PQF, namely
858     the Attributes+Term part. Multiple <literal>@attr</literal> can
859     be used. For example to scan in title (complete) phrases:
860     <literallayout>
861      @attr 1=4 @attr 6=2 "science o"
862     </literallayout>
863    </para>
864    
865    <table frame="top"><title>ZOOM Scan Set Options</title>
866     <tgroup cols="3">
867      <colspec colwidth="4*" colname="name"></colspec>
868      <colspec colwidth="7*" colname="description"></colspec>
869      <colspec colwidth="2*" colname="default"></colspec>
870      <thead>
871       <row>
872        <entry>Option</entry>
873        <entry>Description</entry>
874        <entry>Default</entry>
875       </row>
876      </thead>
877      <tbody>
878       <row><entry>
879         number</entry><entry>Number of Scan Terms requested in next scan.
880         After scan it holds the actual number of terms returned.
881        </entry><entry>10</entry></row>
882       <row><entry>
883         position</entry><entry>Preferred Position of term in response
884         in next scan; actual position after completion of scan.
885        </entry><entry>1</entry></row>
886       <row><entry>
887         stepSize</entry><entry>Step Size
888        </entry><entry>0</entry></row>
889       <row><entry>
890         scanStatus</entry><entry>An integer indicating the Scan Status
891         of last scan.
892        </entry><entry>0</entry></row>
893      </tbody>
894     </tgroup>
895    </table>
896   </sect1>
897
898   <sect1 id="zoom.ext"><title>Extended Services</title>
899    <para>
900     ZOOM offers an interface to a subset of the Z39.50 extended services
901     as well as a few privately defined ones:
902    </para>
903    <itemizedlist>
904     <listitem>
905      <para>
906       Z39.50 Item Order (ILL).
907       See <xref linkend="zoom.ext.itemorder"/>.
908      </para>
909     </listitem>
910     <listitem>
911      <para>
912       Record Update. This allows a client to insert, modify or delete
913       records.
914       See <xref linkend="zoom.ext.update"/>.
915      </para>
916     </listitem>
917     <listitem>
918      <para>
919       Database Create. This a non-standard feature. Allows a client
920       to create a database.
921       See <xref linkend="zoom.ext.dbcreate"/>.
922      </para>
923     </listitem>
924     <listitem>
925      <para>
926       Database Drop. This a non-standard feature. Allows a client
927       to delete/drop a database.
928       See <xref linkend="zoom.ext.dbdrop"/>.
929      </para>
930      </listitem>
931     <listitem>
932      <para>
933       Commit operation. This a non-standard feature. Allows a client
934       to commit operations.
935       See <xref linkend="zoom.ext.commit"/>.
936      </para>
937     </listitem>
938     <!-- all the ILL PDU options should go here too -->
939    </itemizedlist>
940    <para>
941     To create an extended service operation a <literal>ZOOM_package</literal>
942     must be created. The operation is a five step operation. The
943     package is created, package is configured by means of options,
944     the package is send, result is inspected (by means of options),
945     the package is destroyed.
946    </para>
947    <synopsis>
948     ZOOM_package ZOOM_connection_package(ZOOM_connection c,
949                                          ZOOM_options options);
950
951     const char *ZOOM_package_option_get(ZOOM_package p,
952                                         const char *key);
953     void ZOOM_package_option_set(ZOOM_package p, const char *key,
954                                  const char *val);
955     void ZOOM_package_send(ZOOM_package p, const char *type);
956
957     void ZOOM_package_destroy(ZOOM_package p);
958    </synopsis>
959    <para>
960     The <function>ZOOM_connection_package</function> creates a
961     package for the connection given using the options specified.
962    </para>
963    <para>
964     Functions <function>ZOOM_package_option_get</function> and
965     <function>ZOOM_package_option_set</function> gets and sets
966     options.
967    </para>
968    <para>
969     <function>ZOOM_package_send</function> sends
970     the package the via connection specified in 
971     <function>ZOOM_connection_package</function>.
972     The <parameter>type</parameter> specifies the actual extended service
973     package type to be sent.
974    </para>
975
976    <table frame="top"><title>Extended Service Common Options</title>
977     <tgroup cols="3">
978      <colspec colwidth="4*" colname="name"></colspec>
979      <colspec colwidth="7*" colname="description"></colspec>
980      <colspec colwidth="3*" colname="default"></colspec>
981      <thead>
982       <row>
983        <entry>Option</entry>
984        <entry>Description</entry>
985        <entry>Default</entry>
986       </row>
987      </thead>
988      <tbody>
989       <row>
990        <entry>package-name</entry>
991        <entry>Extended Service Request package name. Must be specified
992        as part of a request</entry>
993        <entry>none</entry>
994       </row>
995       <row>
996        <entry>user-id</entry>
997        <entry>User ID of Extended Service Package. Is a request option</entry>
998        <entry>none</entry>
999       </row>
1000       <row>
1001        <entry>function</entry>
1002        <entry>
1003         Function of package - one of <literal>create</literal>,
1004         <literal>delete</literal>, <literal>modify</literal>. Is
1005         a request option.
1006        </entry>
1007        <entry><literal>create</literal></entry>
1008       </row>
1009       <row>
1010        <entry>targetReference</entry>
1011        <entry>
1012         Target Reference. This is part of the response as returned
1013         by the server. Read it after a succesful operation.
1014        </entry>
1015        <entry><literal>none</literal></entry>
1016       </row>
1017      </tbody>
1018     </tgroup>
1019    </table>
1020
1021    <sect2 id="zoom.ext.itemorder"><title>Item Order</title>
1022     <para>
1023      For Item Order, type must be set to <literal>itemorder</literal> in
1024      <function>ZOOM_package_send</function>.
1025     </para>
1026
1027     <table frame="top"><title>Item Order Options</title>
1028      <tgroup cols="3">
1029       <colspec colwidth="4*" colname="name"></colspec>
1030       <colspec colwidth="7*" colname="description"></colspec>
1031       <colspec colwidth="3*" colname="default"></colspec>
1032       <thead>
1033        <row>
1034         <entry>Option</entry>
1035         <entry>Description</entry>
1036         <entry>Default</entry>
1037        </row>
1038       </thead>
1039       <tbody>
1040        <row>
1041         <entry>contact-name</entry>
1042         <entry>ILL contact name</entry>
1043         <entry>none</entry>
1044        </row>
1045        <row>
1046         <entry>contact-phone</entry>
1047         <entry>ILL contact phone</entry>
1048         <entry>none</entry>
1049        </row>
1050        <row>
1051         <entry>contact-email</entry>
1052         <entry>ILL contact email</entry>
1053         <entry>none</entry>
1054        </row>
1055        <row>
1056         <entry>itemorder-item</entry>
1057         <entry>Position for item (record) requested. An integer</entry>
1058         <entry>1</entry>
1059        </row>
1060       </tbody>
1061      </tgroup>
1062     </table>
1063
1064    </sect2>
1065
1066    <sect2 id="zoom.ext.update"><title>Record Update</title>
1067     <para>
1068      For Record Update, type must be set to <literal>update</literal> in
1069      <function>ZOOM_package_send</function>.
1070     </para>
1071
1072     <table frame="top"><title>Record Update Options</title>
1073      <tgroup cols="3">
1074       <colspec colwidth="4*" colname="name"></colspec>
1075       <colspec colwidth="7*" colname="description"></colspec>
1076       <colspec colwidth="3*" colname="default"></colspec>
1077       <thead>
1078        <row>
1079         <entry>Option</entry>
1080         <entry>Description</entry>
1081         <entry>Default</entry>
1082        </row>
1083       </thead>
1084       <tbody>
1085        <row>
1086         <entry>action</entry>
1087         <entry>
1088          The update action. One of 
1089          <literal>specialUpdate</literal>,
1090          <literal>recordInsert</literal>,
1091          <literal>recordReplace</literal>,
1092          <literal>recordDelete</literal>,
1093          <literal>elementUpdate</literal>.
1094         </entry>
1095         <entry><literal>specialUpdate</literal></entry>
1096        </row>
1097        <row>
1098         <entry>recordIdOpaque</entry>
1099         <entry>Opaque Record ID</entry>
1100         <entry>none</entry>
1101        </row>
1102        <row>
1103         <entry>recordIdNumber</entry>
1104         <entry>Record ID number</entry>
1105         <entry>none</entry>
1106        </row>
1107        <row>
1108         <entry>record</entry>
1109         <entry>The record itself</entry>
1110         <entry>none</entry>
1111        </row>
1112        <row>
1113         <entry>syntax</entry>
1114         <entry>The record syntax (transfer syntax). Is a string that
1115          is a known record syntax.
1116         </entry>
1117         <entry>no syntax</entry>
1118        </row>
1119        <row>
1120         <entry>databaseName</entry>
1121         <entry>Database from connection object</entry>
1122         <entry>Default</entry>
1123        </row>
1124       </tbody>
1125      </tgroup>
1126     </table>
1127     
1128    </sect2>
1129
1130    <sect2 id="zoom.ext.dbcreate"><title>Database Create</title>
1131     <para>
1132      For Database Create, type must be set to <literal>create</literal> in
1133      <function>ZOOM_package_send</function>.
1134     </para>
1135     
1136     <table frame="top"><title>Database Create Options</title>
1137      <tgroup cols="3">
1138       <colspec colwidth="4*" colname="name"></colspec>
1139       <colspec colwidth="7*" colname="description"></colspec>
1140       <colspec colwidth="3*" colname="default"></colspec>
1141       <thead>
1142        <row>
1143         <entry>Option</entry>
1144         <entry>Description</entry>
1145         <entry>Default</entry>
1146        </row>
1147       </thead>
1148       <tbody>
1149        <row>
1150         <entry>databaseName</entry>
1151         <entry>Database from connection object</entry>
1152         <entry>Default</entry>
1153        </row>
1154       </tbody>
1155      </tgroup>
1156     </table>
1157    </sect2>
1158    
1159    <sect2 id="zoom.ext.dbdrop"><title>Database Drop</title>
1160     <para>
1161      For Database Drop, type must be set to <literal>drop</literal> in
1162      <function>ZOOM_package_send</function>.
1163     </para>
1164     
1165     <table frame="top"><title>Database Create Options</title>
1166      <tgroup cols="3">
1167       <colspec colwidth="4*" colname="name"></colspec>
1168       <colspec colwidth="7*" colname="description"></colspec>
1169       <colspec colwidth="3*" colname="default"></colspec>
1170       <thead>
1171        <row>
1172         <entry>Option</entry>
1173         <entry>Description</entry>
1174         <entry>Default</entry>
1175        </row>
1176       </thead>
1177       <tbody>
1178        <row>
1179         <entry>databaseName</entry>
1180         <entry>Database from connection object</entry>
1181         <entry>Default</entry>
1182        </row>
1183       </tbody>
1184      </tgroup>
1185     </table>
1186    </sect2>
1187    
1188    <sect2 id="zoom.ext.commit"><title>Commit Operation</title>
1189     <para>
1190      For Commit, type must be set to <literal>commit</literal> in
1191      <function>ZOOM_package_send</function>.
1192     </para>
1193    </sect2>
1194
1195    <sect2><title>Protocol behavior</title>
1196     <para>
1197      All the extended services are Z39.50-only.
1198     </para>
1199     <note>
1200      <para>
1201       The database create, drop and commit services are privately defined
1202       operations.
1203       Refer to <filename>esadmin.asn</filename> in YAZ for the ASN.1
1204       definitions.
1205      </para>
1206     </note>
1207    </sect2>
1208   </sect1>
1209
1210   <sect1 id="zoom.options"><title>Options</title>
1211    <para>
1212     Most &zoom; objects provide a way to specify options to change behavior.
1213     From an implementation point of view a set of options is just like
1214     an associative array / hash.
1215    </para>
1216    <synopsis>
1217      ZOOM_options ZOOM_options_create (void);
1218
1219      ZOOM_options ZOOM_options_create_with_parent (ZOOM_options parent);
1220
1221      void ZOOM_options_destroy (ZOOM_options opt);
1222    </synopsis>
1223    <synopsis>
1224      const char *ZOOM_options_get (ZOOM_options opt, const char *name);
1225
1226      void ZOOM_options_set (ZOOM_options opt, const char *name,
1227                             const char *v);
1228    </synopsis>
1229    <synopsis>
1230      typedef const char *(*ZOOM_options_callback)
1231                                      (void *handle, const char *name);
1232
1233      ZOOM_options_callback
1234              ZOOM_options_set_callback (ZOOM_options opt,
1235                                         ZOOM_options_callback c,
1236                                         void *handle);
1237    </synopsis>
1238   </sect1>
1239   <sect1 id="zoom.events"><title>Events</title>
1240    <para>
1241     If you're developing non-blocking applications, you have to deal 
1242     with events.
1243    </para>
1244    <synopsis>
1245     int ZOOM_event (int no, ZOOM_connection *cs);
1246    </synopsis>
1247    <para>
1248     The <function>ZOOM_event</function> executes pending events for
1249     a number of connections. Supply the number of connections in
1250     <literal>no</literal> and an array of connections in
1251     <literal>cs</literal> (<literal>cs[0] ... cs[no-1]</literal>).
1252     A pending event could be a sending a search, receiving a response,
1253     etc.
1254     When an event has occurred for one of the connections, this function
1255     returns a positive integer <literal>n</literal> denoting that an event
1256     occurred for connection <literal>cs[n-1]</literal>.
1257     When no events are pending for the connections, a value of zero is
1258     returned.
1259     To ensure that all outstanding requests are performed call this function
1260     repeatedly until zero is returned.
1261    </para>
1262    <para>
1263     If <function>ZOOM_event</function> returns and returns non-zero, the
1264     last event that occurred can be expected.
1265    </para>
1266    <synopsis>
1267     int ZOOM_connection_last_event(ZOOM_connection cs);
1268    </synopsis>
1269    <para>
1270     <function>ZOOM_connection_last_event</function> returns an event type
1271     (integer) for the last event.
1272    </para>
1273
1274    <table frame="top"><title>ZOOM Event IDs</title>
1275     <tgroup cols="2">
1276      <colspec colwidth="4*" colname="name"></colspec>
1277      <colspec colwidth="7*" colname="description"></colspec>
1278      <thead>
1279       <row>
1280        <entry>Event</entry>
1281        <entry>Description</entry>
1282       </row>
1283      </thead>
1284      <tbody>
1285       <row>
1286        <entry>ZOOM_EVENT_NONE</entry>
1287        <entry>No event has occurred</entry>
1288       </row>
1289       <row>
1290        <entry>ZOOM_EVENT_CONNECT</entry>
1291        <entry>TCP/IP connect has initiated</entry>
1292       </row>
1293       <row>
1294        <entry>ZOOM_EVENT_SEND_DATA</entry>
1295        <entry>Data has been transmitted (sending)</entry>
1296       </row>
1297       <row>
1298        <entry>ZOOM_EVENT_RECV_DATA</entry>
1299        <entry>Data has been received)</entry>
1300       </row>
1301       <row>
1302        <entry>ZOOM_EVENT_TIMEOUT</entry>
1303        <entry>Timeout</entry>
1304       </row>
1305       <row>
1306        <entry>ZOOM_EVENT_UNKNOWN</entry>
1307        <entry>Unknown event</entry>
1308       </row>
1309       <row>
1310        <entry>ZOOM_EVENT_SEND_APDU</entry>
1311        <entry>An APDU has been transmitted (sending)</entry>
1312       </row>
1313       <row>
1314        <entry>ZOOM_EVENT_RECV_APDU</entry>
1315        <entry>An APDU has been received</entry>
1316       </row>
1317       <row>
1318        <entry>ZOOM_EVENT_RECV_RECORD</entry>
1319        <entry>A result-set record has been received</entry>
1320       </row>
1321       <row>
1322        <entry>ZOOM_EVENT_RECV_SEARCH</entry>
1323        <entry>A search result been received</entry>
1324       </row>
1325      </tbody>
1326     </tgroup>
1327    </table>
1328   </sect1>
1329  </chapter>
1330  
1331  <!-- Keep this comment at the end of the file
1332  Local variables:
1333  mode: sgml
1334  sgml-omittag:t
1335  sgml-shorttag:t
1336  sgml-minimize-attributes:nil
1337  sgml-always-quote-attributes:t
1338  sgml-indent-step:1
1339  sgml-indent-data:t
1340  sgml-parent-document: "yaz.xml"
1341  sgml-local-catalogs: nil
1342  sgml-namecase-general:t
1343  End:
1344  -->
1345