forked from lithiumFlower/doctotext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtml_parser.h
37 lines (31 loc) · 811 Bytes
/
html_parser.h
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
37
#ifndef DOCTOTEXT_HTML_PARSER_H
#define DOCTOTEXT_HTML_PARSER_H
#include "link.h"
#include <string>
#include <vector>
namespace doctotext
{
struct FormattingStyle;
class Metadata;
}
using namespace doctotext;
class HTMLParser
{
private:
struct Implementation;
Implementation* impl;
public:
HTMLParser(const std::string& file_name);
HTMLParser(const char* buffer, size_t size);
~HTMLParser();
void setVerboseLogging(bool verbose);
void setLogStream(std::ostream& log_stream);
bool isHTML();
void getLinks(std::vector<Link>& links);
std::string plainText(const FormattingStyle& formatting);
Metadata metaData();
///turns off charset decoding. It may be useful, if we want to decode data ourself (EML parser is an example).
void skipCharsetDecoding();
bool error();
};
#endif