Index: /gsdl/trunk/src/colservr/Makefile.in
===================================================================
--- /gsdl/trunk/src/colservr/Makefile.in	(revision 15415)
+++ /gsdl/trunk/src/colservr/Makefile.in	(revision 15416)
@@ -156,5 +156,5 @@
 MG_MGPP_OBJECTS=collectset.o
 
-HEADERS = search.h querycache.h queryinfo.h collectserver.h collectset.h \
+HEADERS = comtypes.h search.h querycache.h queryinfo.h collectserver.h collectset.h \
           colservrconfig.h maptools.h filter.h source.h browsefilter.h \
           queryfilter.h mggdbmsource.h gdbmsource.h \
@@ -162,5 +162,5 @@
 	  $(MG_HEADERS) $(LC_HEADERS) $(CORBAHEADERS)
 
-SOURCES = search.cpp querycache.cpp queryinfo.cpp collectserver.cpp \
+SOURCES = comtypes.cpp search.cpp querycache.cpp queryinfo.cpp collectserver.cpp \
           colservrconfig.cpp maptools.cpp filter.cpp source.cpp \
           browsefilter.cpp queryfilter.cpp mggdbmsource.cpp gdbmsource.cpp \
@@ -168,5 +168,5 @@
 	  $(MG_SOURCES) $(LC_SOURCES) $(CORBASOURCES)
 
-OBJECTS = search.o querycache.o queryinfo.o collectserver.o \
+OBJECTS = comtypes.o search.o querycache.o queryinfo.o collectserver.o \
           colservrconfig.o maptools.o filter.o source.o browsefilter.o \
           queryfilter.o mggdbmsource.o gdbmsource.o \
Index: /gsdl/trunk/src/colservr/comtypes.cpp
===================================================================
--- /gsdl/trunk/src/colservr/comtypes.cpp	(revision 15416)
+++ /gsdl/trunk/src/colservr/comtypes.cpp	(revision 15416)
@@ -0,0 +1,294 @@
+/**********************************************************************
+ *
+ * comtypes.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 "comtypes.h"
+
+
+text_t get_comerror_string (comerror_t err) {
+  if (err == noError) return "no error";
+  else if (err == authenticationFailure) return "authentication failure";
+  else if (err == protocolError) return "protocol error";
+  else if (err == configurationError) return "configuration error";
+  else if (err == systemProblem) return "system problem";
+  else if (err == syntaxError) return "query syntax error";
+  return "unknown problem";
+}
+
+
+void ShortColInfo_t::clear() {
+  name.clear();
+  host.clear();
+  port = 0;
+}
+
+/*
+   isPublic now defaults to true  most values are default          
+   similar to a constructor in a class to make some initializations
+*/
+
+void ColInfoResponse_t::clear () {
+  shortInfo.clear();
+  useBook=false;
+  isPublic=true;
+  isBeta=false;
+  isSegmented=false;
+  isCollectGroup=false;
+  languages.erase(languages.begin(), languages.end());
+  ccsCols.erase(ccsCols.begin(), ccsCols.end());
+  ccsOptions = 0;
+  stemIndexes = 3; // old default was both provided
+  buildDate=0;
+  buildType.clear();
+  numDocs=0;
+  numSections=0;
+  numWords=0;
+  numBytes=0;
+  format.erase(format.begin(), format.end());
+  building.erase(building.begin(), building.end());
+  httpdomain.clear();
+  httpprefix.clear();
+  receptionist.clear();
+
+  // Setting some authentication parameters use with
+  // various parts of the code.
+  
+  authenticate.clear();         // turned off by default, individual collection authentication
+  auth_group.clear();              // turned off by default, authentication by groups method
+  public_documents.clear();          // turned off by default, allow access to these documents <list>
+  private_documents.clear();           // turned off by default, disallow access to these documents <list>
+    
+}
+
+text_t ColInfoResponse_t::get_collectionmeta(text_t name, text_t lang) {
+  text_t value = collectionmeta[name][lang];
+  if (value.empty()) {
+    value = collectionmeta[name][g_EmptyText];
+  }
+  return value;
+
+}
+
+void InfoFiltersResponse_t::clear () {
+  filterNames.erase(filterNames.begin(), filterNames.end());
+}
+
+
+void InfoFilterOptionsRequest_t::clear () {
+  filterName.clear();
+}
+
+
+void FilterOption_t::clear () {
+  name.clear();
+  type = booleant;
+  repeatable = onePerQuery;
+  defaultValue.clear();
+  validValues.erase(validValues.begin(), validValues.end());
+}
+
+void FilterOption_t::check_defaultValue () {
+  text_tarray::iterator here, end;
+
+  // how the default is interpreted depends on the option type
+  switch (type) {
+  case booleant: 
+  case enumeratedt: // has to be one of the validValues
+    here = validValues.begin ();
+    end = validValues.end ();
+    while (here != end) {
+      if (*here == defaultValue) return;
+      ++here;
+    }
+    
+    break;
+
+  case integert: // has to be in the validValues range
+    if ((validValues.size() >= 2) &&
+	(validValues[0].getint() <= defaultValue.getint()) &&
+	(validValues[1].getint() >= defaultValue.getint()))
+      return;
+    break;
+
+  case stringt: // any value is valid
+    return; 
+  }
+
+  // did not find the defaultValue
+  if (validValues.empty()) defaultValue.clear();
+  else defaultValue = validValues[0];
+}
+
+
+bool operator==(const FilterOption_t &x, const FilterOption_t &y) {
+  return ((x.name == y.name) &&
+	  (x.type == y.type) &&
+	  (x.repeatable == y.repeatable) &&
+	  (x.defaultValue == y.defaultValue) &&
+	  (x.validValues == y.validValues));
+}
+
+bool operator<(const FilterOption_t &x, const FilterOption_t &y) {
+  return ((x.name < y.name) ||
+	  ((x.name == y.name) &&
+	   ((x.type < y.type) ||
+	    ((x.type == y.type) &&
+	     ((x.repeatable < y.repeatable) ||
+	      ((x.repeatable == y.repeatable) &&
+	       ((x.defaultValue < y.defaultValue) ||
+		((x.defaultValue == y.defaultValue) &&
+		 (x.validValues < y.validValues)))))))));
+}
+
+
+
+void InfoFilterOptionsResponse_t::clear () {
+  filterOptions.erase(filterOptions.begin(), filterOptions.end());
+}
+
+
+void OptionValue_t::clear () {
+  name.clear();
+  value.clear();
+}
+
+
+void FilterRequest_t::clear () {
+  filterName.clear();
+  filterLang.clear();
+  filterOptions.erase(filterOptions.begin(), filterOptions.end());
+  docSet.erase(docSet.begin(), docSet.end());
+  filterResultOptions = 0;
+  requestParams.clear();
+  refParams.clear();
+  fields.erase(fields.begin(), fields.end());
+  getParents = false;
+}
+
+
+void TermInfo_t::clear () {
+  term.clear();
+  freq = 0;
+  matchTerms.erase (matchTerms.begin(), matchTerms.end());
+}
+
+
+void MetadataInfo_t::clear () {
+  params.clear();
+  isRef = false;
+  values.erase(values.begin(), values.end());
+  if (parent != NULL) {
+    delete parent;
+    parent = NULL;
+  }
+}
+
+MetadataInfo_t::MetadataInfo_t () {parent=NULL;clear();}
+
+// copy constructor
+MetadataInfo_t::MetadataInfo_t (const MetadataInfo_t &x) {
+  params = x.params;
+  isRef = x.isRef;
+  values = x.values;
+  if (x.parent == NULL) parent = NULL;
+  else {
+    parent = new MetadataInfo_t ();
+    *parent = *(x.parent);
+  }
+}
+
+MetadataInfo_t::~MetadataInfo_t () {
+  if (parent != NULL) {
+    delete parent;
+    parent = NULL;
+  }
+}
+
+MetadataInfo_t &MetadataInfo_t::operator=(const MetadataInfo_t &x) {
+  if (&x != this) {
+    params = x.params;
+    isRef = x.isRef;
+    values = x.values;
+    if (x.parent == NULL) parent = NULL;
+    else {
+      parent = new MetadataInfo_t ();
+      *parent = *(x.parent);
+    }
+  }
+  return *this;
+}
+
+void ResultDocInfo_t::clear () {
+  OID.clear ();
+  ranking = 0;
+  result_num = 0;
+  num_terms_matched = 0;
+  num_phrase_match = 0;
+  docFreq.erase(docFreq.begin(), docFreq.end());
+  metadata.erase(metadata.begin(), metadata.end());
+  classifier_metadata_type.erase(classifier_metadata_type.begin(), 
+				 classifier_metadata_type.end());
+  classifier_metadata_offset = 0;
+  
+}
+
+ResultDocInfo_t &ResultDocInfo_t::operator=(const ResultDocInfo_t &x) {
+  OID = x.OID; 
+  ranking = x.ranking;
+  result_num = x.result_num;
+  num_terms_matched = x.num_terms_matched;
+  num_phrase_match = x.num_phrase_match;
+  docFreq = x.docFreq; 
+  metadata = x.metadata;
+  return *this;
+}
+
+void FilterResponse_t::clear () {
+  error_message = g_EmptyText;
+  numDocs = 0;
+  isApprox = Exact;
+  termInfo.erase (termInfo.begin(), termInfo.end());
+  docInfo.erase (docInfo.begin(), docInfo.end());
+  stopwords.clear();
+}
+
+FilterResponse_t &FilterResponse_t::operator=(const FilterResponse_t &x) {
+  error_message = x.error_message;
+  numDocs = x.numDocs;
+  isApprox = x.isApprox;
+  termInfo = x.termInfo;
+  docInfo = x.docInfo;
+  stopwords = x.stopwords;
+  return *this;
+}
+
+void DocumentRequest_t::clear () {
+  OID.clear();
+  docType.clear();
+  docFormat.clear();
+}
+
+void DocumentResponse_t::clear () {
+  doc.clear();
+}
Index: /gsdl/trunk/src/colservr/comtypes.h
===================================================================
--- /gsdl/trunk/src/colservr/comtypes.h	(revision 15416)
+++ /gsdl/trunk/src/colservr/comtypes.h	(revision 15416)
@@ -0,0 +1,377 @@
+/**********************************************************************
+ *
+ * comtypes.h -- 
+ * Copyright (C) 1999,2004  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 COMTYPES_H
+#define COMTYPES_H
+
+#include "gsdlconf.h"
+#include "text_t.h"
+
+#if defined(GSDL_USE_OBJECTSPACE)
+#  include <ospace\std\vector>
+#  include <ospace\std\list>
+#  include <ospace\std\memory> // for pair
+#  include <ospace\std\map>
+#elif defined(GSDL_USE_STL_H)
+#  include <vector.h>
+#  include <list.h>
+#  include <memory.h> // for pair
+#  include <map.h>
+#else
+#  include <vector>
+#  include <list>
+#  include <memory> // for pair
+#  include <map>
+#endif
+
+
+enum comerror_t {noError, authenticationFailure, protocolError, 
+		 configurationError, systemProblem, syntaxError};
+text_t get_comerror_string (comerror_t err);
+
+
+// ShortColInfo ::= SEQUENCE {
+//   name GeneralString,
+//   host GeneralString,
+//   port INTEGER
+// }
+struct ShortColInfo_t {
+  void clear ();
+  ShortColInfo_t () {clear();}
+
+  text_t name;
+  text_t host;
+  int port;
+};
+
+// for collection metadata: metadata name -> lang -> value
+// for collection macros: macro name -> params -> value
+typedef map<text_t, text_tmap, lttext_t> collectionmeta_map; 
+
+#define CCSUniformSearchResultsFormatting 1
+
+#define SIcasefold 1
+#define SIstem 2
+#define SIaccentfold 4
+
+struct ColInfoResponse_t {
+  void clear ();
+  ColInfoResponse_t () {clear();} 
+  text_t get_collectionmeta(text_t name, text_t lang);
+  
+  ShortColInfo_t shortInfo;
+  bool useBook;	//whether we want to display the book
+  bool isPublic;
+  bool isBeta;
+  bool isSegmented;
+  bool isCollectGroup; // used to group a set of collections as one item on the home page
+  unsigned long buildDate;
+  text_tarray ccsCols;    // empty if collection does not use cross-collection searching
+  int ccsOptions; // uses CCS #defines from above
+  int stemIndexes; // uses SI #defines from above
+  text_tarray languages;
+  unsigned long numDocs;     // 0 if not known
+  unsigned long numSections; // 0 if not known
+  unsigned long numWords;    // 0 if not known
+  unsigned long numBytes;    // 0 if not known
+  collectionmeta_map  collectionmeta;
+  text_tmap      format;
+  collectionmeta_map	 collection_macros; // for collectionmacro config directive (> gsdl 2.53)
+  text_tmap      building;
+  text_t         httpdomain;      // GRB: could these two http items need removing
+  text_t         httpprefix;
+  text_t         receptionist;
+  text_t         buildType;           // 'mg' or 'mgpp' or 'lucene'
+  text_t         authenticate;      // 'document' or 'collection'
+  text_t         auth_group;          // 'mygroup' 'yourgroup'
+  text_tmap      public_documents;    // the acl to allow access to listed documents
+  text_tmap      private_documents;   // the acl to disallow access to listed documents
+};
+
+
+// -- filter options which might be supported for the QueryFilter
+// --
+// -- onePerQuery StartResults   integer
+// -- onePerQuery EndResults     integer
+// -- onePerQuery QueryType      enumerated (boolean, ranked)
+// -- onePerTerm  Term           string ???
+// -- onePerTerm  Casefold       boolean
+// -- onePerTerm  Stem           boolean
+// -- onePerTerm  Index          enumerated
+// -- onePerTerm  Subcollection  enumerated
+// --
+// -- filter options which might be supported for the BrowseFilter
+// --
+// -- onePerQuery StartResults   integer
+// -- onePerQuery EndResults     integer
+// -- onePerQuery ParentNode     string ("" will return the browsing available)
+// --
+// -- The NullFilter always returns the set it was given, it doesn't have
+// -- any options
+
+// InfoFiltersResponse ::= SEQUENCE {
+//   filterNames StringSet
+// }
+struct InfoFiltersResponse_t {
+  void clear ();
+
+  text_tset filterNames;
+};
+
+// InfoFilterOptionsRequest ::= SEQUENCE {
+//   filterName GeneralString
+// }
+struct InfoFilterOptionsRequest_t {
+  void clear ();
+
+  text_t filterName;
+};
+
+// FilterOption ::= SEQUENCE {
+//   name         GeneralString,
+//   type         ENUMERATED {booleant(0), integert(1), enumeratedt(2), stringt(3)},
+//   repeatable   ENUMERATED {onePerQuery(0), onePerTerm(1), nPerTerm(2)},
+//   defaultValue GeneralString,
+//   -- the interpretation of the validValues depends on the type
+//   -- for boolean: the first value is the false value, the second is true value
+//   -- for integer: the first value is the minimum, the second the maximum
+//   -- for enumerated: all values a listed
+//   -- for string: this value is ignored
+//   validValues  StringSequence
+// }
+struct FilterOption_t {
+  void clear ();
+  void check_defaultValue ();
+  FilterOption_t () {clear();}
+
+  text_t name;
+
+  enum type_t {booleant=0, integert=1, enumeratedt=2, stringt=3};
+  type_t type;
+
+  enum repeatable_t {onePerQuery=0, onePerTerm=1, nPerTerm=2};
+  repeatable_t repeatable;
+
+  text_t defaultValue;
+  text_tarray validValues;
+};
+
+bool operator==(const FilterOption_t &x, const FilterOption_t &y);
+bool operator<(const FilterOption_t &x, const FilterOption_t &y);
+
+
+typedef map<text_t, FilterOption_t, lttext_t> FilterOption_tmap;
+
+
+// InfoFilterOptionsResponse ::= SEQUENCE {
+//   filterOptions SET OF FilterOption
+// }
+struct InfoFilterOptionsResponse_t {
+  void clear ();
+
+  FilterOption_tmap filterOptions;
+};
+
+
+// OptionValue ::= SEQUENCE {
+//   name  GeneralString,
+//   value GeneralString
+// }
+struct OptionValue_t {
+  void clear ();
+
+  text_t name;
+  text_t value;
+};
+
+typedef vector<OptionValue_t> OptionValue_tarray;
+
+
+// -- Terms are presented in the same order that they are requested,
+// -- any information relating to the terms is in reference to the
+// -- index specified for that term.
+//
+// FilterRequest ::= SEQUENCE {
+//   filterName          [0] GeneralString,
+//   filterOptions       [1] IMPLICIT SEQUENCE OF OptionValue,
+//   docSet              [2] IMPLICIT StringSequence, -- the OID "" represents everything
+//   filterResultOptions [3] IMPLICIT BIT STRING {termFreq(0), matchTerms(1), OID(2), 
+//                                                subCol(3), ranking(4), docFreq(5), 
+//                                                metadata(6)}
+// 
+//   -- the next set of options are for the metadata request, 
+//   -- they can be left blank if metadata is not wanted
+//   requestParams       [4] IMPLICIT GeneralString, -- used to negotiate the metadata content
+//   refParams           [5] IMPLICIT GeneralString, -- used to decide whether to return a 
+//                                                   -- reference to the data or the actual data
+//   fields              [6] IMPLICIT StringSet
+//   getParents          [7] IMPLICIT BOOLEAN        -- gets metadata of all parents too
+// }
+#define FRtermFreq   1
+#define FRmatchTerms 2
+#define FROID        4
+#define FRsubCol     8
+#define FRranking    16
+#define FRdocFreq    32
+#define FRmetadata   64
+// used to indicate a full text browse query for mgpp
+#define FRfullTextBrowse  128
+
+struct FilterRequest_t {
+  void clear ();
+  FilterRequest_t () {clear();}
+
+  text_t filterName;
+  text_t filterLang; // non empty if we want info to be retrived in language specific
+  OptionValue_tarray filterOptions;
+  text_tarray docSet;        // empty if not used
+  int filterResultOptions; // use the FR* defines above
+
+  text_t requestParams; // empty if not used
+  text_t refParams;     // empty if not used
+  text_tset fields;   // empty if not used
+  bool getParents;      // defaults to false
+};
+
+
+// TermInfo ::= SEQUENCE {
+//   term       [0] GeneralString,
+//   freq       [1] IMPLICIT INTEGER,       -- 0 if not requested
+//   matchTerms [2] IMPLICIT StringSequence -- empty if not requested
+// }
+struct TermInfo_t {
+  void clear ();
+  TermInfo_t () {clear();}
+
+  text_t term;
+  int freq; // 0 if not requested
+  text_tarray matchTerms; // empty if not requested
+};
+
+typedef vector<TermInfo_t> TermInfo_tarray;
+
+
+// MetadataInfo ::= SEQUENCE {
+//   params  [0] IMPLICIT GeneralString,
+//   isRef   [1] IMPLICIT BOOLEAN,
+//   values  [3] IMPLICIT SEQUENCE OF GeneralString,
+//   name    [4] IMPLICIT GeneralString
+// }
+struct MetadataInfo_t {
+  text_t params;
+  bool isRef;
+  text_tarray values;
+  MetadataInfo_t *parent;
+
+  void clear ();
+  MetadataInfo_t ();
+  MetadataInfo_t (const MetadataInfo_t &x); // copy constructor
+  ~MetadataInfo_t ();
+  MetadataInfo_t &operator=(const MetadataInfo_t &x);
+};
+
+typedef map<text_t, MetadataInfo_t, lttext_t> MetadataInfo_tmap;
+
+// ResultDocInfo ::= SEQUENCE {
+//   OID      [0] IMPLICIT GeneralString,
+//   ranking  [1] IMPLICIT INTEGER,             -- 0 if not requested, range 0-10000
+//   docFreq  [2] IMPLICIT SEQUENCE OF INTEGER, -- empty if not requested
+//   metadata [3] IMPLICIT SEQUENCE OF MetadataInfo, -- no longer a SEQUENCE (SET maybe??)
+//   classifier_metadata_type   [4] IMPLICIT GeneralString,       -- empty if not requested
+//   classifier_metadata_offset [5] IMPLICIT INTEGER,             -- 0 if not requested
+// }
+struct ResultDocInfo_t {
+  void clear ();
+  ResultDocInfo_t () {clear();}
+
+  text_t OID;
+  int result_num;          // place in results list
+  int ranking;             // 0 if not requested (real ranking*10000)
+  int num_terms_matched;   // not available on all versions of mg
+  int num_phrase_match;    // not available on all versions of mg
+  vector<int> docFreq;           // empty if not requested
+  MetadataInfo_tmap metadata;    // empty if not requested
+  text_t classifier_metadata_type;        // empty if not requested
+  int    classifier_metadata_offset;      // 0 if not requested
+  ResultDocInfo_t &operator=(const ResultDocInfo_t &x);
+};
+
+typedef vector<ResultDocInfo_t> ResultDocInfo_tarray;
+
+
+// FilterResponse ::= SEQUENCE {
+//   numDocs   [0] IMPLICIT INTEGER,
+//   isApprox  [1] ENUMERATED {Exact(0), Approximate(1), MoreThan(2)}, -- whether numDocs is approximate
+//   termInfo  [2] IMPLICIT SEQUENCE OF TermInfo,                      -- empty if not required
+//   docInfo   [3] IMPLICIT SEQUENCE OF ResultDocInfo                  -- empty if not required
+// }
+
+enum isapprox {Exact=0, Approximate=1, MoreThan=2};
+
+struct FilterResponse_t {
+  void clear ();
+  FilterResponse_t () {clear();}
+
+  text_t error_message;  // Currently only used by Lucene
+  int numDocs;
+  isapprox isApprox;
+  TermInfo_tarray termInfo; // empty if not requested
+  ResultDocInfo_tarray docInfo; // empty if not requested
+  text_tset stopwords;
+
+  FilterResponse_t &operator=(const FilterResponse_t &x);
+};
+
+
+// DocumentRequest ::= SEQUENCE {
+//   OID       GeneralString,
+//   docType   GeneralString,
+//   docFormat GeneralString
+// }
+struct DocumentRequest_t {
+  void clear ();
+  DocumentRequest_t () {clear();}
+
+  text_t OID;
+  text_t docType;
+  text_t docFormat;
+};
+
+
+// DocumentResponse ::= SEQUENCE {
+//   doc OCTET STRING
+// }
+
+struct DocumentResponse_t {
+  void clear ();
+  DocumentResponse_t () {clear();}
+
+  text_t doc;
+};
+
+
+#endif
+
Index: /gsdl/trunk/src/colservr/win32.mak
===================================================================
--- /gsdl/trunk/src/colservr/win32.mak	(revision 15415)
+++ /gsdl/trunk/src/colservr/win32.mak	(revision 15416)
@@ -92,5 +92,5 @@
 !ENDIF
 
-HEADERS = mgq.h search.h mgsearch.h querycache.h queryinfo.h collectserver.h \
+HEADERS = comtypes.h mgq.h search.h mgsearch.h querycache.h queryinfo.h collectserver.h \
           colservrconfig.h maptools.h filter.h source.h browsefilter.h \
           queryfilter.h mgqueryfilter.h mggdbmsource.h phrasesearch.h \
@@ -99,5 +99,5 @@
           expat_resultset.h expat_document.h gdbmsource.h
 
-SOURCES = mgq.c search.cpp mgsearch.cpp querycache.cpp queryinfo.cpp \
+SOURCES = comtypes.cpp mgq.c search.cpp mgsearch.cpp querycache.cpp queryinfo.cpp \
 	  collectserver.cpp colservrconfig.cpp maptools.cpp filter.cpp \
 	  source.cpp browsefilter.cpp queryfilter.cpp mgqueryfilter.cpp \
@@ -107,5 +107,5 @@
           expat_resultset.cpp expat_document.cpp gdbmsource.cpp
 
-OBJECTS = mgq.obj search.obj mgsearch.obj querycache.obj queryinfo.obj \
+OBJECTS = comtypes.obj mgq.obj search.obj mgsearch.obj querycache.obj queryinfo.obj \
 	  collectserver.obj colservrconfig.obj maptools.obj filter.obj \
 	  source.obj browsefilter.obj queryfilter.obj mgqueryfilter.obj \
Index: /gsdl/trunk/src/oaiservr/Makefile.in
===================================================================
--- /gsdl/trunk/src/oaiservr/Makefile.in	(revision 15415)
+++ /gsdl/trunk/src/oaiservr/Makefile.in	(revision 15416)
@@ -97,5 +97,5 @@
 SOURCES = $(COMMONSOURCES) $(OAISOURCES)
 
-RECPTOBJECTS = ../../src/recpt/comtypes.o ../../src/recpt/OIDtools.o \
+RECPTOBJECTS = ../../src/recpt/OIDtools.o \
 	../../src/recpt/nullproto.o ../../src/recpt/recptproto.o \
 	../../src/recpt/htmlutils.o ../../src/recpt/infodbclass.o \
@@ -112,5 +112,6 @@
 
 
-COLSERVROBJECTS = ../../src/colservr/mgq.o \
+COLSERVROBJECTS = ../../src/colservr/comtypes.o \
+		  ../../src/colservr/mgq.o \
 		  ../../src/colservr/search.o \
                   ../../src/colservr/mgsearch.o \
Index: /gsdl/trunk/src/oaiservr/win32.mak
===================================================================
--- /gsdl/trunk/src/oaiservr/win32.mak	(revision 15415)
+++ /gsdl/trunk/src/oaiservr/win32.mak	(revision 15416)
@@ -114,5 +114,5 @@
 SOURCES = $(COMMONSOURCES) $(OAISOURCES)
 
-RECPTOBJECTS = "$(recptDir)\comtypes.obj" "$(recptDir)\OIDtools.obj" "$(recptDir)\nullproto.obj" "$(recptDir)\recptproto.obj" \
+RECPTOBJECTS = "$(recptDir)\OIDtools.obj" "$(recptDir)\nullproto.obj" "$(recptDir)\recptproto.obj" \
                "$(recptDir)\htmlutils.obj" "$(recptDir)\infodbclass.obj" "$(recptDir)\cgiargs.obj" \
                "$(recptDir)\cgiutils.obj"
Index: /gsdl/trunk/src/recpt/Makefile.in
===================================================================
--- /gsdl/trunk/src/recpt/Makefile.in	(revision 15415)
+++ /gsdl/trunk/src/recpt/Makefile.in	(revision 15416)
@@ -159,5 +159,5 @@
 COMMONHEADERS = receptionist.h cgiwrapper.h cgiargs.h action.h browserclass.h \
                 converter.h maincfg.h cgiutils.h OIDtools.h browsetoolsclass.h \
-		statusaction.h pageaction.h comtypes.h recptproto.h \
+		statusaction.h pageaction.h recptproto.h \
 		pingaction.h queryaction.h documentaction.h  \
 		extlinkaction.h browseaction.h htmlutils.h argdb.h \
@@ -181,5 +181,5 @@
 COMMONSOURCES = receptionist.cpp cgiwrapper.cpp cgiargs.cpp action.cpp browserclass.cpp \
                 converter.cpp maincfg.cpp cgiutils.cpp OIDtools.cpp browsetoolsclass.cpp \
-		statusaction.cpp pageaction.cpp comtypes.cpp  \
+		statusaction.cpp pageaction.cpp \
 		recptproto.cpp pingaction.cpp queryaction.cpp documentaction.cpp \
 		extlinkaction.cpp browseaction.h htmlutils.cpp querytools.cpp \
@@ -214,5 +214,5 @@
 COMMONOBJECTS = receptionist.o cgiwrapper.o cgiargs.o action.o browserclass.o \
                 converter.o maincfg.o cgiutils.o OIDtools.o browsetoolsclass.o \
-		statusaction.o pageaction.o comtypes.o \
+		statusaction.o pageaction.o \
 		recptproto.o pingaction.o queryaction.o documentaction.o \
 		extlinkaction.o browseaction.o htmlutils.o querytools.o browseactiontools.o \
@@ -240,5 +240,6 @@
 
 
-COLSERVROBJECTS = ../colservr/mgq.o \
+COLSERVROBJECTS = ../colservr/comtypes.o \
+		  ../colservr/mgq.o \
 		  ../colservr/search.o \
                   ../colservr/mgsearch.o \
@@ -393,5 +394,5 @@
 test:
 
-Z3950_OBJS = comtypes.o recptproto.o infodbclass.o OIDtools.o \
+Z3950_OBJS = recptproto.o infodbclass.o OIDtools.o \
 	 $(COLSERVROBJECTS) \
     ../colservr/z3950parser.o ../colservr/z3950explain.o \
Index: dl/trunk/src/recpt/comtypes.cpp
===================================================================
--- /gsdl/trunk/src/recpt/comtypes.cpp	(revision 15415)
+++ 	(revision )
@@ -1,294 +1,0 @@
-/**********************************************************************
- *
- * comtypes.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 "comtypes.h"
-
-
-text_t get_comerror_string (comerror_t err) {
-  if (err == noError) return "no error";
-  else if (err == authenticationFailure) return "authentication failure";
-  else if (err == protocolError) return "protocol error";
-  else if (err == configurationError) return "configuration error";
-  else if (err == systemProblem) return "system problem";
-  else if (err == syntaxError) return "query syntax error";
-  return "unknown problem";
-}
-
-
-void ShortColInfo_t::clear() {
-  name.clear();
-  host.clear();
-  port = 0;
-}
-
-/*
-   isPublic now defaults to true  most values are default          
-   similar to a constructor in a class to make some initializations
-*/
-
-void ColInfoResponse_t::clear () {
-  shortInfo.clear();
-  useBook=false;
-  isPublic=true;
-  isBeta=false;
-  isSegmented=false;
-  isCollectGroup=false;
-  languages.erase(languages.begin(), languages.end());
-  ccsCols.erase(ccsCols.begin(), ccsCols.end());
-  ccsOptions = 0;
-  stemIndexes = 3; // old default was both provided
-  buildDate=0;
-  buildType.clear();
-  numDocs=0;
-  numSections=0;
-  numWords=0;
-  numBytes=0;
-  format.erase(format.begin(), format.end());
-  building.erase(building.begin(), building.end());
-  httpdomain.clear();
-  httpprefix.clear();
-  receptionist.clear();
-
-  // Setting some authentication parameters use with
-  // various parts of the code.
-  
-  authenticate.clear();         // turned off by default, individual collection authentication
-  auth_group.clear();              // turned off by default, authentication by groups method
-  public_documents.clear();          // turned off by default, allow access to these documents <list>
-  private_documents.clear();           // turned off by default, disallow access to these documents <list>
-    
-}
-
-text_t ColInfoResponse_t::get_collectionmeta(text_t name, text_t lang) {
-  text_t value = collectionmeta[name][lang];
-  if (value.empty()) {
-    value = collectionmeta[name][g_EmptyText];
-  }
-  return value;
-
-}
-
-void InfoFiltersResponse_t::clear () {
-  filterNames.erase(filterNames.begin(), filterNames.end());
-}
-
-
-void InfoFilterOptionsRequest_t::clear () {
-  filterName.clear();
-}
-
-
-void FilterOption_t::clear () {
-  name.clear();
-  type = booleant;
-  repeatable = onePerQuery;
-  defaultValue.clear();
-  validValues.erase(validValues.begin(), validValues.end());
-}
-
-void FilterOption_t::check_defaultValue () {
-  text_tarray::iterator here, end;
-
-  // how the default is interpreted depends on the option type
-  switch (type) {
-  case booleant: 
-  case enumeratedt: // has to be one of the validValues
-    here = validValues.begin ();
-    end = validValues.end ();
-    while (here != end) {
-      if (*here == defaultValue) return;
-      ++here;
-    }
-    
-    break;
-
-  case integert: // has to be in the validValues range
-    if ((validValues.size() >= 2) &&
-	(validValues[0].getint() <= defaultValue.getint()) &&
-	(validValues[1].getint() >= defaultValue.getint()))
-      return;
-    break;
-
-  case stringt: // any value is valid
-    return; 
-  }
-
-  // did not find the defaultValue
-  if (validValues.empty()) defaultValue.clear();
-  else defaultValue = validValues[0];
-}
-
-
-bool operator==(const FilterOption_t &x, const FilterOption_t &y) {
-  return ((x.name == y.name) &&
-	  (x.type == y.type) &&
-	  (x.repeatable == y.repeatable) &&
-	  (x.defaultValue == y.defaultValue) &&
-	  (x.validValues == y.validValues));
-}
-
-bool operator<(const FilterOption_t &x, const FilterOption_t &y) {
-  return ((x.name < y.name) ||
-	  ((x.name == y.name) &&
-	   ((x.type < y.type) ||
-	    ((x.type == y.type) &&
-	     ((x.repeatable < y.repeatable) ||
-	      ((x.repeatable == y.repeatable) &&
-	       ((x.defaultValue < y.defaultValue) ||
-		((x.defaultValue == y.defaultValue) &&
-		 (x.validValues < y.validValues)))))))));
-}
-
-
-
-void InfoFilterOptionsResponse_t::clear () {
-  filterOptions.erase(filterOptions.begin(), filterOptions.end());
-}
-
-
-void OptionValue_t::clear () {
-  name.clear();
-  value.clear();
-}
-
-
-void FilterRequest_t::clear () {
-  filterName.clear();
-  filterLang.clear();
-  filterOptions.erase(filterOptions.begin(), filterOptions.end());
-  docSet.erase(docSet.begin(), docSet.end());
-  filterResultOptions = 0;
-  requestParams.clear();
-  refParams.clear();
-  fields.erase(fields.begin(), fields.end());
-  getParents = false;
-}
-
-
-void TermInfo_t::clear () {
-  term.clear();
-  freq = 0;
-  matchTerms.erase (matchTerms.begin(), matchTerms.end());
-}
-
-
-void MetadataInfo_t::clear () {
-  params.clear();
-  isRef = false;
-  values.erase(values.begin(), values.end());
-  if (parent != NULL) {
-    delete parent;
-    parent = NULL;
-  }
-}
-
-MetadataInfo_t::MetadataInfo_t () {parent=NULL;clear();}
-
-// copy constructor
-MetadataInfo_t::MetadataInfo_t (const MetadataInfo_t &x) {
-  params = x.params;
-  isRef = x.isRef;
-  values = x.values;
-  if (x.parent == NULL) parent = NULL;
-  else {
-    parent = new MetadataInfo_t ();
-    *parent = *(x.parent);
-  }
-}
-
-MetadataInfo_t::~MetadataInfo_t () {
-  if (parent != NULL) {
-    delete parent;
-    parent = NULL;
-  }
-}
-
-MetadataInfo_t &MetadataInfo_t::operator=(const MetadataInfo_t &x) {
-  if (&x != this) {
-    params = x.params;
-    isRef = x.isRef;
-    values = x.values;
-    if (x.parent == NULL) parent = NULL;
-    else {
-      parent = new MetadataInfo_t ();
-      *parent = *(x.parent);
-    }
-  }
-  return *this;
-}
-
-void ResultDocInfo_t::clear () {
-  OID.clear ();
-  ranking = 0;
-  result_num = 0;
-  num_terms_matched = 0;
-  num_phrase_match = 0;
-  docFreq.erase(docFreq.begin(), docFreq.end());
-  metadata.erase(metadata.begin(), metadata.end());
-  classifier_metadata_type.erase(classifier_metadata_type.begin(), 
-				 classifier_metadata_type.end());
-  classifier_metadata_offset = 0;
-  
-}
-
-ResultDocInfo_t &ResultDocInfo_t::operator=(const ResultDocInfo_t &x) {
-  OID = x.OID; 
-  ranking = x.ranking;
-  result_num = x.result_num;
-  num_terms_matched = x.num_terms_matched;
-  num_phrase_match = x.num_phrase_match;
-  docFreq = x.docFreq; 
-  metadata = x.metadata;
-  return *this;
-}
-
-void FilterResponse_t::clear () {
-  error_message = g_EmptyText;
-  numDocs = 0;
-  isApprox = Exact;
-  termInfo.erase (termInfo.begin(), termInfo.end());
-  docInfo.erase (docInfo.begin(), docInfo.end());
-  stopwords.clear();
-}
-
-FilterResponse_t &FilterResponse_t::operator=(const FilterResponse_t &x) {
-  error_message = x.error_message;
-  numDocs = x.numDocs;
-  isApprox = x.isApprox;
-  termInfo = x.termInfo;
-  docInfo = x.docInfo;
-  stopwords = x.stopwords;
-  return *this;
-}
-
-void DocumentRequest_t::clear () {
-  OID.clear();
-  docType.clear();
-  docFormat.clear();
-}
-
-void DocumentResponse_t::clear () {
-  doc.clear();
-}
Index: dl/trunk/src/recpt/comtypes.h
===================================================================
--- /gsdl/trunk/src/recpt/comtypes.h	(revision 15415)
+++ 	(revision )
@@ -1,377 +1,0 @@
-/**********************************************************************
- *
- * comtypes.h -- 
- * Copyright (C) 1999,2004  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 COMTYPES_H
-#define COMTYPES_H
-
-#include "gsdlconf.h"
-#include "text_t.h"
-
-#if defined(GSDL_USE_OBJECTSPACE)
-#  include <ospace\std\vector>
-#  include <ospace\std\list>
-#  include <ospace\std\memory> // for pair
-#  include <ospace\std\map>
-#elif defined(GSDL_USE_STL_H)
-#  include <vector.h>
-#  include <list.h>
-#  include <memory.h> // for pair
-#  include <map.h>
-#else
-#  include <vector>
-#  include <list>
-#  include <memory> // for pair
-#  include <map>
-#endif
-
-
-enum comerror_t {noError, authenticationFailure, protocolError, 
-		 configurationError, systemProblem, syntaxError};
-text_t get_comerror_string (comerror_t err);
-
-
-// ShortColInfo ::= SEQUENCE {
-//   name GeneralString,
-//   host GeneralString,
-//   port INTEGER
-// }
-struct ShortColInfo_t {
-  void clear ();
-  ShortColInfo_t () {clear();}
-
-  text_t name;
-  text_t host;
-  int port;
-};
-
-// for collection metadata: metadata name -> lang -> value
-// for collection macros: macro name -> params -> value
-typedef map<text_t, text_tmap, lttext_t> collectionmeta_map; 
-
-#define CCSUniformSearchResultsFormatting 1
-
-#define SIcasefold 1
-#define SIstem 2
-#define SIaccentfold 4
-
-struct ColInfoResponse_t {
-  void clear ();
-  ColInfoResponse_t () {clear();} 
-  text_t get_collectionmeta(text_t name, text_t lang);
-  
-  ShortColInfo_t shortInfo;
-  bool useBook;	//whether we want to display the book
-  bool isPublic;
-  bool isBeta;
-  bool isSegmented;
-  bool isCollectGroup; // used to group a set of collections as one item on the home page
-  unsigned long buildDate;
-  text_tarray ccsCols;    // empty if collection does not use cross-collection searching
-  int ccsOptions; // uses CCS #defines from above
-  int stemIndexes; // uses SI #defines from above
-  text_tarray languages;
-  unsigned long numDocs;     // 0 if not known
-  unsigned long numSections; // 0 if not known
-  unsigned long numWords;    // 0 if not known
-  unsigned long numBytes;    // 0 if not known
-  collectionmeta_map  collectionmeta;
-  text_tmap      format;
-  collectionmeta_map	 collection_macros; // for collectionmacro config directive (> gsdl 2.53)
-  text_tmap      building;
-  text_t         httpdomain;      // GRB: could these two http items need removing
-  text_t         httpprefix;
-  text_t         receptionist;
-  text_t         buildType;           // 'mg' or 'mgpp' or 'lucene'
-  text_t         authenticate;      // 'document' or 'collection'
-  text_t         auth_group;          // 'mygroup' 'yourgroup'
-  text_tmap      public_documents;    // the acl to allow access to listed documents
-  text_tmap      private_documents;   // the acl to disallow access to listed documents
-};
-
-
-// -- filter options which might be supported for the QueryFilter
-// --
-// -- onePerQuery StartResults   integer
-// -- onePerQuery EndResults     integer
-// -- onePerQuery QueryType      enumerated (boolean, ranked)
-// -- onePerTerm  Term           string ???
-// -- onePerTerm  Casefold       boolean
-// -- onePerTerm  Stem           boolean
-// -- onePerTerm  Index          enumerated
-// -- onePerTerm  Subcollection  enumerated
-// --
-// -- filter options which might be supported for the BrowseFilter
-// --
-// -- onePerQuery StartResults   integer
-// -- onePerQuery EndResults     integer
-// -- onePerQuery ParentNode     string ("" will return the browsing available)
-// --
-// -- The NullFilter always returns the set it was given, it doesn't have
-// -- any options
-
-// InfoFiltersResponse ::= SEQUENCE {
-//   filterNames StringSet
-// }
-struct InfoFiltersResponse_t {
-  void clear ();
-
-  text_tset filterNames;
-};
-
-// InfoFilterOptionsRequest ::= SEQUENCE {
-//   filterName GeneralString
-// }
-struct InfoFilterOptionsRequest_t {
-  void clear ();
-
-  text_t filterName;
-};
-
-// FilterOption ::= SEQUENCE {
-//   name         GeneralString,
-//   type         ENUMERATED {booleant(0), integert(1), enumeratedt(2), stringt(3)},
-//   repeatable   ENUMERATED {onePerQuery(0), onePerTerm(1), nPerTerm(2)},
-//   defaultValue GeneralString,
-//   -- the interpretation of the validValues depends on the type
-//   -- for boolean: the first value is the false value, the second is true value
-//   -- for integer: the first value is the minimum, the second the maximum
-//   -- for enumerated: all values a listed
-//   -- for string: this value is ignored
-//   validValues  StringSequence
-// }
-struct FilterOption_t {
-  void clear ();
-  void check_defaultValue ();
-  FilterOption_t () {clear();}
-
-  text_t name;
-
-  enum type_t {booleant=0, integert=1, enumeratedt=2, stringt=3};
-  type_t type;
-
-  enum repeatable_t {onePerQuery=0, onePerTerm=1, nPerTerm=2};
-  repeatable_t repeatable;
-
-  text_t defaultValue;
-  text_tarray validValues;
-};
-
-bool operator==(const FilterOption_t &x, const FilterOption_t &y);
-bool operator<(const FilterOption_t &x, const FilterOption_t &y);
-
-
-typedef map<text_t, FilterOption_t, lttext_t> FilterOption_tmap;
-
-
-// InfoFilterOptionsResponse ::= SEQUENCE {
-//   filterOptions SET OF FilterOption
-// }
-struct InfoFilterOptionsResponse_t {
-  void clear ();
-
-  FilterOption_tmap filterOptions;
-};
-
-
-// OptionValue ::= SEQUENCE {
-//   name  GeneralString,
-//   value GeneralString
-// }
-struct OptionValue_t {
-  void clear ();
-
-  text_t name;
-  text_t value;
-};
-
-typedef vector<OptionValue_t> OptionValue_tarray;
-
-
-// -- Terms are presented in the same order that they are requested,
-// -- any information relating to the terms is in reference to the
-// -- index specified for that term.
-//
-// FilterRequest ::= SEQUENCE {
-//   filterName          [0] GeneralString,
-//   filterOptions       [1] IMPLICIT SEQUENCE OF OptionValue,
-//   docSet              [2] IMPLICIT StringSequence, -- the OID "" represents everything
-//   filterResultOptions [3] IMPLICIT BIT STRING {termFreq(0), matchTerms(1), OID(2), 
-//                                                subCol(3), ranking(4), docFreq(5), 
-//                                                metadata(6)}
-// 
-//   -- the next set of options are for the metadata request, 
-//   -- they can be left blank if metadata is not wanted
-//   requestParams       [4] IMPLICIT GeneralString, -- used to negotiate the metadata content
-//   refParams           [5] IMPLICIT GeneralString, -- used to decide whether to return a 
-//                                                   -- reference to the data or the actual data
-//   fields              [6] IMPLICIT StringSet
-//   getParents          [7] IMPLICIT BOOLEAN        -- gets metadata of all parents too
-// }
-#define FRtermFreq   1
-#define FRmatchTerms 2
-#define FROID        4
-#define FRsubCol     8
-#define FRranking    16
-#define FRdocFreq    32
-#define FRmetadata   64
-// used to indicate a full text browse query for mgpp
-#define FRfullTextBrowse  128
-
-struct FilterRequest_t {
-  void clear ();
-  FilterRequest_t () {clear();}
-
-  text_t filterName;
-  text_t filterLang; // non empty if we want info to be retrived in language specific
-  OptionValue_tarray filterOptions;
-  text_tarray docSet;        // empty if not used
-  int filterResultOptions; // use the FR* defines above
-
-  text_t requestParams; // empty if not used
-  text_t refParams;     // empty if not used
-  text_tset fields;   // empty if not used
-  bool getParents;      // defaults to false
-};
-
-
-// TermInfo ::= SEQUENCE {
-//   term       [0] GeneralString,
-//   freq       [1] IMPLICIT INTEGER,       -- 0 if not requested
-//   matchTerms [2] IMPLICIT StringSequence -- empty if not requested
-// }
-struct TermInfo_t {
-  void clear ();
-  TermInfo_t () {clear();}
-
-  text_t term;
-  int freq; // 0 if not requested
-  text_tarray matchTerms; // empty if not requested
-};
-
-typedef vector<TermInfo_t> TermInfo_tarray;
-
-
-// MetadataInfo ::= SEQUENCE {
-//   params  [0] IMPLICIT GeneralString,
-//   isRef   [1] IMPLICIT BOOLEAN,
-//   values  [3] IMPLICIT SEQUENCE OF GeneralString,
-//   name    [4] IMPLICIT GeneralString
-// }
-struct MetadataInfo_t {
-  text_t params;
-  bool isRef;
-  text_tarray values;
-  MetadataInfo_t *parent;
-
-  void clear ();
-  MetadataInfo_t ();
-  MetadataInfo_t (const MetadataInfo_t &x); // copy constructor
-  ~MetadataInfo_t ();
-  MetadataInfo_t &operator=(const MetadataInfo_t &x);
-};
-
-typedef map<text_t, MetadataInfo_t, lttext_t> MetadataInfo_tmap;
-
-// ResultDocInfo ::= SEQUENCE {
-//   OID      [0] IMPLICIT GeneralString,
-//   ranking  [1] IMPLICIT INTEGER,             -- 0 if not requested, range 0-10000
-//   docFreq  [2] IMPLICIT SEQUENCE OF INTEGER, -- empty if not requested
-//   metadata [3] IMPLICIT SEQUENCE OF MetadataInfo, -- no longer a SEQUENCE (SET maybe??)
-//   classifier_metadata_type   [4] IMPLICIT GeneralString,       -- empty if not requested
-//   classifier_metadata_offset [5] IMPLICIT INTEGER,             -- 0 if not requested
-// }
-struct ResultDocInfo_t {
-  void clear ();
-  ResultDocInfo_t () {clear();}
-
-  text_t OID;
-  int result_num;          // place in results list
-  int ranking;             // 0 if not requested (real ranking*10000)
-  int num_terms_matched;   // not available on all versions of mg
-  int num_phrase_match;    // not available on all versions of mg
-  vector<int> docFreq;           // empty if not requested
-  MetadataInfo_tmap metadata;    // empty if not requested
-  text_t classifier_metadata_type;        // empty if not requested
-  int    classifier_metadata_offset;      // 0 if not requested
-  ResultDocInfo_t &operator=(const ResultDocInfo_t &x);
-};
-
-typedef vector<ResultDocInfo_t> ResultDocInfo_tarray;
-
-
-// FilterResponse ::= SEQUENCE {
-//   numDocs   [0] IMPLICIT INTEGER,
-//   isApprox  [1] ENUMERATED {Exact(0), Approximate(1), MoreThan(2)}, -- whether numDocs is approximate
-//   termInfo  [2] IMPLICIT SEQUENCE OF TermInfo,                      -- empty if not required
-//   docInfo   [3] IMPLICIT SEQUENCE OF ResultDocInfo                  -- empty if not required
-// }
-
-enum isapprox {Exact=0, Approximate=1, MoreThan=2};
-
-struct FilterResponse_t {
-  void clear ();
-  FilterResponse_t () {clear();}
-
-  text_t error_message;  // Currently only used by Lucene
-  int numDocs;
-  isapprox isApprox;
-  TermInfo_tarray termInfo; // empty if not requested
-  ResultDocInfo_tarray docInfo; // empty if not requested
-  text_tset stopwords;
-
-  FilterResponse_t &operator=(const FilterResponse_t &x);
-};
-
-
-// DocumentRequest ::= SEQUENCE {
-//   OID       GeneralString,
-//   docType   GeneralString,
-//   docFormat GeneralString
-// }
-struct DocumentRequest_t {
-  void clear ();
-  DocumentRequest_t () {clear();}
-
-  text_t OID;
-  text_t docType;
-  text_t docFormat;
-};
-
-
-// DocumentResponse ::= SEQUENCE {
-//   doc OCTET STRING
-// }
-
-struct DocumentResponse_t {
-  void clear ();
-  DocumentResponse_t () {clear();}
-
-  text_t doc;
-};
-
-
-#endif
-
Index: /gsdl/trunk/src/recpt/win32.mak
===================================================================
--- /gsdl/trunk/src/recpt/win32.mak	(revision 15415)
+++ /gsdl/trunk/src/recpt/win32.mak	(revision 15416)
@@ -118,5 +118,5 @@
 COMMONHEADERS = receptionist.h cgiargs.h action.h browserclass.h \
                 converter.h maincfg.h cgiutils.h OIDtools.h browsetoolsclass.h \
-		statusaction.h pageaction.h comtypes.h recptproto.h pingaction.h \
+		statusaction.h pageaction.h recptproto.h pingaction.h \
 		queryaction.h documentaction.h extlinkaction.h htmlutils.h \
 		querytools.h formattools.h tipaction.h authenaction.h infodbclass.h \
@@ -134,5 +134,5 @@
 COMMONSOURCES = receptionist.cpp cgiargs.cpp action.cpp browserclass.cpp \
                 converter.cpp maincfg.cpp cgiutils.cpp OIDtools.cpp browsetoolsclass.cpp \
-		statusaction.cpp pageaction.cpp comtypes.cpp \
+		statusaction.cpp pageaction.cpp \
 		recptproto.cpp pingaction.cpp queryaction.cpp documentaction.cpp \
 		extlinkaction.cpp htmlutils.cpp querytools.cpp formattools.cpp \
@@ -152,5 +152,5 @@
 COMMONOBJECTS = receptionist.obj cgiargs.obj action.obj browserclass.obj \
                 converter.obj maincfg.obj cgiutils.obj OIDtools.obj browsetoolsclass.obj \
-		statusaction.obj pageaction.obj comtypes.obj recptproto.obj \
+		statusaction.obj pageaction.obj recptproto.obj \
 		pingaction.obj queryaction.obj documentaction.obj extlinkaction.obj \
 		htmlutils.obj querytools.obj formattools.obj tipaction.obj \
@@ -215,5 +215,5 @@
 	"$(YAZDIR)\lib\yaz.lib" \
 	"$(GSDLHOME)\packages\d2m\libd2m.lib" \
-	zparse.yy.obj comtypes.obj infodbclass.obj \
+	zparse.yy.obj infodbclass.obj \
 	OIDtools.obj recptproto.obj \
 	nullproto.obj
