diff options
| author | 2024-02-17 12:13:03 -0500 | |
|---|---|---|
| committer | 2024-02-18 10:32:21 -0500 | |
| commit | db172ba249d8984ac3838496fcf9986ef1e3f9bc (patch) | |
| tree | f75f6a0cf045862029a69b8390f0c27f42409818 /src | |
| parent | ns: rewrite IDocumentInterface (diff) | |
| download | yuzu-db172ba249d8984ac3838496fcf9986ef1e3f9bc.tar.gz yuzu-db172ba249d8984ac3838496fcf9986ef1e3f9bc.tar.xz yuzu-db172ba249d8984ac3838496fcf9986ef1e3f9bc.zip | |
ns: rewrite IDownloadTaskInterface
Diffstat (limited to 'src')
| -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 | |||
| 747 | hle/service/ns/content_management_interface.h | 747 | hle/service/ns/content_management_interface.h |
| 748 | hle/service/ns/document_interface.cpp | 748 | hle/service/ns/document_interface.cpp |
| 749 | hle/service/ns/document_interface.h | 749 | hle/service/ns/document_interface.h |
| 750 | hle/service/ns/download_task_interface.cpp | ||
| 751 | hle/service/ns/download_task_interface.h | ||
| 750 | hle/service/ns/ecommerce_interface.cpp | 752 | hle/service/ns/ecommerce_interface.cpp |
| 751 | hle/service/ns/ecommerce_interface.h | 753 | hle/service/ns/ecommerce_interface.h |
| 752 | hle/service/ns/factory_reset_interface.cpp | 754 | 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/cmif_serialization.h" | ||
| 5 | #include "core/hle/service/ns/download_task_interface.h" | ||
| 6 | |||
| 7 | namespace Service::NS { | ||
| 8 | |||
| 9 | IDownloadTaskInterface::IDownloadTaskInterface(Core::System& system_) | ||
| 10 | : ServiceFramework{system_, "IDownloadTaskInterface"} { | ||
| 11 | // clang-format off | ||
| 12 | static const FunctionInfo functions[] = { | ||
| 13 | {701, nullptr, "ClearTaskStatusList"}, | ||
| 14 | {702, nullptr, "RequestDownloadTaskList"}, | ||
| 15 | {703, nullptr, "RequestEnsureDownloadTask"}, | ||
| 16 | {704, nullptr, "ListDownloadTaskStatus"}, | ||
| 17 | {705, nullptr, "RequestDownloadTaskListData"}, | ||
| 18 | {706, nullptr, "TryCommitCurrentApplicationDownloadTask"}, | ||
| 19 | {707, D<&IDownloadTaskInterface::EnableAutoCommit>, "EnableAutoCommit"}, | ||
| 20 | {708, D<&IDownloadTaskInterface::DisableAutoCommit>, "DisableAutoCommit"}, | ||
| 21 | {709, nullptr, "TriggerDynamicCommitEvent"}, | ||
| 22 | }; | ||
| 23 | // clang-format on | ||
| 24 | |||
| 25 | RegisterHandlers(functions); | ||
| 26 | } | ||
| 27 | |||
| 28 | IDownloadTaskInterface::~IDownloadTaskInterface() = default; | ||
| 29 | |||
| 30 | Result IDownloadTaskInterface::EnableAutoCommit() { | ||
| 31 | LOG_WARNING(Service_NS, "(STUBBED) called"); | ||
| 32 | R_SUCCEED(); | ||
| 33 | } | ||
| 34 | Result IDownloadTaskInterface::DisableAutoCommit() { | ||
| 35 | LOG_WARNING(Service_NS, "(STUBBED) called"); | ||
| 36 | R_SUCCEED(); | ||
| 37 | } | ||
| 38 | |||
| 39 | } // 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "core/hle/service/service.h" | ||
| 7 | |||
| 8 | namespace Service::NS { | ||
| 9 | |||
| 10 | class IDownloadTaskInterface final : public ServiceFramework<IDownloadTaskInterface> { | ||
| 11 | public: | ||
| 12 | explicit IDownloadTaskInterface(Core::System& system_); | ||
| 13 | ~IDownloadTaskInterface() override; | ||
| 14 | |||
| 15 | private: | ||
| 16 | Result EnableAutoCommit(); | ||
| 17 | Result DisableAutoCommit(); | ||
| 18 | }; | ||
| 19 | |||
| 20 | } // 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 @@ | |||
| 15 | #include "core/hle/service/ns/application_version_interface.h" | 15 | #include "core/hle/service/ns/application_version_interface.h" |
| 16 | #include "core/hle/service/ns/content_management_interface.h" | 16 | #include "core/hle/service/ns/content_management_interface.h" |
| 17 | #include "core/hle/service/ns/document_interface.h" | 17 | #include "core/hle/service/ns/document_interface.h" |
| 18 | #include "core/hle/service/ns/download_task_interface.h" | ||
| 18 | #include "core/hle/service/ns/ecommerce_interface.h" | 19 | #include "core/hle/service/ns/ecommerce_interface.h" |
| 19 | #include "core/hle/service/ns/factory_reset_interface.h" | 20 | #include "core/hle/service/ns/factory_reset_interface.h" |
| 20 | #include "core/hle/service/ns/language.h" | 21 | #include "core/hle/service/ns/language.h" |
| @@ -466,27 +467,6 @@ Result IApplicationManagerInterface::ConvertApplicationLanguageToLanguageCode( | |||
| 466 | return ResultSuccess; | 467 | return ResultSuccess; |
| 467 | } | 468 | } |
| 468 | 469 | ||
| 469 | IDownloadTaskInterface::IDownloadTaskInterface(Core::System& system_) | ||
| 470 | : ServiceFramework{system_, "IDownloadTaskInterface"} { | ||
| 471 | // clang-format off | ||
| 472 | static const FunctionInfo functions[] = { | ||
| 473 | {701, nullptr, "ClearTaskStatusList"}, | ||
| 474 | {702, nullptr, "RequestDownloadTaskList"}, | ||
| 475 | {703, nullptr, "RequestEnsureDownloadTask"}, | ||
| 476 | {704, nullptr, "ListDownloadTaskStatus"}, | ||
| 477 | {705, nullptr, "RequestDownloadTaskListData"}, | ||
| 478 | {706, nullptr, "TryCommitCurrentApplicationDownloadTask"}, | ||
| 479 | {707, nullptr, "EnableAutoCommit"}, | ||
| 480 | {708, nullptr, "DisableAutoCommit"}, | ||
| 481 | {709, nullptr, "TriggerDynamicCommitEvent"}, | ||
| 482 | }; | ||
| 483 | // clang-format on | ||
| 484 | |||
| 485 | RegisterHandlers(functions); | ||
| 486 | } | ||
| 487 | |||
| 488 | IDownloadTaskInterface::~IDownloadTaskInterface() = default; | ||
| 489 | |||
| 490 | IReadOnlyApplicationRecordInterface::IReadOnlyApplicationRecordInterface(Core::System& system_) | 470 | IReadOnlyApplicationRecordInterface::IReadOnlyApplicationRecordInterface(Core::System& system_) |
| 491 | : ServiceFramework{system_, "IReadOnlyApplicationRecordInterface"} { | 471 | : ServiceFramework{system_, "IReadOnlyApplicationRecordInterface"} { |
| 492 | static const FunctionInfo functions[] = { | 472 | 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: | |||
| 32 | void ConvertApplicationLanguageToLanguageCode(HLERequestContext& ctx); | 32 | void ConvertApplicationLanguageToLanguageCode(HLERequestContext& ctx); |
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | class IDownloadTaskInterface final : public ServiceFramework<IDownloadTaskInterface> { | ||
| 36 | public: | ||
| 37 | explicit IDownloadTaskInterface(Core::System& system_); | ||
| 38 | ~IDownloadTaskInterface() override; | ||
| 39 | }; | ||
| 40 | |||
| 41 | class IReadOnlyApplicationRecordInterface final | 35 | class IReadOnlyApplicationRecordInterface final |
| 42 | : public ServiceFramework<IReadOnlyApplicationRecordInterface> { | 36 | : public ServiceFramework<IReadOnlyApplicationRecordInterface> { |
| 43 | public: | 37 | public: |