source: main/trunk/greenstone2/runtime-src/src/protocol/nullproto.h@ 24411

Last change on this file since 24411 was 16310, checked in by davidb, 16 years ago

Introduction of 'collecthome' which parallels 'gsdlhome' to allow the toplevel collect folder to be outside of the gsdlhome area

  • Property svn:executable set to *
File size: 3.5 KB
Line 
1/**********************************************************************
2 *
3 * nullproto.h --
4 * Copyright (C) 1999 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
27#ifndef NULLPROTO_H
28#define NULLPROTO_H
29
30#include "gsdlconf.h"
31#include "collectserver.h"
32#include "collectset.h"
33#include "recptproto.h"
34
35
36class nullproto : public recptproto {
37protected:
38 collectset *cset;
39public:
40 nullproto();
41 virtual ~nullproto();
42
43 // add_collection sets up the collectionserver and calls
44 // add_collectserver
45 virtual void add_collection (const text_t &collection, void *recpt,
46 const text_t &gsdlhome, const text_t& collecthome,
47 const text_t &dbhome);
48
49 void set_collectset(collectset *set) { this->cset = set; }
50
51 // remove_collection deletes the collection server of collection.
52 // This only needs to be called if a collectionserver is to be
53 // removed while the library is running as the destructor function
54 // cleans up all collectservers when the program exits.
55 void remove_collection (const text_t &collection, ostream &logout);
56
57 // this configure will configure each of the collection servers
58 void configure (const text_t &key, const text_tarray &cfgline,
59 comerror_t &err);
60
61 // this init will init each of the collection servers
62 bool init (comerror_t &err, ostream &logout);
63
64 text_t get_protocol_name (comerror_t &err);
65 text_t get_site_name (comerror_t &err);
66
67 void get_collection_list (text_tarray &collist, comerror_t &err,
68 ostream &logout);
69 void has_collection (const text_t &collection, bool &hascollection,
70 comerror_t &err, ostream &logout);
71 void ping (const text_t &collection, bool &wassuccess,
72 comerror_t &err, ostream &logout);
73 void get_collectinfo (const text_t &collection,
74 ColInfoResponse_t &collectinfo,
75 comerror_t &err, ostream &logout);
76 void get_filterinfo (const text_t &collection,
77 InfoFiltersResponse_t &response,
78 comerror_t &err, ostream &logout);
79 void get_filteroptions (const text_t &collection,
80 const InfoFilterOptionsRequest_t &request,
81 InfoFilterOptionsResponse_t &response,
82 comerror_t &err, ostream &logout);
83 void filter (const text_t &collection,
84 FilterRequest_t &request,
85 FilterResponse_t &response,
86 comerror_t &err, ostream &logout);
87
88 void get_document (const text_t &collection,
89 const DocumentRequest_t &request,
90 DocumentResponse_t &response,
91 comerror_t &err, ostream &logout);
92
93 void is_searchable (const text_t &collection, bool &issearchable,
94 comerror_t &err, ostream &logout);
95
96
97};
98
99
100#endif
Note: See TracBrowser for help on using the repository browser.