summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/romfs_factory.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-09-17 00:29:24 +0200
committerLioncash <mathew1800@gmail.com>2020-09-17 01:15:19 +0200
commita62c1999c520f88513d9b0cf6e3a5c3a548d51ac (patch)
tree988f711352f4ec0bd56bd4a517a8b2b628fcb9f9 /src/core/file_sys/romfs_factory.h
parentfile_sys/bis_factory: Eliminate usage of the global system accessor (diff)
downloadyuzu-a62c1999c520f88513d9b0cf6e3a5c3a548d51ac.tar
yuzu-a62c1999c520f88513d9b0cf6e3a5c3a548d51ac.tar.gz
yuzu-a62c1999c520f88513d9b0cf6e3a5c3a548d51ac.tar.bz2
yuzu-a62c1999c520f88513d9b0cf6e3a5c3a548d51ac.tar.lz
yuzu-a62c1999c520f88513d9b0cf6e3a5c3a548d51ac.tar.xz
yuzu-a62c1999c520f88513d9b0cf6e3a5c3a548d51ac.tar.zst
yuzu-a62c1999c520f88513d9b0cf6e3a5c3a548d51ac.zip
Diffstat (limited to 'src/core/file_sys/romfs_factory.h')
-rw-r--r--src/core/file_sys/romfs_factory.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/core/file_sys/romfs_factory.h b/src/core/file_sys/romfs_factory.h
index c5d40285c..ec704dfa8 100644
--- a/src/core/file_sys/romfs_factory.h
+++ b/src/core/file_sys/romfs_factory.h
@@ -13,8 +13,15 @@ namespace Loader {
class AppLoader;
} // namespace Loader
+namespace Service::FileSystem {
+class FileSystemController;
+}
+
namespace FileSys {
+class ContentProvider;
+class NCA;
+
enum class ContentRecordType : u8;
enum class StorageId : u8 {
@@ -29,18 +36,26 @@ enum class StorageId : u8 {
/// File system interface to the RomFS archive
class RomFSFactory {
public:
- explicit RomFSFactory(Loader::AppLoader& app_loader);
+ explicit RomFSFactory(Loader::AppLoader& app_loader, ContentProvider& provider,
+ Service::FileSystem::FileSystemController& controller);
~RomFSFactory();
void SetPackedUpdate(VirtualFile update_raw);
- ResultVal<VirtualFile> OpenCurrentProcess(u64 current_process_title_id) const;
- ResultVal<VirtualFile> Open(u64 title_id, StorageId storage, ContentRecordType type) const;
+ [[nodiscard]] ResultVal<VirtualFile> OpenCurrentProcess(u64 current_process_title_id) const;
+ [[nodiscard]] ResultVal<VirtualFile> Open(u64 title_id, StorageId storage,
+ ContentRecordType type) const;
private:
+ [[nodiscard]] std::shared_ptr<NCA> GetEntry(u64 title_id, StorageId storage,
+ ContentRecordType type) const;
+
VirtualFile file;
VirtualFile update_raw;
bool updatable;
u64 ivfc_offset;
+
+ ContentProvider& content_provider;
+ Service::FileSystem::FileSystemController& filesystem_controller;
};
} // namespace FileSys