- Timestamp:
- 2000-07-13T10:21:53+12:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/New_Config_Format-branch/gsdl/src/recpt/librarymain.cpp
r994 r1279 28 28 /* 29 29 $Log$ 30 Revision 1.24.4.1 2000/07/12 22:21:41 sjboddie 31 merged changes to trunk into New_Config_Format branch 32 33 Revision 1.28 2000/07/05 21:49:32 sjboddie 34 Receptionist now caches collection information to avoid making multiple 35 get_collectinfo calls to collection server 36 37 Revision 1.27 2000/06/23 03:21:39 sjboddie 38 Created converter classes for simple 8 bit encodings that use a 39 simple textual map file. Instances of these classes are used to handle 40 the Windows 1256 (Arabic) encoding. 41 42 Revision 1.26 2000/05/29 03:30:03 sjboddie 43 fixed a bug preventing GB encoded text from being displayed correctly 44 (bug showed up in Chinese collection) 45 46 Revision 1.25 2000/04/14 02:52:05 sjboddie 47 tidied up error messaging and set up some debugging info to be output 48 when running library from command line 49 30 50 Revision 1.24 2000/02/29 20:59:02 sjboddie 31 51 added error message when unable to read from collect directory - should … … 132 152 #include "authenaction.h" 133 153 #include "usersaction.h" 134 #include "authenaction.h"135 154 #include "extlinkaction.h" 136 155 #include "buildaction.h" … … 152 171 text_tarray collections; 153 172 154 // get gsdlhome (if we fail the error will be picked up later -- in 155 // cgiwrapper) 173 // get gsdlhome 156 174 text_t gsdlhome; 157 if (site_cfg_read (gsdlhome)) { 158 text_t collectdir = filename_cat (gsdlhome, "collect"); 159 if (!read_dir (collectdir, collections)) { 160 cerr << "couldn't read collect directory - make sure gsdlhome field is correct in gsdlsite.cfg\n"; 161 exit (1); 162 } 163 } 175 site_cfg_read (gsdlhome); 176 text_t collectdir = filename_cat (gsdlhome, "collect"); 177 read_dir (collectdir, collections); 164 178 165 179 text_tarray::const_iterator thiscol = collections.begin(); … … 202 216 // collection name 203 217 cserver->configure ("collection", *thiscol); 204 218 219 // configure receptionist's collectinfo structure 220 text_tarray colinfo; 221 colinfo.push_back (*thiscol); 222 colinfo.push_back (gsdlhome); 223 colinfo.push_back (gsdlhome); 224 recpt.configure ("collectinfo", colinfo); 225 205 226 nproto.add_collectserver (cserver); 206 227 thiscol ++; … … 215 236 recpt.add_converter ("u", &utf8inconvert, &utf8outconvert); 216 237 217 if (!gsdlhome.empty()) { 218 mapinconvertclass gbinconvert; 219 gbinconvert.setmapfile (gsdlhome, "gbku", 0x25a1); 220 mapoutconvertclass gboutconvert; 221 gboutconvert.setmapfile (gsdlhome, "ugbk", 0xa1f5); 222 recpt.add_converter ("g", &gbinconvert, &gboutconvert); 223 } 238 mapinconvertclass gbinconvert; 239 gbinconvert.setmapfile (gsdlhome, "gbku", 0x25a1); 240 mapoutconvertclass gboutconvert; 241 gboutconvert.setmapfile (gsdlhome, "ugbk", 0xa1f5); 242 recpt.add_converter ("g", &gbinconvert, &gboutconvert); 243 244 text_t armapfile = filename_cat (gsdlhome, "unicode", "MAPPINGS"); 245 armapfile = filename_cat (armapfile, "WINDOWS", "1256.TXT"); 246 simplemapinconvertclass arinconvert; 247 arinconvert.setmapfile (armapfile); 248 simplemapoutconvertclass aroutconvert; 249 aroutconvert.setmapfile (armapfile); 250 recpt.add_converter ("a", &arinconvert, &aroutconvert); 251 224 252 225 253 // the list of actions. Note: these actions will become invalid … … 230 258 231 259 pageaction apageaction; 260 apageaction.set_receptionist (&recpt); 232 261 recpt.add_action (&apageaction); 233 262 … … 236 265 237 266 queryaction aqueryaction; 267 aqueryaction.set_receptionist (&recpt); 238 268 recpt.add_action (&aqueryaction); 239 269 240 270 documentaction adocumentaction; 271 adocumentaction.set_receptionist (&recpt); 241 272 recpt.add_action (&adocumentaction); 242 273
Note:
See TracChangeset
for help on using the changeset viewer.