]> granicus.if.org Git - icinga2/blob - lib/base/configuration.hpp
Merge pull request #6718 from Icinga/bugfix/ssl-shutdown
[icinga2] / lib / base / configuration.hpp
1 /******************************************************************************
2  * Icinga 2                                                                   *
3  * Copyright (C) 2012-2018 Icinga Development Team (https://icinga.com/)      *
4  *                                                                            *
5  * This program is free software; you can redistribute it and/or              *
6  * modify it under the terms of the GNU General Public License                *
7  * as published by the Free Software Foundation; either version 2             *
8  * of the License, or (at your option) any later version.                     *
9  *                                                                            *
10  * This program is distributed in the hope that it will be useful,            *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
13  * GNU General Public License for more details.                               *
14  *                                                                            *
15  * You should have received a copy of the GNU General Public License          *
16  * along with this program; if not, write to the Free Software Foundation     *
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
18  ******************************************************************************/
19
20 #ifndef CONFIGURATION_H
21 #define CONFIGURATION_H
22
23 #include "base/i2-base.hpp"
24 #include "base/configuration-ti.hpp"
25
26 namespace icinga
27 {
28
29 /**
30  * Global configuration.
31  *
32  * @ingroup base
33  */
34 class Configuration : public ObjectImpl<Configuration>
35 {
36 public:
37         DECLARE_OBJECT(Configuration);
38
39         String GetApiBindHost() const override;
40         void SetApiBindHost(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
41
42         String GetApiBindPort() const override;
43         void SetApiBindPort(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
44
45         bool GetAttachDebugger() const override;
46         void SetAttachDebugger(bool value, bool suppress_events = false, const Value& cookie = Empty) override;
47
48         String GetCacheDir() const override;
49         void SetCacheDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
50
51         int GetConcurrency() const override;
52         void SetConcurrency(int value, bool suppress_events = false, const Value& cookie = Empty) override;
53
54         String GetConfigDir() const override;
55         void SetConfigDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
56
57         String GetDataDir() const override;
58         void SetDataDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
59
60         String GetEventEngine() const override;
61         void SetEventEngine(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
62
63         String GetIncludeConfDir() const override;
64         void SetIncludeConfDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
65
66         String GetInitRunDir() const override;
67         void SetInitRunDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
68
69         String GetLogDir() const override;
70         void SetLogDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
71
72         String GetModAttrPath() const override;
73         void SetModAttrPath(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
74
75         String GetObjectsPath() const override;
76         void SetObjectsPath(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
77
78         String GetPidPath() const override;
79         void SetPidPath(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
80
81         String GetPkgDataDir() const override;
82         void SetPkgDataDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
83
84         String GetPrefixDir() const override;
85         void SetPrefixDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
86
87         String GetProgramData() const override;
88         void SetProgramData(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
89
90         int GetRLimitFiles() const override;
91         void SetRLimitFiles(int value, bool suppress_events = false, const Value& cookie = Empty) override;
92
93         int GetRLimitProcesses() const override;
94         void SetRLimitProcesses(int value, bool suppress_events = false, const Value& cookie = Empty) override;
95
96         int GetRLimitStack() const override;
97         void SetRLimitStack(int value, bool suppress_events = false, const Value& cookie = Empty) override;
98
99         String GetRunAsGroup() const override;
100         void SetRunAsGroup(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
101
102         String GetRunAsUser() const override;
103         void SetRunAsUser(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
104
105         String GetSpoolDir() const override;
106         void SetSpoolDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
107
108         String GetStatePath() const override;
109         void SetStatePath(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
110
111         double GetTlsHandshakeTimeout() const override;
112         void SetTlsHandshakeTimeout(double value, bool suppress_events = false, const Value& cookie = Empty) override;
113
114         String GetVarsPath() const override;
115         void SetVarsPath(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
116
117         String GetZonesDir() const override;
118         void SetZonesDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
119
120         /* deprecated */
121         String GetLocalStateDir() const override;
122         void SetLocalStateDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
123
124         String GetSysconfDir() const override;
125         void SetSysconfDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
126
127         String GetRunDir() const override;
128         void SetRunDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
129
130         static bool GetReadOnly();
131         static void SetReadOnly(bool readOnly);
132
133         static String ApiBindHost;
134         static String ApiBindPort;
135         static bool AttachDebugger;
136         static String CacheDir;
137         static int Concurrency;
138         static String ConfigDir;
139         static String DataDir;
140         static String EventEngine;
141         static String IncludeConfDir;
142         static String InitRunDir;
143         static String LogDir;
144         static String ModAttrPath;
145         static String ObjectsPath;
146         static String PidPath;
147         static String PkgDataDir;
148         static String PrefixDir;
149         static String ProgramData;
150         static int RLimitFiles;
151         static int RLimitProcesses;
152         static int RLimitStack;
153         static String RunAsGroup;
154         static String RunAsUser;
155         static String SpoolDir;
156         static String StatePath;
157         static double TlsHandshakeTimeout;
158         static String VarsPath;
159         static String ZonesDir;
160
161         /* deprecated */
162         static String LocalStateDir;
163         static String RunDir;
164         static String SysconfDir;
165
166 private:
167         static bool m_ReadOnly;
168
169 };
170
171 }
172
173 #endif /* CONFIGURATION_H */