summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2024-02-21 22:23:13 +0100
committerLiam <byteslice@airmail.cc>2024-02-22 00:19:12 +0100
commit8ffa27b311060061a5e9b240d92c7df1c81ac011 (patch)
tree251a1162840bd221a73c541886711622baf6202a /src/core/hle/service
parentolsc: move INativeHandleHolder, IOlscServiceForApplication, IOlscServiceForSystemService, ITransferTaskListController (diff)
downloadyuzu-8ffa27b311060061a5e9b240d92c7df1c81ac011.tar
yuzu-8ffa27b311060061a5e9b240d92c7df1c81ac011.tar.gz
yuzu-8ffa27b311060061a5e9b240d92c7df1c81ac011.tar.bz2
yuzu-8ffa27b311060061a5e9b240d92c7df1c81ac011.tar.lz
yuzu-8ffa27b311060061a5e9b240d92c7df1c81ac011.tar.xz
yuzu-8ffa27b311060061a5e9b240d92c7df1c81ac011.tar.zst
yuzu-8ffa27b311060061a5e9b240d92c7df1c81ac011.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/olsc/olsc.cpp14
-rw-r--r--src/core/hle/service/olsc/olsc_service_for_application.cpp35
-rw-r--r--src/core/hle/service/olsc/olsc_service_for_application.h8
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 {
void LoopProcess(Core::System& system) {
auto server_manager = std::make_unique<ServerManager>(system);
- server_manager->RegisterNamedService("olsc:u",
- std::make_shared<IOlscServiceForApplication>(system));
- server_manager->RegisterNamedService("olsc:s",
- std::make_shared<IOlscServiceForSystemService>(system));
+ const auto OlscFactoryForApplication = [&] {
+ return std::make_shared<IOlscServiceForApplication>(system);
+ };
+
+ const auto OlscFactoryForSystemService = [&] {
+ return std::make_shared<IOlscServiceForSystemService>(system);
+ };
+
+ server_manager->RegisterNamedService("olsc:u", OlscFactoryForApplication);
+ server_manager->RegisterNamedService("olsc:s", OlscFactoryForSystemService);
ServerManager::RunServer(std::move(server_manager));
}
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 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#include "core/hle/service/ipc_helpers.h"
+#include "core/hle/service/cmif_serialization.h"
#include "core/hle/service/olsc/olsc_service_for_application.h"
namespace Service::OLSC {
@@ -10,10 +10,10 @@ IOlscServiceForApplication::IOlscServiceForApplication(Core::System& system_)
: ServiceFramework{system_, "olsc:u"} {
// clang-format off
static const FunctionInfo functions[] = {
- {0, &IOlscServiceForApplication::Initialize, "Initialize"},
+ {0, D<&IOlscServiceForApplication::Initialize>, "Initialize"},
{10, nullptr, "VerifySaveDataBackupLicenseAsync"},
- {13, &IOlscServiceForApplication::GetSaveDataBackupSetting, "GetSaveDataBackupSetting"},
- {14, &IOlscServiceForApplication::SetSaveDataBackupSettingEnabled, "SetSaveDataBackupSettingEnabled"},
+ {13, D<&IOlscServiceForApplication::GetSaveDataBackupSetting>, "GetSaveDataBackupSetting"},
+ {14, D<&IOlscServiceForApplication::SetSaveDataBackupSettingEnabled>, "SetSaveDataBackupSettingEnabled"},
{15, nullptr, "SetCustomData"},
{16, nullptr, "DeleteSaveDataBackupSetting"},
{18, nullptr, "GetSaveDataBackupInfoCache"},
@@ -40,31 +40,24 @@ IOlscServiceForApplication::IOlscServiceForApplication(Core::System& system_)
IOlscServiceForApplication::~IOlscServiceForApplication() = default;
-void IOlscServiceForApplication::Initialize(HLERequestContext& ctx) {
+Result IOlscServiceForApplication::Initialize(ClientProcessId process_id) {
LOG_WARNING(Service_OLSC, "(STUBBED) called");
-
initialized = true;
-
- IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(ResultSuccess);
+ R_SUCCEED();
}
-void IOlscServiceForApplication::GetSaveDataBackupSetting(HLERequestContext& ctx) {
+Result IOlscServiceForApplication::GetSaveDataBackupSetting(Out<u8> out_save_data_backup_setting) {
LOG_WARNING(Service_OLSC, "(STUBBED) called");
-
// backup_setting is set to 0 since real value is unknown
- constexpr u64 backup_setting = 0;
-
- IPC::ResponseBuilder rb{ctx, 4};
- rb.Push(ResultSuccess);
- rb.Push(backup_setting);
+ *out_save_data_backup_setting = 0;
+ R_SUCCEED();
}
-void IOlscServiceForApplication::SetSaveDataBackupSettingEnabled(HLERequestContext& ctx) {
- LOG_WARNING(Service_OLSC, "(STUBBED) called");
-
- IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(ResultSuccess);
+Result IOlscServiceForApplication::SetSaveDataBackupSettingEnabled(bool enabled,
+ NS::Uid account_id) {
+ LOG_WARNING(Service_OLSC, "(STUBBED) called, enabled={}, account_id={}", enabled,
+ account_id.uuid.FormattedString());
+ R_SUCCEED();
}
} // 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 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+#include "core/hle/service/cmif_types.h"
+#include "core/hle/service/ns/ns_types.h"
#include "core/hle/service/service.h"
namespace Service::OLSC {
@@ -11,9 +13,9 @@ public:
~IOlscServiceForApplication() override;
private:
- void Initialize(HLERequestContext& ctx);
- void GetSaveDataBackupSetting(HLERequestContext& ctx);
- void SetSaveDataBackupSettingEnabled(HLERequestContext& ctx);
+ Result Initialize(ClientProcessId process_id);
+ Result GetSaveDataBackupSetting(Out<u8> out_save_data_backup_setting);
+ Result SetSaveDataBackupSettingEnabled(bool enabled, NS::Uid account_id);
bool initialized{};
};