core: implement basic integrity verification
This commit is contained in:
parent
0a51fe7854
commit
716e0a126a
12 changed files with 220 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <iosfwd>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
@ -132,6 +133,8 @@ enum class ResultStatus : u16 {
|
|||
ErrorBLZDecompressionFailed,
|
||||
ErrorBadINIHeader,
|
||||
ErrorINITooManyKIPs,
|
||||
ErrorIntegrityVerificationNotImplemented,
|
||||
ErrorIntegrityVerificationFailed,
|
||||
};
|
||||
|
||||
std::string GetResultStatusString(ResultStatus status);
|
||||
|
@ -169,6 +172,13 @@ public:
|
|||
*/
|
||||
virtual LoadResult Load(Kernel::KProcess& process, Core::System& system) = 0;
|
||||
|
||||
/**
|
||||
* Try to verify the integrity of the file.
|
||||
*/
|
||||
virtual ResultStatus VerifyIntegrity(std::function<bool(size_t, size_t)> progress_callback) {
|
||||
return ResultStatus::ErrorIntegrityVerificationNotImplemented;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the code (typically .code section) of the application
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue