blob: 04a16d77d88da50a53b6716cdebfb1e53667b281 (
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
|
#ifndef SETTINGS_H_
#define SETTINGS_H_
#include <string>
#include <map>
#include <set>
#include <vector>
class CSettings
{
public:
typedef std::map<std::string, std::string> map_settings_t;
typedef std::set<std::string> set_strings_t;
typedef std::pair<std::string, std::string> pair_string_string_t;
typedef std::set<pair_string_string_t> set_pair_strings_t;
typedef std::map<std::string, set_pair_strings_t> map_analyzer_reporters_t;
typedef std::map<std::string, set_pair_strings_t> map_analyzer_actions_t;
private:
map_settings_t m_mapSettingsCommon;
map_settings_t m_mapSettingsReporters;
map_settings_t m_mapSettingsActions;
set_strings_t m_setOpenGPGPublicKeys;
set_strings_t m_setBlackList;
set_strings_t m_setEnabledPlugins;
std::string m_sDatabase;
set_pair_strings_t m_setReporters;
bool m_bOpenGPGCheck;
unsigned int m_nMaxCrashReportsSize;
map_analyzer_reporters_t m_mapAnalyzerReporters;
map_analyzer_actions_t m_mapAnalyzerActions;
void ParseCommon();
void ParseReporters();
void ParseActions();
set_strings_t ParseList(const std::string& pList);
set_pair_strings_t ParseListWithArgs(const std::string& pList);
set_strings_t ParseKey(const std::string& pKey);
public:
void LoadSettings(const std::string& pPath);
const set_strings_t& GetBlackList();
const set_strings_t& GetEnabledPlugins();
const set_strings_t& GetOpenGPGPublicKeys();
const bool& GetOpenGPGCheck();
const map_analyzer_reporters_t& GetAnalyzerReporters();
const map_analyzer_actions_t& GetAnalyzerActions();
const unsigned int& GetMaxCrashReportsSize();
const set_pair_strings_t& GetReporters();
const std::string& GetDatabase();
};
#endif
|