annotate src/include/config.h @ 2:23d0d9319a00

Update Also converted everything to LF from CRLF
author Paper <mrpapersonic@gmail.com>
date Sat, 12 Aug 2023 03:16:26 -0400
parents 1ae666fdf9e2
children 1d82f6e04d7d
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,
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
8 ANILIST
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
9 };
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
10
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
11 /* todo: make this a class enum */
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
12 enum Themes {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
13 LIGHT,
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
14 DARK,
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
15 OS
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
16 };
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
17
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
18 class Config {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
19 public:
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
20 int Load();
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
21 int Save();
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
22
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
23 enum AnimeListServices service;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
24 enum Themes theme;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
25 struct {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
26 std::string auth_token;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
27 std::string username;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
28 int user_id;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
29 } anilist;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
30 };
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
31 #define CONFIG_DIR "weeaboo"
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
32 #define CONFIG_NAME "config.json"
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
33 #define MAX_LINE_LENGTH 256
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
34 #endif // __config_h