Move utility classes from common to own static lib
This commit is contained in:
21
src/util/cd_image_hasher.h
Normal file
21
src/util/cd_image_hasher.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include "common/progress_callback.h"
|
||||
#include "common/types.h"
|
||||
#include <array>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
class CDImage;
|
||||
|
||||
namespace CDImageHasher {
|
||||
|
||||
using Hash = std::array<u8, 16>;
|
||||
std::string HashToString(const Hash& hash);
|
||||
std::optional<Hash> HashFromString(const std::string_view& str);
|
||||
|
||||
bool GetImageHash(CDImage* image, Hash* out_hash,
|
||||
ProgressCallback* progress_callback = ProgressCallback::NullProgressCallback);
|
||||
bool GetTrackHash(CDImage* image, u8 track, Hash* out_hash,
|
||||
ProgressCallback* progress_callback = ProgressCallback::NullProgressCallback);
|
||||
|
||||
} // namespace CDImageHasher
|
||||
Reference in New Issue
Block a user