]> granicus.if.org Git - icinga2/blob - lib/base/configuration.hpp
02a516b87d72a2963bdb85cee8eaa034b9c8964c
[icinga2] / lib / base / configuration.hpp
1 /******************************************************************************
2  * Icinga 2                                                                   *
3  * Copyright (C) 2012-2018 Icinga Development Team (https://www.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         String GetVarsPath() const override;
112         void SetVarsPath(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
113
114         String GetZonesDir() const override;
115         void SetZonesDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
116
117         /* deprecated */
118         String GetLocalStateDir() const override;
119         void SetLocalStateDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
120
121         String GetSysconfDir() const override;
122         void SetSysconfDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
123
124         String GetRunDir() const override;
125         void SetRunDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
126
127         static bool GetReadOnly();
128         static void SetReadOnly(bool readOnly);
129
130         static String ApiBindHost;
131         static String ApiBindPort;
132         static bool AttachDebugger;
133         static String CacheDir;
134         static int Concurrency;
135         static String ConfigDir;
136         static String DataDir;
137         static String EventEngine;
138         static String IncludeConfDir;
139         static String InitRunDir;
140         static String LogDir;
141         static String ModAttrPath;
142         static String ObjectsPath;
143         static String PidPath;
144         static String PkgDataDir;
145         static String PrefixDir;
146         static String ProgramData;
147         static int RLimitFiles;
148         static int RLimitProcesses;
149         static int RLimitStack;
150         static String RunAsGroup;
151         static String RunAsUser;
152         static String SpoolDir;
153         static String StatePath;
154         static String VarsPath;
155         static String ZonesDir;
156
157         /* deprecated */
158         static String LocalStateDir;
159         static String RunDir;
160         static String SysconfDir;
161
162 private:
163         static bool m_ReadOnly;
164
165 };
166
167 }
168
169 #endif /* CONFIGURATION_H */