Changeset 2113 for trunk/gsdl/src/recpt
- Timestamp:
- 2001-03-05T13:54:26+13:00 (23 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/Makefile.in
r1937 r2113 86 86 MCOMPILE = mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c 87 87 MLINK = mico-ld -static $(LDFLAGS) $(MICO_LIB) -o $@ 88 MLIBS = $(LIBS) - lmico2.2.788 MLIBS = $(LIBS) -L../../lib/ -lmico2.3.5 -lmicoaux2.3.5 89 89 90 90 .SUFFIXES: … … 328 328 329 329 corbaserver: $(RECPTLIB_OBJS) 330 echo -e building corbaserver 330 331 $(MLINK) $(RECPTLIB_OBJS) $(MLIBS) 331 332 … … 335 336 ifneq ($(USE_FASTCGI), 1) 336 337 CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \ 338 ../../lib/corbaiface.o \ 339 ../../lib/corbaconv_text_t.o \ 340 ../../lib/corbatext_t.o \ 337 341 ../../lib/gsdllib.a \ 338 342 ../../packages/mg/src/text/libtextin.a \ … … 342 346 else 343 347 CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \ 348 ../../lib/corbaiface.o \ 349 ../../lib/corbaconv_text_t.o \ 350 ../../lib/corbatext_t.o \ 344 351 ../../lib/gsdllib.a \ 345 352 ../../packages/mg/src/text/libtextin.a \ … … 351 358 352 359 corbarecptldd: $(CORBARECPT_OBJS) 353 $(MLINK) $(CORBARECPT_OBJS) $(MLIBS) 360 echo -e building corbarecptldd: 361 $(MLINK) $(CORBARECPT_OBJS) $(MLIBS) 354 362 355 363 test: -
trunk/gsdl/src/recpt/cgiwrapper.cpp
r1864 r2113 380 380 bool found_valid_col = false; 381 381 382 382 383 while (rprotolist_here != rprotolist_end) { 384 comerror_t err; 383 385 if ((*rprotolist_here).p == NULL) continue; 384 386 else if (is_z3950==false && 385 (*rprotolist_here).p->get_protocol_name( ) == "z3950proto") {387 (*rprotolist_here).p->get_protocol_name(err) == "z3950proto") { 386 388 cout << "\nZ39.50 Servers: (always public)\n" 387 389 << "---------------\n"; … … 390 392 391 393 text_tarray collist; 392 comerror_t err;393 394 (*rprotolist_here).p->get_collection_list (collist, err, cerr); 394 395 if (err == noError) { -
trunk/gsdl/src/recpt/collectoraction.cpp
r2112 r2113 676 676 677 677 // don't include z39.50 collection 678 if ((*rprotolist_here).p->get_protocol_name () == "z3950proto") { 678 comerror_t err; 679 if ((*rprotolist_here).p->get_protocol_name (err) == "z3950proto") { 679 680 rprotolist_here ++; 680 681 continue; … … 682 683 683 684 text_tarray collist; 684 comerror_t err;685 685 (*rprotolist_here).p->get_collection_list (collist, err, logout); 686 686 if (err == noError) { … … 1576 1576 recptprotolistclass::iterator rprotolist_end = protos->end(); 1577 1577 while (rprotolist_here != rprotolist_end) { 1578 comerror_t err; 1578 1579 if ((*rprotolist_here).p != NULL) { 1579 if ((*rprotolist_here).p->get_protocol_name ( ) == "nullproto") {1580 if ((*rprotolist_here).p->get_protocol_name (err) == "nullproto") { 1580 1581 // create collection server and add it to nullproto 1581 1582 (*rprotolist_here).p->add_collection (collection, recpt, gsdlhome, gsdlhome); … … 1583 1584 text_tarray tmp; 1584 1585 tmp.push_back (gsdlhome); 1585 (*rprotolist_here).p->configure ("gsdlhome", tmp );1586 (*rprotolist_here).p->configure ("gsdlhome", tmp, err); 1586 1587 // re-initialize the null protocol 1587 if (!(*rprotolist_here).p->init ( logout)) {1588 if (!(*rprotolist_here).p->init (err, logout)) { 1588 1589 logout << "collectoraction::create_colserver: nullproto init failed\n"; 1589 1590 } … … 1604 1605 recptprotolistclass::iterator rprotolist_end = protos->end(); 1605 1606 while (rprotolist_here != rprotolist_end) { 1607 comerror_t err; 1606 1608 if ((*rprotolist_here).p != NULL) { 1607 if ((*rprotolist_here).p->get_protocol_name ( ) == "nullproto") {1609 if ((*rprotolist_here).p->get_protocol_name (err) == "nullproto") { 1608 1610 (*rprotolist_here).p->remove_collection (collection, logout); 1609 1611 return; -
trunk/gsdl/src/recpt/corbaclient.mpp
r1982 r2113 49 49 #include "authenaction.h" 50 50 #include "extlinkaction.h" 51 #include "delhistoryaction.h"52 51 #include "tipaction.h" 53 52 #include "collectoraction.h" … … 126 125 recpt.add_action (&aauthenaction); 127 126 128 delhistoryaction adelhistoryaction;129 recpt.add_action(&adelhistoryaction);130 131 127 collectoraction acollectoraction; 132 128 acollectoraction.set_receptionist (&recpt); -
trunk/gsdl/src/recpt/corbaproto.h
r1860 r2113 56 56 57 57 // this configure will configure each of the collection servers 58 void configure (const text_t &key, const text_tarray &cfgline );58 void configure (const text_t &key, const text_tarray &cfgline, comerror_t &err); 59 59 60 60 // this init will init each of the collection servers 61 bool init ( ostream &logout);61 bool init (comerror_t &err,ostream &logout); 62 62 63 63 // used to check for icons and retrieve them from the collection … … 67 67 text_t& httpprefix); 68 68 69 text_t get_site_name ( );69 text_t get_site_name (comerror_t &err); 70 70 71 text_t get_protocol_name ( );71 text_t get_protocol_name (comerror_t &err); 72 72 void get_collection_list (text_tarray &collist, comerror_t &err, 73 73 ostream &logout); -
trunk/gsdl/src/recpt/corbaproto.mpp
r1983 r2113 369 369 370 370 // this configure will configure each of the collection servers 371 void corbaproto::configure (const text_t &key, const text_tarray &cfgline) { 371 void corbaproto::configure (const text_t &key, const text_tarray &cfgline, 372 comerror_t &err) { 372 373 // the naming of the collection should not be done here, 373 374 // it should be done just after the collection server has been … … 399 400 400 401 // this init will configure and init each of the collection servers 401 bool corbaproto::init ( ostream &logout) {402 bool corbaproto::init (comerror_t &err, ostream &logout) { 402 403 // cout << "Corbaproto::Init" << endl; 403 404 … … 478 479 } 479 480 480 text_t corbaproto::get_site_name ( ) {481 text_t corbaproto::get_site_name (comerror_t &err) { 481 482 return site_name; 482 483 } 483 484 484 text_t corbaproto::get_protocol_name ( ) {485 text_t corbaproto::get_protocol_name (comerror_t &err) { 485 486 return "corbaproto"; 486 487 } … … 700 701 // convert the response back to normal form 701 702 response.numDocs = corbaResponse.numDocs; 702 response.isApprox = corbaResponse.isApprox;703 response.isApprox = (enum isapprox) corbaResponse.isApprox; 703 704 corbaresponse_resultDocInfoToC(corbaResponse.docInfo, response.docInfo); 704 705 -
trunk/gsdl/src/recpt/documentaction.cpp
r2020 r2113 579 579 metadata.insert ("archivedir"); 580 580 581 comerror_t err; 581 582 OptionValue_tarray options; 582 583 // we need to know what the query was for the z3950proto 583 if (collectproto->get_protocol_name( )=="z3950proto") {584 if (collectproto->get_protocol_name(err)=="z3950proto") { 584 585 OptionValue_t opt; 585 586 opt.name="Query"; -
trunk/gsdl/src/recpt/nullproto.cpp
r1892 r2113 64 64 65 65 // this configure will configure each of the collection servers 66 void nullproto::configure (const text_t &key, const text_tarray &cfgline) { 66 void nullproto::configure (const text_t &key, const text_tarray &cfgline, 67 comerror_t &err) { 67 68 // the naming of the collection should not be done here, 68 69 // it should be done just after the collection server has been … … 77 78 78 79 // this init will configure and init each of the collection servers 79 bool nullproto::init ( ostream &logout) {80 bool nullproto::init (comerror_t &err, ostream &logout) { 80 81 return cset->init(logout); 81 82 } 82 83 83 text_t nullproto::get_site_name ( ) {84 return " ";84 text_t nullproto::get_site_name (comerror_t &err) { 85 return "localhost"; 85 86 } 86 87 87 text_t nullproto::get_protocol_name ( ) {88 text_t nullproto::get_protocol_name (comerror_t &err) { 88 89 return "nullproto"; 89 90 } -
trunk/gsdl/src/recpt/nullproto.h
r1892 r2113 55 55 56 56 // this configure will configure each of the collection servers 57 void configure (const text_t &key, const text_tarray &cfgline); 57 void configure (const text_t &key, const text_tarray &cfgline, 58 comerror_t &err); 58 59 59 60 // this init will init each of the collection servers 60 bool init ( ostream &logout);61 bool init (comerror_t &err, ostream &logout); 61 62 62 text_t get_protocol_name ( );63 text_t get_site_name ( );63 text_t get_protocol_name (comerror_t &err); 64 text_t get_site_name (comerror_t &err); 64 65 65 66 void get_collection_list (text_tarray &collist, comerror_t &err, -
trunk/gsdl/src/recpt/pageaction.cpp
r2105 r2113 164 164 homeextra += "</tr><tr valign=top>\n"; 165 165 166 comerror_t err; 166 167 text_t optsite = ""; 167 text_t site_name = (*rprotolist_here).p->get_site_name ( );168 text_t site_name = (*rprotolist_here).p->get_site_name (err); 168 169 if (!site_name.empty()) { optsite = "site="+site_name+"&"; } 169 170 -
trunk/gsdl/src/recpt/receptionist.cpp
r1927 r2113 359 359 while (protohere != protoend) { 360 360 assert ((*protohere).p != NULL); 361 comerror_t err; 361 362 if ((*protohere).p != NULL) 362 (*protohere).p->configure(key, cfgline );363 (*protohere).p->configure(key, cfgline, err); 363 364 364 365 protohere++; … … 472 473 recptprotolistclass::iterator protoend = protocols.end (); 473 474 while (protohere != protoend) { 475 comerror_t err; 474 476 if (((*protohere).p == NULL) || 475 !(*protohere).p->init( logout)) return false;477 !(*protohere).p->init(err, logout)) return false; 476 478 protohere++; 477 479 } -
trunk/gsdl/src/recpt/recptproto.cpp
r1860 r2113 37 37 38 38 // configure should be called for each line in the configuration file 39 void recptproto::configure (const text_t &/*key*/, const text_tarray &/*cfgline*/ ) {39 void recptproto::configure (const text_t &/*key*/, const text_tarray &/*cfgline*/, comerror_t &) { 40 40 } 41 41 … … 43 43 // functions are called. If init returns false a message will be written 44 44 // out to the log file and no other output should be produced. 45 bool recptproto::init ( ostream &/*logout*/) {45 bool recptproto::init (comerror_t &err, ostream &/*logout*/) { 46 46 return true; 47 47 } … … 51 51 // connection to a site is being used then this should return the name 52 52 // used to label a site 53 text_t recptproto::get_site_name( ) {54 return " ";53 text_t recptproto::get_site_name(comerror_t &err) { 54 return "localhost"; 55 55 } 56 56 … … 58 58 // that can be used to do run time type identification and display information 59 59 // about the protocol. 60 text_t recptproto::get_protocol_name ( ) {60 text_t recptproto::get_protocol_name (comerror_t &err) { 61 61 return "recptproto"; 62 62 } -
trunk/gsdl/src/recpt/recptproto.h
r1860 r2113 61 61 62 62 // configure should be called for each line in the configuration file 63 virtual void configure (const text_t &key, const text_tarray &cfgline );63 virtual void configure (const text_t &key, const text_tarray &cfgline, comerror_t &err); 64 64 65 65 // init should be called after the configuration but before any other 66 66 // functions are called. If init returns false a message will be written 67 67 // out to the log file and no other output should be produced. 68 virtual bool init ( ostream &logout);68 virtual bool init (comerror_t &err, ostream &logout); 69 69 70 70 // get_site_name should return the name of the site used. … … 72 72 // connection to a site is being used then this should return the name 73 73 // used to label a site 74 virtual text_t get_site_name( );74 virtual text_t get_site_name(comerror_t &err); 75 75 76 76 // get_protocol_name should return the name of this protocol (e.g. recptproto) 77 77 // that can be used to do run time type identification and display information 78 78 // about the protocol. 79 virtual text_t get_protocol_name ( );79 virtual text_t get_protocol_name (comerror_t &err); 80 80 81 81 // get_collection_list returns the list of collections that -
trunk/gsdl/src/recpt/statusaction.cpp
r1860 r2113 62 62 while (rprotolist_here != rprotolist_end) { 63 63 if ((*rprotolist_here).p != NULL) { 64 text_t protoname = (*rprotolist_here).p->get_protocol_name(); 64 comerror_t err; 65 text_t protoname = (*rprotolist_here).p->get_protocol_name(err); 65 66 text_tarray collist; 66 comerror_t err;67 67 (*rprotolist_here).p->get_collection_list (collist, err, logout); 68 68 if (err == noError) { … … 263 263 bool protofirst = true; 264 264 while (protohere != protoend) { 265 comerror_t err; 265 266 if (!protofirst) textout << outconvert << ", "; 266 267 protofirst = false; 267 268 if ((*protohere).p != NULL) { 268 textout << outconvert << "\"" << (*protohere).p->get_protocol_name( ) << "\"";269 textout << outconvert << "\"" << (*protohere).p->get_protocol_name(err) << "\""; 269 270 } 270 271 protohere++; … … 452 453 while (rprotolist_here != rprotolist_end) { 453 454 if ((*rprotolist_here).p != NULL) { 454 protoname = (*rprotolist_here).p->get_protocol_name(); 455 comerror_t err; 456 protoname = (*rprotolist_here).p->get_protocol_name(err); 455 457 textout << outconvert 456 458 << "<tr><td>" … … 459 461 460 462 text_tarray collist; 461 comerror_t err;462 463 (*rprotolist_here).p->get_collection_list (collist, err, logout); 463 464 if (err == noError) { … … 527 528 while (rprotolist_here != rprotolist_end) { 528 529 rproto = (*rprotolist_here).p; 529 if (rproto != NULL && rproto->get_protocol_name() == arg_pr) { 530 comerror_t err; 531 if (rproto != NULL && rproto->get_protocol_name(err) == arg_pr) { 530 532 // see if the protocol has the collection 531 533 bool hascollection; 532 comerror_t err;533 534 rproto->has_collection (arg_c, hascollection, err, logout); 534 535 if (err == noError && hascollection) break;
Note:
See TracChangeset
for help on using the changeset viewer.