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