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

Last change on this file since 27220 was 24959, checked in by ak19, 12 years ago

Second commit to do with Greenstone's support for RSS. Has been tested on Linux, and works if zextra.dm and base.dm are setup properly and if the rss-items.rdf file generated by the update to BasePlugout is moved to the index folder. Modified Dr Bainbridge's code to make the way that rssaction.cpp accesses the rss-items.rdf file independent of where the GS server is located, by adding a new method to get the rss-items.rdf file's contents to the recptproto protocol class and implementing it in nullproto. The method is also mirrored in corba/corbaproto, however compilation with corba fails in a part of the code that I've not modified.

  • Property svn:executable set to *
File size: 3.7 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
84 // returns the contents of a collection's rss-items.rdf file (generated by BasePlugout)
85 void get_rss_items (const text_t &collection,
86 const text_t &gsdlhome,
87 text_t &rss_items,
88 comerror_t &err,
89 ostream &logout);
90
91 void filter (const text_t &collection,
92 FilterRequest_t &request,
93 FilterResponse_t &response,
94 comerror_t &err, ostream &logout);
95
96 void get_document (const text_t &collection,
97 const DocumentRequest_t &request,
98 DocumentResponse_t &response,
99 comerror_t &err, ostream &logout);
100
101 void is_searchable (const text_t &collection, bool &issearchable,
102 comerror_t &err, ostream &logout);
103
104
105};
106
107
108#endif
Note: See TracBrowser for help on using the repository browser.