summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am/storage.h
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2024-01-02 03:58:56 +0100
committerLiam <byteslice@airmail.cc>2024-01-30 02:17:33 +0100
commitb1c2f791af08b3eaba53c1ce1673fe0729fc5d26 (patch)
tree69300381618872113496f62494e8c3e0353538d9 /src/core/hle/service/am/storage.h
parentam: migrate global state to per-applet state structure (diff)
downloadyuzu-b1c2f791af08b3eaba53c1ce1673fe0729fc5d26.tar
yuzu-b1c2f791af08b3eaba53c1ce1673fe0729fc5d26.tar.gz
yuzu-b1c2f791af08b3eaba53c1ce1673fe0729fc5d26.tar.bz2
yuzu-b1c2f791af08b3eaba53c1ce1673fe0729fc5d26.tar.lz
yuzu-b1c2f791af08b3eaba53c1ce1673fe0729fc5d26.tar.xz
yuzu-b1c2f791af08b3eaba53c1ce1673fe0729fc5d26.tar.zst
yuzu-b1c2f791af08b3eaba53c1ce1673fe0729fc5d26.zip
Diffstat (limited to 'src/core/hle/service/am/storage.h')
-rw-r--r--src/core/hle/service/am/storage.h25
1 files changed, 7 insertions, 18 deletions
diff --git a/src/core/hle/service/am/storage.h b/src/core/hle/service/am/storage.h
index d47a8d89f..10d00b141 100644
--- a/src/core/hle/service/am/storage.h
+++ b/src/core/hle/service/am/storage.h
@@ -7,36 +7,25 @@
namespace Service::AM {
-class IStorageImpl {
-public:
- virtual ~IStorageImpl();
- virtual std::vector<u8>& GetData() = 0;
- virtual const std::vector<u8>& GetData() const = 0;
- virtual std::size_t GetSize() const = 0;
-};
+class LibraryAppletStorage;
class IStorage final : public ServiceFramework<IStorage> {
public:
+ explicit IStorage(Core::System& system_, std::shared_ptr<LibraryAppletStorage> impl_);
explicit IStorage(Core::System& system_, std::vector<u8>&& buffer);
~IStorage() override;
- std::vector<u8>& GetData() {
- return impl->GetData();
+ std::shared_ptr<LibraryAppletStorage> GetImpl() const {
+ return impl;
}
- const std::vector<u8>& GetData() const {
- return impl->GetData();
- }
-
- std::size_t GetSize() const {
- return impl->GetSize();
- }
+ std::vector<u8> GetData() const;
private:
- void Register();
void Open(HLERequestContext& ctx);
+ void OpenTransferStorage(HLERequestContext& ctx);
- std::shared_ptr<IStorageImpl> impl;
+ const std::shared_ptr<LibraryAppletStorage> impl;
};
} // namespace Service::AM