source: main/trunk/greenstone2/runtime-src/src/corba/corbaproto.h@ 25234

Last change on this file since 25234 was 25231, checked in by ak19, 12 years ago

Many changes to get corba working again ever since the addition of RSS support meant that the method get_rss_items needed to be mirrored in the corba code. The corba code was not compiling then and it turned out we needed a later version of Mico's corba implementation (2.3.13 up from 2.3.5). Therefore the current commit not only corrects some errors in the recently added getRssItems() method but includes further changes: 1. namespaced use of iostream functions were required in some mpp files. 2. New types and member variables added to the corbaiface.idl interface file, to mirror the presence of equivalent variables in comtools.h which hadn't been ported over yet. (Such as the complex corba data type equivalent of collectionmetamap used in comtools.h.) This required (de)serialisation methods to be declared and implemented in corbatext_t.h and corbatext_t.mpp. The additional member variables for the corbaColInfoResponse in corbaiface.idl are now also unpacked in corbaproto.mpp along with the rest of the data structure. 3. Having changed from mico version 2.3.5 to 2.3.13 required code to changed to use POA instead of BOA. This also meant that skeleton files were no longer to be generated when running idl over corbaiface.idl. corbaserver inherits from a POA related object now instead of from the skeleton. 4. Makefile.in was updated to reflect these changes (absence of skeleton), includes a target to run IDL over the corbaiface.idl file to generate the necessary helper files, and corrects earlier oversights in updating the corba makefile with the rest of the changes made over time to runtime-src.

  • Property svn:keywords set to Author Date Id Revision
File size: 3.6 KB
Line 
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
35
36using namespace gsdlInterface;
37
38class corbaproto : public recptproto {
39 private:
40 corbaiface_var getCorbaClient();
41 protected:
42 collectservermapclass cservers;
43 corbaiface_var client;
44 //CORBA::ORB_var orb;
45 //CORBA::BOA_var boa;
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
60 void configure (const text_t &key, const text_tarray &cfgline, comerror_t &err);
61
62 // this init will init each of the collection servers
63 bool init (comerror_t &err,ostream &logout);
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
71 text_t get_site_name (comerror_t &err);
72
73 text_t get_protocol_name (comerror_t &err);
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);
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
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
Note: See TracBrowser for help on using the repository browser.