30 [[nodiscard]]
static std::shared_ptr<SdlPref>
31 instance(
const std::string& name = SdlPref::get_default_file(
false));
33 [[nodiscard]] std::string get_pref_file(
bool systemConfigOnly =
false)
const;
35 [[nodiscard]] std::string get_string(
const std::string& key,
const std::string& fallback =
"",
36 bool systemConfigOnly =
false)
const;
37 [[nodiscard]] int64_t get_int(
const std::string& key, int64_t fallback = 0,
38 bool systemConfigOnly =
false)
const;
39 [[nodiscard]]
bool get_bool(
const std::string& key,
bool fallback =
false,
40 bool systemConfigOnly =
false)
const;
41 [[nodiscard]] std::vector<std::string> get_array(
const std::string& key,
42 const std::vector<std::string>& fallback = {},
43 bool systemConfigOnly =
false)
const;
45 [[nodiscard]]
bool is_commandline_override_allowed()
const;
47 static void print_config_file_help(
int version);
53 std::string _system_name;
54 WINPR_JSONPtr _config;
55 WINPR_JSONPtr _system_config;
57 explicit SdlPref(std::string file);
59 [[nodiscard]] WINPR_JSON* get_item(
const std::string& key,
bool systemConfigOnly)
const;
60 [[nodiscard]] WINPR_JSON* get_item(
const WINPR_JSONPtr& config,
const std::string& key)
const;
62 [[nodiscard]] WINPR_JSONPtr get(
bool systemConfigOnly)
const;
63 [[nodiscard]]
bool get_bool(
const WINPR_JSONPtr& config,
const std::string& key,
64 bool fallback =
false)
const;
66 [[nodiscard]]
bool is_user_config_enabled()
const;
68 [[nodiscard]]
static std::string get_default_file(
bool systemConfigOnly);
69 [[nodiscard]]
static std::string item_to_str(WINPR_JSON* item,
70 const std::string& fallback =
"");