Mercurial > minori
comparison src/services/services.cc @ 279:657fda1b9cac
*: clean up enums
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Fri, 19 Apr 2024 13:24:06 -0400 |
parents | c130f47f6f48 |
children | 2115488eb302 |
comparison
equal
deleted
inserted
replaced
274:f6a756c19bfb | 279:657fda1b9cac |
---|---|
5 | 5 |
6 namespace Services { | 6 namespace Services { |
7 | 7 |
8 void Synchronize() { | 8 void Synchronize() { |
9 switch (session.config.service) { | 9 switch (session.config.service) { |
10 case Anime::Services::ANILIST: AniList::GetAnimeList(); break; | 10 case Anime::Service::AniList: AniList::GetAnimeList(); break; |
11 default: break; | 11 default: break; |
12 } | 12 } |
13 } | 13 } |
14 | 14 |
15 std::vector<int> Search(const std::string& search) { | 15 std::vector<int> Search(const std::string& search) { |
16 switch (session.config.service) { | 16 switch (session.config.service) { |
17 case Anime::Services::ANILIST: return AniList::Search(search); | 17 case Anime::Service::AniList: return AniList::Search(search); |
18 default: return {}; | 18 default: return {}; |
19 } | 19 } |
20 } | 20 } |
21 | 21 |
22 void UpdateAnimeEntry(int id) { | 22 void UpdateAnimeEntry(int id) { |
23 switch (session.config.service) { | 23 switch (session.config.service) { |
24 case Anime::Services::ANILIST: AniList::UpdateAnimeEntry(id); break; | 24 case Anime::Service::AniList: AniList::UpdateAnimeEntry(id); break; |
25 default: break; | 25 default: break; |
26 } | 26 } |
27 } | 27 } |
28 | 28 |
29 bool Authorize() { | 29 bool Authorize() { |
30 switch (session.config.service) { | 30 switch (session.config.service) { |
31 case Anime::Services::ANILIST: return AniList::AuthorizeUser(); | 31 case Anime::Service::AniList: return AniList::AuthorizeUser(); |
32 default: return true; | 32 default: return true; |
33 } | 33 } |
34 } | 34 } |
35 | 35 |
36 }; // namespace Services | 36 }; // namespace Services |