summaryrefslogtreecommitdiffstats
path: root/src/core/loader/loader.h
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-09-10 19:40:39 +0200
committerGitHub <noreply@github.com>2023-09-10 19:40:39 +0200
commit64130d9f01c15bc021d3802e484b5a480911e5cc (patch)
tree88a1905a2dce48c34c77fc258b47b4aea66107a9 /src/core/loader/loader.h
parentMerge pull request #11465 from Kelebek1/skip_remaining_reset (diff)
parentcore: implement basic integrity verification (diff)
downloadyuzu-64130d9f01c15bc021d3802e484b5a480911e5cc.tar
yuzu-64130d9f01c15bc021d3802e484b5a480911e5cc.tar.gz
yuzu-64130d9f01c15bc021d3802e484b5a480911e5cc.tar.bz2
yuzu-64130d9f01c15bc021d3802e484b5a480911e5cc.tar.lz
yuzu-64130d9f01c15bc021d3802e484b5a480911e5cc.tar.xz
yuzu-64130d9f01c15bc021d3802e484b5a480911e5cc.tar.zst
yuzu-64130d9f01c15bc021d3802e484b5a480911e5cc.zip
Diffstat (limited to 'src/core/loader/loader.h')
-rw-r--r--src/core/loader/loader.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h
index 721eb8e8c..b4828f7cd 100644
--- a/src/core/loader/loader.h
+++ b/src/core/loader/loader.h
@@ -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);
@@ -170,6 +173,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
*
* @param[out] buffer Reference to buffer to store data