annotate src/include/config.h @ 7:07a9095eaeed

Update Refactored some code, moved some around
author Paper <mrpapersonic@gmail.com>
date Thu, 24 Aug 2023 23:11:38 -0400
parents 1d82f6e04d7d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
1 #ifndef __config_h
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
2 #define __config_h
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
3 enum AnimeTitleLanguage {
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
4 ROMAJI,
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
5 NATIVE,
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
6 ENGLISH
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
7 };
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
8
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
9 enum AnimeListServices {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
10 NONE,
6
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
11 ANILIST,
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
12 NB_SERVICES
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
13 };
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
14
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
15 enum Themes {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
16 LIGHT,
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
17 DARK,
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
18 OS
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
19 };
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
20
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
21 class Config {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
22 public:
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
23 int Load();
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
24 int Save();
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
25
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
26 enum AnimeListServices service;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
27 enum Themes theme;
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
28
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
29 struct {
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
30 enum AnimeTitleLanguage language;
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
31 bool display_aired_episodes;
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
32 bool display_available_episodes;
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
33 bool highlight_anime_if_available;
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
34 bool highlighted_anime_above_others;
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
35 } anime_list;
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
36
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
37 struct {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
38 std::string auth_token;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
39 std::string username;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
40 int user_id;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
41 } anilist;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
42 };
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
43 #define CONFIG_DIR "weeaboo"
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
44 #define CONFIG_NAME "config.json"
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
45 #define MAX_LINE_LENGTH 256
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
46 #endif // __config_h