1 // $Header: /home/cvsroot/yaz++/zoom/master-header,v 1.7 2002-11-04 23:08:49 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.
23 class YAZ_EXPORT query;
24 class YAZ_EXPORT resultSet;
25 class YAZ_EXPORT record;
27 const char *option (const char *key);
28 const char *option (const char *key, const char *val);
33 class YAZ_EXPORT connection {
35 * friend class resultSet; // so it can use _getYazConnection()
36 * ZOOM_connection _getYazConnection () const { return c; }
38 connection (const char *hostname, int portnum);
40 const char *option (const char *key) const;
41 const char *option (const char *key, const char *val);
45 // pure virtual class: derive concrete subclasses from it.
46 * friend class resultSet; // so it can use _getYazQuery()
47 * ZOOM_query _getYazQuery () const { return q; }
54 class YAZ_EXPORT prefixQuery : public query {
56 prefixQuery (const char *pqn);
60 class YAZ_EXPORT CCLQuery : public query {
62 CCLQuery (const char *ccl, void *qualset);
66 class YAZ_EXPORT resultSet {
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;
78 class YAZ_EXPORT record {
79 * const resultSet *owner;
81 * friend class resultSet; // so it can use this constructor
82 * record::record (const resultSet *rs, ZOOM_record rec):
83 * owner (rs), r (rec) {}
87 UNKNOWN, GRS1, SUTRS, USMARC, UKMARC, XML
89 record *clone () const;
90 syntax recsyn () const;
91 const char *render () const;
92 const char *rawdata () const;
95 class YAZ_EXPORT exception {
100 int errcode () const;
101 const char *errmsg () const;
104 class YAZ_EXPORT systemException: public exception {
107 int errcode () const;
108 const char *errmsg () const;
111 class YAZ_EXPORT bib1Exception: public exception {
115 bib1Exception (int errcode, const char *addinfo);
116 int errcode () const;
117 const char *errmsg () const;
118 const char *addinfo () const;
121 class YAZ_EXPORT queryException: public exception {
124 * ~queryException ();
129 queryException (int qtype, const char *source);
130 int errcode () const;
131 const char *errmsg () const;
132 const char *addinfo () const;