summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/core/hle/service/olsc/olsc_service_for_system_service.cpp48
-rw-r--r--src/core/hle/service/olsc/olsc_service_for_system_service.h12
3 files changed, 52 insertions, 10 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 36bc9103e..d48696654 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -870,6 +870,8 @@ add_library(core STATIC
hle/service/olsc/olsc_service_for_system_service.h
hle/service/olsc/olsc.cpp
hle/service/olsc/olsc.h
+ hle/service/olsc/remote_storage_controller.cpp
+ hle/service/olsc/remote_storage_controller.h
hle/service/olsc/transfer_task_list_controller.cpp
hle/service/olsc/transfer_task_list_controller.h
hle/service/omm/omm.cpp
diff --git a/src/core/hle/service/olsc/olsc_service_for_system_service.cpp b/src/core/hle/service/olsc/olsc_service_for_system_service.cpp
index 1873f1245..f027933c9 100644
--- a/src/core/hle/service/olsc/olsc_service_for_system_service.cpp
+++ b/src/core/hle/service/olsc/olsc_service_for_system_service.cpp
@@ -1,8 +1,10 @@
// 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/daemon_controller.h"
#include "core/hle/service/olsc/olsc_service_for_system_service.h"
+#include "core/hle/service/olsc/remote_storage_controller.h"
#include "core/hle/service/olsc/transfer_task_list_controller.h"
namespace Service::OLSC {
@@ -11,9 +13,9 @@ IOlscServiceForSystemService::IOlscServiceForSystemService(Core::System& system_
: ServiceFramework{system_, "olsc:s"} {
// clang-format off
static const FunctionInfo functions[] = {
- {0, &IOlscServiceForSystemService::OpenTransferTaskListController, "OpenTransferTaskListController"},
- {1, nullptr, "OpenRemoteStorageController"},
- {2, nullptr, "OpenDaemonController"},
+ {0, D<&IOlscServiceForSystemService::OpenTransferTaskListController>, "OpenTransferTaskListController"},
+ {1, D<&IOlscServiceForSystemService::OpenRemoteStorageController>, "OpenRemoteStorageController"},
+ {2, D<&IOlscServiceForSystemService::OpenDaemonController>, "OpenDaemonController"},
{10, nullptr, "Unknown10"},
{11, nullptr, "Unknown11"},
{12, nullptr, "Unknown12"},
@@ -24,7 +26,7 @@ IOlscServiceForSystemService::IOlscServiceForSystemService(Core::System& system_
{103, nullptr, "GetLastErrorInfo"},
{104, nullptr, "GetLastErrorEventHolder"},
{105, nullptr, "GetLastTransferTaskErrorInfo"},
- {200, nullptr, "GetDataTransferPolicyInfo"},
+ {200, D<&IOlscServiceForSystemService::GetDataTransferPolicyInfo>, "GetDataTransferPolicyInfo"},
{201, nullptr, "RemoveDataTransferPolicyInfo"},
{202, nullptr, "UpdateDataTransferPolicyOld"},
{203, nullptr, "UpdateDataTransferPolicy"},
@@ -68,6 +70,7 @@ IOlscServiceForSystemService::IOlscServiceForSystemService(Core::System& system_
{1122, nullptr, "RepairIssue2"},
{1123, nullptr, "RepairIssue3"},
{1124, nullptr, "Unknown1124"},
+ {10000, D<&IOlscServiceForSystemService::CloneService>, "CloneService"},
};
// clang-format on
@@ -76,12 +79,39 @@ IOlscServiceForSystemService::IOlscServiceForSystemService(Core::System& system_
IOlscServiceForSystemService::~IOlscServiceForSystemService() = default;
-void IOlscServiceForSystemService::OpenTransferTaskListController(HLERequestContext& ctx) {
+Result IOlscServiceForSystemService::OpenTransferTaskListController(
+ Out<SharedPointer<ITransferTaskListController>> out_interface) {
LOG_INFO(Service_OLSC, "called");
+ *out_interface = std::make_shared<ITransferTaskListController>(system);
+ R_SUCCEED();
+}
+
+Result IOlscServiceForSystemService::OpenRemoteStorageController(
+ Out<SharedPointer<IRemoteStorageController>> out_interface) {
+ LOG_INFO(Service_OLSC, "called");
+ *out_interface = std::make_shared<IRemoteStorageController>(system);
+ R_SUCCEED();
+}
+
+Result IOlscServiceForSystemService::OpenDaemonController(
+ Out<SharedPointer<IDaemonController>> out_interface) {
+ LOG_INFO(Service_OLSC, "called");
+ *out_interface = std::make_shared<IDaemonController>(system);
+ R_SUCCEED();
+}
- IPC::ResponseBuilder rb{ctx, 2, 0, 1};
- rb.Push(ResultSuccess);
- rb.PushIpcInterface<ITransferTaskListController>(system);
+Result IOlscServiceForSystemService::GetDataTransferPolicyInfo(Out<u16> out_policy_info,
+ u64 application_id) {
+ LOG_WARNING(Service_OLSC, "(STUBBED) called");
+ *out_policy_info = 0;
+ R_SUCCEED();
+}
+
+Result IOlscServiceForSystemService::CloneService(
+ Out<SharedPointer<IOlscServiceForSystemService>> out_interface) {
+ LOG_INFO(Service_OLSC, "called");
+ *out_interface = std::static_pointer_cast<IOlscServiceForSystemService>(shared_from_this());
+ R_SUCCEED();
}
} // namespace Service::OLSC
diff --git a/src/core/hle/service/olsc/olsc_service_for_system_service.h b/src/core/hle/service/olsc/olsc_service_for_system_service.h
index a81fba0dc..13026272a 100644
--- a/src/core/hle/service/olsc/olsc_service_for_system_service.h
+++ b/src/core/hle/service/olsc/olsc_service_for_system_service.h
@@ -1,17 +1,27 @@
// 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/service.h"
namespace Service::OLSC {
+class IDaemonController;
+class IRemoteStorageController;
+class ITransferTaskListController;
+
class IOlscServiceForSystemService final : public ServiceFramework<IOlscServiceForSystemService> {
public:
explicit IOlscServiceForSystemService(Core::System& system_);
~IOlscServiceForSystemService() override;
private:
- void OpenTransferTaskListController(HLERequestContext& ctx);
+ Result OpenTransferTaskListController(
+ Out<SharedPointer<ITransferTaskListController>> out_interface);
+ Result OpenRemoteStorageController(Out<SharedPointer<IRemoteStorageController>> out_interface);
+ Result OpenDaemonController(Out<SharedPointer<IDaemonController>> out_interface);
+ Result GetDataTransferPolicyInfo(Out<u16> out_policy_info, u64 application_id);
+ Result CloneService(Out<SharedPointer<IOlscServiceForSystemService>> out_interface);
};
} // namespace Service::OLSC