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