summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am/am.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-01-26 19:18:13 +0100
committerbunnei <bunneidev@gmail.com>2020-02-06 05:06:52 +0100
commit84e895cdd64f0378f1c5bc3af3897b77068d5acf (patch)
tree3673a1d60a718f2decdd71f7b4d5b8a9538dfc3b /src/core/hle/service/am/am.h
parentapplets: software_keyboard: Signal state change on end of interactive session. (diff)
downloadyuzu-84e895cdd64f0378f1c5bc3af3897b77068d5acf.tar
yuzu-84e895cdd64f0378f1c5bc3af3897b77068d5acf.tar.gz
yuzu-84e895cdd64f0378f1c5bc3af3897b77068d5acf.tar.bz2
yuzu-84e895cdd64f0378f1c5bc3af3897b77068d5acf.tar.lz
yuzu-84e895cdd64f0378f1c5bc3af3897b77068d5acf.tar.xz
yuzu-84e895cdd64f0378f1c5bc3af3897b77068d5acf.tar.zst
yuzu-84e895cdd64f0378f1c5bc3af3897b77068d5acf.zip
Diffstat (limited to 'src/core/hle/service/am/am.h')
-rw-r--r--src/core/hle/service/am/am.h30
1 files changed, 24 insertions, 6 deletions
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h
index 448817be9..0b9a4332d 100644
--- a/src/core/hle/service/am/am.h
+++ b/src/core/hle/service/am/am.h
@@ -12,7 +12,8 @@
namespace Kernel {
class KernelCore;
-}
+class TransferMemory;
+} // namespace Kernel
namespace Service::NVFlinger {
class NVFlinger;
@@ -188,19 +189,36 @@ private:
std::shared_ptr<AppletMessageQueue> msg_queue;
};
+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 IStorage final : public ServiceFramework<IStorage> {
public:
- explicit IStorage(std::vector<u8> buffer);
+ explicit IStorage(std::vector<u8>&& buffer);
~IStorage() override;
- const std::vector<u8>& GetData() const;
+ std::vector<u8>& GetData() {
+ return impl->GetData();
+ }
+
+ const std::vector<u8>& GetData() const {
+ return impl->GetData();
+ }
+
+ std::size_t GetSize() const {
+ return impl->GetSize();
+ }
private:
+ void Register();
void Open(Kernel::HLERequestContext& ctx);
- std::vector<u8> buffer;
-
- friend class IStorageAccessor;
+ std::shared_ptr<IStorageImpl> impl;
};
class IStorageAccessor final : public ServiceFramework<IStorageAccessor> {