diff options
| author | 2024-02-17 11:45:52 -0500 | |
|---|---|---|
| committer | 2024-02-18 10:32:21 -0500 | |
| commit | 8ea72cc99d13c85821db3868b4672d847d2e6208 (patch) | |
| tree | 61fd3127d19e6b746ad6f35a60ebef3856b52b44 /src | |
| parent | ns: move IECommerceInterface (diff) | |
| download | yuzu-8ea72cc99d13c85821db3868b4672d847d2e6208.tar.gz yuzu-8ea72cc99d13c85821db3868b4672d847d2e6208.tar.xz yuzu-8ea72cc99d13c85821db3868b4672d847d2e6208.zip | |
ns: move IFactoryResetInterface
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/core/hle/service/ns/factory_reset_interface.cpp | 27 | ||||
| -rw-r--r-- | src/core/hle/service/ns/factory_reset_interface.h | 16 | ||||
| -rw-r--r-- | src/core/hle/service/ns/ns.cpp | 20 | ||||
| -rw-r--r-- | src/core/hle/service/ns/ns.h | 6 |
5 files changed, 46 insertions, 25 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 96da6ac26..405dd5ab1 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -745,6 +745,8 @@ add_library(core STATIC | |||
| 745 | hle/service/ns/application_version_interface.h | 745 | hle/service/ns/application_version_interface.h |
| 746 | hle/service/ns/ecommerce_interface.cpp | 746 | hle/service/ns/ecommerce_interface.cpp |
| 747 | hle/service/ns/ecommerce_interface.h | 747 | hle/service/ns/ecommerce_interface.h |
| 748 | hle/service/ns/factory_reset_interface.cpp | ||
| 749 | hle/service/ns/factory_reset_interface.h | ||
| 748 | hle/service/ns/language.cpp | 750 | hle/service/ns/language.cpp |
| 749 | hle/service/ns/language.h | 751 | hle/service/ns/language.h |
| 750 | hle/service/ns/ns_results.h | 752 | hle/service/ns/ns_results.h |
diff --git a/src/core/hle/service/ns/factory_reset_interface.cpp b/src/core/hle/service/ns/factory_reset_interface.cpp new file mode 100644 index 000000000..fd5cf7e1f --- /dev/null +++ b/src/core/hle/service/ns/factory_reset_interface.cpp | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/ns/factory_reset_interface.h" | ||
| 5 | |||
| 6 | namespace Service::NS { | ||
| 7 | |||
| 8 | IFactoryResetInterface::IFactoryResetInterface(Core::System& system_) | ||
| 9 | : ServiceFramework{system_, "IFactoryResetInterface"} { | ||
| 10 | // clang-format off | ||
| 11 | static const FunctionInfo functions[] = { | ||
| 12 | {100, nullptr, "ResetToFactorySettings"}, | ||
| 13 | {101, nullptr, "ResetToFactorySettingsWithoutUserSaveData"}, | ||
| 14 | {102, nullptr, "ResetToFactorySettingsForRefurbishment"}, | ||
| 15 | {103, nullptr, "ResetToFactorySettingsWithPlatformRegion"}, | ||
| 16 | {104, nullptr, "ResetToFactorySettingsWithPlatformRegionAuthentication"}, | ||
| 17 | {105, nullptr, "RequestResetToFactorySettingsSecurely"}, | ||
| 18 | {106, nullptr, "RequestResetToFactorySettingsWithPlatformRegionAuthenticationSecurely"}, | ||
| 19 | }; | ||
| 20 | // clang-format on | ||
| 21 | |||
| 22 | RegisterHandlers(functions); | ||
| 23 | } | ||
| 24 | |||
| 25 | IFactoryResetInterface::~IFactoryResetInterface() = default; | ||
| 26 | |||
| 27 | } // namespace Service::NS | ||
diff --git a/src/core/hle/service/ns/factory_reset_interface.h b/src/core/hle/service/ns/factory_reset_interface.h new file mode 100644 index 000000000..50d125123 --- /dev/null +++ b/src/core/hle/service/ns/factory_reset_interface.h | |||
| @@ -0,0 +1,16 @@ | |||
| 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 IFactoryResetInterface final : public ServiceFramework<IFactoryResetInterface> { | ||
| 11 | public: | ||
| 12 | explicit IFactoryResetInterface(Core::System& system_); | ||
| 13 | ~IFactoryResetInterface() override; | ||
| 14 | }; | ||
| 15 | |||
| 16 | } // namespace Service::NS | ||
diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index 3b13715b8..5188699ad 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include "core/hle/service/ns/account_proxy_interface.h" | 14 | #include "core/hle/service/ns/account_proxy_interface.h" |
| 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/ecommerce_interface.h" | 16 | #include "core/hle/service/ns/ecommerce_interface.h" |
| 17 | #include "core/hle/service/ns/factory_reset_interface.h" | ||
| 17 | #include "core/hle/service/ns/language.h" | 18 | #include "core/hle/service/ns/language.h" |
| 18 | #include "core/hle/service/ns/ns.h" | 19 | #include "core/hle/service/ns/ns.h" |
| 19 | #include "core/hle/service/ns/ns_results.h" | 20 | #include "core/hle/service/ns/ns_results.h" |
| @@ -567,25 +568,6 @@ IDownloadTaskInterface::IDownloadTaskInterface(Core::System& system_) | |||
| 567 | 568 | ||
| 568 | IDownloadTaskInterface::~IDownloadTaskInterface() = default; | 569 | IDownloadTaskInterface::~IDownloadTaskInterface() = default; |
| 569 | 570 | ||
| 570 | IFactoryResetInterface::IFactoryResetInterface(Core::System& system_) | ||
| 571 | : ServiceFramework{system_, "IFactoryResetInterface"} { | ||
| 572 | // clang-format off | ||
| 573 | static const FunctionInfo functions[] = { | ||
| 574 | {100, nullptr, "ResetToFactorySettings"}, | ||
| 575 | {101, nullptr, "ResetToFactorySettingsWithoutUserSaveData"}, | ||
| 576 | {102, nullptr, "ResetToFactorySettingsForRefurbishment"}, | ||
| 577 | {103, nullptr, "ResetToFactorySettingsWithPlatformRegion"}, | ||
| 578 | {104, nullptr, "ResetToFactorySettingsWithPlatformRegionAuthentication"}, | ||
| 579 | {105, nullptr, "RequestResetToFactorySettingsSecurely"}, | ||
| 580 | {106, nullptr, "RequestResetToFactorySettingsWithPlatformRegionAuthenticationSecurely"}, | ||
| 581 | }; | ||
| 582 | // clang-format on | ||
| 583 | |||
| 584 | RegisterHandlers(functions); | ||
| 585 | } | ||
| 586 | |||
| 587 | IFactoryResetInterface::~IFactoryResetInterface() = default; | ||
| 588 | |||
| 589 | IReadOnlyApplicationRecordInterface::IReadOnlyApplicationRecordInterface(Core::System& system_) | 571 | IReadOnlyApplicationRecordInterface::IReadOnlyApplicationRecordInterface(Core::System& system_) |
| 590 | : ServiceFramework{system_, "IReadOnlyApplicationRecordInterface"} { | 572 | : ServiceFramework{system_, "IReadOnlyApplicationRecordInterface"} { |
| 591 | static const FunctionInfo functions[] = { | 573 | static const FunctionInfo functions[] = { |
diff --git a/src/core/hle/service/ns/ns.h b/src/core/hle/service/ns/ns.h index f8c6af386..853896b48 100644 --- a/src/core/hle/service/ns/ns.h +++ b/src/core/hle/service/ns/ns.h | |||
| @@ -58,12 +58,6 @@ public: | |||
| 58 | ~IDownloadTaskInterface() override; | 58 | ~IDownloadTaskInterface() override; |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | class IFactoryResetInterface final : public ServiceFramework<IFactoryResetInterface> { | ||
| 62 | public: | ||
| 63 | explicit IFactoryResetInterface(Core::System& system_); | ||
| 64 | ~IFactoryResetInterface() override; | ||
| 65 | }; | ||
| 66 | |||
| 67 | class IReadOnlyApplicationRecordInterface final | 61 | class IReadOnlyApplicationRecordInterface final |
| 68 | : public ServiceFramework<IReadOnlyApplicationRecordInterface> { | 62 | : public ServiceFramework<IReadOnlyApplicationRecordInterface> { |
| 69 | public: | 63 | public: |