summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/filesystem/filesystem.h
diff options
context:
space:
mode:
authorZach Hilman <DarkLordZach@users.noreply.github.com>2018-07-17 21:42:15 +0200
committerbunnei <bunneidev@gmail.com>2018-07-17 21:42:15 +0200
commit69bfe075b5c3f6b17ce269950d1f8c9aab18e2de (patch)
tree8fca65bb5b3a0a8fb2b0772020d5b8d47749c3b3 /src/core/hle/service/filesystem/filesystem.h
parentMerge pull request #671 from MerryMage/clear-exclusive-state (diff)
downloadyuzu-69bfe075b5c3f6b17ce269950d1f8c9aab18e2de.tar
yuzu-69bfe075b5c3f6b17ce269950d1f8c9aab18e2de.tar.gz
yuzu-69bfe075b5c3f6b17ce269950d1f8c9aab18e2de.tar.bz2
yuzu-69bfe075b5c3f6b17ce269950d1f8c9aab18e2de.tar.lz
yuzu-69bfe075b5c3f6b17ce269950d1f8c9aab18e2de.tar.xz
yuzu-69bfe075b5c3f6b17ce269950d1f8c9aab18e2de.tar.zst
yuzu-69bfe075b5c3f6b17ce269950d1f8c9aab18e2de.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/filesystem/filesystem.h48
1 files changed, 17 insertions, 31 deletions
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 <memory>
#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<FileSys::FileSystemFactory>&& 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<std::unique_ptr<FileSys::FileSystemBackend>> 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<FileSys::RomFSFactory>&& factory);
+ResultCode RegisterSaveData(std::unique_ptr<FileSys::SaveDataFactory>&& factory);
+ResultCode RegisterSDMC(std::unique_ptr<FileSys::SDMCFactory>&& factory);
+
+// TODO(DarkLordZach): BIS Filesystem
+// ResultCode RegisterBIS(std::unique_ptr<FileSys::BISFactory>&& factory);
+
+ResultVal<std::unique_ptr<FileSys::FileSystemBackend>> OpenRomFS(u64 title_id);
+ResultVal<std::unique_ptr<FileSys::FileSystemBackend>> OpenSaveData(
+ FileSys::SaveDataSpaceId space, FileSys::SaveDataDescriptor save_struct);
+ResultVal<std::unique_ptr<FileSys::FileSystemBackend>> OpenSDMC();
+
+// TODO(DarkLordZach): BIS Filesystem
+// ResultVal<std::unique_ptr<FileSys::FileSystemBackend>> OpenBIS();
/// Registers all Filesystem services with the specified service manager.
void InstallInterfaces(SM::ServiceManager& service_manager);