mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-06 04:01:44 +00:00
c2d9ac8f5c
Also greatly refactors libstratosphere, and does a lot of other things. There is a lot of code in this one.
31 lines
1 KiB
C++
31 lines
1 KiB
C++
#pragma once
|
|
#include <switch.h>
|
|
#include <stratosphere.hpp>
|
|
|
|
#include "fsmitm_romstorage.hpp"
|
|
#include "fsmitm_romfsbuild.hpp"
|
|
#include "fsmitm_utils.hpp"
|
|
|
|
|
|
/* Represents a merged RomFS. */
|
|
class LayeredRomFS : public IROStorage {
|
|
private:
|
|
/* Data Sources. */
|
|
std::shared_ptr<RomInterfaceStorage> storage_romfs;
|
|
std::shared_ptr<RomFileStorage> file_romfs;
|
|
/* Information about the merged RomFS. */
|
|
u64 title_id;
|
|
std::shared_ptr<std::vector<RomFSSourceInfo>> p_source_infos;
|
|
|
|
LayeredRomFS *Clone() override {
|
|
return new LayeredRomFS(*this);
|
|
};
|
|
|
|
public:
|
|
LayeredRomFS(std::shared_ptr<RomInterfaceStorage> s_r, std::shared_ptr<RomFileStorage> f_r, u64 tid);
|
|
virtual ~LayeredRomFS();
|
|
|
|
Result Read(void *buffer, size_t size, u64 offset) override;
|
|
Result GetSize(u64 *out_size) override;
|
|
Result OperateRange(u32 operation_type, u64 offset, u64 size, FsRangeInfo *out_range_info) override;
|
|
};
|