source: trunk/gsdl/src/recpt/z3950proto.h@ 1861

Last change on this file since 1861 was 1355, checked in by jrm21, 24 years ago

Fixed up parsing of z39.50 config file, so that errors go to file instead
of stderr, which screws up the cgi headers and page...
Errors goes to etc/recpt/z3950err.txt

  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1/**********************************************************************
2 *
3 * z3950proto.h --
4 * Copyright (C) 2000 The New Zealand Digital Library Project
5 *
6 * A component of the Greenstone digital library software
7 * from the New Zealand Digital Library Project at the
8 * University of Waikato, New Zealand.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 *
24 *********************************************************************/
25
26#ifndef Z3950PROTO_H
27#define Z3950PROTO_H
28
29#include "recptproto.h"
30#include "z3950server.h"
31
32class z3950proto : public recptproto {
33protected:
34 int zserver_count;
35 z3950_server_array zservers;
36public:
37 z3950proto();
38 virtual ~z3950proto();
39
40 int getServerCount() { return zserver_count;}
41 /*
42 void add_collectserver (collectserver *thecserver)
43 {cservers.addcollectserver(thecserver);}
44 */
45
46 void add_server(z3950_server& zserver);
47
48 void read_config_file(const text_t &filename, const text_t &errfile);
49
50 void configure (const text_t &key, const text_tarray &cfgline);
51
52 bool init (ostream &logout);
53
54 text_t get_protocol_name () {return "z3950proto";}
55
56 void get_collection_list (text_tarray &collist, comerror_t &err,
57 ostream &logout);
58
59 void has_collection (const text_t &collection, bool &hascollection,
60 comerror_t &err, ostream &logout);
61
62 void ping (const text_t &collection, bool &wassuccess,
63 comerror_t &err, ostream &logout);
64
65 void get_collectinfo (const text_t &collection,
66 ColInfoResponse_t &collectinfo,
67 comerror_t &err, ostream &logout);
68
69 void get_filterinfo (const text_t &collection,
70 InfoFiltersResponse_t &response,
71 comerror_t &err, ostream &logout);
72
73 /* void get_info (const text_t &collection, const text_tset &metadata,
74 FilterResponse_t &response, ostream &logout);
75 */
76
77 void get_filteroptions (const text_t &collection,
78 const InfoFilterOptionsRequest_t &request,
79 InfoFilterOptionsResponse_t &response,
80 comerror_t &err, ostream &logout);
81
82 void filter (const text_t &collection,
83 FilterRequest_t &request,
84 FilterResponse_t &response,
85 comerror_t &err, ostream &logout);
86
87 void get_document (const text_t &collection,
88 const DocumentRequest_t &request,
89 DocumentResponse_t &response,
90 comerror_t &err, ostream &logout);
91
92};
93
94#endif
Note: See TracBrowser for help on using the repository browser.