18 #include "precompiled.h"
28 if (cfgNsString == L
"default")
30 else if (cfgNsString == L
"system")
32 else if (cfgNsString == L
"user")
34 else if (cfgNsString == L
"mod")
38 LOGERROR(L
"Invalid namespace name passed to the ConfigDB!");
57 LOGWARNING(L
"Config setting %hs does not exist!", name.c_str());
105 scriptInterface.RegisterFunction<std::string, std::wstring, std::string, &
JSI_ConfigDB::GetValue>(
"ConfigDB_GetValue");
106 scriptInterface.RegisterFunction<bool, std::wstring, std::string, std::string, &
JSI_ConfigDB::CreateValue>(
"ConfigDB_CreateValue");
108 scriptInterface.RegisterFunction<bool, std::wstring, Path, &
JSI_ConfigDB::SetFile>(
"ConfigDB_SetFile");
bool Reload(void *cbdata, std::wstring cfgNsString)
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
std::string GetValue(void *cbdata, std::wstring cfgNsString, std::string name)
void RegisterScriptFunctions(ScriptInterface &scriptInterface)
bool SetFile(void *cbdata, std::wstring cfgNsString, Path path)
bool GetConfigNamespace(std::wstring cfgNsString, EConfigNamespace &cfgNs)
bool WriteFile(void *cbdata, std::wstring cfgNsString, Path path)
bool CreateValue(void *cbdata, std::wstring cfgNsString, std::string name, std::string value)
Abstraction around a SpiderMonkey JSContext.