summaryrefslogtreecommitdiff
path: root/project2/xslPreFetch.cpp
blob: 7486c9f6a06ab31f3ec76d30552365279170997b (plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include "xslPreFetch.h"
#include "xmlObjectLoader.h"

DECLARE_LOADER("xslprefetch", XslPreFetch);

XslPreFetch::XslPreFetch(const xmlpp::Element * p) :
	SourceObject(p),
	View(p),
	NoOutputExecute(p),
	CurlHelper(p),
	html(p->get_attribute_value("html") == "true"),
	warnings(p->get_attribute_value("warnings") != "false"),
	encoding(p, "encoding", false)
{
}

XslPreFetch::~XslPreFetch()
{
}

void
XslPreFetch::execute(const Presenter*) const
{
	execute();
}

void
XslPreFetch::execute() const
{
	queue(url(), encoding());
}

void
XslPreFetch::loadComplete(const CommonObjects *)
{
}


CurlHandle::Ptr
XslPreFetch::newCurl() const
{
	return CurlHelper::newCurl();
}

bool
XslPreFetch::asHtml() const
{
	return html;
}

bool
XslPreFetch::withWarnings() const
{
	return warnings;
}