Switch to side-by-side view

--- a/src/internfile/mimehandler.h
+++ b/src/internfile/mimehandler.h
@@ -1,6 +1,6 @@
 #ifndef _MIMEHANDLER_H_INCLUDED_
 #define _MIMEHANDLER_H_INCLUDED_
-/* @(#$Id: mimehandler.h,v 1.5 2005-02-04 09:39:44 dockes Exp $  (C) 2004 J.F.Dockes */
+/* @(#$Id: mimehandler.h,v 1.6 2005-03-25 09:40:27 dockes Exp $  (C) 2004 J.F.Dockes */
 
 #include <string>
 #include <list>
@@ -10,13 +10,34 @@
 
 
 /**
- * Document interner class. We sometimes have data to pass to an interner
+ * Document interner class. 
  */
 class MimeHandler {
  public:
     virtual ~MimeHandler() {}
-    virtual bool worker(RclConfig *, const std::string &filename, 
-			const std::string &mimetype, Rcl::Doc& outdoc) = 0;
+
+    /**
+     * Transform external data into internal utf8 document
+     *
+     * @param conf the global configuration
+     * @param filename File from which the data comes from
+     * @param mimetype its mime type (from the mimemap configuration file)
+     * @param outdoc   The output document
+     * @param ipath the access path for the document inside the file. 
+     *              For mono-document file types, this will always be empty. 
+     *              It is used, for example for mbox files which may contain
+     *              multiple emails. If this is not empty in input, then the
+     *              caller is requesting a single document (ie: for display).
+     *              If this is empty (during indexation), it will be filled-up
+     *              by the function, and all the file's documents will be 
+     *              returned by successive calls.
+     * @return the return value indicates if there are more documents to be 
+     *         fetched from the same file.
+     */
+    enum Status {MHError, MHDone, MHAgain};
+    virtual Status worker(RclConfig * conf, const std::string &filename, 
+			  const std::string &mimetype, Rcl::Doc& outdoc,
+			  string& ipath) = 0;
 };
 
 /**
@@ -30,6 +51,11 @@
  */
 extern std::string getMimeViewer(const std::string &mtyp, ConfTree *mhandlers);
 
+/** 
+ * Return command to uncompress the given type. The returned command has
+ * substitutable places for input file name and temp dir name, and will
+ * return output name
+ */
 bool getUncompressor(const std::string &mtype, ConfTree *mhandlers,
 		     std::list<std::string>& cmd);