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 |
|
---|
14 | class 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
|
---|