diff options
| -rw-r--r-- | src/core/hle/service/olsc/olsc.cpp | 14 | ||||
| -rw-r--r-- | src/core/hle/service/olsc/olsc_service_for_application.cpp | 35 | ||||
| -rw-r--r-- | src/core/hle/service/olsc/olsc_service_for_application.h | 8 |
3 files changed, 29 insertions, 28 deletions
diff --git a/src/core/hle/service/olsc/olsc.cpp b/src/core/hle/service/olsc/olsc.cpp index 26d93cf20..18e5ad43f 100644 --- a/src/core/hle/service/olsc/olsc.cpp +++ b/src/core/hle/service/olsc/olsc.cpp | |||
| @@ -12,10 +12,16 @@ namespace Service::OLSC { | |||
| 12 | void LoopProcess(Core::System& system) { | 12 | void LoopProcess(Core::System& system) { |
| 13 | auto server_manager = std::make_unique<ServerManager>(system); | 13 | auto server_manager = std::make_unique<ServerManager>(system); |
| 14 | 14 | ||
| 15 | server_manager->RegisterNamedService("olsc:u", | 15 | const auto OlscFactoryForApplication = [&] { |
| 16 | std::make_shared<IOlscServiceForApplication>(system)); | 16 | return std::make_shared<IOlscServiceForApplication>(system); |
| 17 | server_manager->RegisterNamedService("olsc:s", | 17 | }; |
| 18 | std::make_shared<IOlscServiceForSystemService>(system)); | 18 | |
| 19 | const auto OlscFactoryForSystemService = [&] { | ||
| 20 | return std::make_shared<IOlscServiceForSystemService>(system); | ||
| 21 | }; | ||
| 22 | |||
| 23 | server_manager->RegisterNamedService("olsc:u", OlscFactoryForApplication); | ||
| 24 | server_manager->RegisterNamedService("olsc:s", OlscFactoryForSystemService); | ||
| 19 | 25 | ||
| 20 | ServerManager::RunServer(std::move(server_manager)); | 26 | ServerManager::RunServer(std::move(server_manager)); |
| 21 | } | 27 | } |
diff --git a/src/core/hle/service/olsc/olsc_service_for_application.cpp b/src/core/hle/service/olsc/olsc_service_for_application.cpp index ae3ed1e3f..01360f5ef 100644 --- a/src/core/hle/service/olsc/olsc_service_for_application.cpp +++ b/src/core/hle/service/olsc/olsc_service_for_application.cpp | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project |
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "core/hle/service/ipc_helpers.h" | 4 | #include "core/hle/service/cmif_serialization.h" |
| 5 | #include "core/hle/service/olsc/olsc_service_for_application.h" | 5 | #include "core/hle/service/olsc/olsc_service_for_application.h" |
| 6 | 6 | ||
| 7 | namespace Service::OLSC { | 7 | namespace Service::OLSC { |
| @@ -10,10 +10,10 @@ IOlscServiceForApplication::IOlscServiceForApplication(Core::System& system_) | |||
| 10 | : ServiceFramework{system_, "olsc:u"} { | 10 | : ServiceFramework{system_, "olsc:u"} { |
| 11 | // clang-format off | 11 | // clang-format off |
| 12 | static const FunctionInfo functions[] = { | 12 | static const FunctionInfo functions[] = { |
| 13 | {0, &IOlscServiceForApplication::Initialize, "Initialize"}, | 13 | {0, D<&IOlscServiceForApplication::Initialize>, "Initialize"}, |
| 14 | {10, nullptr, "VerifySaveDataBackupLicenseAsync"}, | 14 | {10, nullptr, "VerifySaveDataBackupLicenseAsync"}, |
| 15 | {13, &IOlscServiceForApplication::GetSaveDataBackupSetting, "GetSaveDataBackupSetting"}, | 15 | {13, D<&IOlscServiceForApplication::GetSaveDataBackupSetting>, "GetSaveDataBackupSetting"}, |
| 16 | {14, &IOlscServiceForApplication::SetSaveDataBackupSettingEnabled, "SetSaveDataBackupSettingEnabled"}, | 16 | {14, D<&IOlscServiceForApplication::SetSaveDataBackupSettingEnabled>, "SetSaveDataBackupSettingEnabled"}, |
| 17 | {15, nullptr, "SetCustomData"}, | 17 | {15, nullptr, "SetCustomData"}, |
| 18 | {16, nullptr, "DeleteSaveDataBackupSetting"}, | 18 | {16, nullptr, "DeleteSaveDataBackupSetting"}, |
| 19 | {18, nullptr, "GetSaveDataBackupInfoCache"}, | 19 | {18, nullptr, "GetSaveDataBackupInfoCache"}, |
| @@ -40,31 +40,24 @@ IOlscServiceForApplication::IOlscServiceForApplication(Core::System& system_) | |||
| 40 | 40 | ||
| 41 | IOlscServiceForApplication::~IOlscServiceForApplication() = default; | 41 | IOlscServiceForApplication::~IOlscServiceForApplication() = default; |
| 42 | 42 | ||
| 43 | void IOlscServiceForApplication::Initialize(HLERequestContext& ctx) { | 43 | Result IOlscServiceForApplication::Initialize(ClientProcessId process_id) { |
| 44 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); | 44 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); |
| 45 | |||
| 46 | initialized = true; | 45 | initialized = true; |
| 47 | 46 | R_SUCCEED(); | |
| 48 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 49 | rb.Push(ResultSuccess); | ||
| 50 | } | 47 | } |
| 51 | 48 | ||
| 52 | void IOlscServiceForApplication::GetSaveDataBackupSetting(HLERequestContext& ctx) { | 49 | Result IOlscServiceForApplication::GetSaveDataBackupSetting(Out<u8> out_save_data_backup_setting) { |
| 53 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); | 50 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); |
| 54 | |||
| 55 | // backup_setting is set to 0 since real value is unknown | 51 | // backup_setting is set to 0 since real value is unknown |
| 56 | constexpr u64 backup_setting = 0; | 52 | *out_save_data_backup_setting = 0; |
| 57 | 53 | R_SUCCEED(); | |
| 58 | IPC::ResponseBuilder rb{ctx, 4}; | ||
| 59 | rb.Push(ResultSuccess); | ||
| 60 | rb.Push(backup_setting); | ||
| 61 | } | 54 | } |
| 62 | 55 | ||
| 63 | void IOlscServiceForApplication::SetSaveDataBackupSettingEnabled(HLERequestContext& ctx) { | 56 | Result IOlscServiceForApplication::SetSaveDataBackupSettingEnabled(bool enabled, |
| 64 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); | 57 | NS::Uid account_id) { |
| 65 | 58 | LOG_WARNING(Service_OLSC, "(STUBBED) called, enabled={}, account_id={}", enabled, | |
| 66 | IPC::ResponseBuilder rb{ctx, 2}; | 59 | account_id.uuid.FormattedString()); |
| 67 | rb.Push(ResultSuccess); | 60 | R_SUCCEED(); |
| 68 | } | 61 | } |
| 69 | 62 | ||
| 70 | } // namespace Service::OLSC | 63 | } // namespace Service::OLSC |
diff --git a/src/core/hle/service/olsc/olsc_service_for_application.h b/src/core/hle/service/olsc/olsc_service_for_application.h index 29074054b..3f9ac7536 100644 --- a/src/core/hle/service/olsc/olsc_service_for_application.h +++ b/src/core/hle/service/olsc/olsc_service_for_application.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project |
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "core/hle/service/cmif_types.h" | ||
| 5 | #include "core/hle/service/ns/ns_types.h" | ||
| 4 | #include "core/hle/service/service.h" | 6 | #include "core/hle/service/service.h" |
| 5 | 7 | ||
| 6 | namespace Service::OLSC { | 8 | namespace Service::OLSC { |
| @@ -11,9 +13,9 @@ public: | |||
| 11 | ~IOlscServiceForApplication() override; | 13 | ~IOlscServiceForApplication() override; |
| 12 | 14 | ||
| 13 | private: | 15 | private: |
| 14 | void Initialize(HLERequestContext& ctx); | 16 | Result Initialize(ClientProcessId process_id); |
| 15 | void GetSaveDataBackupSetting(HLERequestContext& ctx); | 17 | Result GetSaveDataBackupSetting(Out<u8> out_save_data_backup_setting); |
| 16 | void SetSaveDataBackupSettingEnabled(HLERequestContext& ctx); | 18 | Result SetSaveDataBackupSettingEnabled(bool enabled, NS::Uid account_id); |
| 17 | 19 | ||
| 18 | bool initialized{}; | 20 | bool initialized{}; |
| 19 | }; | 21 | }; |