diff options
author | David Marcec <dmarcecguzman@gmail.com> | 2018-01-17 04:20:12 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-01-21 21:39:28 +0100 |
commit | d64b7d7dfda8123cc8e0d6abaf358a4a08ba795c (patch) | |
tree | 8131ceeb6ec598cf7cf83132a19cc6ab981a4ff0 /src/core/hle/service/filesystem/filesystem.h | |
parent | file_sys: Cleanup to better match Switch file system constructs. (diff) | |
download | yuzu-d64b7d7dfda8123cc8e0d6abaf358a4a08ba795c.tar yuzu-d64b7d7dfda8123cc8e0d6abaf358a4a08ba795c.tar.gz yuzu-d64b7d7dfda8123cc8e0d6abaf358a4a08ba795c.tar.bz2 yuzu-d64b7d7dfda8123cc8e0d6abaf358a4a08ba795c.tar.lz yuzu-d64b7d7dfda8123cc8e0d6abaf358a4a08ba795c.tar.xz yuzu-d64b7d7dfda8123cc8e0d6abaf358a4a08ba795c.tar.zst yuzu-d64b7d7dfda8123cc8e0d6abaf358a4a08ba795c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/filesystem/filesystem.h | 41 |
1 files changed, 41 insertions, 0 deletions
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 <memory> +#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<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); + +/// Registers all Filesystem services with the specified service manager. +void InstallInterfaces(SM::ServiceManager& service_manager); + +} // namespace Filesystem +} // namespace Service |