diff options
| author | 2024-02-17 12:16:19 -0500 | |
|---|---|---|
| committer | 2024-02-18 10:32:21 -0500 | |
| commit | c31ac453325ce62b13bf5ebb25d198217877c5b5 (patch) | |
| tree | 7c7d93353ee1a6a8deaf72f8f75182e1fc7f9cd7 /src | |
| parent | ns: rewrite IDownloadTaskInterface (diff) | |
| download | yuzu-c31ac453325ce62b13bf5ebb25d198217877c5b5.tar.gz yuzu-c31ac453325ce62b13bf5ebb25d198217877c5b5.tar.xz yuzu-c31ac453325ce62b13bf5ebb25d198217877c5b5.zip | |
ns: add IDynamicRightsInterface
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/core/hle/service/ns/dynamic_rights_interface.cpp | 62 | ||||
| -rw-r--r-- | src/core/hle/service/ns/dynamic_rights_interface.h | 22 | ||||
| -rw-r--r-- | src/core/hle/service/ns/ns.cpp | 3 |
4 files changed, 88 insertions, 1 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index c97d3aa89..8f70d2599 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -749,6 +749,8 @@ add_library(core STATIC | |||
| 749 | hle/service/ns/document_interface.h | 749 | hle/service/ns/document_interface.h |
| 750 | hle/service/ns/download_task_interface.cpp | 750 | hle/service/ns/download_task_interface.cpp |
| 751 | hle/service/ns/download_task_interface.h | 751 | hle/service/ns/download_task_interface.h |
| 752 | hle/service/ns/dynamic_rights_interface.cpp | ||
| 753 | hle/service/ns/dynamic_rights_interface.h | ||
| 752 | hle/service/ns/ecommerce_interface.cpp | 754 | hle/service/ns/ecommerce_interface.cpp |
| 753 | hle/service/ns/ecommerce_interface.h | 755 | hle/service/ns/ecommerce_interface.h |
| 754 | hle/service/ns/factory_reset_interface.cpp | 756 | hle/service/ns/factory_reset_interface.cpp |
diff --git a/src/core/hle/service/ns/dynamic_rights_interface.cpp b/src/core/hle/service/ns/dynamic_rights_interface.cpp new file mode 100644 index 000000000..ce81e203f --- /dev/null +++ b/src/core/hle/service/ns/dynamic_rights_interface.cpp | |||
| @@ -0,0 +1,62 @@ | |||
| 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/dynamic_rights_interface.h" | ||
| 6 | |||
| 7 | namespace Service::NS { | ||
| 8 | |||
| 9 | IDynamicRightsInterface::IDynamicRightsInterface(Core::System& system_) | ||
| 10 | : ServiceFramework{system_, "DynamicRightsInterface"} { | ||
| 11 | // clang-format off | ||
| 12 | static const FunctionInfo functions[] = { | ||
| 13 | {0, nullptr, "RequestApplicationRightsOnServer"}, | ||
| 14 | {1, nullptr, "RequestAssignRights"}, | ||
| 15 | {4, nullptr, "DeprecatedRequestAssignRightsToResume"}, | ||
| 16 | {5, D<&IDynamicRightsInterface::VerifyActivatedRightsOwners>, "VerifyActivatedRightsOwners"}, | ||
| 17 | {6, nullptr, "DeprecatedGetApplicationRightsStatus"}, | ||
| 18 | {7, nullptr, "RequestPrefetchForDynamicRights"}, | ||
| 19 | {8, nullptr, "GetDynamicRightsState"}, | ||
| 20 | {9, nullptr, "RequestApplicationRightsOnServerToResume"}, | ||
| 21 | {10, nullptr, "RequestAssignRightsToResume"}, | ||
| 22 | {11, nullptr, "GetActivatedRightsUsers"}, | ||
| 23 | {12, nullptr, "GetApplicationRightsStatus"}, | ||
| 24 | {13, D<&IDynamicRightsInterface::GetRunningApplicationStatus>, "GetRunningApplicationStatus"}, | ||
| 25 | {14, nullptr, "SelectApplicationLicense"}, | ||
| 26 | {15, nullptr, "RequestContentsAuthorizationToken"}, | ||
| 27 | {16, nullptr, "QualifyUser"}, | ||
| 28 | {17, nullptr, "QualifyUserWithProcessId"}, | ||
| 29 | {18, D<&IDynamicRightsInterface::NotifyApplicationRightsCheckStart>, "NotifyApplicationRightsCheckStart"}, | ||
| 30 | {19, nullptr, "UpdateUserList"}, | ||
| 31 | {20, nullptr, "IsRightsLostUser"}, | ||
| 32 | {21, nullptr, "SetRequiredAddOnContentsOnContentsAvailabilityTransition"}, | ||
| 33 | {22, nullptr, "GetLimitedApplicationLicense"}, | ||
| 34 | {23, nullptr, "GetLimitedApplicationLicenseUpgradableEvent"}, | ||
| 35 | {24, nullptr, "NotifyLimitedApplicationLicenseUpgradableEventForDebug"}, | ||
| 36 | {25, nullptr, "RequestProceedDynamicRightsState"}, | ||
| 37 | }; | ||
| 38 | // clang-format on | ||
| 39 | |||
| 40 | RegisterHandlers(functions); | ||
| 41 | } | ||
| 42 | |||
| 43 | IDynamicRightsInterface::~IDynamicRightsInterface() = default; | ||
| 44 | |||
| 45 | Result IDynamicRightsInterface::NotifyApplicationRightsCheckStart() { | ||
| 46 | LOG_WARNING(Service_NS, "(STUBBED) called"); | ||
| 47 | R_SUCCEED(); | ||
| 48 | } | ||
| 49 | |||
| 50 | Result IDynamicRightsInterface::GetRunningApplicationStatus(Out<u32> out_status, | ||
| 51 | u64 rights_handle) { | ||
| 52 | LOG_WARNING(Service_NS, "(STUBBED) called, rights_handle={:#x}", rights_handle); | ||
| 53 | *out_status = 0; | ||
| 54 | R_SUCCEED(); | ||
| 55 | } | ||
| 56 | |||
| 57 | Result IDynamicRightsInterface::VerifyActivatedRightsOwners(u64 rights_handle) { | ||
| 58 | LOG_WARNING(Service_NS, "(STUBBED) called, rights_handle={:#x}", rights_handle); | ||
| 59 | R_SUCCEED(); | ||
| 60 | } | ||
| 61 | |||
| 62 | } // namespace Service::NS | ||
diff --git a/src/core/hle/service/ns/dynamic_rights_interface.h b/src/core/hle/service/ns/dynamic_rights_interface.h new file mode 100644 index 000000000..877e009b0 --- /dev/null +++ b/src/core/hle/service/ns/dynamic_rights_interface.h | |||
| @@ -0,0 +1,22 @@ | |||
| 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/cmif_types.h" | ||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | namespace Service::NS { | ||
| 10 | |||
| 11 | class IDynamicRightsInterface final : public ServiceFramework<IDynamicRightsInterface> { | ||
| 12 | public: | ||
| 13 | explicit IDynamicRightsInterface(Core::System& system_); | ||
| 14 | ~IDynamicRightsInterface() override; | ||
| 15 | |||
| 16 | private: | ||
| 17 | Result NotifyApplicationRightsCheckStart(); | ||
| 18 | Result GetRunningApplicationStatus(Out<u32> out_status, u64 rights_handle); | ||
| 19 | Result VerifyActivatedRightsOwners(u64 rights_handle); | ||
| 20 | }; | ||
| 21 | |||
| 22 | } // namespace Service::NS | ||
diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index 451fc2b8d..6f8427d51 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp | |||
| @@ -16,6 +16,7 @@ | |||
| 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/download_task_interface.h" |
| 19 | #include "core/hle/service/ns/dynamic_rights_interface.h" | ||
| 19 | #include "core/hle/service/ns/ecommerce_interface.h" | 20 | #include "core/hle/service/ns/ecommerce_interface.h" |
| 20 | #include "core/hle/service/ns/factory_reset_interface.h" | 21 | #include "core/hle/service/ns/factory_reset_interface.h" |
| 21 | #include "core/hle/service/ns/language.h" | 22 | #include "core/hle/service/ns/language.h" |
| @@ -549,7 +550,7 @@ void IReadOnlyApplicationControlDataInterface::GetApplicationControlData(HLERequ | |||
| 549 | NS::NS(const char* name, Core::System& system_) : ServiceFramework{system_, name} { | 550 | NS::NS(const char* name, Core::System& system_) : ServiceFramework{system_, name} { |
| 550 | // clang-format off | 551 | // clang-format off |
| 551 | static const FunctionInfo functions[] = { | 552 | static const FunctionInfo functions[] = { |
| 552 | {7988, nullptr, "GetDynamicRightsInterface"}, | 553 | {7988, &NS::PushInterface<IDynamicRightsInterface>, "GetDynamicRightsInterface"}, |
| 553 | {7989, &NS::PushInterface<IReadOnlyApplicationControlDataInterface>, "GetReadOnlyApplicationControlDataInterface"}, | 554 | {7989, &NS::PushInterface<IReadOnlyApplicationControlDataInterface>, "GetReadOnlyApplicationControlDataInterface"}, |
| 554 | {7991, &NS::PushInterface<IReadOnlyApplicationRecordInterface>, "GetReadOnlyApplicationRecordInterface"}, | 555 | {7991, &NS::PushInterface<IReadOnlyApplicationRecordInterface>, "GetReadOnlyApplicationRecordInterface"}, |
| 555 | {7992, &NS::PushInterface<IECommerceInterface>, "GetECommerceInterface"}, | 556 | {7992, &NS::PushInterface<IECommerceInterface>, "GetECommerceInterface"}, |