summaryrefslogtreecommitdiff
path: root/include/history.h
blob: 11e90be6ef102ade58ef50ee3dacc8098bfe55ea (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
#ifndef NEWSBOAT_HISTORY_H_
#define NEWSBOAT_HISTORY_H_

#include <string>
#include <vector>

namespace newsboat {

class History {
public:
	History();
	~History();
	void add_line(const std::string& line);
	std::string prev();
	std::string next();
	void load_from_file(const std::string& file);
	void save_to_file(const std::string& file, unsigned int limit);

private:
	std::vector<std::string> lines;
	unsigned int idx;
};

} // namespace newsboat

#endif /* NEWSBOAT_HISTORY_H_ */