Changeset 2449


Ignore:
Timestamp:
2001-05-21T12:19:16+12:00 (23 years ago)
Author:
dmm9
Message:

added get_document_list function

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

Legend:

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

    r2404 r2449  
    2525
    2626#include "browseaction.h"
     27#include "querytools.h"
     28#include "browsetools.h"
    2729
    2830browseaction::browseaction(){
     
    101103
    102104void browseaction::configure (const text_t &key, const text_tarray &cfgline){
     105  action::configure(key, cfgline);
    103106}
    104107
     
    146149  textout << outconvert << disp << "_browse:header_\n" <<"_browse:content_"
    147150      << "_browse:footer_";
     151  if(args["c"].empty()) return false;
     152  else if(get_document_list(args, protos, browsers, disp, outconvert, textout,
     153                logout)) return true;
     154  else return false;
     155}
     156
     157bool browseaction::get_document_list(cgiargsclass &args,
     158        recptprotolistclass *protos, browsermapclass *browsers,
     159        displayclass &disp, outconvertclass &outconvert,
     160        ostream &textout, ostream &logout){
     161  //cout<<"in doc list"<<endl;
     162 
     163  text_t collection = args["c"];
     164  comerror_t err;
     165
     166  //check that the protocol is alive
     167  recptproto* colproto = protos->getrecptproto (collection, logout);
     168  if(colproto == NULL) {
     169    logout << outconvert << "ERROR: Null collection protocol trying to browse "
     170       << collection << "\n";
     171    return false;
     172  }
     173 
     174  //check the collection is responding/in place
     175  ColInfoResponse_t *colinfo = recpt->get_collectinfo_ptr(colproto, collection,
     176                              logout);
     177  if(colinfo == NULL){
     178    logout << outconvert << "ERROR: Null returned for get_collectinfo_ptr on "
     179       << collection << "in browseaction\n";
     180    return false;
     181  }
    148182 
    149183  return true;
    150184}
    151185
    152 
    153 
    154 
    155 
    156 
    157 
    158 
    159 
  • trunk/gsdl/src/recpt/browseaction.h

    r2390 r2449  
    3333 protected:
    3434  receptionist* recpt;
    35 
     35  bool get_document_list(cgiargsclass &args, recptprotolistclass *protos,
     36          browsermapclass *browsers, displayclass &disp,
     37          outconvertclass &outconvert, ostream &textout,
     38          ostream &logout);
    3639 public:
    3740  browseaction();
Note: See TracChangeset for help on using the changeset viewer.