Mercurial > minori
annotate include/core/config.h @ 137:69db40272acd
dep/animia: [WIP] huge refactor
this WILL NOT compile, because lots of code has been changed
and every API in the original codebase has been removed.
note that this api setup is not exactly permanent...
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Fri, 10 Nov 2023 13:52:47 -0500 |
parents | 275da698697d |
children | 6fdf0632c003 |
rev | line source |
---|---|
9 | 1 #ifndef __core__config_h |
2 #define __core__config_h | |
85 | 3 |
9 | 4 #include "core/anime.h" |
102 | 5 #include "gui/theme.h" |
108 | 6 #include "gui/locale.h" |
118
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
116
diff
changeset
|
7 #include <string> |
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
116
diff
changeset
|
8 #include <vector> |
9 | 9 |
10 class Config { | |
11 public: | |
12 int Load(); | |
118
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
116
diff
changeset
|
13 int Save() const; |
9 | 14 |
15 Anime::Services service; | |
102 | 16 Theme::Theme theme; |
108 | 17 Locale::Locale locale; |
9 | 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 | |
116
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
28 /* these should preferably be in an |
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
29 "auth" struct... */ |
9 | 30 struct { |
31 public: | |
120 | 32 struct { |
33 public: | |
34 std::string auth_token; | |
35 std::string username; | |
36 int user_id; | |
37 } anilist; | |
38 } auth; | |
39 | |
40 struct { | |
41 public: | |
42 bool detect_media_players; | |
43 //bool detect_streaming_media; | |
44 } recognition; | |
116
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
45 |
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
46 struct { |
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
47 public: |
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
48 std::string feed_link; |
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
49 } torrents; |
9 | 50 }; |
11 | 51 |
102 | 52 #define WIDEIFY_EX(x) L##x |
53 #define WIDEIFY(x) WIDEIFY_EX(x) | |
114
ab191e28e69d
*: add initial torrent stuff
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
54 |
116
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
55 /* only on these platforms keep this uppercase. |
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
56 this will not remove compatibility with older |
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
57 versions, since these platforms are case insensitive |
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
58 (on macOS, only by default) */ |
114
ab191e28e69d
*: add initial torrent stuff
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
59 #if (defined(WIN32) || defined(MACOSX)) |
ab191e28e69d
*: add initial torrent stuff
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
60 #define CONFIG_DIR "Minori" |
ab191e28e69d
*: add initial torrent stuff
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
61 #else |
63 | 62 #define CONFIG_DIR "minori" |
114
ab191e28e69d
*: add initial torrent stuff
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
63 #endif |
ab191e28e69d
*: add initial torrent stuff
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
64 |
102 | 65 #define CONFIG_WDIR WIDEIFY(CONFIG_DIR) |
101
c537996cf67b
*: multitude of config changes
Paper <mrpapersonic@gmail.com>
parents:
85
diff
changeset
|
66 #define CONFIG_NAME "config.ini" |
102 | 67 #define CONFIG_WNAME WIDEIFY(CONFIG_NAME) |
62 | 68 |
9 | 69 #define MAX_LINE_LENGTH 256 |
85 | 70 |
9 | 71 #endif // __core__config_h |