annotate include/library/library.h @ 367:8d45d892be88 default tip

*: instead of pugixml, use Qt XML features this means we have one extra Qt dependency though...
author Paper <paper@tflc.us>
date Sun, 17 Nov 2024 22:55:47 -0500
parents 886f66775f31
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
261
3ec7804abf17 include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
1 #ifndef MINORI_LIBRARY_LIBRARY_H_
3ec7804abf17 include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
2 #define MINORI_LIBRARY_LIBRARY_H_
222
b9f111d84d95 *: move to semver, remove old macos build, add library files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
3
b9f111d84d95 *: move to semver, remove old macos build, add library files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
4 #include "library/library.h"
b9f111d84d95 *: move to semver, remove old macos build, add library files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
5
366
886f66775f31 animone: add preliminary AT-SPI stuff
Paper <paper@tflc.us>
parents: 328
diff changeset
6 #include <optional>
328
71396ecb6f7e library: convert to class + database
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
7 #include <filesystem>
222
b9f111d84d95 *: move to semver, remove old macos build, add library files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
8 #include <unordered_map>
b9f111d84d95 *: move to semver, remove old macos build, add library files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
9
223
84e0a3c4737a library: implement menu bar buttons
Paper <mrpapersonic@gmail.com>
parents: 222
diff changeset
10 namespace Library {
84e0a3c4737a library: implement menu bar buttons
Paper <mrpapersonic@gmail.com>
parents: 222
diff changeset
11
366
886f66775f31 animone: add preliminary AT-SPI stuff
Paper <paper@tflc.us>
parents: 328
diff changeset
12 class Database final {
328
71396ecb6f7e library: convert to class + database
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
13 public:
366
886f66775f31 animone: add preliminary AT-SPI stuff
Paper <paper@tflc.us>
parents: 328
diff changeset
14 std::optional<std::filesystem::path> GetAnimeFolder(int id);
328
71396ecb6f7e library: convert to class + database
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
15 void Refresh();
366
886f66775f31 animone: add preliminary AT-SPI stuff
Paper <paper@tflc.us>
parents: 328
diff changeset
16 void Refresh(int id);
222
b9f111d84d95 *: move to semver, remove old macos build, add library files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
17
366
886f66775f31 animone: add preliminary AT-SPI stuff
Paper <paper@tflc.us>
parents: 328
diff changeset
18 // Anime episodes. Indexed as `folders[id][episode]'
328
71396ecb6f7e library: convert to class + database
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
19 std::unordered_map<int, std::unordered_map<int, std::filesystem::path>> items;
366
886f66775f31 animone: add preliminary AT-SPI stuff
Paper <paper@tflc.us>
parents: 328
diff changeset
20
886f66775f31 animone: add preliminary AT-SPI stuff
Paper <paper@tflc.us>
parents: 328
diff changeset
21 private:
886f66775f31 animone: add preliminary AT-SPI stuff
Paper <paper@tflc.us>
parents: 328
diff changeset
22 void Refresh(std::optional<int> find_id);
328
71396ecb6f7e library: convert to class + database
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
23 };
71396ecb6f7e library: convert to class + database
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
24
71396ecb6f7e library: convert to class + database
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
25 extern Database db;
222
b9f111d84d95 *: move to semver, remove old macos build, add library files
Paper <paper@paper.us.eu.org>
parents:
diff changeset
26
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 223
diff changeset
27 } // namespace Library
223
84e0a3c4737a library: implement menu bar buttons
Paper <mrpapersonic@gmail.com>
parents: 222
diff changeset
28
261
3ec7804abf17 include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents: 258
diff changeset
29 #endif // MINORI_LIBRARY_LIBRARY_H_