25 #include <winpr/json.h>
30 static std::shared_ptr<SdlPref> instance(
const std::string& name = SdlPref::get_default_file());
32 std::string get_pref_file();
34 std::string get_string(
const std::string& key,
const std::string& fallback =
"");
35 int64_t get_int(
const std::string& key, int64_t fallback = 0);
36 bool get_bool(
const std::string& key,
bool fallback =
false);
37 std::vector<std::string> get_array(
const std::string& key,
38 const std::vector<std::string>& fallback = {});
40 static void print_config_file_help(
int version);
46 WINPR_JSONPtr _config;
48 explicit SdlPref(std::string file);
50 WINPR_JSON* get_item(
const std::string& key);
53 static std::string get_pref_dir();
54 static std::string get_default_file();
55 static std::string item_to_str(WINPR_JSON* item,
const std::string& fallback =
"");
WINPR_API void WINPR_JSON_Delete(WINPR_JSON *item)
Delete a WinPR JSON wrapper object.