diff options
author | Charles Lombardo <clombardo169@gmail.com> | 2024-01-15 19:51:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-15 19:51:14 +0100 |
commit | a2ffb419c921fdb2321472131e8c4447c3aab36a (patch) | |
tree | 83965b0a6e58b0bb401f786286d372bfedf6dd1d /src/core/hle/service/filesystem/romfs_controller.h | |
parent | Merge pull request #12611 from liamwhite/resource-management-is-hard (diff) | |
parent | loader: fix homebrew nro registration (diff) | |
download | yuzu-a2ffb419c921fdb2321472131e8c4447c3aab36a.tar yuzu-a2ffb419c921fdb2321472131e8c4447c3aab36a.tar.gz yuzu-a2ffb419c921fdb2321472131e8c4447c3aab36a.tar.bz2 yuzu-a2ffb419c921fdb2321472131e8c4447c3aab36a.tar.lz yuzu-a2ffb419c921fdb2321472131e8c4447c3aab36a.tar.xz yuzu-a2ffb419c921fdb2321472131e8c4447c3aab36a.tar.zst yuzu-a2ffb419c921fdb2321472131e8c4447c3aab36a.zip |
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 |