[166] | 1 | /**********************************************************************
|
---|
| 2 | *
|
---|
| 3 | * nullproto.h --
|
---|
| 4 | * Copyright (C) 1999 The New Zealand Digital Library Project
|
---|
| 5 | *
|
---|
[533] | 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.
|
---|
[166] | 9 | *
|
---|
[533] | 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 | *
|
---|
[166] | 24 | *********************************************************************/
|
---|
| 25 |
|
---|
| 26 |
|
---|
| 27 | #ifndef NULLPROTO_H
|
---|
| 28 | #define NULLPROTO_H
|
---|
| 29 |
|
---|
| 30 | #include "gsdlconf.h"
|
---|
| 31 | #include "collectserver.h"
|
---|
[1860] | 32 | #include "collectset.h"
|
---|
[166] | 33 | #include "recptproto.h"
|
---|
[1649] | 34 | #include "receptionist.h"
|
---|
[166] | 35 |
|
---|
| 36 | class nullproto : public recptproto {
|
---|
| 37 | protected:
|
---|
[1860] | 38 | collectset *cset;
|
---|
[166] | 39 | public:
|
---|
[1459] | 40 | virtual ~nullproto();
|
---|
[166] | 41 |
|
---|
[1649] | 42 | // add_collection sets up the collectionserver and calls
|
---|
| 43 | // add_collectserver
|
---|
[1860] | 44 | // virtual void add_collection (const text_t &collection, void *recpt,
|
---|
| 45 | // const text_t &gsdlhome, const text_t &gdbmhome);
|
---|
[1649] | 46 |
|
---|
[166] | 47 | // add_collectserver should be called for each collection server
|
---|
| 48 | // before any configuration is done
|
---|
[1860] | 49 | void set_collectset(collectset *set) { this->cset = set; }
|
---|
[166] | 50 |
|
---|
[1679] | 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 |
|
---|
[166] | 57 | // this configure will configure each of the collection servers
|
---|
| 58 | void configure (const text_t &key, const text_tarray &cfgline);
|
---|
| 59 |
|
---|
| 60 | // this init will init each of the collection servers
|
---|
| 61 | bool init (ostream &logout);
|
---|
| 62 |
|
---|
| 63 | text_t get_protocol_name ();
|
---|
[1860] | 64 | text_t get_site_name ();
|
---|
| 65 |
|
---|
[166] | 66 | void get_collection_list (text_tarray &collist, comerror_t &err,
|
---|
| 67 | ostream &logout);
|
---|
| 68 | void has_collection (const text_t &collection, bool &hascollection,
|
---|
| 69 | comerror_t &err, ostream &logout);
|
---|
| 70 | void ping (const text_t &collection, bool &wassuccess,
|
---|
| 71 | comerror_t &err, ostream &logout);
|
---|
| 72 | void get_collectinfo (const text_t &collection,
|
---|
| 73 | ColInfoResponse_t &collectinfo,
|
---|
| 74 | comerror_t &err, ostream &logout);
|
---|
[220] | 75 | void get_filterinfo (const text_t &collection,
|
---|
| 76 | InfoFiltersResponse_t &response,
|
---|
| 77 | comerror_t &err, ostream &logout);
|
---|
[184] | 78 | void get_filteroptions (const text_t &collection,
|
---|
[220] | 79 | const InfoFilterOptionsRequest_t &request,
|
---|
[184] | 80 | InfoFilterOptionsResponse_t &response,
|
---|
| 81 | comerror_t &err, ostream &logout);
|
---|
| 82 | void filter (const text_t &collection,
|
---|
[248] | 83 | FilterRequest_t &request,
|
---|
[184] | 84 | FilterResponse_t &response,
|
---|
| 85 | comerror_t &err, ostream &logout);
|
---|
[257] | 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 |
|
---|
[166] | 92 | };
|
---|
| 93 |
|
---|
| 94 |
|
---|
| 95 | #endif
|
---|