9
|
1 #ifndef __core__config_h
|
|
2 #define __core__config_h
|
85
|
3
|
9
|
4 #include "core/anime.h"
|
|
5
|
|
6 enum class Themes {
|
|
7 LIGHT,
|
|
8 DARK,
|
|
9 OS // AKA "Default"
|
|
10 };
|
|
11
|
|
12 class Config {
|
|
13 public:
|
|
14 int Load();
|
|
15 int Save();
|
|
16
|
|
17 Anime::Services service;
|
|
18 Themes theme;
|
|
19
|
|
20 struct {
|
|
21 public:
|
|
22 Anime::TitleLanguage language;
|
|
23 bool display_aired_episodes;
|
|
24 bool display_available_episodes;
|
|
25 bool highlight_anime_if_available;
|
|
26 bool highlighted_anime_above_others;
|
|
27 } anime_list;
|
|
28
|
|
29 struct {
|
|
30 public:
|
|
31 std::string auth_token;
|
|
32 std::string username;
|
|
33 int user_id;
|
|
34 } anilist;
|
|
35 };
|
11
|
36
|
63
|
37 #define WIDEIFY_EX(x) L##x
|
|
38 #define WIDEIFY(x) WIDEIFY_EX(x)
|
|
39 #define CONFIG_DIR "minori"
|
|
40 #define CONFIG_WDIR WIDEIFY(CONFIG_DIR)
|
|
41 #define CONFIG_NAME "config.json"
|
|
42 #define CONFIG_WNAME WIDEIFY(CONFIG_NAME)
|
62
|
43
|
9
|
44 #define MAX_LINE_LENGTH 256
|
85
|
45
|
9
|
46 #endif // __core__config_h
|