ReXGlue SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
file_system_factory.h
Go to the documentation of this file.
1
10
11
#pragma once
12
13
#include <filesystem>
14
#include <memory>
15
#include <optional>
16
#include <span>
17
18
#include <
rex/filesystem/file_system.h
>
19
#include <
rex/filesystem/xdbf.h
>
20
#include <
rex/filesystem/xex.h
>
21
#include <
rex/kernel/types/xex.h
>
22
#include <
rex/module.h
>
23
#include <
rex/result.h
>
24
25
namespace
rex::filesystem {
26
27
class
IContainerImage
;
28
struct
XContentPackageHeader
;
29
31
REX_DECLARE_INTERFACE
(
IFileSystemFactory
, 2)
37
[[nodiscard]]
virtual
std::unique_ptr<IFileSystem> Create() = 0;
38
44
[[nodiscard]]
virtual
Result<std::unique_ptr<IXEXImage>
> ParseXEX(std::span<const u8> file) = 0;
45
52
[[nodiscard]]
virtual
Result<std::unique_ptr<IContainerImage>
> OpenContainer(
53
const
std::filesystem::path& path) = 0;
54
62
[[nodiscard]]
virtual
std::unique_ptr<IXDBFTitleData> OpenXDBF(
const
u8* data,
63
size_t
data_size) = 0;
64
70
[[nodiscard]]
virtual
Result<PEInfo>
ParsePE(std::span<const u8> image) = 0;
71
78
[[nodiscard]]
virtual
std::optional<XEXOptHeaderEntry> FindXEXOptHeader(
79
std::span<const u8> header,
kernel::XEXHeaderKey
key) = 0;
80
87
[[nodiscard]]
virtual
Result<XContentPackageHeader>
ReadPackageHeader(
88
std::span<const u8> bytes) = 0;
89
95
[[nodiscard]]
virtual
Result<XContentPackageHeader>
ReadPackageHeader(
96
const
std::filesystem::path& path) = 0;
97
};
98
99
}
// namespace rex::filesystem
rex::filesystem::IContainerImage
Definition
stfs.h:531
rex::filesystem::IFileSystemFactory
Definition
file_system_factory.h:31
file_system.h
xex.h
XEX image reader and PE image parsing.
xex.h
module.h
Interfaces, factory and module declaration.
REX_DECLARE_INTERFACE
#define REX_DECLARE_INTERFACE(Name, version)
Definition
module.h:114
rex::kernel::XEXHeaderKey
XEXHeaderKey
Definition
xex.h:270
rex::Result
std::expected< T, Error > Result
Definition
result.h:98
result.h
rex::filesystem::XContentPackageHeader
Definition
stfs.h:499
xdbf.h
rex
filesystem
file_system_factory.h
Generated by
1.18.0