aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/am/storage.cpp
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2024-02-14 11:02:38 -0600
committerGitHub <noreply@github.com>2024-02-14 11:02:38 -0600
commit1e8554b01f007d86e0740e44ab50c59d12d5c9f5 (patch)
treec8749abcba107559141113f2b997238087b18d52 /src/core/hle/service/am/storage.cpp
parentad4ae399033853e6fe45a5e2a0009c614ab199fc (diff)
parentbca698a17ae4b39106cd7f8c7eef06ccc7c8d6dd (diff)
Merge pull request #12993 from liamwhite/am-rewrite-part1
am: rewrite part 1
Diffstat (limited to 'src/core/hle/service/am/storage.cpp')
-rw-r--r--src/core/hle/service/am/storage.cpp59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/core/hle/service/am/storage.cpp b/src/core/hle/service/am/storage.cpp
deleted file mode 100644
index 4e82afd1c..000000000
--- a/src/core/hle/service/am/storage.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#include "core/hle/service/am/am_results.h"
-#include "core/hle/service/am/library_applet_storage.h"
-#include "core/hle/service/am/storage.h"
-#include "core/hle/service/am/storage_accessor.h"
-#include "core/hle/service/ipc_helpers.h"
-
-namespace Service::AM {
-
-IStorage::IStorage(Core::System& system_, std::shared_ptr<LibraryAppletStorage> impl_)
- : ServiceFramework{system_, "IStorage"}, impl{std::move(impl_)} {
- static const FunctionInfo functions[] = {
- {0, &IStorage::Open, "Open"},
- {1, &IStorage::OpenTransferStorage, "OpenTransferStorage"},
- };
-
- RegisterHandlers(functions);
-}
-
-IStorage::IStorage(Core::System& system_, std::vector<u8>&& data)
- : IStorage(system_, CreateStorage(std::move(data))) {}
-
-IStorage::~IStorage() = default;
-
-void IStorage::Open(HLERequestContext& ctx) {
- LOG_DEBUG(Service_AM, "called");
-
- if (impl->GetHandle() != nullptr) {
- IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(AM::ResultInvalidStorageType);
- return;
- }
-
- IPC::ResponseBuilder rb{ctx, 2, 0, 1};
- rb.Push(ResultSuccess);
- rb.PushIpcInterface<IStorageAccessor>(system, impl);
-}
-
-void IStorage::OpenTransferStorage(HLERequestContext& ctx) {
- LOG_DEBUG(Service_AM, "called");
-
- if (impl->GetHandle() == nullptr) {
- IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(AM::ResultInvalidStorageType);
- return;
- }
-
- IPC::ResponseBuilder rb{ctx, 2, 0, 1};
- rb.Push(ResultSuccess);
- rb.PushIpcInterface<ITransferStorageAccessor>(system, impl);
-}
-
-std::vector<u8> IStorage::GetData() const {
- return impl->GetData();
-}
-
-} // namespace Service::AM