source: trunk/gsdl/src/colservr/collectset.h@ 2545

Last change on this file since 2545 was 2545, checked in by sjboddie, 23 years ago

Added an unload_database() function to mgsearchclass which is called by
collectset's remove_collection() function. This fixes a bug that was
present when using the windows local library (or any persistent server
form of Greenstone) to edit an existing collection from the collector (i.e.
the collector occassionally couldn't delete the existing indexes because
they were being held open by mg).

Also removed #ifdefs that were disabling the use of mgpp collections on
Windows and got mgppqueryfilter and mgppsearch compiling on Windows. mgpp
collections should now work on Windows exactly as they do on Unix (I
haven't tested it yet though)

  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1/************************************************************
2 *
3 * Collection set
4 *
5 ************************************************************/
6
7#ifndef COLLECTSET_H
8#define COLLECTSET_H
9
10#include "collectserver.h"
11#include "cnfgable.h"
12#include "receptionist.h" // Added 8/9/200 to permit receptionist configuration
13
14class collectset : public configurable
15{
16 protected:
17 collectservermapclass cservers;
18 mgsearchclass *mgsearch;
19 mgppsearchclass *mgppsearch;
20 int noofservers;
21 text_t httpdomain;
22 text_t httpprefix;
23
24 public:
25 collectset(text_t &gsdlhome);
26 // this constructor is used by the local library
27 collectset() {}
28
29 ~collectset();
30
31 // initialise the collections
32 bool init(ostream &logout);
33
34 // configure all the servers as supplied
35 void configure (const text_t &key, const text_tarray &cfgline);
36
37 // Add/remove collections
38 void collectset::remove_collection (const text_t &collection, ostream &logout);
39 void collectset::add_collection (const text_t &collection, void *recpt,
40 const text_t &gsdlhome, const text_t &gdbmhome);
41
42 // return the total number of servers in the set
43 int size();
44
45 void getCollectionList(text_tarray &collist);
46
47 // return the component map
48 collectservermapclass servers();
49
50 // configure a receptionist with the list of servers
51 void setReceptionistServers(receptionist &recpt, text_t &gsdlhome);
52
53 // return an individual collection server
54 collectserver *getCollectServer(const text_t &collection)
55 {
56 return cservers.getcollectserver(collection);
57 }
58};
59
60#endif
Note: See TracBrowser for help on using the repository browser.