19 class CommandController;
49 unsigned amountScanned;
55 using Directories = std::vector<Entry>;
58 PoolEntry(
const Sha1Sum& s, time_t
t,
const char* f)
61 assert(time != time_t(-1));
63 PoolEntry(
const Sha1Sum& s,
const char* t,
const char* f)
66 assert(timeStr !=
nullptr);
70 void setTime(time_t t);
75 const char* timeStr =
nullptr;
76 time_t time = time_t(-1);
80 bool operator()(
const PoolEntry&
x,
const PoolEntry& y)
const {
83 bool operator()(
const PoolEntry&
x,
const Sha1Sum& y)
const {
86 bool operator()(
const Sha1Sum&
x,
const PoolEntry& y)
const {
90 using Pool = std::vector<PoolEntry>;
93 void remove(Pool::iterator it);
101 const std::string& directory,
102 const std::string& poolPath,
103 ScanProgress& progress);
107 const std::string& poolPath,
108 ScanProgress& progress);
109 Pool::iterator findInDatabase(
const std::string&
filename);
111 Directories getDirectories()
const;
114 void update(
const Setting& setting)
override;
117 int signalEvent(
const std::shared_ptr<const Event>& event)
override;
122 std::unique_ptr<Sha1SumCommand> sha1SumCommand;
124 std::vector<std::string> stringBuffer;
Contains the main loop of openMSX.
auto sum(InputRange &&range)
File getFile(FileType fileType, const Sha1Sum &sha1sum)
Search file with the given sha1sum.
This class represents the result of a sha1 calculation (a 160-bit value).
constexpr const char *const filename
Thanks to enen for testing this on a real cartridge:
FilePool(CommandController &controller, Reactor &reactor)
Sha1Sum getSha1Sum(File &file)
Calculate sha1sum for the given File object.
constexpr KeyMatrixPosition x
Keyboard bindings.
Generic Gang-of-Four Observer class, templatized edition.
constexpr AdjustTables adjust