[1860] | 1 | /**********************************************************************
|
---|
| 2 | *
|
---|
| 3 | * corbaproto.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 CORBAPROTO_H
|
---|
| 28 | #define CORBAPROTO_H
|
---|
| 29 |
|
---|
| 30 | #include "gsdlconf.h"
|
---|
| 31 | #include "collectserver.h"
|
---|
| 32 | #include "recptproto.h"
|
---|
| 33 | #include "corbaiface.h"
|
---|
| 34 | using namespace gsdlInterface;
|
---|
| 35 |
|
---|
| 36 | class corbaproto : public recptproto {
|
---|
| 37 | private:
|
---|
| 38 | corbaiface_var getCorbaClient();
|
---|
| 39 | protected:
|
---|
| 40 | collectservermapclass cservers;
|
---|
| 41 | corbaiface_var client;
|
---|
| 42 | CORBA::ORB_var orb;
|
---|
| 43 | CORBA::BOA_var boa;
|
---|
| 44 | CORBA::Object_var obj;
|
---|
| 45 | text_t gsdlhome;
|
---|
| 46 | text_t site_name;
|
---|
| 47 |
|
---|
| 48 | public:
|
---|
| 49 | virtual ~corbaproto() {}
|
---|
| 50 | corbaproto(char* site_name);
|
---|
| 51 |
|
---|
| 52 | // add_collectserver should be called for each collection server
|
---|
| 53 | // before any configuration is done
|
---|
| 54 | void add_collectserver (collectserver *thecserver)
|
---|
| 55 | {cservers.addcollectserver(thecserver);}
|
---|
| 56 |
|
---|
| 57 | // this configure will configure each of the collection servers
|
---|
[2113] | 58 | void configure (const text_t &key, const text_tarray &cfgline, comerror_t &err);
|
---|
[1860] | 59 |
|
---|
| 60 | // this init will init each of the collection servers
|
---|
[2113] | 61 | bool init (comerror_t &err,ostream &logout);
|
---|
[1860] | 62 |
|
---|
| 63 | // used to check for icons and retrieve them from the collection
|
---|
| 64 | // site if they are missing
|
---|
| 65 | void cache_missing_icons(text_tmap& format_map,
|
---|
| 66 | text_t& httpdomain,
|
---|
| 67 | text_t& httpprefix);
|
---|
| 68 |
|
---|
[2113] | 69 | text_t get_site_name (comerror_t &err);
|
---|
[1860] | 70 |
|
---|
[2113] | 71 | text_t get_protocol_name (comerror_t &err);
|
---|
[1860] | 72 | void get_collection_list (text_tarray &collist, comerror_t &err,
|
---|
| 73 | ostream &logout);
|
---|
| 74 | void has_collection (const text_t &collection, bool &hascollection,
|
---|
| 75 | comerror_t &err, ostream &logout);
|
---|
| 76 | void ping (const text_t &collection, bool &wassuccess,
|
---|
| 77 | comerror_t &err, ostream &logout);
|
---|
| 78 | void get_collectinfo (const text_t &collection,
|
---|
| 79 | ColInfoResponse_t &collectinfo,
|
---|
| 80 | comerror_t &err, ostream &logout);
|
---|
| 81 | void get_filterinfo (const text_t &collection,
|
---|
| 82 | InfoFiltersResponse_t &response,
|
---|
| 83 | comerror_t &err, ostream &logout);
|
---|
| 84 | void get_filteroptions (const text_t &collection,
|
---|
| 85 | const InfoFilterOptionsRequest_t &request,
|
---|
| 86 | InfoFilterOptionsResponse_t &response,
|
---|
| 87 | comerror_t &err, ostream &logout);
|
---|
[24959] | 88 |
|
---|
| 89 | // returns the contents of a collection's rss-items.rdf file (generated by BasePlugout)
|
---|
| 90 | void get_rss_items (const text_t &collection,
|
---|
| 91 | const text_t &gsdlhome,
|
---|
| 92 | text_t &rss_items,
|
---|
| 93 | comerror_t &err,
|
---|
| 94 | ostream &logout);
|
---|
| 95 |
|
---|
[1860] | 96 | void filter (const text_t &collection,
|
---|
| 97 | FilterRequest_t &request,
|
---|
| 98 | FilterResponse_t &response,
|
---|
| 99 | comerror_t &err, ostream &logout);
|
---|
| 100 |
|
---|
| 101 | void get_document (const text_t &collection,
|
---|
| 102 | const DocumentRequest_t &request,
|
---|
| 103 | DocumentResponse_t &response,
|
---|
| 104 | comerror_t &err, ostream &logout);
|
---|
| 105 |
|
---|
| 106 | };
|
---|
| 107 |
|
---|
| 108 |
|
---|
| 109 | #endif
|
---|