mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-16 21:27:49 +00:00
am: Move IStorageAccessor to header and update backing buffer
Writes to an AM::IStorage object through an IStorageAccessor will now be preserved once the accessor is destroyed.
This commit is contained in:
parent
7ee51622c4
commit
1ebdafe073
2 changed files with 62 additions and 64 deletions
|
@ -155,6 +155,32 @@ private:
|
|||
std::shared_ptr<AppletMessageQueue> msg_queue;
|
||||
};
|
||||
|
||||
class IStorage final : public ServiceFramework<IStorage> {
|
||||
public:
|
||||
explicit IStorage(std::vector<u8> buffer);
|
||||
|
||||
const std::vector<u8>& GetData() const;
|
||||
|
||||
private:
|
||||
std::vector<u8> buffer;
|
||||
|
||||
void Open(Kernel::HLERequestContext& ctx);
|
||||
|
||||
friend class IStorageAccessor;
|
||||
};
|
||||
|
||||
class IStorageAccessor final : public ServiceFramework<IStorageAccessor> {
|
||||
public:
|
||||
explicit IStorageAccessor(IStorage& backing);
|
||||
|
||||
private:
|
||||
IStorage& backing;
|
||||
|
||||
void GetSize(Kernel::HLERequestContext& ctx);
|
||||
void Write(Kernel::HLERequestContext& ctx);
|
||||
void Read(Kernel::HLERequestContext& ctx);
|
||||
};
|
||||
|
||||
class ILibraryAppletCreator final : public ServiceFramework<ILibraryAppletCreator> {
|
||||
public:
|
||||
ILibraryAppletCreator();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue