diff options
author | Liam <byteslice@airmail.cc> | 2024-02-17 18:13:03 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-18 16:32:21 +0100 |
commit | db172ba249d8984ac3838496fcf9986ef1e3f9bc (patch) | |
tree | f75f6a0cf045862029a69b8390f0c27f42409818 | |
parent | ns: rewrite IDocumentInterface (diff) | |
download | yuzu-db172ba249d8984ac3838496fcf9986ef1e3f9bc.tar yuzu-db172ba249d8984ac3838496fcf9986ef1e3f9bc.tar.gz yuzu-db172ba249d8984ac3838496fcf9986ef1e3f9bc.tar.bz2 yuzu-db172ba249d8984ac3838496fcf9986ef1e3f9bc.tar.lz yuzu-db172ba249d8984ac3838496fcf9986ef1e3f9bc.tar.xz yuzu-db172ba249d8984ac3838496fcf9986ef1e3f9bc.tar.zst yuzu-db172ba249d8984ac3838496fcf9986ef1e3f9bc.zip |
-rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/core/hle/service/ns/download_task_interface.cpp | 39 | ||||
-rw-r--r-- | src/core/hle/service/ns/download_task_interface.h | 20 | ||||
-rw-r--r-- | src/core/hle/service/ns/ns.cpp | 22 | ||||
-rw-r--r-- | src/core/hle/service/ns/ns.h | 6 |
5 files changed, 62 insertions, 27 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 29e29f659..c97d3aa89 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -747,6 +747,8 @@ add_library(core STATIC hle/service/ns/content_management_interface.h hle/service/ns/document_interface.cpp hle/service/ns/document_interface.h + hle/service/ns/download_task_interface.cpp + hle/service/ns/download_task_interface.h hle/service/ns/ecommerce_interface.cpp hle/service/ns/ecommerce_interface.h hle/service/ns/factory_reset_interface.cpp diff --git a/src/core/hle/service/ns/download_task_interface.cpp b/src/core/hle/service/ns/download_task_interface.cpp new file mode 100644 index 000000000..62dc7f187 --- /dev/null +++ b/src/core/hle/service/ns/download_task_interface.cpp @@ -0,0 +1,39 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/hle/service/cmif_serialization.h" +#include "core/hle/service/ns/download_task_interface.h" + +namespace Service::NS { + +IDownloadTaskInterface::IDownloadTaskInterface(Core::System& system_) + : ServiceFramework{system_, "IDownloadTaskInterface"} { + // clang-format off + static const FunctionInfo functions[] = { + {701, nullptr, "ClearTaskStatusList"}, + {702, nullptr, "RequestDownloadTaskList"}, + {703, nullptr, "RequestEnsureDownloadTask"}, + {704, nullptr, "ListDownloadTaskStatus"}, + {705, nullptr, "RequestDownloadTaskListData"}, + {706, nullptr, "TryCommitCurrentApplicationDownloadTask"}, + {707, D<&IDownloadTaskInterface::EnableAutoCommit>, "EnableAutoCommit"}, + {708, D<&IDownloadTaskInterface::DisableAutoCommit>, "DisableAutoCommit"}, + {709, nullptr, "TriggerDynamicCommitEvent"}, + }; + // clang-format on + + RegisterHandlers(functions); +} + +IDownloadTaskInterface::~IDownloadTaskInterface() = default; + +Result IDownloadTaskInterface::EnableAutoCommit() { + LOG_WARNING(Service_NS, "(STUBBED) called"); + R_SUCCEED(); +} +Result IDownloadTaskInterface::DisableAutoCommit() { + LOG_WARNING(Service_NS, "(STUBBED) called"); + R_SUCCEED(); +} + +} // namespace Service::NS diff --git a/src/core/hle/service/ns/download_task_interface.h b/src/core/hle/service/ns/download_task_interface.h new file mode 100644 index 000000000..b1cb69cb8 --- /dev/null +++ b/src/core/hle/service/ns/download_task_interface.h @@ -0,0 +1,20 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/hle/service/service.h" + +namespace Service::NS { + +class IDownloadTaskInterface final : public ServiceFramework<IDownloadTaskInterface> { +public: + explicit IDownloadTaskInterface(Core::System& system_); + ~IDownloadTaskInterface() override; + +private: + Result EnableAutoCommit(); + Result DisableAutoCommit(); +}; + +} // namespace Service::NS diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index b98fa2c96..451fc2b8d 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp @@ -15,6 +15,7 @@ #include "core/hle/service/ns/application_version_interface.h" #include "core/hle/service/ns/content_management_interface.h" #include "core/hle/service/ns/document_interface.h" +#include "core/hle/service/ns/download_task_interface.h" #include "core/hle/service/ns/ecommerce_interface.h" #include "core/hle/service/ns/factory_reset_interface.h" #include "core/hle/service/ns/language.h" @@ -466,27 +467,6 @@ Result IApplicationManagerInterface::ConvertApplicationLanguageToLanguageCode( return ResultSuccess; } -IDownloadTaskInterface::IDownloadTaskInterface(Core::System& system_) - : ServiceFramework{system_, "IDownloadTaskInterface"} { - // clang-format off - static const FunctionInfo functions[] = { - {701, nullptr, "ClearTaskStatusList"}, - {702, nullptr, "RequestDownloadTaskList"}, - {703, nullptr, "RequestEnsureDownloadTask"}, - {704, nullptr, "ListDownloadTaskStatus"}, - {705, nullptr, "RequestDownloadTaskListData"}, - {706, nullptr, "TryCommitCurrentApplicationDownloadTask"}, - {707, nullptr, "EnableAutoCommit"}, - {708, nullptr, "DisableAutoCommit"}, - {709, nullptr, "TriggerDynamicCommitEvent"}, - }; - // clang-format on - - RegisterHandlers(functions); -} - -IDownloadTaskInterface::~IDownloadTaskInterface() = default; - IReadOnlyApplicationRecordInterface::IReadOnlyApplicationRecordInterface(Core::System& system_) : ServiceFramework{system_, "IReadOnlyApplicationRecordInterface"} { static const FunctionInfo functions[] = { diff --git a/src/core/hle/service/ns/ns.h b/src/core/hle/service/ns/ns.h index 3e838373c..197895cdf 100644 --- a/src/core/hle/service/ns/ns.h +++ b/src/core/hle/service/ns/ns.h @@ -32,12 +32,6 @@ private: void ConvertApplicationLanguageToLanguageCode(HLERequestContext& ctx); }; -class IDownloadTaskInterface final : public ServiceFramework<IDownloadTaskInterface> { -public: - explicit IDownloadTaskInterface(Core::System& system_); - ~IDownloadTaskInterface() override; -}; - class IReadOnlyApplicationRecordInterface final : public ServiceFramework<IReadOnlyApplicationRecordInterface> { public: |