1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
3 #ifndef CONFIGURATION_H
4 #define CONFIGURATION_H
6 #include "base/i2-base.hpp"
7 #include "base/configuration-ti.hpp"
13 * Global configuration.
17 class Configuration : public ObjectImpl<Configuration>
20 DECLARE_OBJECT(Configuration);
22 String GetApiBindHost() const override;
23 void SetApiBindHost(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
25 String GetApiBindPort() const override;
26 void SetApiBindPort(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
28 bool GetAttachDebugger() const override;
29 void SetAttachDebugger(bool value, bool suppress_events = false, const Value& cookie = Empty) override;
31 String GetCacheDir() const override;
32 void SetCacheDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
34 int GetConcurrency() const override;
35 void SetConcurrency(int value, bool suppress_events = false, const Value& cookie = Empty) override;
37 String GetConfigDir() const override;
38 void SetConfigDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
40 String GetDataDir() const override;
41 void SetDataDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
43 String GetEventEngine() const override;
44 void SetEventEngine(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
46 String GetIncludeConfDir() const override;
47 void SetIncludeConfDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
49 String GetInitRunDir() const override;
50 void SetInitRunDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
52 String GetLogDir() const override;
53 void SetLogDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
55 String GetModAttrPath() const override;
56 void SetModAttrPath(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
58 String GetObjectsPath() const override;
59 void SetObjectsPath(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
61 String GetPidPath() const override;
62 void SetPidPath(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
64 String GetPkgDataDir() const override;
65 void SetPkgDataDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
67 String GetPrefixDir() const override;
68 void SetPrefixDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
70 String GetProgramData() const override;
71 void SetProgramData(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
73 int GetRLimitFiles() const override;
74 void SetRLimitFiles(int value, bool suppress_events = false, const Value& cookie = Empty) override;
76 int GetRLimitProcesses() const override;
77 void SetRLimitProcesses(int value, bool suppress_events = false, const Value& cookie = Empty) override;
79 int GetRLimitStack() const override;
80 void SetRLimitStack(int value, bool suppress_events = false, const Value& cookie = Empty) override;
82 String GetRunAsGroup() const override;
83 void SetRunAsGroup(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
85 String GetRunAsUser() const override;
86 void SetRunAsUser(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
88 String GetSpoolDir() const override;
89 void SetSpoolDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
91 String GetStatePath() const override;
92 void SetStatePath(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
94 double GetTlsHandshakeTimeout() const override;
95 void SetTlsHandshakeTimeout(double value, bool suppress_events = false, const Value& cookie = Empty) override;
97 String GetVarsPath() const override;
98 void SetVarsPath(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
100 String GetZonesDir() const override;
101 void SetZonesDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
104 String GetLocalStateDir() const override;
105 void SetLocalStateDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
107 String GetSysconfDir() const override;
108 void SetSysconfDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
110 String GetRunDir() const override;
111 void SetRunDir(const String& value, bool suppress_events = false, const Value& cookie = Empty) override;
113 static bool GetReadOnly();
114 static void SetReadOnly(bool readOnly);
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;
145 static String LocalStateDir;
146 static String RunDir;
147 static String SysconfDir;
150 static bool m_ReadOnly;
156 #endif /* CONFIGURATION_H */