]> granicus.if.org Git - icinga2/blob - lib/base/configuration.hpp
Merge pull request #7185 from Icinga/bugfix/gelfwriter-wrong-log-facility
[icinga2] / lib / base / configuration.hpp
1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2
3 #ifndef CONFIGURATION_H
4 #define CONFIGURATION_H
5
6 #include "base/i2-base.hpp"
7 #include "base/configuration-ti.hpp"
8
9 namespace icinga
10 {
11
12 /**
13  * Global configuration.
14  *
15  * @ingroup base
16  */
17 class Configuration : public ObjectImpl<Configuration>
18 {
19 public:
20         DECLARE_OBJECT(Configuration);
21
22         String GetApiBindHost() const override;
23         void SetApiBindHost(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
24
25         String GetApiBindPort() const override;
26         void SetApiBindPort(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
27
28         bool GetAttachDebugger() const override;
29         void SetAttachDebugger(bool value, bool suppress_events = false, const Value& cookie = Empty) override;
30
31         String GetCacheDir() const override;
32         void SetCacheDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
33
34         int GetConcurrency() const override;
35         void SetConcurrency(int value, bool suppress_events = false, const Value& cookie = Empty) override;
36
37         String GetConfigDir() const override;
38         void SetConfigDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
39
40         String GetDataDir() const override;
41         void SetDataDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
42
43         String GetEventEngine() const override;
44         void SetEventEngine(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
45
46         String GetIncludeConfDir() const override;
47         void SetIncludeConfDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
48
49         String GetInitRunDir() const override;
50         void SetInitRunDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
51
52         String GetLogDir() const override;
53         void SetLogDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
54
55         String GetModAttrPath() const override;
56         void SetModAttrPath(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
57
58         String GetObjectsPath() const override;
59         void SetObjectsPath(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
60
61         String GetPidPath() const override;
62         void SetPidPath(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
63
64         String GetPkgDataDir() const override;
65         void SetPkgDataDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
66
67         String GetPrefixDir() const override;
68         void SetPrefixDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
69
70         String GetProgramData() const override;
71         void SetProgramData(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
72
73         int GetRLimitFiles() const override;
74         void SetRLimitFiles(int value, bool suppress_events = false, const Value& cookie = Empty) override;
75
76         int GetRLimitProcesses() const override;
77         void SetRLimitProcesses(int value, bool suppress_events = false, const Value& cookie = Empty) override;
78
79         int GetRLimitStack() const override;
80         void SetRLimitStack(int value, bool suppress_events = false, const Value& cookie = Empty) override;
81
82         String GetRunAsGroup() const override;
83         void SetRunAsGroup(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
84
85         String GetRunAsUser() const override;
86         void SetRunAsUser(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
87
88         String GetSpoolDir() const override;
89         void SetSpoolDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
90
91         String GetStatePath() const override;
92         void SetStatePath(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
93
94         double GetTlsHandshakeTimeout() const override;
95         void SetTlsHandshakeTimeout(double value, bool suppress_events = false, const Value& cookie = Empty) override;
96
97         String GetVarsPath() const override;
98         void SetVarsPath(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
99
100         String GetZonesDir() const override;
101         void SetZonesDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
102
103         /* deprecated */
104         String GetLocalStateDir() const override;
105         void SetLocalStateDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
106
107         String GetSysconfDir() const override;
108         void SetSysconfDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
109
110         String GetRunDir() const override;
111         void SetRunDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
112
113         static bool GetReadOnly();
114         static void SetReadOnly(bool readOnly);
115
116         static String ApiBindHost;
117         static String ApiBindPort;
118         static bool AttachDebugger;
119         static String CacheDir;
120         static int Concurrency;
121         static String ConfigDir;
122         static String DataDir;
123         static String EventEngine;
124         static String IncludeConfDir;
125         static String InitRunDir;
126         static String LogDir;
127         static String ModAttrPath;
128         static String ObjectsPath;
129         static String PidPath;
130         static String PkgDataDir;
131         static String PrefixDir;
132         static String ProgramData;
133         static int RLimitFiles;
134         static int RLimitProcesses;
135         static int RLimitStack;
136         static String RunAsGroup;
137         static String RunAsUser;
138         static String SpoolDir;
139         static String StatePath;
140         static double TlsHandshakeTimeout;
141         static String VarsPath;
142         static String ZonesDir;
143
144         /* deprecated */
145         static String LocalStateDir;
146         static String RunDir;
147         static String SysconfDir;
148
149 private:
150         static bool m_ReadOnly;
151
152 };
153
154 }
155
156 #endif /* CONFIGURATION_H */