1
0
Fork 0
forked from suyu/suyu

olsc: rewrite ITransferTaskListController

This commit is contained in:
Liam 2024-02-21 18:36:17 -05:00
parent 8689370830
commit 6b956a6951
2 changed files with 38 additions and 36 deletions

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // 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/native_handle_holder.h" #include "core/hle/service/olsc/native_handle_holder.h"
#include "core/hle/service/olsc/transfer_task_list_controller.h" #include "core/hle/service/olsc/transfer_task_list_controller.h"
@ -10,34 +10,34 @@ namespace Service::OLSC {
ITransferTaskListController::ITransferTaskListController(Core::System& system_) ITransferTaskListController::ITransferTaskListController(Core::System& system_)
: ServiceFramework{system_, "ITransferTaskListController"} { : ServiceFramework{system_, "ITransferTaskListController"} {
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "Unknown0"}, {0, nullptr, "Unknown0"},
{1, nullptr, "Unknown1"}, {1, nullptr, "Unknown1"},
{2, nullptr, "Unknown2"}, {2, nullptr, "Unknown2"},
{3, nullptr, "Unknown3"}, {3, nullptr, "Unknown3"},
{4, nullptr, "Unknown4"}, {4, nullptr, "Unknown4"},
{5, &ITransferTaskListController::GetNativeHandleHolder , "GetNativeHandleHolder"}, {5, D<&ITransferTaskListController::GetNativeHandleHolder>, "GetNativeHandleHolder"},
{6, nullptr, "Unknown6"}, {6, nullptr, "Unknown6"},
{7, nullptr, "Unknown7"}, {7, nullptr, "Unknown7"},
{8, nullptr, "GetRemoteStorageController"}, {8, nullptr, "GetRemoteStorageController"},
{9, &ITransferTaskListController::GetNativeHandleHolder, "GetNativeHandleHolder2"}, {9, D<&ITransferTaskListController::GetNativeHandleHolder>, "GetNativeHandleHolder2"},
{10, nullptr, "Unknown10"}, {10, nullptr, "Unknown10"},
{11, nullptr, "Unknown11"}, {11, nullptr, "Unknown11"},
{12, nullptr, "Unknown12"}, {12, nullptr, "Unknown12"},
{13, nullptr, "Unknown13"}, {13, nullptr, "Unknown13"},
{14, nullptr, "Unknown14"}, {14, nullptr, "Unknown14"},
{15, nullptr, "Unknown15"}, {15, nullptr, "Unknown15"},
{16, nullptr, "Unknown16"}, {16, nullptr, "Unknown16"},
{17, nullptr, "Unknown17"}, {17, nullptr, "Unknown17"},
{18, nullptr, "Unknown18"}, {18, nullptr, "Unknown18"},
{19, nullptr, "Unknown19"}, {19, nullptr, "Unknown19"},
{20, nullptr, "Unknown20"}, {20, nullptr, "Unknown20"},
{21, nullptr, "Unknown21"}, {21, nullptr, "Unknown21"},
{22, nullptr, "Unknown22"}, {22, nullptr, "Unknown22"},
{23, nullptr, "Unknown23"}, {23, nullptr, "Unknown23"},
{24, nullptr, "Unknown24"}, {24, nullptr, "Unknown24"},
{25, nullptr, "Unknown25"}, {25, nullptr, "Unknown25"},
}; };
// clang-format on // clang-format on
RegisterHandlers(functions); RegisterHandlers(functions);
@ -45,12 +45,11 @@ ITransferTaskListController::ITransferTaskListController(Core::System& system_)
ITransferTaskListController::~ITransferTaskListController() = default; ITransferTaskListController::~ITransferTaskListController() = default;
void ITransferTaskListController::GetNativeHandleHolder(HLERequestContext& ctx) { Result ITransferTaskListController::GetNativeHandleHolder(
LOG_INFO(Service_OLSC, "called"); Out<SharedPointer<INativeHandleHolder>> out_holder) {
LOG_WARNING(Service_OLSC, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2, 0, 1}; *out_holder = std::make_shared<INativeHandleHolder>(system);
rb.Push(ResultSuccess); R_SUCCEED();
rb.PushIpcInterface<INativeHandleHolder>(system);
} }
} // namespace Service::OLSC } // namespace Service::OLSC

View file

@ -1,17 +1,20 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#include "core/hle/service/cmif_types.h"
#include "core/hle/service/service.h" #include "core/hle/service/service.h"
namespace Service::OLSC { namespace Service::OLSC {
class INativeHandleHolder;
class ITransferTaskListController final : public ServiceFramework<ITransferTaskListController> { class ITransferTaskListController final : public ServiceFramework<ITransferTaskListController> {
public: public:
explicit ITransferTaskListController(Core::System& system_); explicit ITransferTaskListController(Core::System& system_);
~ITransferTaskListController() override; ~ITransferTaskListController() override;
private: private:
void GetNativeHandleHolder(HLERequestContext& ctx); Result GetNativeHandleHolder(Out<SharedPointer<INativeHandleHolder>> out_holder);
}; };
} // namespace Service::OLSC } // namespace Service::OLSC