diff options
| author | Liam <byteslice@airmail.cc> | 2024-01-08 00:49:00 -0500 |
|---|---|---|
| committer | Liam <byteslice@airmail.cc> | 2024-01-11 11:28:52 -0500 |
| commit | aae9eea53208fc0924c90ebb1272fcfaa3f23e0c (patch) | |
| tree | 050ccc76dd2fad3c3f81197aa6435674caeac86f /src/core/hle/service/filesystem/romfs_controller.h | |
| parent | 82b58668edcb078896a1184d158a08c58f841dd5 (diff) | |
fsp-srv: use program registry for SetCurrentProcess
Diffstat (limited to 'src/core/hle/service/filesystem/romfs_controller.h')
| -rw-r--r-- | src/core/hle/service/filesystem/romfs_controller.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/core/hle/service/filesystem/romfs_controller.h b/src/core/hle/service/filesystem/romfs_controller.h new file mode 100644 index 000000000..9a478f71d --- /dev/null +++ b/src/core/hle/service/filesystem/romfs_controller.h @@ -0,0 +1,31 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/file_sys/nca_metadata.h" +#include "core/file_sys/romfs_factory.h" +#include "core/file_sys/vfs_types.h" + +namespace Service::FileSystem { + +class RomFsController { +public: + explicit RomFsController(std::shared_ptr<FileSys::RomFSFactory> factory_, u64 program_id_); + ~RomFsController(); + + FileSys::VirtualFile OpenRomFSCurrentProcess(); + FileSys::VirtualFile OpenPatchedRomFS(u64 title_id, FileSys::ContentRecordType type); + FileSys::VirtualFile OpenPatchedRomFSWithProgramIndex(u64 title_id, u8 program_index, + FileSys::ContentRecordType type); + FileSys::VirtualFile OpenRomFS(u64 title_id, FileSys::StorageId storage_id, + FileSys::ContentRecordType type); + std::shared_ptr<FileSys::NCA> OpenBaseNca(u64 title_id, FileSys::StorageId storage_id, + FileSys::ContentRecordType type); + +private: + const std::shared_ptr<FileSys::RomFSFactory> factory; + const u64 program_id; +}; + +} // namespace Service::FileSystem |
