source: branches/corba/gsdl/src/recpt/corbaclient.mpp@ 1068

Last change on this file since 1068 was 1068, checked in by cs025, 24 years ago

First corba additions: new files

  • Property svn:keywords set to Author Date Id Revision
File size: 3.9 KB
Line 
1/**********************************************************************
2 *
3 * corbaclient.cpp --
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 * $Id: corbaclient.mpp 1068 2000-04-04 15:11:31Z cs025 $
25 *
26 *********************************************************************/
27
28#include "receptionist.h"
29#include "cgiwrapper.h"
30#include "corbaproto.h"
31#include "collectserver.h"
32#include "filter.h"
33#include "browsefilter.h"
34#include "queryfilter.h"
35#include "infodbclass.h"
36#include "mgsearch.h"
37#include "mggdbmsource.h"
38#include "fileutil.h"
39#include <assert.h>
40
41#include "action.h"
42#include "statusaction.h"
43#include "pageaction.h"
44#include "pingaction.h"
45#include "queryaction.h"
46#include "documentaction.h"
47#include "authenaction.h"
48#include "usersaction.h"
49#include "authenaction.h"
50#include "extlinkaction.h"
51#include "buildaction.h"
52
53#include "browserclass.h"
54#include "vlistbrowserclass.h"
55#include "hlistbrowserclass.h"
56#include "datelistbrowserclass.h"
57#include "invbrowserclass.h"
58#include "pagedbrowserclass.h"
59#include "htmlbrowserclass.h"
60
61#include "gsdlhome.h"
62
63int main () {
64 receptionist recpt;
65 corbaproto nproto;
66
67// cout << "GRB 0" << endl;
68
69 // add the protocol to the receptionist
70 recpt.add_protocol (&nproto);
71
72// cout << "GRB 1" << endl;
73
74 // add other converters
75 utf8inconvertclass utf8inconvert;
76 utf8outconvertclass utf8outconvert;
77 recpt.add_converter ("u", &utf8inconvert, &utf8outconvert);
78
79 mapinconvertclass gbinconvert;
80 gbinconvert.setmapfile (GSDL_GSDLHOME, "gbku", 0x25a1);
81 mapoutconvertclass gboutconvert;
82 gboutconvert.setmapfile (GSDL_GSDLHOME, "ugbk", 0xa1f5);
83 recpt.add_converter ("g", &gbinconvert, &gboutconvert);
84
85// cout << "GRB 2" << endl;
86
87 // the list of actions. Note: these actions will become invalid
88 // at the end of this function.
89 statusaction astatusaction;
90 astatusaction.set_receptionist (&recpt);
91 recpt.add_action (&astatusaction);
92
93 pageaction apageaction;
94 recpt.add_action (&apageaction);
95
96 pingaction apingaction;
97 recpt.add_action (&apingaction);
98
99 queryaction aqueryaction;
100 recpt.add_action (&aqueryaction);
101
102 documentaction adocumentaction;
103 recpt.add_action (&adocumentaction);
104
105 usersaction ausersaction;
106 recpt.add_action (&ausersaction);
107
108 extlinkaction anextlinkaction;
109 recpt.add_action (&anextlinkaction);
110
111 buildaction abuildaction;
112 recpt.add_action (&abuildaction);
113
114 authenaction aauthenaction;
115 aauthenaction.set_receptionist(&recpt);
116 recpt.add_action (&aauthenaction);
117
118// cout << "GRB 3" << endl;
119
120 // list of browsers
121 vlistbrowserclass avlistbrowserclass;
122 recpt.add_browser (&avlistbrowserclass);
123 recpt.setdefaultbrowser ("VList");
124
125 hlistbrowserclass ahlistbrowserclass;
126 recpt.add_browser (&ahlistbrowserclass);
127
128 datelistbrowserclass adatelistbrowserclass;
129 recpt.add_browser (&adatelistbrowserclass);
130
131 invbrowserclass ainvbrowserclass;
132 recpt.add_browser (&ainvbrowserclass);
133
134 pagedbrowserclass apagedbrowserclass;
135 recpt.add_browser (&apagedbrowserclass);
136
137 htmlbrowserclass ahtmlbrowserclass;
138 recpt.add_browser (&ahtmlbrowserclass);
139
140// cout << "GRB 4" << endl;
141
142 cgiwrapper (recpt, "");
143
144 // cout << "TEST" << endl;
145 return 0;
146}
147
Note: See TracBrowser for help on using the repository browser.