summaryrefslogtreecommitdiffstats
path: root/src/core/loader/ncch.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-10-13 03:21:49 +0200
committerbunnei <bunneidev@gmail.com>2017-10-13 03:21:49 +0200
commit72b03025ac4ef0d8633c2f3e55b513cd149c59e5 (patch)
treef1fbeb915a0b3df8e4e988a6a562a763e18ea666 /src/core/loader/ncch.h
parenthle: Remove a large amount of 3ds-specific service code. (diff)
downloadyuzu-72b03025ac4ef0d8633c2f3e55b513cd149c59e5.tar
yuzu-72b03025ac4ef0d8633c2f3e55b513cd149c59e5.tar.gz
yuzu-72b03025ac4ef0d8633c2f3e55b513cd149c59e5.tar.bz2
yuzu-72b03025ac4ef0d8633c2f3e55b513cd149c59e5.tar.lz
yuzu-72b03025ac4ef0d8633c2f3e55b513cd149c59e5.tar.xz
yuzu-72b03025ac4ef0d8633c2f3e55b513cd149c59e5.tar.zst
yuzu-72b03025ac4ef0d8633c2f3e55b513cd149c59e5.zip
Diffstat (limited to 'src/core/loader/ncch.h')
-rw-r--r--src/core/loader/ncch.h80
1 files changed, 0 insertions, 80 deletions
diff --git a/src/core/loader/ncch.h b/src/core/loader/ncch.h
deleted file mode 100644
index 09230ae33..000000000
--- a/src/core/loader/ncch.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2014 Citra Emulator Project
-// Licensed under GPLv2 or any later version
-// Refer to the license.txt file included.
-
-#pragma once
-
-#include <memory>
-#include "common/common_types.h"
-#include "common/swap.h"
-#include "core/file_sys/ncch_container.h"
-#include "core/loader/loader.h"
-
-////////////////////////////////////////////////////////////////////////////////////////////////////
-// Loader namespace
-
-namespace Loader {
-
-/// Loads an NCCH file (e.g. from a CCI, or the first NCCH in a CXI)
-class AppLoader_NCCH final : public AppLoader {
-public:
- AppLoader_NCCH(FileUtil::IOFile&& file, const std::string& filepath)
- : AppLoader(std::move(file)), filepath(filepath), base_ncch(filepath),
- overlay_ncch(&base_ncch) {}
-
- /**
- * Returns the type of the file
- * @param file FileUtil::IOFile open file
- * @return FileType found, or FileType::Error if this loader doesn't know it
- */
- static FileType IdentifyType(FileUtil::IOFile& file);
-
- FileType GetFileType() override {
- return IdentifyType(file);
- }
-
- ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override;
-
- /**
- * Loads the Exheader and returns the system mode for this application.
- * @returns A pair with the optional system mode, and and the status.
- */
- std::pair<boost::optional<u32>, ResultStatus> LoadKernelSystemMode() override;
-
- ResultStatus ReadCode(std::vector<u8>& buffer) override;
-
- ResultStatus ReadIcon(std::vector<u8>& buffer) override;
-
- ResultStatus ReadBanner(std::vector<u8>& buffer) override;
-
- ResultStatus ReadLogo(std::vector<u8>& buffer) override;
-
- ResultStatus ReadProgramId(u64& out_program_id) override;
-
- ResultStatus ReadRomFS(std::shared_ptr<FileUtil::IOFile>& romfs_file, u64& offset,
- u64& size) override;
-
- ResultStatus ReadUpdateRomFS(std::shared_ptr<FileUtil::IOFile>& romfs_file, u64& offset,
- u64& size) override;
-
- ResultStatus ReadTitle(std::string& title) override;
-
-private:
- /**
- * Loads .code section into memory for booting
- * @param process The newly created process
- * @return ResultStatus result of function
- */
- ResultStatus LoadExec(Kernel::SharedPtr<Kernel::Process>& process);
-
- /// Reads the region lockout info in the SMDH and send it to CFG service
- void ParseRegionLockoutInfo();
-
- FileSys::NCCHContainer base_ncch;
- FileSys::NCCHContainer update_ncch;
- FileSys::NCCHContainer* overlay_ncch;
-
- std::string filepath;
-};
-
-} // namespace Loader