|
a/src/internfile/mh_text.h |
|
b/src/internfile/mh_text.h |
|
... |
|
... |
14 |
* Free Software Foundation, Inc.,
|
14 |
* Free Software Foundation, Inc.,
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
16 |
*/
|
16 |
*/
|
17 |
#ifndef _MH_TEXT_H_INCLUDED_
|
17 |
#ifndef _MH_TEXT_H_INCLUDED_
|
18 |
#define _MH_TEXT_H_INCLUDED_
|
18 |
#define _MH_TEXT_H_INCLUDED_
|
19 |
/* @(#$Id: mh_text.h,v 1.2 2006-01-30 11:15:27 dockes Exp $ (C) 2004 J.F.Dockes */
|
19 |
/* @(#$Id: mh_text.h,v 1.3 2006-12-15 12:40:02 dockes Exp $ (C) 2004 J.F.Dockes */
|
20 |
|
20 |
|
21 |
#include <string>
|
21 |
#include <string>
|
|
|
22 |
using std::string;
|
22 |
|
23 |
|
23 |
#include "rclconfig.h"
|
|
|
24 |
#include "rcldb.h"
|
|
|
25 |
#include "mimehandler.h"
|
24 |
#include "mimehandler.h"
|
26 |
|
25 |
|
27 |
/**
|
26 |
/**
|
28 |
* Handler for text/plain files.
|
27 |
* Handler for text/plain files.
|
29 |
*
|
28 |
*
|
30 |
* Maybe try to guess charset, or use default, then transcode to utf8
|
29 |
* Maybe try to guess charset, or use default, then transcode to utf8
|
31 |
*/
|
30 |
*/
|
32 |
class MimeHandlerText : public MimeHandler {
|
31 |
class MimeHandlerText : public RecollFilter {
|
33 |
public:
|
32 |
public:
|
34 |
MimeHandler::Status mkDoc(RclConfig *conf, const std::string &fn,
|
33 |
MimeHandlerText(const string& mt) : RecollFilter(mt) {}
|
35 |
const std::string &mtype, Rcl::Doc &docout,
|
34 |
virtual ~MimeHandlerText() {}
|
36 |
std::string&);
|
35 |
virtual bool set_document_file(const string &file_path);
|
37 |
|
36 |
virtual bool set_document_string(const string&);
|
|
|
37 |
virtual bool next_document();
|
|
|
38 |
private:
|
|
|
39 |
string m_text;
|
38 |
};
|
40 |
};
|
39 |
|
41 |
|
40 |
#endif /* _MH_TEXT_H_INCLUDED_ */
|
42 |
#endif /* _MH_TEXT_H_INCLUDED_ */
|