Parent: [d0aaf9] (diff)

Child: [d392d3] (diff)

Download this file

mimehandler.h    37 lines (28 with data), 982 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#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 */
#include <string>
#include <list>
#include "rclconfig.h"
#include "rcldb.h"
/**
* Document interner class. We sometimes have data to pass to an interner
*/
class MimeHandler {
public:
virtual ~MimeHandler() {}
virtual bool worker(RclConfig *, const std::string &filename,
const std::string &mimetype, Rcl::Doc& outdoc) = 0;
};
/**
* Return indexing handler class for given mime type
* returned pointer should be deleted by caller
*/
extern MimeHandler *getMimeHandler(const std::string &mtyp, ConfTree *mhdlers);
/**
* Return external viewer exec string for given mime type
*/
extern std::string getMimeViewer(const std::string &mtyp, ConfTree *mhandlers);
bool getUncompressor(const std::string &mtype, ConfTree *mhandlers,
std::list<std::string>& cmd);
#endif /* _MIMEHANDLER_H_INCLUDED_ */