annotate src/include/config.h @ 6:1d82f6e04d7d

Update: add first parts to the settings dialog
author Paper <mrpapersonic@gmail.com>
date Wed, 16 Aug 2023 00:49:17 -0400
parents 23d0d9319a00
children 07a9095eaeed
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
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
3 /* This should be moved to anime_list.h, but unfortunately
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
4 #include-ing anime_list.h in this file causes a shitstorm for
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
5 whatever reason, so I'll just leave it here */
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
6 enum AnimeListServices {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
7 NONE,
6
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
8 ANILIST,
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
9 NB_SERVICES
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
10 };
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
11
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
12 /* todo: make this a class enum */
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
13 enum Themes {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
14 LIGHT,
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
15 DARK,
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
16 OS
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
17 };
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
18
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
19 class Config {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
20 public:
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
21 int Load();
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
22 int Save();
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
23
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
24 enum AnimeListServices service;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
25 enum Themes theme;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
26 struct {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
27 std::string auth_token;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
28 std::string username;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
29 int user_id;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
30 } anilist;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
31 };
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
32 #define CONFIG_DIR "weeaboo"
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
33 #define CONFIG_NAME "config.json"
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
34 #define MAX_LINE_LENGTH 256
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
35 #endif // __config_h