summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am/service/storage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/am/service/storage.h')
-rw-r--r--src/core/hle/service/am/service/storage.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/core/hle/service/am/service/storage.h b/src/core/hle/service/am/service/storage.h
new file mode 100644
index 000000000..cde2ed0ea
--- /dev/null
+++ b/src/core/hle/service/am/service/storage.h
@@ -0,0 +1,35 @@
+// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include "core/hle/service/cmif_types.h"
+#include "core/hle/service/service.h"
+
+namespace Service::AM {
+
+class LibraryAppletStorage;
+class IStorageAccessor;
+class ITransferStorageAccessor;
+
+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::shared_ptr<LibraryAppletStorage> GetImpl() const {
+ return m_impl;
+ }
+
+ std::vector<u8> GetData() const;
+
+private:
+ Result Open(Out<SharedPointer<IStorageAccessor>> out_storage_accessor);
+ Result OpenTransferStorage(
+ Out<SharedPointer<ITransferStorageAccessor>> out_transfer_storage_accessor);
+
+ const std::shared_ptr<LibraryAppletStorage> m_impl;
+};
+
+} // namespace Service::AM