Index: /gsdl/trunk/src/protocol/Makefile.in
===================================================================
--- /gsdl/trunk/src/protocol/Makefile.in	(revision 15450)
+++ /gsdl/trunk/src/protocol/Makefile.in	(revision 15450)
@@ -0,0 +1,63 @@
+###########################################################################
+#
+# Makefile -- src/protocol
+# A component of the Greenstone digital library software
+# from the New Zealand Digital Library Project at the
+# University of Waikato, New Zealand.
+#
+# Copyright (C) 1999-2008  The New Zealand Digital Library Project
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+###########################################################################
+
+CXX = @CXX@
+CXXFLAGS = @CXXFLAGS@
+DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER @DEFS@
+
+INDEXERS_DIR = ../../indexers
+
+# Do NOT add the "recpt" directory here: the protocol should be independent of the receptionist!
+INCLUDES = -I. -I../.. -I../../lib -I../colservr -I$(INDEXERS_DIR)/mgpp/text
+
+CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
+CXXLINK = $(CXX) $(LDFLAGS) -o $@
+
+
+.SUFFIXES:
+.SUFFIXES: .cpp .o
+.cpp.o:
+	$(CXXCOMPILE) $< 
+
+
+HEADERS = recptproto.h nullproto.h
+
+SOURCES = recptproto.cpp nullproto.cpp
+
+OBJECTS = recptproto.o nullproto.o
+
+
+all: $(OBJECTS)
+
+distclean:
+	rm -f $(OBJECTS) Makefile
+clean:
+	rm -f $(OBJECTS)
+
+install:
+
+depend:
+	makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Index: /gsdl/trunk/src/protocol/nullproto.cpp
===================================================================
--- /gsdl/trunk/src/protocol/nullproto.cpp	(revision 15450)
+++ /gsdl/trunk/src/protocol/nullproto.cpp	(revision 15450)
@@ -0,0 +1,161 @@
+/**********************************************************************
+ *
+ * nullproto.cpp -- 
+ * Copyright (C) 1999  The New Zealand Digital Library Project
+ *
+ * A component of the Greenstone digital library software
+ * from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *********************************************************************/
+
+#include "nullproto.h"
+#include <assert.h>
+
+#include "filter.h"
+#include "browsefilter.h"
+#include "mgqueryfilter.h"
+#include "mgppqueryfilter.h"
+#include "mgsearch.h"
+#include "mgppsearch.h"
+#include "fileutil.h"
+
+nullproto::nullproto() {
+  cset = NULL;
+}
+
+nullproto::~nullproto() {
+}
+
+// add collection to collectset (this should not be called until after the
+// collectset has been added to the protocol with set_collectset()
+void nullproto::add_collection (const text_t &collection, void *recpt, 
+				const text_t &gsdlhome, const text_t &gdbmhome) {      
+  
+  if (cset != NULL) {
+    this->cset->add_collection (collection, gsdlhome);
+  }
+}
+
+
+// remove_collection deletes the collection server of collection.
+// This only needs to be called if a collectionserver is to be
+// removed while the library is running. The destructor function
+// cleans up all collectservers when the program exits.
+void nullproto::remove_collection (const text_t &collection, ostream &logout) {
+  cset->remove_collection(collection, logout);
+}
+
+// this configure will configure each of the collection servers
+void nullproto::configure (const text_t &key, const text_tarray &cfgline,
+			   comerror_t &err) {
+  // the naming of the collection should not be done here,
+  // it should be done just after the collection server has been 
+  // created
+
+  // the protocol should not configure the collection set; it should be
+  // done direct to the collection server set
+  if (key == "gsdlhome" || key == "gdbmhome") {
+    cset->configure(key, cfgline);
+  }
+}
+
+// this init will configure and init each of the collection servers
+bool nullproto::init (comerror_t &err, ostream &logout) {
+  return cset->init(logout);
+}
+
+text_t nullproto::get_site_name (comerror_t &err) {
+  return "localhost";
+}
+
+text_t nullproto::get_protocol_name (comerror_t &err) {
+  return "nullproto";
+}
+
+
+void nullproto::get_collection_list (text_tarray &collist, comerror_t &err, 
+				     ostream &/*logout*/) {
+  cset->getCollectionList(collist);
+  err = noError; // no error is guaranteed - collection server shouldn't
+                 // about receptionist error states, logout is irrelevant
+}
+
+void nullproto::has_collection (const text_t &collection, bool &hascollection, 
+				comerror_t &err, ostream &/*logout*/) {
+  hascollection = (cset->getCollectServer(collection) != NULL);
+  err = noError;
+}
+
+void nullproto::ping (const text_t &collection, bool &wassuccess, 
+		      comerror_t &err, ostream &logout) {
+  collectserver *cserver = cset->getCollectServer(collection);
+  if (cserver != NULL) cserver->ping(wassuccess, err, logout);
+  else err = protocolError;
+}
+
+void nullproto::get_collectinfo (const text_t &collection, 
+				 ColInfoResponse_t &collectinfo,
+				 comerror_t &err, ostream &logout) {
+  collectserver *cserver = cset->getCollectServer (collection);
+  if (cserver != NULL) cserver->get_collectinfo (collectinfo, err, logout);
+  else err = protocolError;
+}
+
+
+void nullproto::get_filterinfo (const text_t &collection,
+				InfoFiltersResponse_t &response,
+				comerror_t &err, ostream &logout) {
+  collectserver *cserver = cset->getCollectServer (collection);
+  if (cserver != NULL) cserver->get_filterinfo (response, err, logout);
+  else err = protocolError;
+}
+
+void nullproto::get_filteroptions (const text_t &collection,
+				   const InfoFilterOptionsRequest_t &request,
+				   InfoFilterOptionsResponse_t &response, 
+				   comerror_t &err, ostream &logout) {
+  collectserver *cserver = cset->getCollectServer (collection);
+  if (cserver != NULL) cserver->get_filteroptions (request, response, err, logout);
+  else err = protocolError;
+}
+
+void nullproto::filter (const text_t &collection,
+			FilterRequest_t &request,
+			FilterResponse_t &response,
+			comerror_t &err, ostream &logout) {
+  collectserver *cserver = cset->getCollectServer (collection);
+  if (cserver != NULL) cserver->filter (request, response, err, logout);
+  else err = protocolError;
+}
+
+void nullproto::get_document (const text_t &collection,
+			      const DocumentRequest_t &request,
+			      DocumentResponse_t &response,
+			      comerror_t &err, ostream &logout) {
+  collectserver *cserver = cset->getCollectServer (collection);
+  if (cserver != NULL) cserver->get_document (request, response, err, logout);
+  else err = protocolError;
+}
+
+void nullproto::is_searchable (const text_t &collection, bool &issearchable, 
+			       comerror_t &err, ostream &logout) {
+  issearchable = false;
+  collectserver *cserver = cset->getCollectServer (collection);
+  if (cserver != NULL) cserver->is_searchable (issearchable, err, logout);
+  else err = protocolError;
+}
Index: /gsdl/trunk/src/protocol/nullproto.h
===================================================================
--- /gsdl/trunk/src/protocol/nullproto.h	(revision 15450)
+++ /gsdl/trunk/src/protocol/nullproto.h	(revision 15450)
@@ -0,0 +1,99 @@
+/**********************************************************************
+ *
+ * nullproto.h -- 
+ * Copyright (C) 1999  The New Zealand Digital Library Project
+ *
+ * A component of the Greenstone digital library software
+ * from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *********************************************************************/
+
+
+#ifndef NULLPROTO_H
+#define NULLPROTO_H
+
+#include "gsdlconf.h"
+#include "collectserver.h"
+#include "collectset.h"
+#include "recptproto.h"
+
+
+class nullproto : public recptproto {
+protected:
+  collectset           *cset;
+public:
+  nullproto();
+  virtual ~nullproto();
+
+  // add_collection sets up the collectionserver and calls
+  // add_collectserver
+  virtual void add_collection (const text_t &collection, void *recpt, 
+			       const text_t &gsdlhome, const text_t &gdbmhome);
+
+  void set_collectset(collectset *set) { this->cset = set; }
+
+  // remove_collection deletes the collection server of collection.
+  // This only needs to be called if a collectionserver is to be
+  // removed while the library is running as the destructor function
+  // cleans up all collectservers when the program exits.
+  void remove_collection (const text_t &collection, ostream &logout);
+
+  // this configure will configure each of the collection servers
+  void configure (const text_t &key, const text_tarray &cfgline,
+		  comerror_t &err);
+
+  // this init will init each of the collection servers
+  bool init (comerror_t &err, ostream &logout);
+
+  text_t get_protocol_name (comerror_t &err);
+  text_t get_site_name (comerror_t &err);
+
+  void get_collection_list (text_tarray &collist, comerror_t &err, 
+			    ostream &logout);
+  void has_collection (const text_t &collection, bool &hascollection, 
+		       comerror_t &err, ostream &logout);
+  void ping (const text_t &collection, bool &wassuccess, 
+	     comerror_t &err, ostream &logout);
+  void get_collectinfo (const text_t &collection, 
+			ColInfoResponse_t &collectinfo,
+			comerror_t &err, ostream &logout);
+  void get_filterinfo (const text_t &collection,
+		       InfoFiltersResponse_t &response,
+		       comerror_t &err, ostream &logout);
+  void get_filteroptions (const text_t &collection,
+			  const InfoFilterOptionsRequest_t &request,
+			  InfoFilterOptionsResponse_t &response, 
+			  comerror_t &err, ostream &logout);
+  void filter (const text_t &collection,
+	       FilterRequest_t &request,
+	       FilterResponse_t &response,
+	       comerror_t &err, ostream &logout);
+
+  void get_document (const text_t &collection,
+		     const DocumentRequest_t &request,
+		     DocumentResponse_t &response,
+		     comerror_t &err, ostream &logout);
+
+  void is_searchable (const text_t &collection, bool &issearchable, 
+		      comerror_t &err, ostream &logout);
+
+
+};
+
+
+#endif
Index: /gsdl/trunk/src/protocol/recptproto.cpp
===================================================================
--- /gsdl/trunk/src/protocol/recptproto.cpp	(revision 15450)
+++ /gsdl/trunk/src/protocol/recptproto.cpp	(revision 15450)
@@ -0,0 +1,174 @@
+/**********************************************************************
+ *
+ * recptproto.cpp -- 
+ * Copyright (C) 1999  The New Zealand Digital Library Project
+ *
+ * A component of the Greenstone digital library software
+ * from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *********************************************************************/
+
+#include "recptproto.h"
+#include <assert.h>
+
+
+// add collection server to protocol
+void recptproto::add_collection (const text_t &/*collection*/, void * /*recpt*/, 
+				 const text_t &/*gsdlhome*/, const text_t &/*gdbmhome*/) {
+}
+
+void recptproto::remove_collection (const text_t &/*collection*/, ostream &/*logout*/) {
+}
+
+// configure should be called for each line in the configuration file
+void recptproto::configure (const text_t &/*key*/, const text_tarray &/*cfgline*/, comerror_t &) {
+}
+
+// init should be called after the configuration but before any other
+// functions are called. If init returns false a message will be written
+// out to the log file and no other output should be produced.
+bool recptproto::init (comerror_t &err, ostream &/*logout*/) {
+  return true;
+}
+
+// get site name should return the name of the site used.
+// This is trivially empty in the case of a null protocol.  If a remote
+// connection to a site is being used then this should return the name
+// used to label a site
+text_t recptproto::get_site_name(comerror_t &err) {
+  return "localhost";
+}
+
+// get_protocol_name should return the name of this protocol (e.g. recptproto)
+// that can be used to do run time type identification and display information
+// about the protocol.
+text_t recptproto::get_protocol_name (comerror_t &err) {
+  return "recptproto";
+}
+
+// get_collection_list returns the list of collections that
+// this protocol knows about
+void recptproto::get_collection_list (text_tarray &collist, comerror_t &err, 
+				      ostream &/*logout*/) {
+  collist.erase(collist.begin(),collist.end());
+  err = noError;
+}
+
+// has_collection sets 'hascollection' to be true if the protocol
+// can communicate with the collection (i.e. it is within its 
+// collection list). This function should be implemented in as
+// efficient time as possible as it will be called for each page
+// access and for each protocol.
+void recptproto::has_collection (const text_t &/*collection*/, bool &hascollection, 
+				 comerror_t &err, ostream &/*logout*/) {
+  hascollection = false;
+  err = noError;
+}
+
+// sets 'wassuccess' to be true if a successful ping was done to
+// the given collection.
+void recptproto::ping (const text_t &/*collection*/, bool &wassuccess, 
+		       comerror_t &err, ostream &/*logout*/) {
+  wassuccess = false; // no collections are supported by this class
+  err = noError;
+}
+
+// obtains general information about the collection
+void recptproto::get_collectinfo (const text_t &/*collection*/, 
+				  ColInfoResponse_t &/*collectinfo*/,
+				  comerror_t &err, ostream &/*logout*/) {
+  err = protocolError;
+}
+
+// gets a list of all the filters
+void recptproto::get_filterinfo (const text_t &/*collection*/,
+				 InfoFiltersResponse_t &/*reponse*/,
+				 comerror_t &err, ostream &/*logout*/) {
+  err = protocolError;
+}
+
+// gets all the filter options for a particular filter
+void recptproto::get_filteroptions (const text_t &/*collection*/,
+				    const InfoFilterOptionsRequest_t &/*request*/,
+				    InfoFilterOptionsResponse_t &/*response*/, 
+				    comerror_t &err, ostream &/*logout*/) {
+  err = protocolError;
+}
+
+// filters (search or browse) a result set
+void recptproto::filter (const text_t &/*collection*/,
+			 FilterRequest_t &/*request*/,
+			 FilterResponse_t &/*response*/,
+			 comerror_t &err, ostream &/*logout*/) {
+  err = protocolError;
+}
+
+void recptproto::get_document (const text_t &/*collection*/,
+			       const DocumentRequest_t &/*request*/,
+			       DocumentResponse_t &/*response*/,
+			       comerror_t &err, ostream &/*logout*/) {
+  err = protocolError;
+}
+
+// sets issearchable to true if the given colection is searchable
+void recptproto::is_searchable (const text_t &/*collection*/, bool &issearchable, 
+				comerror_t &err, ostream &/*logout*/) {
+  issearchable = false; // no collections are supported by this class
+  err = noError;
+}
+
+
+
+
+
+
+
+// therecptproto remains the property of the calling code but
+// should not be deleted until it is removed from this list.
+void recptprotolistclass::addrecptproto (recptproto *therecptproto) {
+  // can't add a protocol that doesn't exist
+  assert (therecptproto != NULL);
+  if (therecptproto == NULL) return;
+
+  recptprotoptr rpp;
+  rpp.p = therecptproto;
+
+  recptprotoptrs.push_back(rpp);
+}
+
+// getrecptproto will return NULL if a recptproto for the given colelction
+// could not be found
+recptproto *recptprotolistclass::getrecptproto (const text_t &collection, 
+						ostream &logout) {
+  iterator here = recptprotoptrs.begin ();
+  iterator end = recptprotoptrs.end ();
+  bool hascollection;
+  comerror_t err;
+
+  while (here != end) {
+    assert ((*here).p != NULL);
+    if ((*here).p != NULL) {
+      (*here).p->has_collection (collection, hascollection, err, logout);
+      if ((err == noError) && (hascollection == true)) return (*here).p;
+    }
+    
+    ++here;
+  }
+  
+  return NULL;
+}
Index: /gsdl/trunk/src/protocol/recptproto.h
===================================================================
--- /gsdl/trunk/src/protocol/recptproto.h	(revision 15450)
+++ /gsdl/trunk/src/protocol/recptproto.h	(revision 15450)
@@ -0,0 +1,193 @@
+/**********************************************************************
+ *
+ * recptproto.h -- 
+ * Copyright (C) 1999  The New Zealand Digital Library Project
+ *
+ * A component of the Greenstone digital library software
+ * from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *********************************************************************/
+
+
+#ifndef RECPTPROTO_H
+#define RECPTPROTO_H
+
+#include "gsdlconf.h"
+#include "text_t.h"
+#include "comtypes.h"
+
+#if defined(GSDL_USE_OBJECTSPACE)
+#  include <ospace\std\vector>
+#elif defined(GSDL_USE_STL_H)
+#  include <vector.h>
+#else
+#  include <vector>
+#endif
+
+#if defined(GSDL_USE_OBJECTSPACE)
+#  include <ospace\std\iostream>
+#elif defined(GSDL_USE_IOS_H)
+#  include <iostream.h>
+#else
+#  include <iostream>
+#endif
+
+
+// recptproto is a generalisation of a protocol for communicating
+// with a collection server.
+class recptproto {
+public:
+
+  // add collection server to protocol
+  virtual void add_collection (const text_t &collection, void *recpt, 
+			       const text_t &gsdlhome, const text_t &gdbmhome);
+
+  virtual void remove_collection (const text_t &collection, ostream &logout);
+
+  // configure should be called for each line in the configuration file
+  virtual void configure (const text_t &key, const text_tarray &cfgline, comerror_t &err);
+
+  // init should be called after the configuration but before any other
+  // functions are called. If init returns false a message will be written
+  // out to the log file and no other output should be produced.
+  virtual bool init (comerror_t &err, ostream &logout);
+
+  // get_site_name should return the name of the site used.
+  // This is trivially empty in the case of a null protocol.  If a remote
+  // connection to a site is being used then this should return the name
+  // used to label a site
+  virtual text_t get_site_name(comerror_t &err);
+
+  // get_protocol_name should return the name of this protocol (e.g. recptproto)
+  // that can be used to do run time type identification and display information
+  // about the protocol.
+  virtual text_t get_protocol_name (comerror_t &err);
+
+  // get_collection_list returns the list of collections that
+  // this protocol knows about
+  virtual void get_collection_list (text_tarray &collist, comerror_t &err, 
+				    ostream &logout);
+
+  // has_collection sets 'hascollection' to be true if the protocol
+  // can communicate with the collection (i.e. it is within its 
+  // collection list). This function should be implemented in as
+  // efficient time as possible as it will be called for each page
+  // access and for each protocol.
+  virtual void has_collection (const text_t &collection, bool &hascollection, 
+			       comerror_t &err, ostream &logout);
+
+  // sets 'wassuccess' to be true if a successful ping was done to
+  // the given collection.
+  virtual void ping (const text_t &collection, bool &wassuccess, 
+		     comerror_t &err, ostream &logout);
+
+  // obtains general information about the collection
+  virtual void get_collectinfo (const text_t &collection, 
+				ColInfoResponse_t &collectinfo,
+				comerror_t &err, ostream &logout);
+
+  // gets a list of all the filters
+  virtual void get_filterinfo (const text_t &collection,
+			       InfoFiltersResponse_t &response,
+			       comerror_t &err, ostream &logout);
+
+  // gets all the filter options for a particular filter
+  virtual void get_filteroptions (const text_t &collection,
+				  const InfoFilterOptionsRequest_t &request,
+				  InfoFilterOptionsResponse_t &response, 
+				  comerror_t &err, ostream &logout);
+
+  // filters (search or browse) a result set and returns information
+  // about the filtered set including term frequency information and 
+  // metadata
+  virtual void filter (const text_t &collection,
+		       FilterRequest_t &request,
+		       FilterResponse_t &response,
+		       comerror_t &err, ostream &logout);
+
+  // gets a document (duh!)
+  virtual void get_document (const text_t &collection,
+			     const DocumentRequest_t &request,
+			     DocumentResponse_t &response,
+			     comerror_t &err, ostream &logout);
+
+  virtual void is_searchable (const text_t &collection, bool &issearchable, 
+			      comerror_t &err, ostream &logout);
+
+};
+
+
+// The recptprotoptr function does not 'own' the recptproto. The 
+// recptproto should be deleted by the code which created it.
+class recptprotoptr {
+public:
+  recptproto *p;
+
+  recptprotoptr () {p=NULL;}
+  ~recptprotoptr () {}
+};
+
+typedef vector<recptprotoptr> recptprotoptrlist;
+
+
+// contains a list of recptprotos
+class recptprotolistclass {
+protected:
+  recptprotoptrlist recptprotoptrs;
+
+public:
+  // type support for recptprotolistclass
+  typedef recptprotoptrlist::iterator iterator;
+  typedef recptprotoptrlist::const_iterator const_iterator;
+  typedef recptprotoptrlist::reference reference;
+  typedef recptprotoptrlist::const_reference const_reference;
+  typedef recptprotoptrlist::size_type size_type;
+
+  typedef recptprotoptrlist::difference_type difference_type;
+  typedef recptprotoptrlist::const_reverse_iterator const_reverse_iterator;
+  typedef recptprotoptrlist::reverse_iterator reverse_iterator;
+  
+  // basic container support
+  iterator begin () {return recptprotoptrs.begin();}
+  const_iterator begin () const {return recptprotoptrs.begin();}
+  iterator end () {return recptprotoptrs.end();}
+  const_iterator end () const {return recptprotoptrs.end();}
+
+  void erase(iterator pos) {recptprotoptrs.erase(pos);}
+  void erase(iterator first, iterator last) {recptprotoptrs.erase(first, last);}
+  recptprotolistclass &operator=(const recptprotolistclass &x) 
+    {recptprotoptrs=x.recptprotoptrs;return *this;}
+
+  bool empty () const {return recptprotoptrs.empty();}
+  size_type size() const {return recptprotoptrs.size();}
+
+
+  // added functionality
+  void clear () {recptprotoptrs.erase(recptprotoptrs.begin(),recptprotoptrs.end());}
+
+  // therecptproto remains the property of the calling code but
+  // should not be deleted until it is removed from this list.
+  void addrecptproto (recptproto *therecptproto);
+
+  // getrecptproto will return NULL if a recptproto for the given collection
+  // could not be found
+  recptproto *getrecptproto (const text_t &collection, ostream &logout);
+};
+
+
+#endif
Index: /gsdl/trunk/src/recpt/Makefile.in
===================================================================
--- /gsdl/trunk/src/recpt/Makefile.in	(revision 15449)
+++ /gsdl/trunk/src/recpt/Makefile.in	(revision 15450)
@@ -63,5 +63,5 @@
 ifneq ($(USE_FASTCGI), 1)
 DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM @DEFS@
-INCLUDES = -I../../lib -I. -I../colservr -I$(INDEXERS_DIR)/mg \
+INCLUDES = -I../../lib -I. -I../colservr -I../protocol -I$(INDEXERS_DIR)/mg \
 	   -I$(INDEXERS_DIR)/mg/lib -I$(INDEXERS_DIR)/mg/src/text \
            -I../../packages/expat/include \
@@ -69,5 +69,5 @@
 else 
 DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DUSE_FASTCGI @DEFS@
-INCLUDES = -I../../lib -I. -I../colservr -I$(INDEXERS_DIR)/mg \
+INCLUDES = -I../../lib -I. -I../colservr -I../protocol -I$(INDEXERS_DIR)/mg \
 	   -I$(INDEXERS_DIR)/mg/lib -I$(INDEXERS_DIR)/mg/src/text \
            -I../../packages/expat/include \
@@ -263,4 +263,6 @@
 		  $(LC_OBJECTS)
 
+PROTOCOLOBJECTS = ../protocol/recptproto.o \
+                  ../protocol/nullproto.o
 
 
@@ -336,5 +338,5 @@
 
 
-LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) $(Z_CLIENTOBJS) \
+LIBRARY_OBJS = $(COMMONOBJECTS) $(LIBRARYOBJECTS) $(COLSERVROBJECTS) $(PROTOCOLOBJECTS) $(Z_CLIENTOBJS) \
     ../../lib/gsdllib.a  \
     $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
Index: dl/trunk/src/recpt/nullproto.cpp
===================================================================
--- /gsdl/trunk/src/recpt/nullproto.cpp	(revision 15449)
+++ 	(revision )
@@ -1,161 +1,0 @@
-/**********************************************************************
- *
- * nullproto.cpp -- 
- * Copyright (C) 1999  The New Zealand Digital Library Project
- *
- * A component of the Greenstone digital library software
- * from the New Zealand Digital Library Project at the
- * University of Waikato, New Zealand.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *********************************************************************/
-
-#include "nullproto.h"
-#include <assert.h>
-
-#include "filter.h"
-#include "browsefilter.h"
-#include "mgqueryfilter.h"
-#include "mgppqueryfilter.h"
-#include "mgsearch.h"
-#include "mgppsearch.h"
-#include "fileutil.h"
-
-nullproto::nullproto() {
-  cset = NULL;
-}
-
-nullproto::~nullproto() {
-}
-
-// add collection to collectset (this should not be called until after the
-// collectset has been added to the protocol with set_collectset()
-void nullproto::add_collection (const text_t &collection, void *recpt, 
-				const text_t &gsdlhome, const text_t &gdbmhome) {      
-  
-  if (cset != NULL) {
-    this->cset->add_collection (collection, gsdlhome);
-  }
-}
-
-
-// remove_collection deletes the collection server of collection.
-// This only needs to be called if a collectionserver is to be
-// removed while the library is running. The destructor function
-// cleans up all collectservers when the program exits.
-void nullproto::remove_collection (const text_t &collection, ostream &logout) {
-  cset->remove_collection(collection, logout);
-}
-
-// this configure will configure each of the collection servers
-void nullproto::configure (const text_t &key, const text_tarray &cfgline,
-			   comerror_t &err) {
-  // the naming of the collection should not be done here,
-  // it should be done just after the collection server has been 
-  // created
-
-  // the protocol should not configure the collection set; it should be
-  // done direct to the collection server set
-  if (key == "gsdlhome" || key == "gdbmhome") {
-    cset->configure(key, cfgline);
-  }
-}
-
-// this init will configure and init each of the collection servers
-bool nullproto::init (comerror_t &err, ostream &logout) {
-  return cset->init(logout);
-}
-
-text_t nullproto::get_site_name (comerror_t &err) {
-  return "localhost";
-}
-
-text_t nullproto::get_protocol_name (comerror_t &err) {
-  return "nullproto";
-}
-
-
-void nullproto::get_collection_list (text_tarray &collist, comerror_t &err, 
-				     ostream &/*logout*/) {
-  cset->getCollectionList(collist);
-  err = noError; // no error is guaranteed - collection server shouldn't
-                 // about receptionist error states, logout is irrelevant
-}
-
-void nullproto::has_collection (const text_t &collection, bool &hascollection, 
-				comerror_t &err, ostream &/*logout*/) {
-  hascollection = (cset->getCollectServer(collection) != NULL);
-  err = noError;
-}
-
-void nullproto::ping (const text_t &collection, bool &wassuccess, 
-		      comerror_t &err, ostream &logout) {
-  collectserver *cserver = cset->getCollectServer(collection);
-  if (cserver != NULL) cserver->ping(wassuccess, err, logout);
-  else err = protocolError;
-}
-
-void nullproto::get_collectinfo (const text_t &collection, 
-				 ColInfoResponse_t &collectinfo,
-				 comerror_t &err, ostream &logout) {
-  collectserver *cserver = cset->getCollectServer (collection);
-  if (cserver != NULL) cserver->get_collectinfo (collectinfo, err, logout);
-  else err = protocolError;
-}
-
-
-void nullproto::get_filterinfo (const text_t &collection,
-				InfoFiltersResponse_t &response,
-				comerror_t &err, ostream &logout) {
-  collectserver *cserver = cset->getCollectServer (collection);
-  if (cserver != NULL) cserver->get_filterinfo (response, err, logout);
-  else err = protocolError;
-}
-
-void nullproto::get_filteroptions (const text_t &collection,
-				   const InfoFilterOptionsRequest_t &request,
-				   InfoFilterOptionsResponse_t &response, 
-				   comerror_t &err, ostream &logout) {
-  collectserver *cserver = cset->getCollectServer (collection);
-  if (cserver != NULL) cserver->get_filteroptions (request, response, err, logout);
-  else err = protocolError;
-}
-
-void nullproto::filter (const text_t &collection,
-			FilterRequest_t &request,
-			FilterResponse_t &response,
-			comerror_t &err, ostream &logout) {
-  collectserver *cserver = cset->getCollectServer (collection);
-  if (cserver != NULL) cserver->filter (request, response, err, logout);
-  else err = protocolError;
-}
-
-void nullproto::get_document (const text_t &collection,
-			      const DocumentRequest_t &request,
-			      DocumentResponse_t &response,
-			      comerror_t &err, ostream &logout) {
-  collectserver *cserver = cset->getCollectServer (collection);
-  if (cserver != NULL) cserver->get_document (request, response, err, logout);
-  else err = protocolError;
-}
-
-void nullproto::is_searchable (const text_t &collection, bool &issearchable, 
-			       comerror_t &err, ostream &logout) {
-  issearchable = false;
-  collectserver *cserver = cset->getCollectServer (collection);
-  if (cserver != NULL) cserver->is_searchable (issearchable, err, logout);
-  else err = protocolError;
-}
Index: dl/trunk/src/recpt/nullproto.h
===================================================================
--- /gsdl/trunk/src/recpt/nullproto.h	(revision 15449)
+++ 	(revision )
@@ -1,99 +1,0 @@
-/**********************************************************************
- *
- * nullproto.h -- 
- * Copyright (C) 1999  The New Zealand Digital Library Project
- *
- * A component of the Greenstone digital library software
- * from the New Zealand Digital Library Project at the
- * University of Waikato, New Zealand.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *********************************************************************/
-
-
-#ifndef NULLPROTO_H
-#define NULLPROTO_H
-
-#include "gsdlconf.h"
-#include "collectserver.h"
-#include "collectset.h"
-#include "recptproto.h"
-#include "receptionist.h"
-
-class nullproto : public recptproto {
-protected:
-  collectset           *cset;
-public:
-  nullproto();
-  virtual ~nullproto();
-
-  // add_collection sets up the collectionserver and calls
-  // add_collectserver
-  virtual void add_collection (const text_t &collection, void *recpt, 
-			       const text_t &gsdlhome, const text_t &gdbmhome);
-
-  void set_collectset(collectset *set) { this->cset = set; }
-
-  // remove_collection deletes the collection server of collection.
-  // This only needs to be called if a collectionserver is to be
-  // removed while the library is running as the destructor function
-  // cleans up all collectservers when the program exits.
-  void remove_collection (const text_t &collection, ostream &logout);
-
-  // this configure will configure each of the collection servers
-  void configure (const text_t &key, const text_tarray &cfgline,
-		  comerror_t &err);
-
-  // this init will init each of the collection servers
-  bool init (comerror_t &err, ostream &logout);
-
-  text_t get_protocol_name (comerror_t &err);
-  text_t get_site_name (comerror_t &err);
-
-  void get_collection_list (text_tarray &collist, comerror_t &err, 
-			    ostream &logout);
-  void has_collection (const text_t &collection, bool &hascollection, 
-		       comerror_t &err, ostream &logout);
-  void ping (const text_t &collection, bool &wassuccess, 
-	     comerror_t &err, ostream &logout);
-  void get_collectinfo (const text_t &collection, 
-			ColInfoResponse_t &collectinfo,
-			comerror_t &err, ostream &logout);
-  void get_filterinfo (const text_t &collection,
-		       InfoFiltersResponse_t &response,
-		       comerror_t &err, ostream &logout);
-  void get_filteroptions (const text_t &collection,
-			  const InfoFilterOptionsRequest_t &request,
-			  InfoFilterOptionsResponse_t &response, 
-			  comerror_t &err, ostream &logout);
-  void filter (const text_t &collection,
-	       FilterRequest_t &request,
-	       FilterResponse_t &response,
-	       comerror_t &err, ostream &logout);
-
-  void get_document (const text_t &collection,
-		     const DocumentRequest_t &request,
-		     DocumentResponse_t &response,
-		     comerror_t &err, ostream &logout);
-
-  void is_searchable (const text_t &collection, bool &issearchable, 
-		      comerror_t &err, ostream &logout);
-
-
-};
-
-
-#endif
Index: dl/trunk/src/recpt/recptproto.cpp
===================================================================
--- /gsdl/trunk/src/recpt/recptproto.cpp	(revision 15449)
+++ 	(revision )
@@ -1,174 +1,0 @@
-/**********************************************************************
- *
- * recptproto.cpp -- 
- * Copyright (C) 1999  The New Zealand Digital Library Project
- *
- * A component of the Greenstone digital library software
- * from the New Zealand Digital Library Project at the
- * University of Waikato, New Zealand.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *********************************************************************/
-
-#include "recptproto.h"
-#include <assert.h>
-
-
-// add collection server to protocol
-void recptproto::add_collection (const text_t &/*collection*/, void * /*recpt*/, 
-				 const text_t &/*gsdlhome*/, const text_t &/*gdbmhome*/) {
-}
-
-void recptproto::remove_collection (const text_t &/*collection*/, ostream &/*logout*/) {
-}
-
-// configure should be called for each line in the configuration file
-void recptproto::configure (const text_t &/*key*/, const text_tarray &/*cfgline*/, comerror_t &) {
-}
-
-// init should be called after the configuration but before any other
-// functions are called. If init returns false a message will be written
-// out to the log file and no other output should be produced.
-bool recptproto::init (comerror_t &err, ostream &/*logout*/) {
-  return true;
-}
-
-// get site name should return the name of the site used.
-// This is trivially empty in the case of a null protocol.  If a remote
-// connection to a site is being used then this should return the name
-// used to label a site
-text_t recptproto::get_site_name(comerror_t &err) {
-  return "localhost";
-}
-
-// get_protocol_name should return the name of this protocol (e.g. recptproto)
-// that can be used to do run time type identification and display information
-// about the protocol.
-text_t recptproto::get_protocol_name (comerror_t &err) {
-  return "recptproto";
-}
-
-// get_collection_list returns the list of collections that
-// this protocol knows about
-void recptproto::get_collection_list (text_tarray &collist, comerror_t &err, 
-				      ostream &/*logout*/) {
-  collist.erase(collist.begin(),collist.end());
-  err = noError;
-}
-
-// has_collection sets 'hascollection' to be true if the protocol
-// can communicate with the collection (i.e. it is within its 
-// collection list). This function should be implemented in as
-// efficient time as possible as it will be called for each page
-// access and for each protocol.
-void recptproto::has_collection (const text_t &/*collection*/, bool &hascollection, 
-				 comerror_t &err, ostream &/*logout*/) {
-  hascollection = false;
-  err = noError;
-}
-
-// sets 'wassuccess' to be true if a successful ping was done to
-// the given collection.
-void recptproto::ping (const text_t &/*collection*/, bool &wassuccess, 
-		       comerror_t &err, ostream &/*logout*/) {
-  wassuccess = false; // no collections are supported by this class
-  err = noError;
-}
-
-// obtains general information about the collection
-void recptproto::get_collectinfo (const text_t &/*collection*/, 
-				  ColInfoResponse_t &/*collectinfo*/,
-				  comerror_t &err, ostream &/*logout*/) {
-  err = protocolError;
-}
-
-// gets a list of all the filters
-void recptproto::get_filterinfo (const text_t &/*collection*/,
-				 InfoFiltersResponse_t &/*reponse*/,
-				 comerror_t &err, ostream &/*logout*/) {
-  err = protocolError;
-}
-
-// gets all the filter options for a particular filter
-void recptproto::get_filteroptions (const text_t &/*collection*/,
-				    const InfoFilterOptionsRequest_t &/*request*/,
-				    InfoFilterOptionsResponse_t &/*response*/, 
-				    comerror_t &err, ostream &/*logout*/) {
-  err = protocolError;
-}
-
-// filters (search or browse) a result set
-void recptproto::filter (const text_t &/*collection*/,
-			 FilterRequest_t &/*request*/,
-			 FilterResponse_t &/*response*/,
-			 comerror_t &err, ostream &/*logout*/) {
-  err = protocolError;
-}
-
-void recptproto::get_document (const text_t &/*collection*/,
-			       const DocumentRequest_t &/*request*/,
-			       DocumentResponse_t &/*response*/,
-			       comerror_t &err, ostream &/*logout*/) {
-  err = protocolError;
-}
-
-// sets issearchable to true if the given colection is searchable
-void recptproto::is_searchable (const text_t &/*collection*/, bool &issearchable, 
-				comerror_t &err, ostream &/*logout*/) {
-  issearchable = false; // no collections are supported by this class
-  err = noError;
-}
-
-
-
-
-
-
-
-// therecptproto remains the property of the calling code but
-// should not be deleted until it is removed from this list.
-void recptprotolistclass::addrecptproto (recptproto *therecptproto) {
-  // can't add a protocol that doesn't exist
-  assert (therecptproto != NULL);
-  if (therecptproto == NULL) return;
-
-  recptprotoptr rpp;
-  rpp.p = therecptproto;
-
-  recptprotoptrs.push_back(rpp);
-}
-
-// getrecptproto will return NULL if a recptproto for the given colelction
-// could not be found
-recptproto *recptprotolistclass::getrecptproto (const text_t &collection, 
-						ostream &logout) {
-  iterator here = recptprotoptrs.begin ();
-  iterator end = recptprotoptrs.end ();
-  bool hascollection;
-  comerror_t err;
-
-  while (here != end) {
-    assert ((*here).p != NULL);
-    if ((*here).p != NULL) {
-      (*here).p->has_collection (collection, hascollection, err, logout);
-      if ((err == noError) && (hascollection == true)) return (*here).p;
-    }
-    
-    ++here;
-  }
-  
-  return NULL;
-}
Index: dl/trunk/src/recpt/recptproto.h
===================================================================
--- /gsdl/trunk/src/recpt/recptproto.h	(revision 15449)
+++ 	(revision )
@@ -1,193 +1,0 @@
-/**********************************************************************
- *
- * recptproto.h -- 
- * Copyright (C) 1999  The New Zealand Digital Library Project
- *
- * A component of the Greenstone digital library software
- * from the New Zealand Digital Library Project at the
- * University of Waikato, New Zealand.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *********************************************************************/
-
-
-#ifndef RECPTPROTO_H
-#define RECPTPROTO_H
-
-#include "gsdlconf.h"
-#include "text_t.h"
-#include "comtypes.h"
-
-#if defined(GSDL_USE_OBJECTSPACE)
-#  include <ospace\std\vector>
-#elif defined(GSDL_USE_STL_H)
-#  include <vector.h>
-#else
-#  include <vector>
-#endif
-
-#if defined(GSDL_USE_OBJECTSPACE)
-#  include <ospace\std\iostream>
-#elif defined(GSDL_USE_IOS_H)
-#  include <iostream.h>
-#else
-#  include <iostream>
-#endif
-
-
-// recptproto is a generalisation of a protocol for communicating
-// with a collection server.
-class recptproto {
-public:
-
-  // add collection server to protocol
-  virtual void add_collection (const text_t &collection, void *recpt, 
-			       const text_t &gsdlhome, const text_t &gdbmhome);
-
-  virtual void remove_collection (const text_t &collection, ostream &logout);
-
-  // configure should be called for each line in the configuration file
-  virtual void configure (const text_t &key, const text_tarray &cfgline, comerror_t &err);
-
-  // init should be called after the configuration but before any other
-  // functions are called. If init returns false a message will be written
-  // out to the log file and no other output should be produced.
-  virtual bool init (comerror_t &err, ostream &logout);
-
-  // get_site_name should return the name of the site used.
-  // This is trivially empty in the case of a null protocol.  If a remote
-  // connection to a site is being used then this should return the name
-  // used to label a site
-  virtual text_t get_site_name(comerror_t &err);
-
-  // get_protocol_name should return the name of this protocol (e.g. recptproto)
-  // that can be used to do run time type identification and display information
-  // about the protocol.
-  virtual text_t get_protocol_name (comerror_t &err);
-
-  // get_collection_list returns the list of collections that
-  // this protocol knows about
-  virtual void get_collection_list (text_tarray &collist, comerror_t &err, 
-				    ostream &logout);
-
-  // has_collection sets 'hascollection' to be true if the protocol
-  // can communicate with the collection (i.e. it is within its 
-  // collection list). This function should be implemented in as
-  // efficient time as possible as it will be called for each page
-  // access and for each protocol.
-  virtual void has_collection (const text_t &collection, bool &hascollection, 
-			       comerror_t &err, ostream &logout);
-
-  // sets 'wassuccess' to be true if a successful ping was done to
-  // the given collection.
-  virtual void ping (const text_t &collection, bool &wassuccess, 
-		     comerror_t &err, ostream &logout);
-
-  // obtains general information about the collection
-  virtual void get_collectinfo (const text_t &collection, 
-				ColInfoResponse_t &collectinfo,
-				comerror_t &err, ostream &logout);
-
-  // gets a list of all the filters
-  virtual void get_filterinfo (const text_t &collection,
-			       InfoFiltersResponse_t &response,
-			       comerror_t &err, ostream &logout);
-
-  // gets all the filter options for a particular filter
-  virtual void get_filteroptions (const text_t &collection,
-				  const InfoFilterOptionsRequest_t &request,
-				  InfoFilterOptionsResponse_t &response, 
-				  comerror_t &err, ostream &logout);
-
-  // filters (search or browse) a result set and returns information
-  // about the filtered set including term frequency information and 
-  // metadata
-  virtual void filter (const text_t &collection,
-		       FilterRequest_t &request,
-		       FilterResponse_t &response,
-		       comerror_t &err, ostream &logout);
-
-  // gets a document (duh!)
-  virtual void get_document (const text_t &collection,
-			     const DocumentRequest_t &request,
-			     DocumentResponse_t &response,
-			     comerror_t &err, ostream &logout);
-
-  virtual void is_searchable (const text_t &collection, bool &issearchable, 
-			      comerror_t &err, ostream &logout);
-
-};
-
-
-// The recptprotoptr function does not 'own' the recptproto. The 
-// recptproto should be deleted by the code which created it.
-class recptprotoptr {
-public:
-  recptproto *p;
-
-  recptprotoptr () {p=NULL;}
-  ~recptprotoptr () {}
-};
-
-typedef vector<recptprotoptr> recptprotoptrlist;
-
-
-// contains a list of recptprotos
-class recptprotolistclass {
-protected:
-  recptprotoptrlist recptprotoptrs;
-
-public:
-  // type support for recptprotolistclass
-  typedef recptprotoptrlist::iterator iterator;
-  typedef recptprotoptrlist::const_iterator const_iterator;
-  typedef recptprotoptrlist::reference reference;
-  typedef recptprotoptrlist::const_reference const_reference;
-  typedef recptprotoptrlist::size_type size_type;
-
-  typedef recptprotoptrlist::difference_type difference_type;
-  typedef recptprotoptrlist::const_reverse_iterator const_reverse_iterator;
-  typedef recptprotoptrlist::reverse_iterator reverse_iterator;
-  
-  // basic container support
-  iterator begin () {return recptprotoptrs.begin();}
-  const_iterator begin () const {return recptprotoptrs.begin();}
-  iterator end () {return recptprotoptrs.end();}
-  const_iterator end () const {return recptprotoptrs.end();}
-
-  void erase(iterator pos) {recptprotoptrs.erase(pos);}
-  void erase(iterator first, iterator last) {recptprotoptrs.erase(first, last);}
-  recptprotolistclass &operator=(const recptprotolistclass &x) 
-    {recptprotoptrs=x.recptprotoptrs;return *this;}
-
-  bool empty () const {return recptprotoptrs.empty();}
-  size_type size() const {return recptprotoptrs.size();}
-
-
-  // added functionality
-  void clear () {recptprotoptrs.erase(recptprotoptrs.begin(),recptprotoptrs.end());}
-
-  // therecptproto remains the property of the calling code but
-  // should not be deleted until it is removed from this list.
-  void addrecptproto (recptproto *therecptproto);
-
-  // getrecptproto will return NULL if a recptproto for the given collection
-  // could not be found
-  recptproto *getrecptproto (const text_t &collection, ostream &logout);
-};
-
-
-#endif
