aboutsummaryrefslogtreecommitdiff
path: root/src/history.cpp
blob: 8be46aef30f2f88fb3bca3d2161f0123fba65137 (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
#include "history.h"

namespace newsboat {

History::History()
	: rs_object(history::bridged::create())
{
}

void History::add_line(const std::string& line)
{
	history::bridged::add_line(*rs_object, line);
}

std::string History::previous_line()
{
	return std::string(history::bridged::previous_line(*rs_object));
}

std::string History::next_line()
{
	return std::string(history::bridged::next_line(*rs_object));
}

void History::load_from_file(const Filepath& file)
{
	history::bridged::load_from_file(*rs_object, file);
}

void History::save_to_file(const Filepath& file, unsigned int limit)
{
	history::bridged::save_to_file(*rs_object, file, limit);
}

} // namespace newsboat