Ignore:
Timestamp:
2000-08-03T17:21:26+12:00 (24 years ago)
Author:
jrm21
Message:

merged z39.50 receptionist stuff into main trunk (along with the mgpp stuff)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/cgiwrapper.cpp

    r1308 r1347  
    376376  recptprotolistclass::iterator rprotolist_here = protos->begin();
    377377  recptprotolistclass::iterator rprotolist_end = protos->end();
     378
     379  bool is_z3950 = false;
    378380  bool found_valid_col = false;
     381
    379382  while (rprotolist_here != rprotolist_end) {
    380     if ((*rprotolist_here).p != NULL) {
    381 
    382       text_tarray collist;
    383       comerror_t err;
    384       (*rprotolist_here).p->get_collection_list (collist, err, cerr);
    385       if (err == noError) {
    386     text_tarray::iterator collist_here = collist.begin();
    387     text_tarray::iterator collist_end = collist.end();
    388 
    389     while (collist_here != collist_end) {
     383    if ((*rprotolist_here).p == NULL) continue;
     384    else if (is_z3950==false &&
     385         (*rprotolist_here).p->get_protocol_name() == "z3950proto") {
     386      cout << "\nZ39.50 Servers:   (always public)\n"
     387       << "---------------\n";
     388      is_z3950=true;
     389    }
     390
     391    text_tarray collist;
     392    comerror_t err;
     393    (*rprotolist_here).p->get_collection_list (collist, err, cerr);
     394    if (err == noError) {
     395      text_tarray::iterator collist_here = collist.begin();
     396      text_tarray::iterator collist_end = collist.end();
     397     
     398      while (collist_here != collist_end) {
     399   
     400    cout << text_t2ascii << *collist_here;
     401   
     402    int spaces = (22 - (*collist_here).size());
     403    if (spaces < 2) spaces = 2;
     404    text_t outspaces;
     405    for (int i = 0; i < spaces; i++) outspaces.push_back (' ');
     406    cout << text_t2ascii << outspaces;
     407   
     408    ColInfoResponse_t cinfo;
     409    (*rprotolist_here).p->get_collectinfo (*collist_here, cinfo, err, cerr);
     410    if (err == noError && is_z3950 == false) {
     411      if (cinfo.isPublic) cout << "public ";
     412      else cout << "private";
    390413     
     414      if (cinfo.buildDate > 0) cout << "   running    ";
     415      else cout << "   not running";
    391416      cout << text_t2ascii << *collist_here;
    392417
     
    414439      collist_here ++;
    415440    }
     441   
     442    cout << "\n";
     443   
     444    collist_here ++;
    416445      }
    417446    }
     447    is_z3950=false;
    418448    rprotolist_here ++;
    419   }
     449  } // end of while loop
    420450 
    421451  if (!found_valid_col) {
Note: See TracChangeset for help on using the changeset viewer.