1 // $Header: /home/cvsroot/yaz++/zoom/master-header,v 1.2 2002-08-08 16:06:08 mike Exp $
4 // The ZOOM homepage is at http://zoom.z3950.org/
6 // Derived from version 1.0g at
7 // http://zoom.z3950.org/bind/cplusplus/zoom-1.0g.hh
9 #include <stddef.h> // for size_t
12 * * This is a bit stupid. The fact that our ZOOM-C++ implementation is
13 * * based on the ZOOM-C implementation is our Dirty Little Secret, and
14 * * there is in principle no reason why client code need be bothered
15 * * with it. Except of course that the public class declarations in
16 * * C++ have to lay their private parts out for the world to see
17 * * (oo-er). Hence the inclusion of <yaz/zoom.h>
19 *#include <yaz/zoom.h>
22 // Forward declarations for type names.
27 const char *option (const char *key);
28 const char *option (const char *key, const char *val);
36 connection (const char *hostname, int portnum);
37 // ### I would like to add a ``throw (ZOOM::exception)'' clause
38 // here, but it looks like G++ 2.95.2 doesn't recognise it.
40 const char *option (const char *key) const;
41 const char *option (const char *key, const char *val);
42 * ZOOM_connection _getYazConnection () const { return c; } // package-private
46 // pure virtual class: derive concrete subclasses from it.
51 * ZOOM_query _getYazQuery () const { return q; } // package-private
54 class prefixQuery : public query {
56 prefixQuery (const char *pqn);
60 class CCLQuery : public query {
62 CCLQuery (const char *ccl, void *qualset);
70 resultSet (connection &c, const query &q);
72 const char *option (const char *key) const;
73 const char *option (const char *key, const char *val);
75 const record *getRecord (size_t i) const;
79 * const resultSet *owner;
82 * record::record (const resultSet *rs, ZOOM_record rec):
83 * owner (rs), r (rec) {}
86 UNKNOWN, GRS1, SUTRS, USMARC, UKMARC, XML
88 record *clone () const;
89 syntax recsyn () const;
90 const char *render () const;
91 const char *rawdata () const;
100 const char *errmsg () const;
103 class systemException: public exception {
106 int errcode () const;
107 const char *errmsg () const;
110 class bib1Exception: public exception {
114 bib1Exception (int errcode, const char *addinfo);
115 int errcode () const;
116 const char *errmsg () const;
117 const char *addinfo () const;
120 class queryException: public exception {
123 * ~queryException ();
124 static const int PREFIX = 1;
125 static const int CCL = 2;
126 queryException (int qtype, const char *source);
127 int errcode () const;
128 const char *errmsg () const;
129 const char *addinfo () const;