Changeset 2113 for trunk/gsdl/src/recpt


Ignore:
Timestamp:
2001-03-05T13:54:26+13:00 (23 years ago)
Author:
say1
Message:

integrated the new mico package. updated corba to 2.3.7. fixed the c++ corba code. added error messages in the first few calls in the corba protocol. misc corba fixes

Location:
trunk/gsdl/src/recpt
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/Makefile.in

    r1937 r2113  
    8686MCOMPILE = mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
    8787MLINK = mico-ld -static $(LDFLAGS) $(MICO_LIB) -o  $@
    88 MLIBS = $(LIBS) -lmico2.2.7                
     88MLIBS = $(LIBS) -L../../lib/ -lmico2.3.5 -lmicoaux2.3.5         
    8989
    9090.SUFFIXES:
     
    328328
    329329corbaserver: $(RECPTLIB_OBJS)
     330    echo -e building corbaserver
    330331    $(MLINK) $(RECPTLIB_OBJS) $(MLIBS)
    331332
     
    335336ifneq ($(USE_FASTCGI), 1)
    336337CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \
     338    ../../lib/corbaiface.o \
     339    ../../lib/corbaconv_text_t.o \
     340    ../../lib/corbatext_t.o \
    337341    ../../lib/gsdllib.a  \
    338342    ../../packages/mg/src/text/libtextin.a \
     
    342346else
    343347CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \
     348    ../../lib/corbaiface.o \
     349    ../../lib/corbaconv_text_t.o \
     350    ../../lib/corbatext_t.o \
    344351    ../../lib/gsdllib.a  \
    345352    ../../packages/mg/src/text/libtextin.a \
     
    351358
    352359corbarecptldd: $(CORBARECPT_OBJS)
    353     $(MLINK) $(CORBARECPT_OBJS) $(MLIBS)
     360    echo -e building corbarecptldd:
     361    $(MLINK)  $(CORBARECPT_OBJS)  $(MLIBS)
    354362
    355363test:
  • trunk/gsdl/src/recpt/cgiwrapper.cpp

    r1864 r2113  
    380380  bool found_valid_col = false;
    381381
     382
    382383  while (rprotolist_here != rprotolist_end) {
     384    comerror_t err;   
    383385    if ((*rprotolist_here).p == NULL) continue;
    384386    else if (is_z3950==false &&
    385          (*rprotolist_here).p->get_protocol_name() == "z3950proto") {
     387         (*rprotolist_here).p->get_protocol_name(err) == "z3950proto") {
    386388      cout << "\nZ39.50 Servers:   (always public)\n"
    387389       << "---------------\n";
     
    390392
    391393    text_tarray collist;
    392     comerror_t err;
    393394    (*rprotolist_here).p->get_collection_list (collist, err, cerr);
    394395    if (err == noError) {
  • trunk/gsdl/src/recpt/collectoraction.cpp

    r2112 r2113  
    676676
    677677      // 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") {
    679680    rprotolist_here ++;
    680681    continue;
     
    682683
    683684      text_tarray collist;
    684       comerror_t err;
    685685      (*rprotolist_here).p->get_collection_list (collist, err, logout);
    686686      if (err == noError) {
     
    15761576  recptprotolistclass::iterator rprotolist_end = protos->end();
    15771577  while (rprotolist_here != rprotolist_end) {
     1578    comerror_t err;
    15781579    if ((*rprotolist_here).p != NULL) {
    1579       if ((*rprotolist_here).p->get_protocol_name () == "nullproto") {
     1580      if ((*rprotolist_here).p->get_protocol_name (err) == "nullproto") {
    15801581    // create collection server and add it to nullproto
    15811582    (*rprotolist_here).p->add_collection (collection, recpt, gsdlhome, gsdlhome);
     
    15831584    text_tarray tmp;
    15841585    tmp.push_back (gsdlhome);
    1585     (*rprotolist_here).p->configure ("gsdlhome", tmp);
     1586    (*rprotolist_here).p->configure ("gsdlhome", tmp, err);
    15861587    // re-initialize the null protocol
    1587     if (!(*rprotolist_here).p->init (logout)) {
     1588    if (!(*rprotolist_here).p->init (err, logout)) {
    15881589      logout << "collectoraction::create_colserver: nullproto init failed\n";
    15891590    }
     
    16041605  recptprotolistclass::iterator rprotolist_end = protos->end();
    16051606  while (rprotolist_here != rprotolist_end) {
     1607    comerror_t err;
    16061608    if ((*rprotolist_here).p != NULL) {
    1607       if ((*rprotolist_here).p->get_protocol_name () == "nullproto") {
     1609      if ((*rprotolist_here).p->get_protocol_name (err) == "nullproto") {
    16081610    (*rprotolist_here).p->remove_collection (collection, logout);
    16091611    return;
  • trunk/gsdl/src/recpt/corbaclient.mpp

    r1982 r2113  
    4949#include "authenaction.h"
    5050#include "extlinkaction.h"
    51 #include "delhistoryaction.h"
    5251#include "tipaction.h"
    5352#include "collectoraction.h"
     
    126125  recpt.add_action (&aauthenaction);
    127126
    128   delhistoryaction adelhistoryaction;
    129   recpt.add_action(&adelhistoryaction);
    130 
    131127  collectoraction acollectoraction;
    132128  acollectoraction.set_receptionist (&recpt);
  • trunk/gsdl/src/recpt/corbaproto.h

    r1860 r2113  
    5656
    5757  // 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);
    5959
    6060  // this init will init each of the collection servers
    61   bool init (ostream &logout);
     61  bool init (comerror_t &err,ostream &logout);
    6262
    6363  // used to check for icons and retrieve them from the collection
     
    6767                text_t& httpprefix);
    6868
    69   text_t get_site_name ();
     69  text_t get_site_name (comerror_t &err);
    7070
    71   text_t get_protocol_name ();
     71  text_t get_protocol_name (comerror_t &err);
    7272  void get_collection_list (text_tarray &collist, comerror_t &err,
    7373                ostream &logout);
  • trunk/gsdl/src/recpt/corbaproto.mpp

    r1983 r2113  
    369369
    370370// this configure will configure each of the collection servers
    371 void corbaproto::configure (const text_t &key, const text_tarray &cfgline) {
     371void corbaproto::configure (const text_t &key, const text_tarray &cfgline,
     372                comerror_t &err) {
    372373  // the naming of the collection should not be done here,
    373374  // it should be done just after the collection server has been
     
    399400
    400401// this init will configure and init each of the collection servers
    401 bool corbaproto::init (ostream &logout) {
     402bool corbaproto::init (comerror_t &err, ostream &logout) {
    402403//  cout << "Corbaproto::Init" << endl;
    403404
     
    478479}
    479480
    480 text_t corbaproto::get_site_name () {
     481text_t corbaproto::get_site_name (comerror_t &err) {
    481482  return site_name;
    482483}
    483484
    484 text_t corbaproto::get_protocol_name () {
     485text_t corbaproto::get_protocol_name (comerror_t &err) {
    485486  return "corbaproto";
    486487}
     
    700701  // convert the response back to normal form
    701702  response.numDocs = corbaResponse.numDocs;
    702   response.isApprox = corbaResponse.isApprox;
     703  response.isApprox = (enum isapprox) corbaResponse.isApprox;
    703704  corbaresponse_resultDocInfoToC(corbaResponse.docInfo, response.docInfo);
    704705
  • trunk/gsdl/src/recpt/documentaction.cpp

    r2020 r2113  
    579579    metadata.insert ("archivedir");
    580580
     581    comerror_t err;
    581582    OptionValue_tarray options;
    582583    // 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") {
    584585      OptionValue_t opt;
    585586      opt.name="Query";
  • trunk/gsdl/src/recpt/nullproto.cpp

    r1892 r2113  
    6464
    6565// this configure will configure each of the collection servers
    66 void nullproto::configure (const text_t &key, const text_tarray &cfgline) {
     66void nullproto::configure (const text_t &key, const text_tarray &cfgline,
     67               comerror_t &err) {
    6768  // the naming of the collection should not be done here,
    6869  // it should be done just after the collection server has been
     
    7778
    7879// this init will configure and init each of the collection servers
    79 bool nullproto::init (ostream &logout) {
     80bool nullproto::init (comerror_t &err, ostream &logout) {
    8081  return cset->init(logout);
    8182}
    8283
    83 text_t nullproto::get_site_name () {
    84   return "";
     84text_t nullproto::get_site_name (comerror_t &err) {
     85  return "localhost";
    8586}
    8687
    87 text_t nullproto::get_protocol_name () {
     88text_t nullproto::get_protocol_name (comerror_t &err) {
    8889  return "nullproto";
    8990}
  • trunk/gsdl/src/recpt/nullproto.h

    r1892 r2113  
    5555
    5656  // 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);
    5859
    5960  // this init will init each of the collection servers
    60   bool init (ostream &logout);
     61  bool init (comerror_t &err, ostream &logout);
    6162
    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);
    6465
    6566  void get_collection_list (text_tarray &collist, comerror_t &err,
  • trunk/gsdl/src/recpt/pageaction.cpp

    r2105 r2113  
    164164        homeextra += "</tr><tr valign=top>\n";
    165165         
     166          comerror_t err;
    166167          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);
    168169          if (!site_name.empty()) { optsite = "site="+site_name+"&"; }
    169170
  • trunk/gsdl/src/recpt/receptionist.cpp

    r1927 r2113  
    359359  while (protohere != protoend) {
    360360    assert ((*protohere).p != NULL);
     361    comerror_t err;
    361362    if ((*protohere).p != NULL)
    362       (*protohere).p->configure(key, cfgline);
     363      (*protohere).p->configure(key, cfgline, err);
    363364   
    364365    protohere++;
     
    472473  recptprotolistclass::iterator protoend = protocols.end ();
    473474  while (protohere != protoend) {
     475    comerror_t err;   
    474476    if (((*protohere).p == NULL) ||
    475     !(*protohere).p->init(logout)) return false;
     477    !(*protohere).p->init(err, logout)) return false;
    476478    protohere++;
    477479  }
  • trunk/gsdl/src/recpt/recptproto.cpp

    r1860 r2113  
    3737
    3838// configure should be called for each line in the configuration file
    39 void recptproto::configure (const text_t &/*key*/, const text_tarray &/*cfgline*/) {
     39void recptproto::configure (const text_t &/*key*/, const text_tarray &/*cfgline*/, comerror_t &) {
    4040}
    4141
     
    4343// functions are called. If init returns false a message will be written
    4444// out to the log file and no other output should be produced.
    45 bool recptproto::init (ostream &/*logout*/) {
     45bool recptproto::init (comerror_t &err, ostream &/*logout*/) {
    4646  return true;
    4747}
     
    5151// connection to a site is being used then this should return the name
    5252// used to label a site
    53 text_t recptproto::get_site_name() {
    54   return "";
     53text_t recptproto::get_site_name(comerror_t &err) {
     54  return "localhost";
    5555}
    5656
     
    5858// that can be used to do run time type identification and display information
    5959// about the protocol.
    60 text_t recptproto::get_protocol_name () {
     60text_t recptproto::get_protocol_name (comerror_t &err) {
    6161  return "recptproto";
    6262}
  • trunk/gsdl/src/recpt/recptproto.h

    r1860 r2113  
    6161
    6262  // 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);
    6464
    6565  // init should be called after the configuration but before any other
    6666  // functions are called. If init returns false a message will be written
    6767  // 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);
    6969
    7070  // get_site_name should return the name of the site used.
     
    7272  // connection to a site is being used then this should return the name
    7373  // used to label a site
    74   virtual text_t get_site_name();
     74  virtual text_t get_site_name(comerror_t &err);
    7575
    7676  // get_protocol_name should return the name of this protocol (e.g. recptproto)
    7777  // that can be used to do run time type identification and display information
    7878  // about the protocol.
    79   virtual text_t get_protocol_name ();
     79  virtual text_t get_protocol_name (comerror_t &err);
    8080
    8181  // get_collection_list returns the list of collections that
  • trunk/gsdl/src/recpt/statusaction.cpp

    r1860 r2113  
    6262  while (rprotolist_here != rprotolist_end) {
    6363    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);
    6566      text_tarray collist;
    66       comerror_t err;
    6767      (*rprotolist_here).p->get_collection_list (collist, err, logout);
    6868      if (err == noError) {
     
    263263    bool protofirst = true;
    264264    while (protohere != protoend) {
     265      comerror_t err;
    265266      if (!protofirst) textout << outconvert << ", ";
    266267      protofirst = false;
    267268      if ((*protohere).p != NULL) {
    268     textout << outconvert << "\"" << (*protohere).p->get_protocol_name() << "\"";
     269    textout << outconvert << "\"" << (*protohere).p->get_protocol_name(err) << "\"";
    269270      }
    270271      protohere++;
     
    452453  while (rprotolist_here != rprotolist_end) {
    453454    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);
    455457      textout << outconvert
    456458          << "<tr><td>"
     
    459461
    460462      text_tarray collist;
    461       comerror_t err;
    462463      (*rprotolist_here).p->get_collection_list (collist, err, logout);
    463464      if (err == noError) {
     
    527528  while (rprotolist_here != rprotolist_end) {
    528529    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) {
    530532      // see if the protocol has the collection
    531533      bool hascollection;
    532       comerror_t err;
    533534      rproto->has_collection (arg_c, hascollection, err, logout);
    534535      if (err == noError && hascollection) break;
Note: See TracChangeset for help on using the changeset viewer.