From 69bfe075b5c3f6b17ce269950d1f8c9aab18e2de Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Tue, 17 Jul 2018 15:42:15 -0400 Subject: General Filesystem and Save Data Fixes (#670) --- src/core/hle/service/filesystem/filesystem.h | 48 ++++++++++------------------ 1 file changed, 17 insertions(+), 31 deletions(-) (limited to 'src/core/hle/service/filesystem/filesystem.h') diff --git a/src/core/hle/service/filesystem/filesystem.h b/src/core/hle/service/filesystem/filesystem.h index 56d26146e..45272d326 100644 --- a/src/core/hle/service/filesystem/filesystem.h +++ b/src/core/hle/service/filesystem/filesystem.h @@ -6,12 +6,13 @@ #include #include "common/common_types.h" +#include "core/file_sys/romfs_factory.h" +#include "core/file_sys/savedata_factory.h" +#include "core/file_sys/sdmc_factory.h" #include "core/hle/result.h" namespace FileSys { class FileSystemBackend; -class FileSystemFactory; -class Path; } // namespace FileSys namespace Service { @@ -22,35 +23,20 @@ class ServiceManager; namespace FileSystem { -/// Supported FileSystem types -enum class Type { - RomFS = 1, - SaveData = 2, - SDMC = 3, -}; - -/** - * Registers a FileSystem, instances of which can later be opened using its IdCode. - * @param factory FileSystem backend interface to use - * @param type Type used to access this type of FileSystem - */ -ResultCode RegisterFileSystem(std::unique_ptr&& factory, Type type); - -/** - * Opens a file system - * @param type Type of the file system to open - * @param path Path to the file system, used with Binary paths - * @return FileSys::FileSystemBackend interface to the file system - */ -ResultVal> OpenFileSystem(Type type, - FileSys::Path& path); - -/** - * Formats a file system - * @param type Type of the file system to format - * @return ResultCode of the operation - */ -ResultCode FormatFileSystem(Type type); +ResultCode RegisterRomFS(std::unique_ptr&& factory); +ResultCode RegisterSaveData(std::unique_ptr&& factory); +ResultCode RegisterSDMC(std::unique_ptr&& factory); + +// TODO(DarkLordZach): BIS Filesystem +// ResultCode RegisterBIS(std::unique_ptr&& factory); + +ResultVal> OpenRomFS(u64 title_id); +ResultVal> OpenSaveData( + FileSys::SaveDataSpaceId space, FileSys::SaveDataDescriptor save_struct); +ResultVal> OpenSDMC(); + +// TODO(DarkLordZach): BIS Filesystem +// ResultVal> OpenBIS(); /// Registers all Filesystem services with the specified service manager. void InstallInterfaces(SM::ServiceManager& service_manager); -- cgit v1.2.3