1
// $Id: master-header,v 1.17 2003/09/24 18:07:31 adam Exp $
4
// The ZOOM homepage is at http://zoom.z3950.org/
6
// Derived from version 1.3a at
7
// http://zoom.z3950.org/bind/cplusplus/zoom-1.3a.hh
9
#include <stddef.h> // for size_t
14
// Forward declarations for type names.
20
// connections are non-copyable.
21
connection (const connection &);
22
connection &operator= (const connection &);
25
connection (const std::string &hostname, int portnum);
27
void connect (const std::string &hostname, int portnum);
28
std::string option (const std::string &key) const;
29
bool option (const std::string &key, const std::string &val);
33
// base class for all query types
39
class prefixQuery : public query {
41
prefixQuery (const std::string &pqn);
45
class CCLQuery : public query {
47
CCLQuery (const std::string &ccl, void *qualset);
52
// resultSets are non-copyable.
53
resultSet (const resultSet &);
54
resultSet &operator= (const resultSet &);
56
resultSet (connection &c, const query &q);
58
std::string option (const std::string &key) const;
59
bool option (const std::string &key, const std::string &val);
68
UNKNOWN, GRS1, SUTRS, USMARC, UKMARC, XML
71
operator std::string () const;
72
bool operator== (const syntax &s) const;
73
bool operator== (value rs) const;
74
operator value () const;
77
record (resultSet &rs, size_t num);
79
syntax recsyn () const;
80
std::string render () const;
81
std::string rawdata () const;
84
// Base exception class; from which all other ZOOM exceptions
85
// are derived. Other classes that use this as their base
86
// class may want to provide their own errcode() and errmsg()
87
// functions -- hence they are made virtual.
91
virtual ~exception ();
92
virtual int errcode () const;
93
virtual std::string errmsg () const;
96
// systemException could be thrown for timeouts, protocol errors,
98
class systemException : public exception {
100
systemException (); // Uses value of system `errno'
101
systemException (int code);
104
// bib1Exception::errcode() returns a code from the
105
// Bib-1 Diagnostic Set.
106
class bib1Exception: public exception {
108
bib1Exception (int code, const std::string &addinfo);
109
std::string addinfo () const;
112
class queryException : public exception {
114
enum { PREFIX, CCL };
115
queryException (int qtype, const std::string &source);
116
std::string addinfo () const;