diff options
| author | bunnei <bunneidev@gmail.com> | 2018-01-21 16:15:15 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-21 16:15:15 -0500 |
| commit | ab8525705bbd0ae62b567f301281ca516e7c5320 (patch) | |
| tree | 88be854c845cb826366acca96e07ccc62cc96695 /src/core/hle/service/filesystem/filesystem.h | |
| parent | 4c07dde47241a092fd5e17919da6ff0f68d1061a (diff) | |
| parent | 5035d18baaad5cee4cbc671710de472b9f25a920 (diff) | |
Merge pull request #123 from bunnei/fs
Initial implementation of RomFS filesystem and fsp-srv
Diffstat (limited to 'src/core/hle/service/filesystem/filesystem.h')
| -rw-r--r-- | src/core/hle/service/filesystem/filesystem.h | 50 |
1 files changed, 50 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..a674c9493 --- /dev/null +++ b/src/core/hle/service/filesystem/filesystem.h @@ -0,0 +1,50 @@ +// 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/hle/result.h" + +namespace FileSys { +class FileSystemBackend; +class FileSystemFactory; +class Path; +} // namespace FileSys + +namespace Service { + +namespace SM { +class ServiceManager; +} // namespace SM + +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 |
