diff options
| author | 2024-02-21 16:13:01 -0500 | |
|---|---|---|
| committer | 2024-02-21 16:13:01 -0500 | |
| commit | 6334616b44a0b9fc5d601b6deb13fc2c861f253c (patch) | |
| tree | 0e1084c9372979ab3c5f3d351c21db205dff962e /src/core/hle | |
| parent | Merge pull request #13105 from t895/connection-fix (diff) | |
| download | yuzu-6334616b44a0b9fc5d601b6deb13fc2c861f253c.tar.gz yuzu-6334616b44a0b9fc5d601b6deb13fc2c861f253c.tar.xz yuzu-6334616b44a0b9fc5d601b6deb13fc2c861f253c.zip | |
olsc: move INativeHandleHolder, IOlscServiceForApplication, IOlscServiceForSystemService, ITransferTaskListController
Diffstat (limited to 'src/core/hle')
9 files changed, 305 insertions, 207 deletions
diff --git a/src/core/hle/service/olsc/native_handle_holder.cpp b/src/core/hle/service/olsc/native_handle_holder.cpp new file mode 100644 index 000000000..ac5af5497 --- /dev/null +++ b/src/core/hle/service/olsc/native_handle_holder.cpp | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/olsc/native_handle_holder.h" | ||
| 5 | |||
| 6 | namespace Service::OLSC { | ||
| 7 | |||
| 8 | INativeHandleHolder::INativeHandleHolder(Core::System& system_) | ||
| 9 | : ServiceFramework{system_, "INativeHandleHolder"} { | ||
| 10 | // clang-format off | ||
| 11 | static const FunctionInfo functions[] = { | ||
| 12 | {0, nullptr, "GetNativeHandle"}, | ||
| 13 | }; | ||
| 14 | // clang-format on | ||
| 15 | |||
| 16 | RegisterHandlers(functions); | ||
| 17 | } | ||
| 18 | |||
| 19 | INativeHandleHolder::~INativeHandleHolder() = default; | ||
| 20 | |||
| 21 | } // namespace Service::OLSC | ||
diff --git a/src/core/hle/service/olsc/native_handle_holder.h b/src/core/hle/service/olsc/native_handle_holder.h new file mode 100644 index 000000000..bb8973a1d --- /dev/null +++ b/src/core/hle/service/olsc/native_handle_holder.h | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/service.h" | ||
| 5 | |||
| 6 | namespace Service::OLSC { | ||
| 7 | |||
| 8 | class INativeHandleHolder final : public ServiceFramework<INativeHandleHolder> { | ||
| 9 | public: | ||
| 10 | explicit INativeHandleHolder(Core::System& system_); | ||
| 11 | ~INativeHandleHolder() override; | ||
| 12 | }; | ||
| 13 | |||
| 14 | } // namespace Service::OLSC | ||
diff --git a/src/core/hle/service/olsc/olsc.cpp b/src/core/hle/service/olsc/olsc.cpp index 889f27c31..26d93cf20 100644 --- a/src/core/hle/service/olsc/olsc.cpp +++ b/src/core/hle/service/olsc/olsc.cpp | |||
| @@ -1,219 +1,14 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project | 1 | // SPDX-FileCopyrightText: Copyright 2020 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" | ||
| 5 | #include "core/hle/service/olsc/olsc.h" | 4 | #include "core/hle/service/olsc/olsc.h" |
| 5 | #include "core/hle/service/olsc/olsc_service_for_application.h" | ||
| 6 | #include "core/hle/service/olsc/olsc_service_for_system_service.h" | ||
| 6 | #include "core/hle/service/server_manager.h" | 7 | #include "core/hle/service/server_manager.h" |
| 7 | #include "core/hle/service/service.h" | 8 | #include "core/hle/service/service.h" |
| 8 | 9 | ||
| 9 | namespace Service::OLSC { | 10 | namespace Service::OLSC { |
| 10 | 11 | ||
| 11 | class IOlscServiceForApplication final : public ServiceFramework<IOlscServiceForApplication> { | ||
| 12 | public: | ||
| 13 | explicit IOlscServiceForApplication(Core::System& system_) | ||
| 14 | : ServiceFramework{system_, "olsc:u"} { | ||
| 15 | // clang-format off | ||
| 16 | static const FunctionInfo functions[] = { | ||
| 17 | {0, &IOlscServiceForApplication::Initialize, "Initialize"}, | ||
| 18 | {10, nullptr, "VerifySaveDataBackupLicenseAsync"}, | ||
| 19 | {13, &IOlscServiceForApplication::GetSaveDataBackupSetting, "GetSaveDataBackupSetting"}, | ||
| 20 | {14, &IOlscServiceForApplication::SetSaveDataBackupSettingEnabled, "SetSaveDataBackupSettingEnabled"}, | ||
| 21 | {15, nullptr, "SetCustomData"}, | ||
| 22 | {16, nullptr, "DeleteSaveDataBackupSetting"}, | ||
| 23 | {18, nullptr, "GetSaveDataBackupInfoCache"}, | ||
| 24 | {19, nullptr, "UpdateSaveDataBackupInfoCacheAsync"}, | ||
| 25 | {22, nullptr, "DeleteSaveDataBackupAsync"}, | ||
| 26 | {25, nullptr, "ListDownloadableSaveDataBackupInfoAsync"}, | ||
| 27 | {26, nullptr, "DownloadSaveDataBackupAsync"}, | ||
| 28 | {27, nullptr, "UploadSaveDataBackupAsync"}, | ||
| 29 | {9010, nullptr, "VerifySaveDataBackupLicenseAsyncForDebug"}, | ||
| 30 | {9013, nullptr, "GetSaveDataBackupSettingForDebug"}, | ||
| 31 | {9014, nullptr, "SetSaveDataBackupSettingEnabledForDebug"}, | ||
| 32 | {9015, nullptr, "SetCustomDataForDebug"}, | ||
| 33 | {9016, nullptr, "DeleteSaveDataBackupSettingForDebug"}, | ||
| 34 | {9018, nullptr, "GetSaveDataBackupInfoCacheForDebug"}, | ||
| 35 | {9019, nullptr, "UpdateSaveDataBackupInfoCacheAsyncForDebug"}, | ||
| 36 | {9022, nullptr, "DeleteSaveDataBackupAsyncForDebug"}, | ||
| 37 | {9025, nullptr, "ListDownloadableSaveDataBackupInfoAsyncForDebug"}, | ||
| 38 | {9026, nullptr, "DownloadSaveDataBackupAsyncForDebug"}, | ||
| 39 | }; | ||
| 40 | // clang-format on | ||
| 41 | |||
| 42 | RegisterHandlers(functions); | ||
| 43 | } | ||
| 44 | |||
| 45 | private: | ||
| 46 | void Initialize(HLERequestContext& ctx) { | ||
| 47 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); | ||
| 48 | |||
| 49 | initialized = true; | ||
| 50 | |||
| 51 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 52 | rb.Push(ResultSuccess); | ||
| 53 | } | ||
| 54 | |||
| 55 | void GetSaveDataBackupSetting(HLERequestContext& ctx) { | ||
| 56 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); | ||
| 57 | |||
| 58 | // backup_setting is set to 0 since real value is unknown | ||
| 59 | constexpr u64 backup_setting = 0; | ||
| 60 | |||
| 61 | IPC::ResponseBuilder rb{ctx, 4}; | ||
| 62 | rb.Push(ResultSuccess); | ||
| 63 | rb.Push(backup_setting); | ||
| 64 | } | ||
| 65 | |||
| 66 | void SetSaveDataBackupSettingEnabled(HLERequestContext& ctx) { | ||
| 67 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); | ||
| 68 | |||
| 69 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 70 | rb.Push(ResultSuccess); | ||
| 71 | } | ||
| 72 | |||
| 73 | bool initialized{}; | ||
| 74 | }; | ||
| 75 | |||
| 76 | class INativeHandleHolder final : public ServiceFramework<INativeHandleHolder> { | ||
| 77 | public: | ||
| 78 | explicit INativeHandleHolder(Core::System& system_) | ||
| 79 | : ServiceFramework{system_, "INativeHandleHolder"} { | ||
| 80 | // clang-format off | ||
| 81 | static const FunctionInfo functions[] = { | ||
| 82 | {0, nullptr, "GetNativeHandle"}, | ||
| 83 | }; | ||
| 84 | // clang-format on | ||
| 85 | |||
| 86 | RegisterHandlers(functions); | ||
| 87 | } | ||
| 88 | }; | ||
| 89 | |||
| 90 | class ITransferTaskListController final : public ServiceFramework<ITransferTaskListController> { | ||
| 91 | public: | ||
| 92 | explicit ITransferTaskListController(Core::System& system_) | ||
| 93 | : ServiceFramework{system_, "ITransferTaskListController"} { | ||
| 94 | // clang-format off | ||
| 95 | static const FunctionInfo functions[] = { | ||
| 96 | {0, nullptr, "Unknown0"}, | ||
| 97 | {1, nullptr, "Unknown1"}, | ||
| 98 | {2, nullptr, "Unknown2"}, | ||
| 99 | {3, nullptr, "Unknown3"}, | ||
| 100 | {4, nullptr, "Unknown4"}, | ||
| 101 | {5, &ITransferTaskListController::GetNativeHandleHolder , "GetNativeHandleHolder"}, | ||
| 102 | {6, nullptr, "Unknown6"}, | ||
| 103 | {7, nullptr, "Unknown7"}, | ||
| 104 | {8, nullptr, "GetRemoteStorageController"}, | ||
| 105 | {9, &ITransferTaskListController::GetNativeHandleHolder, "GetNativeHandleHolder2"}, | ||
| 106 | {10, nullptr, "Unknown10"}, | ||
| 107 | {11, nullptr, "Unknown11"}, | ||
| 108 | {12, nullptr, "Unknown12"}, | ||
| 109 | {13, nullptr, "Unknown13"}, | ||
| 110 | {14, nullptr, "Unknown14"}, | ||
| 111 | {15, nullptr, "Unknown15"}, | ||
| 112 | {16, nullptr, "Unknown16"}, | ||
| 113 | {17, nullptr, "Unknown17"}, | ||
| 114 | {18, nullptr, "Unknown18"}, | ||
| 115 | {19, nullptr, "Unknown19"}, | ||
| 116 | {20, nullptr, "Unknown20"}, | ||
| 117 | {21, nullptr, "Unknown21"}, | ||
| 118 | {22, nullptr, "Unknown22"}, | ||
| 119 | {23, nullptr, "Unknown23"}, | ||
| 120 | {24, nullptr, "Unknown24"}, | ||
| 121 | {25, nullptr, "Unknown25"}, | ||
| 122 | }; | ||
| 123 | // clang-format on | ||
| 124 | |||
| 125 | RegisterHandlers(functions); | ||
| 126 | } | ||
| 127 | |||
| 128 | private: | ||
| 129 | void GetNativeHandleHolder(HLERequestContext& ctx) { | ||
| 130 | LOG_INFO(Service_OLSC, "called"); | ||
| 131 | |||
| 132 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 133 | rb.Push(ResultSuccess); | ||
| 134 | rb.PushIpcInterface<INativeHandleHolder>(system); | ||
| 135 | } | ||
| 136 | }; | ||
| 137 | |||
| 138 | class IOlscServiceForSystemService final : public ServiceFramework<IOlscServiceForSystemService> { | ||
| 139 | public: | ||
| 140 | explicit IOlscServiceForSystemService(Core::System& system_) | ||
| 141 | : ServiceFramework{system_, "olsc:s"} { | ||
| 142 | // clang-format off | ||
| 143 | static const FunctionInfo functions[] = { | ||
| 144 | {0, &IOlscServiceForSystemService::OpenTransferTaskListController, "OpenTransferTaskListController"}, | ||
| 145 | {1, nullptr, "OpenRemoteStorageController"}, | ||
| 146 | {2, nullptr, "OpenDaemonController"}, | ||
| 147 | {10, nullptr, "Unknown10"}, | ||
| 148 | {11, nullptr, "Unknown11"}, | ||
| 149 | {12, nullptr, "Unknown12"}, | ||
| 150 | {13, nullptr, "Unknown13"}, | ||
| 151 | {100, nullptr, "ListLastTransferTaskErrorInfo"}, | ||
| 152 | {101, nullptr, "GetLastErrorInfoCount"}, | ||
| 153 | {102, nullptr, "RemoveLastErrorInfoOld"}, | ||
| 154 | {103, nullptr, "GetLastErrorInfo"}, | ||
| 155 | {104, nullptr, "GetLastErrorEventHolder"}, | ||
| 156 | {105, nullptr, "GetLastTransferTaskErrorInfo"}, | ||
| 157 | {200, nullptr, "GetDataTransferPolicyInfo"}, | ||
| 158 | {201, nullptr, "RemoveDataTransferPolicyInfo"}, | ||
| 159 | {202, nullptr, "UpdateDataTransferPolicyOld"}, | ||
| 160 | {203, nullptr, "UpdateDataTransferPolicy"}, | ||
| 161 | {204, nullptr, "CleanupDataTransferPolicyInfo"}, | ||
| 162 | {205, nullptr, "RequestDataTransferPolicy"}, | ||
| 163 | {300, nullptr, "GetAutoTransferSeriesInfo"}, | ||
| 164 | {301, nullptr, "UpdateAutoTransferSeriesInfo"}, | ||
| 165 | {400, nullptr, "CleanupSaveDataArchiveInfoType1"}, | ||
| 166 | {900, nullptr, "CleanupTransferTask"}, | ||
| 167 | {902, nullptr, "CleanupSeriesInfoType0"}, | ||
| 168 | {903, nullptr, "CleanupSaveDataArchiveInfoType0"}, | ||
| 169 | {904, nullptr, "CleanupApplicationAutoTransferSetting"}, | ||
| 170 | {905, nullptr, "CleanupErrorHistory"}, | ||
| 171 | {906, nullptr, "SetLastError"}, | ||
| 172 | {907, nullptr, "AddSaveDataArchiveInfoType0"}, | ||
| 173 | {908, nullptr, "RemoveSeriesInfoType0"}, | ||
| 174 | {909, nullptr, "GetSeriesInfoType0"}, | ||
| 175 | {910, nullptr, "RemoveLastErrorInfo"}, | ||
| 176 | {911, nullptr, "CleanupSeriesInfoType1"}, | ||
| 177 | {912, nullptr, "RemoveSeriesInfoType1"}, | ||
| 178 | {913, nullptr, "GetSeriesInfoType1"}, | ||
| 179 | {1000, nullptr, "UpdateIssueOld"}, | ||
| 180 | {1010, nullptr, "Unknown1010"}, | ||
| 181 | {1011, nullptr, "ListIssueInfoOld"}, | ||
| 182 | {1012, nullptr, "GetIssueOld"}, | ||
| 183 | {1013, nullptr, "GetIssue2Old"}, | ||
| 184 | {1014, nullptr, "GetIssue3Old"}, | ||
| 185 | {1020, nullptr, "RepairIssueOld"}, | ||
| 186 | {1021, nullptr, "RepairIssueWithUserIdOld"}, | ||
| 187 | {1022, nullptr, "RepairIssue2Old"}, | ||
| 188 | {1023, nullptr, "RepairIssue3Old"}, | ||
| 189 | {1024, nullptr, "Unknown1024"}, | ||
| 190 | {1100, nullptr, "UpdateIssue"}, | ||
| 191 | {1110, nullptr, "Unknown1110"}, | ||
| 192 | {1111, nullptr, "ListIssueInfo"}, | ||
| 193 | {1112, nullptr, "GetIssue"}, | ||
| 194 | {1113, nullptr, "GetIssue2"}, | ||
| 195 | {1114, nullptr, "GetIssue3"}, | ||
| 196 | {1120, nullptr, "RepairIssue"}, | ||
| 197 | {1121, nullptr, "RepairIssueWithUserId"}, | ||
| 198 | {1122, nullptr, "RepairIssue2"}, | ||
| 199 | {1123, nullptr, "RepairIssue3"}, | ||
| 200 | {1124, nullptr, "Unknown1124"}, | ||
| 201 | }; | ||
| 202 | // clang-format on | ||
| 203 | |||
| 204 | RegisterHandlers(functions); | ||
| 205 | } | ||
| 206 | |||
| 207 | private: | ||
| 208 | void OpenTransferTaskListController(HLERequestContext& ctx) { | ||
| 209 | LOG_INFO(Service_OLSC, "called"); | ||
| 210 | |||
| 211 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 212 | rb.Push(ResultSuccess); | ||
| 213 | rb.PushIpcInterface<ITransferTaskListController>(system); | ||
| 214 | } | ||
| 215 | }; | ||
| 216 | |||
| 217 | void LoopProcess(Core::System& system) { | 12 | void LoopProcess(Core::System& system) { |
| 218 | auto server_manager = std::make_unique<ServerManager>(system); | 13 | auto server_manager = std::make_unique<ServerManager>(system); |
| 219 | 14 | ||
diff --git a/src/core/hle/service/olsc/olsc_service_for_application.cpp b/src/core/hle/service/olsc/olsc_service_for_application.cpp new file mode 100644 index 000000000..ae3ed1e3f --- /dev/null +++ b/src/core/hle/service/olsc/olsc_service_for_application.cpp | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/ipc_helpers.h" | ||
| 5 | #include "core/hle/service/olsc/olsc_service_for_application.h" | ||
| 6 | |||
| 7 | namespace Service::OLSC { | ||
| 8 | |||
| 9 | IOlscServiceForApplication::IOlscServiceForApplication(Core::System& system_) | ||
| 10 | : ServiceFramework{system_, "olsc:u"} { | ||
| 11 | // clang-format off | ||
| 12 | static const FunctionInfo functions[] = { | ||
| 13 | {0, &IOlscServiceForApplication::Initialize, "Initialize"}, | ||
| 14 | {10, nullptr, "VerifySaveDataBackupLicenseAsync"}, | ||
| 15 | {13, &IOlscServiceForApplication::GetSaveDataBackupSetting, "GetSaveDataBackupSetting"}, | ||
| 16 | {14, &IOlscServiceForApplication::SetSaveDataBackupSettingEnabled, "SetSaveDataBackupSettingEnabled"}, | ||
| 17 | {15, nullptr, "SetCustomData"}, | ||
| 18 | {16, nullptr, "DeleteSaveDataBackupSetting"}, | ||
| 19 | {18, nullptr, "GetSaveDataBackupInfoCache"}, | ||
| 20 | {19, nullptr, "UpdateSaveDataBackupInfoCacheAsync"}, | ||
| 21 | {22, nullptr, "DeleteSaveDataBackupAsync"}, | ||
| 22 | {25, nullptr, "ListDownloadableSaveDataBackupInfoAsync"}, | ||
| 23 | {26, nullptr, "DownloadSaveDataBackupAsync"}, | ||
| 24 | {27, nullptr, "UploadSaveDataBackupAsync"}, | ||
| 25 | {9010, nullptr, "VerifySaveDataBackupLicenseAsyncForDebug"}, | ||
| 26 | {9013, nullptr, "GetSaveDataBackupSettingForDebug"}, | ||
| 27 | {9014, nullptr, "SetSaveDataBackupSettingEnabledForDebug"}, | ||
| 28 | {9015, nullptr, "SetCustomDataForDebug"}, | ||
| 29 | {9016, nullptr, "DeleteSaveDataBackupSettingForDebug"}, | ||
| 30 | {9018, nullptr, "GetSaveDataBackupInfoCacheForDebug"}, | ||
| 31 | {9019, nullptr, "UpdateSaveDataBackupInfoCacheAsyncForDebug"}, | ||
| 32 | {9022, nullptr, "DeleteSaveDataBackupAsyncForDebug"}, | ||
| 33 | {9025, nullptr, "ListDownloadableSaveDataBackupInfoAsyncForDebug"}, | ||
| 34 | {9026, nullptr, "DownloadSaveDataBackupAsyncForDebug"}, | ||
| 35 | }; | ||
| 36 | // clang-format on | ||
| 37 | |||
| 38 | RegisterHandlers(functions); | ||
| 39 | } | ||
| 40 | |||
| 41 | IOlscServiceForApplication::~IOlscServiceForApplication() = default; | ||
| 42 | |||
| 43 | void IOlscServiceForApplication::Initialize(HLERequestContext& ctx) { | ||
| 44 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); | ||
| 45 | |||
| 46 | initialized = true; | ||
| 47 | |||
| 48 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 49 | rb.Push(ResultSuccess); | ||
| 50 | } | ||
| 51 | |||
| 52 | void IOlscServiceForApplication::GetSaveDataBackupSetting(HLERequestContext& ctx) { | ||
| 53 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); | ||
| 54 | |||
| 55 | // backup_setting is set to 0 since real value is unknown | ||
| 56 | constexpr u64 backup_setting = 0; | ||
| 57 | |||
| 58 | IPC::ResponseBuilder rb{ctx, 4}; | ||
| 59 | rb.Push(ResultSuccess); | ||
| 60 | rb.Push(backup_setting); | ||
| 61 | } | ||
| 62 | |||
| 63 | void IOlscServiceForApplication::SetSaveDataBackupSettingEnabled(HLERequestContext& ctx) { | ||
| 64 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); | ||
| 65 | |||
| 66 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 67 | rb.Push(ResultSuccess); | ||
| 68 | } | ||
| 69 | |||
| 70 | } // 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 new file mode 100644 index 000000000..29074054b --- /dev/null +++ b/src/core/hle/service/olsc/olsc_service_for_application.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/service.h" | ||
| 5 | |||
| 6 | namespace Service::OLSC { | ||
| 7 | |||
| 8 | class IOlscServiceForApplication final : public ServiceFramework<IOlscServiceForApplication> { | ||
| 9 | public: | ||
| 10 | explicit IOlscServiceForApplication(Core::System& system_); | ||
| 11 | ~IOlscServiceForApplication() override; | ||
| 12 | |||
| 13 | private: | ||
| 14 | void Initialize(HLERequestContext& ctx); | ||
| 15 | void GetSaveDataBackupSetting(HLERequestContext& ctx); | ||
| 16 | void SetSaveDataBackupSettingEnabled(HLERequestContext& ctx); | ||
| 17 | |||
| 18 | bool initialized{}; | ||
| 19 | }; | ||
| 20 | |||
| 21 | } // namespace Service::OLSC | ||
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 new file mode 100644 index 000000000..1873f1245 --- /dev/null +++ b/src/core/hle/service/olsc/olsc_service_for_system_service.cpp | |||
| @@ -0,0 +1,87 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/ipc_helpers.h" | ||
| 5 | #include "core/hle/service/olsc/olsc_service_for_system_service.h" | ||
| 6 | #include "core/hle/service/olsc/transfer_task_list_controller.h" | ||
| 7 | |||
| 8 | namespace Service::OLSC { | ||
| 9 | |||
| 10 | IOlscServiceForSystemService::IOlscServiceForSystemService(Core::System& system_) | ||
| 11 | : ServiceFramework{system_, "olsc:s"} { | ||
| 12 | // clang-format off | ||
| 13 | static const FunctionInfo functions[] = { | ||
| 14 | {0, &IOlscServiceForSystemService::OpenTransferTaskListController, "OpenTransferTaskListController"}, | ||
| 15 | {1, nullptr, "OpenRemoteStorageController"}, | ||
| 16 | {2, nullptr, "OpenDaemonController"}, | ||
| 17 | {10, nullptr, "Unknown10"}, | ||
| 18 | {11, nullptr, "Unknown11"}, | ||
| 19 | {12, nullptr, "Unknown12"}, | ||
| 20 | {13, nullptr, "Unknown13"}, | ||
| 21 | {100, nullptr, "ListLastTransferTaskErrorInfo"}, | ||
| 22 | {101, nullptr, "GetLastErrorInfoCount"}, | ||
| 23 | {102, nullptr, "RemoveLastErrorInfoOld"}, | ||
| 24 | {103, nullptr, "GetLastErrorInfo"}, | ||
| 25 | {104, nullptr, "GetLastErrorEventHolder"}, | ||
| 26 | {105, nullptr, "GetLastTransferTaskErrorInfo"}, | ||
| 27 | {200, nullptr, "GetDataTransferPolicyInfo"}, | ||
| 28 | {201, nullptr, "RemoveDataTransferPolicyInfo"}, | ||
| 29 | {202, nullptr, "UpdateDataTransferPolicyOld"}, | ||
| 30 | {203, nullptr, "UpdateDataTransferPolicy"}, | ||
| 31 | {204, nullptr, "CleanupDataTransferPolicyInfo"}, | ||
| 32 | {205, nullptr, "RequestDataTransferPolicy"}, | ||
| 33 | {300, nullptr, "GetAutoTransferSeriesInfo"}, | ||
| 34 | {301, nullptr, "UpdateAutoTransferSeriesInfo"}, | ||
| 35 | {400, nullptr, "CleanupSaveDataArchiveInfoType1"}, | ||
| 36 | {900, nullptr, "CleanupTransferTask"}, | ||
| 37 | {902, nullptr, "CleanupSeriesInfoType0"}, | ||
| 38 | {903, nullptr, "CleanupSaveDataArchiveInfoType0"}, | ||
| 39 | {904, nullptr, "CleanupApplicationAutoTransferSetting"}, | ||
| 40 | {905, nullptr, "CleanupErrorHistory"}, | ||
| 41 | {906, nullptr, "SetLastError"}, | ||
| 42 | {907, nullptr, "AddSaveDataArchiveInfoType0"}, | ||
| 43 | {908, nullptr, "RemoveSeriesInfoType0"}, | ||
| 44 | {909, nullptr, "GetSeriesInfoType0"}, | ||
| 45 | {910, nullptr, "RemoveLastErrorInfo"}, | ||
| 46 | {911, nullptr, "CleanupSeriesInfoType1"}, | ||
| 47 | {912, nullptr, "RemoveSeriesInfoType1"}, | ||
| 48 | {913, nullptr, "GetSeriesInfoType1"}, | ||
| 49 | {1000, nullptr, "UpdateIssueOld"}, | ||
| 50 | {1010, nullptr, "Unknown1010"}, | ||
| 51 | {1011, nullptr, "ListIssueInfoOld"}, | ||
| 52 | {1012, nullptr, "GetIssueOld"}, | ||
| 53 | {1013, nullptr, "GetIssue2Old"}, | ||
| 54 | {1014, nullptr, "GetIssue3Old"}, | ||
| 55 | {1020, nullptr, "RepairIssueOld"}, | ||
| 56 | {1021, nullptr, "RepairIssueWithUserIdOld"}, | ||
| 57 | {1022, nullptr, "RepairIssue2Old"}, | ||
| 58 | {1023, nullptr, "RepairIssue3Old"}, | ||
| 59 | {1024, nullptr, "Unknown1024"}, | ||
| 60 | {1100, nullptr, "UpdateIssue"}, | ||
| 61 | {1110, nullptr, "Unknown1110"}, | ||
| 62 | {1111, nullptr, "ListIssueInfo"}, | ||
| 63 | {1112, nullptr, "GetIssue"}, | ||
| 64 | {1113, nullptr, "GetIssue2"}, | ||
| 65 | {1114, nullptr, "GetIssue3"}, | ||
| 66 | {1120, nullptr, "RepairIssue"}, | ||
| 67 | {1121, nullptr, "RepairIssueWithUserId"}, | ||
| 68 | {1122, nullptr, "RepairIssue2"}, | ||
| 69 | {1123, nullptr, "RepairIssue3"}, | ||
| 70 | {1124, nullptr, "Unknown1124"}, | ||
| 71 | }; | ||
| 72 | // clang-format on | ||
| 73 | |||
| 74 | RegisterHandlers(functions); | ||
| 75 | } | ||
| 76 | |||
| 77 | IOlscServiceForSystemService::~IOlscServiceForSystemService() = default; | ||
| 78 | |||
| 79 | void IOlscServiceForSystemService::OpenTransferTaskListController(HLERequestContext& ctx) { | ||
| 80 | LOG_INFO(Service_OLSC, "called"); | ||
| 81 | |||
| 82 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 83 | rb.Push(ResultSuccess); | ||
| 84 | rb.PushIpcInterface<ITransferTaskListController>(system); | ||
| 85 | } | ||
| 86 | |||
| 87 | } // 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 new file mode 100644 index 000000000..a81fba0dc --- /dev/null +++ b/src/core/hle/service/olsc/olsc_service_for_system_service.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/service.h" | ||
| 5 | |||
| 6 | namespace Service::OLSC { | ||
| 7 | |||
| 8 | class IOlscServiceForSystemService final : public ServiceFramework<IOlscServiceForSystemService> { | ||
| 9 | public: | ||
| 10 | explicit IOlscServiceForSystemService(Core::System& system_); | ||
| 11 | ~IOlscServiceForSystemService() override; | ||
| 12 | |||
| 13 | private: | ||
| 14 | void OpenTransferTaskListController(HLERequestContext& ctx); | ||
| 15 | }; | ||
| 16 | |||
| 17 | } // namespace Service::OLSC | ||
diff --git a/src/core/hle/service/olsc/transfer_task_list_controller.cpp b/src/core/hle/service/olsc/transfer_task_list_controller.cpp new file mode 100644 index 000000000..9aa941309 --- /dev/null +++ b/src/core/hle/service/olsc/transfer_task_list_controller.cpp | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/ipc_helpers.h" | ||
| 5 | #include "core/hle/service/olsc/native_handle_holder.h" | ||
| 6 | #include "core/hle/service/olsc/transfer_task_list_controller.h" | ||
| 7 | |||
| 8 | namespace Service::OLSC { | ||
| 9 | |||
| 10 | ITransferTaskListController::ITransferTaskListController(Core::System& system_) | ||
| 11 | : ServiceFramework{system_, "ITransferTaskListController"} { | ||
| 12 | // clang-format off | ||
| 13 | static const FunctionInfo functions[] = { | ||
| 14 | {0, nullptr, "Unknown0"}, | ||
| 15 | {1, nullptr, "Unknown1"}, | ||
| 16 | {2, nullptr, "Unknown2"}, | ||
| 17 | {3, nullptr, "Unknown3"}, | ||
| 18 | {4, nullptr, "Unknown4"}, | ||
| 19 | {5, &ITransferTaskListController::GetNativeHandleHolder , "GetNativeHandleHolder"}, | ||
| 20 | {6, nullptr, "Unknown6"}, | ||
| 21 | {7, nullptr, "Unknown7"}, | ||
| 22 | {8, nullptr, "GetRemoteStorageController"}, | ||
| 23 | {9, &ITransferTaskListController::GetNativeHandleHolder, "GetNativeHandleHolder2"}, | ||
| 24 | {10, nullptr, "Unknown10"}, | ||
| 25 | {11, nullptr, "Unknown11"}, | ||
| 26 | {12, nullptr, "Unknown12"}, | ||
| 27 | {13, nullptr, "Unknown13"}, | ||
| 28 | {14, nullptr, "Unknown14"}, | ||
| 29 | {15, nullptr, "Unknown15"}, | ||
| 30 | {16, nullptr, "Unknown16"}, | ||
| 31 | {17, nullptr, "Unknown17"}, | ||
| 32 | {18, nullptr, "Unknown18"}, | ||
| 33 | {19, nullptr, "Unknown19"}, | ||
| 34 | {20, nullptr, "Unknown20"}, | ||
| 35 | {21, nullptr, "Unknown21"}, | ||
| 36 | {22, nullptr, "Unknown22"}, | ||
| 37 | {23, nullptr, "Unknown23"}, | ||
| 38 | {24, nullptr, "Unknown24"}, | ||
| 39 | {25, nullptr, "Unknown25"}, | ||
| 40 | }; | ||
| 41 | // clang-format on | ||
| 42 | |||
| 43 | RegisterHandlers(functions); | ||
| 44 | } | ||
| 45 | |||
| 46 | ITransferTaskListController::~ITransferTaskListController() = default; | ||
| 47 | |||
| 48 | void ITransferTaskListController::GetNativeHandleHolder(HLERequestContext& ctx) { | ||
| 49 | LOG_INFO(Service_OLSC, "called"); | ||
| 50 | |||
| 51 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 52 | rb.Push(ResultSuccess); | ||
| 53 | rb.PushIpcInterface<INativeHandleHolder>(system); | ||
| 54 | } | ||
| 55 | |||
| 56 | } // namespace Service::OLSC | ||
diff --git a/src/core/hle/service/olsc/transfer_task_list_controller.h b/src/core/hle/service/olsc/transfer_task_list_controller.h new file mode 100644 index 000000000..daf476d8a --- /dev/null +++ b/src/core/hle/service/olsc/transfer_task_list_controller.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/service.h" | ||
| 5 | |||
| 6 | namespace Service::OLSC { | ||
| 7 | |||
| 8 | class ITransferTaskListController final : public ServiceFramework<ITransferTaskListController> { | ||
| 9 | public: | ||
| 10 | explicit ITransferTaskListController(Core::System& system_); | ||
| 11 | ~ITransferTaskListController() override; | ||
| 12 | |||
| 13 | private: | ||
| 14 | void GetNativeHandleHolder(HLERequestContext& ctx); | ||
| 15 | }; | ||
| 16 | |||
| 17 | } // namespace Service::OLSC | ||