/********************************************************************** * * corbaclient.cpp -- * Copyright (C) 1999 The New Zealand Digital Library Project * * A component of the Greenstone digital library software * from the New Zealand Digital Library Project at the * University of Waikato, New Zealand. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: corbaclient.mpp 1074 2000-04-06 11:11:40Z cs025 $ * *********************************************************************/ #include "receptionist.h" #include "cgiwrapper.h" #include "corbaproto.h" #include "collectserver.h" #include "filter.h" #include "browsefilter.h" #include "queryfilter.h" #include "infodbclass.h" #include "mgsearch.h" #include "mggdbmsource.h" #include "fileutil.h" #include #include "action.h" #include "statusaction.h" #include "pageaction.h" #include "pingaction.h" #include "queryaction.h" #include "documentaction.h" #include "authenaction.h" #include "usersaction.h" #include "authenaction.h" #include "extlinkaction.h" #include "buildaction.h" #include "browserclass.h" #include "vlistbrowserclass.h" #include "hlistbrowserclass.h" #include "datelistbrowserclass.h" #include "invbrowserclass.h" #include "pagedbrowserclass.h" #include "htmlbrowserclass.h" // #include "gsdlhome.h" #include "recptconfig.h" int main () { receptionist recpt; corbaproto nproto; text_t gsdlhome; site_cfg_read(gsdlhome); // cout << "GRB 0" << endl; // add the protocol to the receptionist recpt.add_protocol (&nproto); // cout << "GRB 1" << endl; // add other converters utf8inconvertclass utf8inconvert; utf8outconvertclass utf8outconvert; recpt.add_converter ("u", &utf8inconvert, &utf8outconvert); mapinconvertclass gbinconvert; gbinconvert.setmapfile (gsdlhome, "gbku", 0x25a1); mapoutconvertclass gboutconvert; gboutconvert.setmapfile (gsdlhome, "ugbk", 0xa1f5); recpt.add_converter ("g", &gbinconvert, &gboutconvert); // cout << "GRB 2" << endl; // the list of actions. Note: these actions will become invalid // at the end of this function. statusaction astatusaction; astatusaction.set_receptionist (&recpt); recpt.add_action (&astatusaction); pageaction apageaction; recpt.add_action (&apageaction); pingaction apingaction; recpt.add_action (&apingaction); queryaction aqueryaction; recpt.add_action (&aqueryaction); documentaction adocumentaction; recpt.add_action (&adocumentaction); usersaction ausersaction; recpt.add_action (&ausersaction); extlinkaction anextlinkaction; recpt.add_action (&anextlinkaction); buildaction abuildaction; recpt.add_action (&abuildaction); authenaction aauthenaction; aauthenaction.set_receptionist(&recpt); recpt.add_action (&aauthenaction); // cout << "GRB 3" << endl; // list of browsers vlistbrowserclass avlistbrowserclass; recpt.add_browser (&avlistbrowserclass); recpt.setdefaultbrowser ("VList"); hlistbrowserclass ahlistbrowserclass; recpt.add_browser (&ahlistbrowserclass); datelistbrowserclass adatelistbrowserclass; recpt.add_browser (&adatelistbrowserclass); invbrowserclass ainvbrowserclass; recpt.add_browser (&ainvbrowserclass); pagedbrowserclass apagedbrowserclass; recpt.add_browser (&apagedbrowserclass); htmlbrowserclass ahtmlbrowserclass; recpt.add_browser (&ahtmlbrowserclass); cgiwrapper (recpt, ""); // cout << "TEST" << endl; return 0; }