summaryrefslogtreecommitdiff
path: root/src/core/loader/nso.h
diff options
context:
space:
mode:
authorGravatar bunnei2017-09-24 11:08:31 -0400
committerGravatar bunnei2017-09-30 14:32:53 -0400
commit6bafd3f4f754e093fe0f99ebf2e1136d3398981a (patch)
treed6021353217bfc01416a3b0f737389f103af9640 /src/core/loader/nso.h
parentexternals: Add lz4. (diff)
downloadyuzu-6bafd3f4f754e093fe0f99ebf2e1136d3398981a.tar.gz
yuzu-6bafd3f4f754e093fe0f99ebf2e1136d3398981a.tar.xz
yuzu-6bafd3f4f754e093fe0f99ebf2e1136d3398981a.zip
loader: Add support for loading an NSO.
Diffstat (limited to 'src/core/loader/nso.h')
-rw-r--r--src/core/loader/nso.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/core/loader/nso.h b/src/core/loader/nso.h
new file mode 100644
index 000000000..39a9bd3d9
--- /dev/null
+++ b/src/core/loader/nso.h
@@ -0,0 +1,38 @@
1// Copyright 2017 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <string>
8#include "common/common_types.h"
9#include "common/file_util.h"
10#include "core/loader/loader.h"
11
12namespace Loader {
13
14/// Loads an NSO file
15class AppLoader_NSO final : public AppLoader {
16public:
17 AppLoader_NSO(FileUtil::IOFile&& file, std::string filename, std::string filepath)
18 : AppLoader(std::move(file)), filename(std::move(filename)), filepath(std::move(filepath)) {}
19
20 /**
21 * Returns the type of the file
22 * @param file FileUtil::IOFile open file
23 * @return FileType found, or FileType::Error if this loader doesn't know it
24 */
25 static FileType IdentifyType(FileUtil::IOFile& file);
26
27 FileType GetFileType() override {
28 return IdentifyType(file);
29 }
30
31 ResultStatus Load() override;
32
33private:
34 std::string filename;
35 std::string filepath;
36};
37
38} // namespace Loader