From d64b7d7dfda8123cc8e0d6abaf358a4a08ba795c Mon Sep 17 00:00:00 2001 From: David Marcec Date: Tue, 16 Jan 2018 19:20:12 -0800 Subject: filesystem: Implement basic IStorage functionality. --- src/core/hle/service/filesystem/filesystem.h | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/core/hle/service/filesystem/filesystem.h (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 new file mode 100644 index 000000000..52db83e62 --- /dev/null +++ b/src/core/hle/service/filesystem/filesystem.h @@ -0,0 +1,41 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include +#include "common/common_types.h" +#include "core/file_sys/filesystem.h" +#include "core/hle/result.h" +#include "core/hle/service/service.h" + +namespace Service { +namespace FileSystem { + +/// Supported FileSystem types +enum class Type { + RomFS = 1, +}; + +/** + * 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); + +/// Registers all Filesystem services with the specified service manager. +void InstallInterfaces(SM::ServiceManager& service_manager); + +} // namespace Filesystem +} // namespace Service -- cgit v1.2.3 From 8e50d6002bd12dde7e4ba4fd3da1b53864c4058c Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 20 Jan 2018 21:32:36 -0500 Subject: fsp_srv: Various improvements to IStorage:Read implementation. --- src/core/hle/service/filesystem/filesystem.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 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 52db83e62..a674c9493 100644 --- a/src/core/hle/service/filesystem/filesystem.h +++ b/src/core/hle/service/filesystem/filesystem.h @@ -6,11 +6,20 @@ #include #include "common/common_types.h" -#include "core/file_sys/filesystem.h" #include "core/hle/result.h" -#include "core/hle/service/service.h" + +namespace FileSys { +class FileSystemBackend; +class FileSystemFactory; +class Path; +} // namespace FileSys namespace Service { + +namespace SM { +class ServiceManager; +} // namespace SM + namespace FileSystem { /// Supported FileSystem types @@ -37,5 +46,5 @@ ResultVal> OpenFileSystem(Type type, /// Registers all Filesystem services with the specified service manager. void InstallInterfaces(SM::ServiceManager& service_manager); -} // namespace Filesystem +} // namespace FileSystem } // namespace Service -- cgit v1.2.3