Move hashes collection to TorrentRead
So yeah, while TorrentRead is not compulsory to use, right now it'd be pretty inconvenient to not use it as the hash grouping function is fidgety to get right. I think group_torrent_hashes() eventually should be moved elsewhere.
This commit is contained in:
parent
5aa42b5e43
commit
f7d90a789d
5 changed files with 41 additions and 39 deletions
|
@ -29,6 +29,7 @@
|
|||
#include <ostream>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <array>
|
||||
|
||||
namespace duck {
|
||||
struct TorrentValue;
|
||||
|
@ -51,6 +52,7 @@ public:
|
|||
std::size_t read_file_size(std::size_t index) const;
|
||||
bool read_is_private() const;
|
||||
std::string_view read_comment() const;
|
||||
std::string_view read_hashes() const;
|
||||
std::string_view read_created_by() const;
|
||||
std::string_view read_announce() const;
|
||||
std::time_t read_creation_date() const;
|
||||
|
@ -65,4 +67,7 @@ private:
|
|||
|
||||
mutable const TorrentValue* m_cached_info_files;
|
||||
};
|
||||
|
||||
std::vector<std::array<std::uint32_t, 5>> group_torrent_hashes (std::string_view hashes);
|
||||
std::vector<std::array<std::uint32_t, 5>> group_torrent_hashes (const TorrentRead& torrent);
|
||||
} //namespace duck
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue