diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/core/hle/service/ns/ns.cpp | 35 | ||||
| -rw-r--r-- | src/core/hle/service/ns/ns.h | 11 | ||||
| -rw-r--r-- | src/core/hle/service/ns/read_only_application_record_interface.cpp | 38 | ||||
| -rw-r--r-- | src/core/hle/service/ns/read_only_application_record_interface.h | 22 |
5 files changed, 63 insertions, 45 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 8f70d2599..ab8b1c6c9 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -765,6 +765,8 @@ add_library(core STATIC | |||
| 765 | hle/service/ns/pdm_qry.h | 765 | hle/service/ns/pdm_qry.h |
| 766 | hle/service/ns/platform_service_manager.cpp | 766 | hle/service/ns/platform_service_manager.cpp |
| 767 | hle/service/ns/platform_service_manager.h | 767 | hle/service/ns/platform_service_manager.h |
| 768 | hle/service/ns/read_only_application_record_interface.cpp | ||
| 769 | hle/service/ns/read_only_application_record_interface.h | ||
| 768 | hle/service/nvdrv/core/container.cpp | 770 | hle/service/nvdrv/core/container.cpp |
| 769 | hle/service/nvdrv/core/container.h | 771 | hle/service/nvdrv/core/container.h |
| 770 | hle/service/nvdrv/core/heap_mapper.cpp | 772 | hle/service/nvdrv/core/heap_mapper.cpp |
diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index 6f8427d51..5dc15dad5 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include "core/hle/service/ns/ns_results.h" | 24 | #include "core/hle/service/ns/ns_results.h" |
| 25 | #include "core/hle/service/ns/pdm_qry.h" | 25 | #include "core/hle/service/ns/pdm_qry.h" |
| 26 | #include "core/hle/service/ns/platform_service_manager.h" | 26 | #include "core/hle/service/ns/platform_service_manager.h" |
| 27 | #include "core/hle/service/ns/read_only_application_record_interface.h" | ||
| 27 | #include "core/hle/service/server_manager.h" | 28 | #include "core/hle/service/server_manager.h" |
| 28 | #include "core/hle/service/set/settings_server.h" | 29 | #include "core/hle/service/set/settings_server.h" |
| 29 | 30 | ||
| @@ -468,40 +469,6 @@ Result IApplicationManagerInterface::ConvertApplicationLanguageToLanguageCode( | |||
| 468 | return ResultSuccess; | 469 | return ResultSuccess; |
| 469 | } | 470 | } |
| 470 | 471 | ||
| 471 | IReadOnlyApplicationRecordInterface::IReadOnlyApplicationRecordInterface(Core::System& system_) | ||
| 472 | : ServiceFramework{system_, "IReadOnlyApplicationRecordInterface"} { | ||
| 473 | static const FunctionInfo functions[] = { | ||
| 474 | {0, &IReadOnlyApplicationRecordInterface::HasApplicationRecord, "HasApplicationRecord"}, | ||
| 475 | {1, nullptr, "NotifyApplicationFailure"}, | ||
| 476 | {2, &IReadOnlyApplicationRecordInterface::IsDataCorruptedResult, "IsDataCorruptedResult"}, | ||
| 477 | }; | ||
| 478 | // clang-format on | ||
| 479 | |||
| 480 | RegisterHandlers(functions); | ||
| 481 | } | ||
| 482 | |||
| 483 | IReadOnlyApplicationRecordInterface::~IReadOnlyApplicationRecordInterface() = default; | ||
| 484 | |||
| 485 | void IReadOnlyApplicationRecordInterface::HasApplicationRecord(HLERequestContext& ctx) { | ||
| 486 | IPC::RequestParser rp{ctx}; | ||
| 487 | const u64 program_id = rp.PopRaw<u64>(); | ||
| 488 | LOG_WARNING(Service_NS, "(STUBBED) called, program_id={:X}", program_id); | ||
| 489 | |||
| 490 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 491 | rb.Push(ResultSuccess); | ||
| 492 | rb.Push<u8>(1); | ||
| 493 | } | ||
| 494 | |||
| 495 | void IReadOnlyApplicationRecordInterface::IsDataCorruptedResult(HLERequestContext& ctx) { | ||
| 496 | IPC::RequestParser rp{ctx}; | ||
| 497 | const auto result = rp.PopRaw<Result>(); | ||
| 498 | LOG_WARNING(Service_NS, "(STUBBED) called, result={:#x}", result.GetInnerValue()); | ||
| 499 | |||
| 500 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 501 | rb.Push(ResultSuccess); | ||
| 502 | rb.Push<u8>(0); | ||
| 503 | } | ||
| 504 | |||
| 505 | IReadOnlyApplicationControlDataInterface::IReadOnlyApplicationControlDataInterface( | 472 | IReadOnlyApplicationControlDataInterface::IReadOnlyApplicationControlDataInterface( |
| 506 | Core::System& system_) | 473 | Core::System& system_) |
| 507 | : ServiceFramework{system_, "IReadOnlyApplicationControlDataInterface"} { | 474 | : ServiceFramework{system_, "IReadOnlyApplicationControlDataInterface"} { |
diff --git a/src/core/hle/service/ns/ns.h b/src/core/hle/service/ns/ns.h index 197895cdf..20a2243ff 100644 --- a/src/core/hle/service/ns/ns.h +++ b/src/core/hle/service/ns/ns.h | |||
| @@ -32,17 +32,6 @@ private: | |||
| 32 | void ConvertApplicationLanguageToLanguageCode(HLERequestContext& ctx); | 32 | void ConvertApplicationLanguageToLanguageCode(HLERequestContext& ctx); |
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | class IReadOnlyApplicationRecordInterface final | ||
| 36 | : public ServiceFramework<IReadOnlyApplicationRecordInterface> { | ||
| 37 | public: | ||
| 38 | explicit IReadOnlyApplicationRecordInterface(Core::System& system_); | ||
| 39 | ~IReadOnlyApplicationRecordInterface() override; | ||
| 40 | |||
| 41 | private: | ||
| 42 | void HasApplicationRecord(HLERequestContext& ctx); | ||
| 43 | void IsDataCorruptedResult(HLERequestContext& ctx); | ||
| 44 | }; | ||
| 45 | |||
| 46 | class IReadOnlyApplicationControlDataInterface final | 35 | class IReadOnlyApplicationControlDataInterface final |
| 47 | : public ServiceFramework<IReadOnlyApplicationControlDataInterface> { | 36 | : public ServiceFramework<IReadOnlyApplicationControlDataInterface> { |
| 48 | public: | 37 | public: |
diff --git a/src/core/hle/service/ns/read_only_application_record_interface.cpp b/src/core/hle/service/ns/read_only_application_record_interface.cpp new file mode 100644 index 000000000..816a1e1dc --- /dev/null +++ b/src/core/hle/service/ns/read_only_application_record_interface.cpp | |||
| @@ -0,0 +1,38 @@ | |||
| 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/read_only_application_record_interface.h" | ||
| 6 | |||
| 7 | namespace Service::NS { | ||
| 8 | |||
| 9 | IReadOnlyApplicationRecordInterface::IReadOnlyApplicationRecordInterface(Core::System& system_) | ||
| 10 | : ServiceFramework{system_, "IReadOnlyApplicationRecordInterface"} { | ||
| 11 | static const FunctionInfo functions[] = { | ||
| 12 | {0, D<&IReadOnlyApplicationRecordInterface::HasApplicationRecord>, "HasApplicationRecord"}, | ||
| 13 | {1, nullptr, "NotifyApplicationFailure"}, | ||
| 14 | {2, D<&IReadOnlyApplicationRecordInterface::IsDataCorruptedResult>, | ||
| 15 | "IsDataCorruptedResult"}, | ||
| 16 | }; | ||
| 17 | // clang-format on | ||
| 18 | |||
| 19 | RegisterHandlers(functions); | ||
| 20 | } | ||
| 21 | |||
| 22 | IReadOnlyApplicationRecordInterface::~IReadOnlyApplicationRecordInterface() = default; | ||
| 23 | |||
| 24 | Result IReadOnlyApplicationRecordInterface::HasApplicationRecord( | ||
| 25 | Out<bool> out_has_application_record, u64 program_id) { | ||
| 26 | LOG_WARNING(Service_NS, "(STUBBED) called, program_id={:016X}", program_id); | ||
| 27 | *out_has_application_record = true; | ||
| 28 | R_SUCCEED(); | ||
| 29 | } | ||
| 30 | |||
| 31 | Result IReadOnlyApplicationRecordInterface::IsDataCorruptedResult( | ||
| 32 | Out<bool> out_is_data_corrupted_result, Result result) { | ||
| 33 | LOG_WARNING(Service_NS, "(STUBBED) called, result={:#x}", result.GetInnerValue()); | ||
| 34 | *out_is_data_corrupted_result = false; | ||
| 35 | R_SUCCEED(); | ||
| 36 | } | ||
| 37 | |||
| 38 | } // namespace Service::NS | ||
diff --git a/src/core/hle/service/ns/read_only_application_record_interface.h b/src/core/hle/service/ns/read_only_application_record_interface.h new file mode 100644 index 000000000..d06e8f5e6 --- /dev/null +++ b/src/core/hle/service/ns/read_only_application_record_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 IReadOnlyApplicationRecordInterface final | ||
| 12 | : public ServiceFramework<IReadOnlyApplicationRecordInterface> { | ||
| 13 | public: | ||
| 14 | explicit IReadOnlyApplicationRecordInterface(Core::System& system_); | ||
| 15 | ~IReadOnlyApplicationRecordInterface() override; | ||
| 16 | |||
| 17 | private: | ||
| 18 | Result HasApplicationRecord(Out<bool> out_has_application_record, u64 program_id); | ||
| 19 | Result IsDataCorruptedResult(Out<bool> out_is_data_corrupted_result, Result result); | ||
| 20 | }; | ||
| 21 | |||
| 22 | } // namespace Service::NS | ||