2022-12-31 08:35:58 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
2023-01-31 14:40:04 +00:00
|
|
|
#include <nlohmann/json.hpp>
|
|
|
|
#include "filters.h"
|
2022-12-31 08:35:58 +00:00
|
|
|
|
|
|
|
struct Config {
|
|
|
|
std::string logcat_command;
|
2023-01-08 16:12:22 +00:00
|
|
|
float normal_font_size = 13.0f;
|
|
|
|
float monospace_font_size = 13.0f;
|
2023-01-31 14:40:04 +00:00
|
|
|
|
|
|
|
Filters filters;
|
2023-02-01 15:22:08 +00:00
|
|
|
Filters exclusions;
|
2022-12-31 08:35:58 +00:00
|
|
|
};
|
|
|
|
|
2023-01-04 16:40:35 +00:00
|
|
|
std::string get_config_folder();
|
|
|
|
void create_config_folders_if_necessary();
|
2023-01-31 14:40:04 +00:00
|
|
|
void from_json(const nlohmann::json& j, Config& config);
|
2023-01-04 16:40:35 +00:00
|
|
|
Config load_config();
|
2023-01-31 14:40:04 +00:00
|
|
|
void to_json(nlohmann::json& j, const Config& config);
|
2023-01-04 16:40:35 +00:00
|
|
|
void write_config(const Config& config);
|