|
a/src/internfile/mh_html.h |
|
b/src/internfile/mh_html.h |
1 |
#ifndef _HTML_H_INCLUDED_
|
1 |
#ifndef _HTML_H_INCLUDED_
|
2 |
#define _HTML_H_INCLUDED_
|
2 |
#define _HTML_H_INCLUDED_
|
3 |
/* @(#$Id: mh_html.h,v 1.4 2005-03-31 10:04:07 dockes Exp $ (C) 2004 J.F.Dockes */
|
3 |
/* @(#$Id: mh_html.h,v 1.5 2005-11-08 21:02:55 dockes Exp $ (C) 2004 J.F.Dockes */
|
4 |
#include "mimehandler.h"
|
4 |
#include "mimehandler.h"
|
5 |
#include <string>
|
5 |
#include <string>
|
6 |
|
6 |
|
7 |
// Code to turn an html document into an internal one. There are 2
|
7 |
/// Translate html document to an internal one.
|
|
|
8 |
///
|
8 |
// interfaces, depending if we're working on a file, or on a
|
9 |
/// There are 2 interfaces, depending if we're working on a file, or
|
9 |
// string. The string form is with external handlers for foreign
|
10 |
/// on a string. The string form is applied to the output of external
|
10 |
// formats: they return a result in html, which has the advantage to
|
11 |
/// handlers for foreign formats: they return a result in html, which
|
11 |
// be text (easy to use in shell-scripts), and semi-structured (can
|
12 |
/// has the advantage to be text (easy to use in shell-scripts), and
|
12 |
// carry titles, abstracts, whatever)
|
13 |
/// semi-structured (can carry titles, abstracts, whatever)
|
13 |
class MimeHandlerHtml : public MimeHandler {
|
14 |
class MimeHandlerHtml : public MimeHandler {
|
14 |
public:
|
15 |
public:
|
15 |
std::string charsethint;
|
16 |
std::string charsethint;
|
|
|
17 |
/// Create internal document from html file (standard interface)
|
16 |
virtual MimeHandler::Status worker(RclConfig *conf, const string &fn,
|
18 |
virtual MimeHandler::Status mkDoc(RclConfig *conf, const string &fn,
|
17 |
const string &mtype, Rcl::Doc &docout, string&);
|
19 |
const string &mtype, Rcl::Doc &docout, string&);
|
|
|
20 |
/// Create internal doc from html string (postfilter for external ones)
|
18 |
virtual MimeHandler::Status worker1(RclConfig *conf, const string &fn,
|
21 |
virtual MimeHandler::Status mkDoc(RclConfig *conf, const string &fn,
|
19 |
const string& htext,
|
22 |
const string& htext,
|
20 |
const string &mtype, Rcl::Doc &docout);
|
23 |
const string &mtype, Rcl::Doc &docout);
|
21 |
};
|
24 |
};
|
22 |
#endif /* _HTML_H_INCLUDED_ */
|
25 |
#endif /* _HTML_H_INCLUDED_ */
|