summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am/service/storage_accessor.h
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2024-02-14 18:02:38 +0100
committerGitHub <noreply@github.com>2024-02-14 18:02:38 +0100
commit1e8554b01f007d86e0740e44ab50c59d12d5c9f5 (patch)
treec8749abcba107559141113f2b997238087b18d52 /src/core/hle/service/am/service/storage_accessor.h
parentMerge pull request #13009 from t895/message-dialog-fix (diff)
parentam: move out omm interfaces to new module (diff)
downloadyuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar
yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar.gz
yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar.bz2
yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar.lz
yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar.xz
yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar.zst
yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.zip
Diffstat (limited to 'src/core/hle/service/am/service/storage_accessor.h')
-rw-r--r--src/core/hle/service/am/service/storage_accessor.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/core/hle/service/am/service/storage_accessor.h b/src/core/hle/service/am/service/storage_accessor.h
new file mode 100644
index 000000000..1a01730e0
--- /dev/null
+++ b/src/core/hle/service/am/service/storage_accessor.h
@@ -0,0 +1,38 @@
+// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include "core/hle/service/am/library_applet_storage.h"
+#include "core/hle/service/cmif_types.h"
+#include "core/hle/service/service.h"
+
+namespace Service::AM {
+
+class IStorageAccessor final : public ServiceFramework<IStorageAccessor> {
+public:
+ explicit IStorageAccessor(Core::System& system_, std::shared_ptr<LibraryAppletStorage> impl);
+ ~IStorageAccessor() override;
+
+private:
+ Result GetSize(Out<s64> out_size);
+ Result Write(InBuffer<BufferAttr_HipcAutoSelect> buffer, s64 offset);
+ Result Read(OutBuffer<BufferAttr_HipcAutoSelect> out_buffer, s64 offset);
+
+ const std::shared_ptr<LibraryAppletStorage> m_impl;
+};
+
+class ITransferStorageAccessor final : public ServiceFramework<ITransferStorageAccessor> {
+public:
+ explicit ITransferStorageAccessor(Core::System& system_,
+ std::shared_ptr<LibraryAppletStorage> impl);
+ ~ITransferStorageAccessor() override;
+
+private:
+ Result GetSize(Out<s64> out_size);
+ Result GetHandle(Out<s64> out_size, OutCopyHandle<Kernel::KTransferMemory> out_handle);
+
+ const std::shared_ptr<LibraryAppletStorage> m_impl;
+};
+
+} // namespace Service::AM