52 WsjcppSettingItem(
const std::string &sSettingGroup,
const std::string &sSettingName);
117 nlohmann::json
toJson(
bool bHidePassword);
172 virtual std::map<std::string, std::string> loadAllSettings() = 0;
183 static std::string
name() {
return "EmployGlobalSettings"; }
185 virtual bool deinit();
186 void setWorkDir(
const std::string &sWorkDir);
188 WsjcppSettingItem ®istrySetting(
const std::string &sSettingGroup,
const std::string &sSettingName);
191 bool exists(
const std::string &sSettingName);
192 void update(
const std::string &sSettingName,
const std::string &sValue);
193 void update(
const std::string &sSettingName,
int nValue);
194 void update(
const std::string &sSettingName,
bool bValue);
199 std::string getFilepathConf()
const;
200 nlohmann::json
toJson(
bool bHidePassword);
201 void printSettings()
const;
209 bool findFileConfig();
222 static std::string
name() {
return "EmployServer"; }
224 virtual bool deinit();
227 void sendToAll(
const nlohmann::json& jsonMessage);
228 void sendToOne(QWebSocket *pClient,
const nlohmann::json& jsonMessage);
235 #endif // EMPLOYEES_H void setNumberValue(int nNumberValue)
Definition: employees.cpp:493
Definition: employees.h:29
void setDirPathValue(const std::string &sDirPathValue)
Definition: employees.cpp:400
std::string m_sSettingGroup
Definition: employees.h:124
Definition: employees.h:180
std::string getDirPathValue() const
Definition: employees.cpp:391
Definition: employees.h:41
Definition: employees.h:21
Definition: employees.h:50
bool isNumber() const
Definition: employees.cpp:285
int getNumberValue() const
Definition: employees.cpp:484
WsjcppSettingItem & string(const std::string &sDefaultStringValue)
Definition: employees.cpp:87
WsjcppSettingItem & dirPath(const std::string &sDefaultDirPathValue)
Definition: employees.cpp:111
WsjcppSettingItem & json()
Definition: employees.cpp:171
std::string m_sDefaultStringValue
Definition: employees.h:133
std::string m_sFilepathConf
Definition: employees.h:206
void setBooleanValue(bool bBooleanValue)
Definition: employees.cpp:525
WsjcppSettingDataType m_nSettingType
Definition: employees.h:128
std::string m_sStringValue
Definition: employees.h:134
void setStringValue(const std::string &sStringValue)
Definition: employees.cpp:338
bool isReadonly() const
Definition: employees.cpp:219
Definition: employees.h:43
Definition: employees.h:45
void setPasswordValue(const std::string &sPasswordValue)
Definition: employees.cpp:369
std::string TAG
Definition: employees.h:231
std::string m_sDirPathValue
Definition: employees.h:142
std::string getDefaultFilePathValue() const
Definition: employees.cpp:413
bool isPassword() const
Definition: employees.cpp:261
Definition: employees.h:163
Definition: employees.h:170
bool isList() const
Definition: employees.cpp:303
void setFilePathValue(const std::string &sFilePathValue)
Definition: employees.cpp:431
std::string m_sTextValue
Definition: employees.h:150
std::string m_sDefaultTextValue
Definition: employees.h:149
Definition: employees.h:20
bool getBooleanValue() const
Definition: employees.cpp:516
IWebSocketServer * m_pWebSocketServer
Definition: employees.h:232
bool isDirPath() const
Definition: employees.cpp:267
std::string TAG
Definition: employees.h:122
bool isText() const
Definition: employees.cpp:279
std::string m_sStorageType
Definition: employees.h:127
Definition: employees.h:19
std::string getGroupName() const
Definition: employees.cpp:231
std::string m_sSettingName
Definition: employees.h:123
std::string m_sPasswordValue
Definition: employees.h:138
Definition: employees.h:40
std::string getDefaultDirPathValue() const
Definition: employees.cpp:382
WsjcppSettingDataType
Definition: employees.h:35
int getDefaultNumberValue() const
Definition: employees.cpp:475
WsjcppSettingItem & boolean(bool bDefaultBooleanValue)
Definition: employees.cpp:159
WsjcppSettingStorageType m_nStorageType
Definition: employees.h:126
WsjcppSettingItem & text(const std::string &sDefaultTextValue)
Definition: employees.cpp:135
IWebSocketServer -.
Definition: cmd_handlers.h:86
Definition: employees.h:219
WsjcppSettingItem & inFile()
Definition: employees.cpp:45
Definition: employees.h:38
std::string getTextValue() const
Definition: employees.cpp:453
std::map< std::string, WsjcppSettingItem * > m_mapSettingItems
Definition: employees.h:212
std::string getDefaultTextValue() const
Definition: employees.cpp:444
std::string m_sDefaultDirPathValue
Definition: employees.h:141
WsjcppSettingItem & inDatabase()
Definition: employees.cpp:57
WsjcppSettingItem(const std::string &sSettingGroup, const std::string &sSettingName)
Definition: employees.cpp:12
std::string getFilePathValue() const
Definition: employees.cpp:422
bool isFromDatabase() const
Definition: employees.cpp:243
Definition: employees.h:42
WsjcppSettingItem & password(const std::string &sDefaultPasswordValue)
Definition: employees.cpp:99
bool isString() const
Definition: employees.cpp:255
void checkWithThrow() const
Definition: employees.cpp:197
WsjcppError - helper class for errors.
Definition: cmd_handlers.h:18
nlohmann::json toJson(bool bHidePassword)
Definition: employees.cpp:539
Definition: employees.h:28
EmployResult
Definition: employees.h:14
WsjcppSettingItem & number(int nDefaultNumberValue)
Definition: employees.cpp:147
void setTextValue(const std::string &sTextValue)
Definition: employees.cpp:462
WsjcppSettingsStore * m_pDatabaseSettingsStore
Definition: employees.h:207
std::string getStringValue() const
Definition: employees.cpp:329
std::string m_sFilePathValue
Definition: employees.h:146
std::string getDefaultStringValue() const
Definition: employees.cpp:320
Definition: wsjcpp_employees.h:13
bool isJson() const
Definition: employees.cpp:297
Definition: employees.h:37
bool isLikeString() const
Definition: employees.cpp:309
std::vector< WsjcppSettingListener * > m_vListeners
Definition: employees.h:213
std::string getDefaultPasswordValue() const
Definition: employees.cpp:351
Definition: employees.h:30
std::string getPasswordValue() const
Definition: employees.cpp:360
Definition: employees.h:18
std::string convertTypeToString() const
Definition: employees.cpp:594
std::string convertValueToString(bool bHidePassword) const
Definition: employees.cpp:570
Definition: employees.h:44
bool isFromRuntime() const
Definition: employees.cpp:249
std::string m_sDefaultFilePathValue
Definition: employees.h:145
Definition: employees.h:39
Definition: employees.h:16
bool m_bReadonly
Definition: employees.h:125
std::string getName() const
Definition: employees.cpp:225
bool m_bDefaultBooleanValue
Definition: employees.h:157
static std::string name()
Definition: employees.h:222
std::string m_sWorkDir
Definition: employees.h:205
WsjcppSettingItem & filePath(const std::string &sDefaultFilePathValue)
Definition: employees.cpp:123
std::string TAG
Definition: employees.h:204
std::string m_sSettingType
Definition: employees.h:129
Api handler Base.
Definition: cmd_handlers.h:202
bool isFromFile() const
Definition: employees.cpp:237
std::string m_sDefaultPasswordValue
Definition: employees.h:137
bool getDefaultBooleanValue() const
Definition: employees.cpp:507
bool m_bBooleanValue
Definition: employees.h:158
int m_nNumberValue
Definition: employees.h:154
WsjcppSettingItem & list()
Definition: employees.cpp:184
static std::string name()
Definition: employees.h:183
Definition: employees.h:27
int m_nDefaultNumberValue
Definition: employees.h:153
Definition: employees.h:15
bool m_bInited
Definition: employees.h:130
Definition: employees.h:36
bool isInited() const
Definition: employees.cpp:213
WsjcppSettingItem & inRuntime()
Definition: employees.cpp:68
bool isFilePath() const
Definition: employees.cpp:273
WsjcppSettingItem & readonly()
Definition: employees.cpp:80
Definition: employees.h:17
WsjcppSettingStorageType
Definition: employees.h:26
bool isBoolean() const
Definition: employees.cpp:291