1 // $Header: /home/cvsroot/yaz++/zoom/master-header,v 1.6 2002-10-30 10:03:52 adam 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>
23 // Forward declarations for type names.
24 class YAZ_EXPORT query;
25 class YAZ_EXPORT resultSet;
26 class YAZ_EXPORT record;
28 const char *option (const char *key);
29 const char *option (const char *key, const char *val);
34 class YAZ_EXPORT connection {
36 * friend class resultSet; // so it can use _getYazConnection()
37 * ZOOM_connection _getYazConnection () const { return c; }
39 connection (const char *hostname, int portnum);
41 const char *option (const char *key) const;
42 const char *option (const char *key, const char *val);
46 // pure virtual class: derive concrete subclasses from it.
47 * friend class resultSet; // so it can use _getYazQuery()
48 * ZOOM_query _getYazQuery () const { return q; }
55 class YAZ_EXPORT prefixQuery : public query {
57 prefixQuery (const char *pqn);
61 class YAZ_EXPORT CCLQuery : public query {
63 CCLQuery (const char *ccl, void *qualset);
67 class YAZ_EXPORT resultSet {
71 resultSet (connection &c, const query &q);
73 const char *option (const char *key) const;
74 const char *option (const char *key, const char *val);
76 const record *getRecord (size_t i) const;
79 class YAZ_EXPORT record {
80 * const resultSet *owner;
82 * friend class resultSet; // so it can use this constructor
83 * record::record (const resultSet *rs, ZOOM_record rec):
84 * owner (rs), r (rec) {}
88 UNKNOWN, GRS1, SUTRS, USMARC, UKMARC, XML
90 record *clone () const;
91 syntax recsyn () const;
92 const char *render () const;
93 const char *rawdata () const;
96 class YAZ_EXPORT exception {
100 exception (int code);
101 int errcode () const;
102 const char *errmsg () const;
105 class YAZ_EXPORT systemException: public exception {
108 int errcode () const;
109 const char *errmsg () const;
112 class YAZ_EXPORT bib1Exception: public exception {
116 bib1Exception (int errcode, const char *addinfo);
117 int errcode () const;
118 const char *errmsg () const;
119 const char *addinfo () const;
122 class YAZ_EXPORT queryException: public exception {
125 * ~queryException ();
130 queryException (int qtype, const char *source);
131 int errcode () const;
132 const char *errmsg () const;
133 const char *addinfo () const;