comparison include/library/library.h @ 366:886f66775f31

animone: add preliminary AT-SPI stuff anime_list: finish the regular singular right click menu
author Paper <paper@tflc.us>
date Sun, 17 Nov 2024 19:56:01 -0500
parents 71396ecb6f7e
children
comparison
equal deleted inserted replaced
365:f81bed4e04ac 366:886f66775f31
1 #ifndef MINORI_LIBRARY_LIBRARY_H_ 1 #ifndef MINORI_LIBRARY_LIBRARY_H_
2 #define MINORI_LIBRARY_LIBRARY_H_ 2 #define MINORI_LIBRARY_LIBRARY_H_
3 3
4 #include "library/library.h" 4 #include "library/library.h"
5 5
6 #include <optional>
6 #include <filesystem> 7 #include <filesystem>
7 #include <unordered_map> 8 #include <unordered_map>
8 9
9 namespace Library { 10 namespace Library {
10 11
11 class Database { 12 class Database final {
12 public: 13 public:
14 std::optional<std::filesystem::path> GetAnimeFolder(int id);
13 void Refresh(); 15 void Refresh();
16 void Refresh(int id);
14 17
18 // Anime episodes. Indexed as `folders[id][episode]'
15 std::unordered_map<int, std::unordered_map<int, std::filesystem::path>> items; 19 std::unordered_map<int, std::unordered_map<int, std::filesystem::path>> items;
20
21 private:
22 void Refresh(std::optional<int> find_id);
16 }; 23 };
17 24
18 extern Database db; 25 extern Database db;
19 26
20 } // namespace Library 27 } // namespace Library