summaryrefslogtreecommitdiff
path: root/plugins/!NotAdopted/HistoryStats/settingsserializer.h
blob: 1840757f54dbf3fa7db3919f18b8792c1835cf2e (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
#if !defined(HISTORYSTATS_GUARD_SETTINGSSERIALIZER_H)
#define HISTORYSTATS_GUARD_SETTINGSSERIALIZER_H

#include "_globals.h"
#include "_consts.h"

#include "settings.h"

class SettingsSerializer
	: public Settings
	, private pattern::NotCopyable<SettingsSerializer>
{
private:
	DWORD m_VersionInDB;
	MirandaSettings m_DB;

public:
	explicit SettingsSerializer(const mu_ansi* module);

	void readFromDB();
	void writeToDB();

	bool isDBUpdateNeeded();
	void updateDB();

	int getLastPage();
	void setLastPage(int nPage);

	bool getShowColumnInfo();
	void setShowColumnInfo(bool bShow);

	bool getShowSupportInfo();
	void setShowSupportInfo(bool bShow);

	ext::string getLastStatisticsFile();
	void setLastStatisticsFile(const mu_text* szFileName);
	bool canShowStatistics();
	void showStatistics();
};

#endif // HISTORYSTATS_GUARD_SETTINGSSERIALIZER_H