aboutsummaryrefslogtreecommitdiff
path: root/include/feedretriever.h
blob: a5ce3471b5090b372e46dfce202e3dc3f68b7507 (plain) (blame)
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
#ifndef NEWSBOAT_FEEDRETRIEVER_H_
#define NEWSBOAT_FEEDRETRIEVER_H_

#include <string>

#include "rss/feed.h"

namespace newsboat {

class Cache;
class ConfigContainer;
class CurlHandle;
class RemoteApi;
class RssIgnores;

class FeedRetriever {
public:
	FeedRetriever(ConfigContainer& cfg, Cache& ch, CurlHandle& easyhandle,
		RssIgnores* ign = nullptr, RemoteApi* api = nullptr);

	rsspp::Feed retrieve(const std::string& uri);

private:
	rsspp::Feed fetch_ttrss(const std::string& feed_id);
	rsspp::Feed fetch_newsblur(const std::string& feed_id);
	rsspp::Feed fetch_ocnews(const std::string& feed_id);
	rsspp::Feed fetch_miniflux(const std::string& feed_id);
	rsspp::Feed fetch_freshrss(const std::string& feed_id);
	rsspp::Feed fetch_feedbin(const std::string& feed_id);
	rsspp::Feed download_http(const std::string& uri);
	rsspp::Feed get_execplugin(const std::string& plugin);
	rsspp::Feed download_filterplugin(const std::string& filter, const std::string& uri);
	rsspp::Feed parse_file(const std::string& file);

	ConfigContainer& cfg;
	Cache& ch;
	RssIgnores* ign;
	RemoteApi* api;
	CurlHandle& easyhandle;
};

} // namespace newsboat

#endif /* NEWSBOAT_RSSPARSER_H_ */