1 // $Id: master-header,v 1.10 2002-11-13 11:48:07 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);
30 class YAZ_EXPORT connection {
32 * friend class resultSet; // so it can use _getYazConnection()
33 * ZOOM_connection _getYazConnection () const { return c; }
35 connection (const char *hostname, int portnum);
37 const char *option (const char *key) const;
38 const char *option (const char *key, const char *val);
42 // pure virtual class: derive concrete subclasses from it.
43 * friend class resultSet; // so it can use _getYazQuery()
44 * ZOOM_query _getYazQuery () const { return q; }
51 class YAZ_EXPORT prefixQuery : public query {
53 prefixQuery (const char *pqn);
57 class YAZ_EXPORT CCLQuery : public query {
59 CCLQuery (const char *ccl, void *qualset);
63 class YAZ_EXPORT resultSet {
67 resultSet (connection &c, const query &q);
69 const char *option (const char *key) const;
70 const char *option (const char *key, const char *val);
72 const record *getRecord (size_t i) const;
75 class YAZ_EXPORT record {
76 * const resultSet *owner;
78 * friend class resultSet; // so it can use this constructor
79 * record::record (const resultSet *rs, ZOOM_record rec):
80 * owner (rs), r (rec) {}
84 UNKNOWN, GRS1, SUTRS, USMARC, UKMARC, XML
86 record *clone () const;
87 syntax recsyn () const;
88 const char *render () const;
89 const char *rawdata () const;
92 class YAZ_EXPORT exception {
98 const char *errmsg () const;
101 class YAZ_EXPORT systemException: public exception {
104 const char *errmsg () const;
107 class YAZ_EXPORT bib1Exception: public exception {
111 bib1Exception (int errcode, const char *addinfo);
112 const char *errmsg () const;
113 const char *addinfo () const;
116 class YAZ_EXPORT queryException: public exception {
119 * ~queryException ();
124 queryException (int qtype, const char *source);
125 const char *errmsg () const;
126 const char *addinfo () const;