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"
|
---|
13 | #include "mgsearch.h"
|
---|
14 | #include "mgppsearch.h"
|
---|
15 |
|
---|
16 | class collectset : public configurable
|
---|
17 | {
|
---|
18 | protected:
|
---|
19 | collectservermapclass cservers;
|
---|
20 | mgsearchclass *mgsearch;
|
---|
21 | mgppsearchclass *mgppsearch;
|
---|
22 | int noofservers;
|
---|
23 | text_t httpdomain;
|
---|
24 | text_t httpprefix;
|
---|
25 |
|
---|
26 | public:
|
---|
27 | collectset(text_t &gsdlhome);
|
---|
28 | // this constructor is used by the local library
|
---|
29 | collectset() {}
|
---|
30 |
|
---|
31 | ~collectset();
|
---|
32 |
|
---|
33 | // initialise the collections
|
---|
34 | bool init(ostream &logout);
|
---|
35 |
|
---|
36 | // configure all the servers as supplied
|
---|
37 | void configure (const text_t &key, const text_tarray &cfgline);
|
---|
38 |
|
---|
39 | // Add/remove collections
|
---|
40 | void remove_collection (const text_t &collection, ostream &logout);
|
---|
41 | void add_collection (const text_t &collection, void *recpt,
|
---|
42 | const text_t &gsdlhome, const text_t &gdbmhome);
|
---|
43 |
|
---|
44 | // return the total number of servers in the set
|
---|
45 | int size();
|
---|
46 |
|
---|
47 | void getCollectionList(text_tarray &collist);
|
---|
48 |
|
---|
49 | // return the component map
|
---|
50 | collectservermapclass servers();
|
---|
51 |
|
---|
52 | // configure a receptionist with the list of servers
|
---|
53 | void setReceptionistServers(receptionist &recpt, text_t &gsdlhome);
|
---|
54 |
|
---|
55 | // return an individual collection server
|
---|
56 | collectserver *getCollectServer(const text_t &collection)
|
---|
57 | {
|
---|
58 | return cservers.getcollectserver(collection);
|
---|
59 | }
|
---|
60 | };
|
---|
61 |
|
---|
62 | #endif
|
---|