diff --git a/externals/stb/stb_image.h b/externals/stb/stb_image.h index 5e807a0a6..725d0ec9e 100644 --- a/externals/stb/stb_image.h +++ b/externals/stb/stb_image.h @@ -5079,7 +5079,7 @@ static void stbi__de_iphone(stbi__png *z) static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp) { stbi_uc palette[1024], pal_img_n=0; - stbi_uc has_trans=0, tc[3]={0}; + stbi_uc has_trans=0, tc[4]={0}; stbi__uint16 tc16[3]; stbi__uint32 ioff=0, idata_limit=0, i, pal_len=0; int first=1,k,interlace=0, color=0, is_iphone=0; @@ -5163,7 +5163,7 @@ static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp) if (z->depth == 16) { for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is } else { - for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger + for (k = 0; k < s->img_n && k < 4; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger } } break; diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index b0ce9ce71..34c236ae9 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -748,6 +748,8 @@ add_library(core STATIC hle/service/kernel_helpers.h hle/service/lbl/lbl.cpp hle/service/lbl/lbl.h + hle/service/ldn/client_process_monitor.cpp + hle/service/ldn/client_process_monitor.h hle/service/ldn/lan_discovery.cpp hle/service/ldn/lan_discovery.h hle/service/ldn/ldn.cpp diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 8efc6ea3d..acd5ec7b4 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -86,7 +86,8 @@ public: {0, D<&IManagerForSystemService::CheckAvailability>, "CheckAvailability"}, {1, D<&IManagerForSystemService::GetAccountId>, "GetAccountId"}, {2, nullptr, "EnsureIdTokenCacheAsync"}, - {3, nullptr, "LoadIdTokenCache"}, + {3, D<&IManagerForSystemService::LoadIdTokenCacheDeprecated>, "LoadIdTokenCacheDeprecated"}, // 19.0.0+ + {4, D<&IManagerForSystemService::LoadIdTokenCache>, "LoadIdTokenCache"}, // 19.0.0+ {100, nullptr, "SetSystemProgramIdentification"}, {101, nullptr, "RefreshNotificationTokenAsync"}, // 7.0.0+ {110, nullptr, "GetServiceEntryRequirementCache"}, // 4.0.0+ @@ -125,6 +126,16 @@ private: R_SUCCEED(); } + Result LoadIdTokenCacheDeprecated() { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + R_SUCCEED(); + } + + Result LoadIdTokenCache() { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + R_SUCCEED(); + } + Common::UUID account_id; }; @@ -608,6 +619,63 @@ protected: } }; +class EnsureSignedDeviceIdentifierCacheAsyncInterface final : public IAsyncContext { +public: + explicit EnsureSignedDeviceIdentifierCacheAsyncInterface(Core::System& system_) : IAsyncContext{system_} { + MarkComplete(); + } + ~EnsureSignedDeviceIdentifierCacheAsyncInterface() = default; + +protected: + bool IsComplete() const override { + return true; + } + + void Cancel() override {} + + Result GetResult() const override { + return ResultSuccess; + } +}; + +class AuthenticateServiceAsyncInterface final : public IAsyncContext { +public: + explicit AuthenticateServiceAsyncInterface(Core::System& system_) : IAsyncContext{system_} { + MarkComplete(); + } + ~AuthenticateServiceAsyncInterface() = default; + +protected: + bool IsComplete() const override { + return true; + } + + void Cancel() override {} + + Result GetResult() const override { + return ResultSuccess; + } +}; + +class SynchronizeNetworkServiceAccountsSnapshotAsyncInterface final : public IAsyncContext { +public: + explicit SynchronizeNetworkServiceAccountsSnapshotAsyncInterface(Core::System& system_) : IAsyncContext{system_} { + MarkComplete(); + } + ~SynchronizeNetworkServiceAccountsSnapshotAsyncInterface() = default; + +protected: + bool IsComplete() const override { + return true; + } + + void Cancel() override {} + + Result GetResult() const override { + return ResultSuccess; + } +}; + class IManagerForApplication final : public ServiceFramework { public: explicit IManagerForApplication(Core::System& system_, @@ -620,8 +688,10 @@ public: {0, &IManagerForApplication::CheckAvailability, "CheckAvailability"}, {1, &IManagerForApplication::GetAccountId, "GetAccountId"}, {2, &IManagerForApplication::EnsureIdTokenCacheAsync, "EnsureIdTokenCacheAsync"}, - {3, &IManagerForApplication::LoadIdTokenCache, "LoadIdTokenCache"}, + {3, &IManagerForApplication::LoadIdTokenCacheDeprecated, "LoadIdTokenCacheDeprecated"}, + {4, &IManagerForApplication::LoadIdTokenCache, "LoadIdTokenCache"}, {130, &IManagerForApplication::GetNintendoAccountUserResourceCacheForApplication, "GetNintendoAccountUserResourceCacheForApplication"}, + {136, &IManagerForApplication::GetNintendoAccountUserResourceCacheForApplication, "GetNintendoAccountUserResourceCache"}, // 19.0.0+ {150, nullptr, "CreateAuthorizationRequest"}, {160, &IManagerForApplication::StoreOpenContext, "StoreOpenContext"}, {170, nullptr, "LoadNetworkServiceLicenseKindAsync"}, @@ -655,12 +725,21 @@ private: rb.PushIpcInterface(ensure_token_id); } - void LoadIdTokenCache(HLERequestContext& ctx) { + void LoadIdTokenCacheDeprecated(HLERequestContext& ctx) { LOG_WARNING(Service_ACC, "(STUBBED) called"); ensure_token_id->LoadIdTokenCache(ctx); } + void LoadIdTokenCache(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 4}; + rb.Push(ResultSuccess); + rb.Push(0); // token size + rb.Push(0); // unknown + } + void GetNintendoAccountUserResourceCacheForApplication(HLERequestContext& ctx) { LOG_WARNING(Service_ACC, "(STUBBED) called"); @@ -1134,6 +1213,381 @@ void Module::Interface::TrySelectUserWithoutInteraction(HLERequestContext& ctx) rb.PushRaw(profile_manager->GetUser(0)->uuid); } +void Module::Interface::GetUserRegistrationNotifier(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + const Common::UUID dummy_uuid{}; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, dummy_uuid); +} + +void Module::Interface::GetUserStateChangeNotifier(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + const Common::UUID dummy_uuid{}; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, dummy_uuid); +} + +void Module::Interface::GetBaasUserAvailabilityChangeNotifier(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + const Common::UUID dummy_uuid{}; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, dummy_uuid); +} + +void Module::Interface::GetProfileUpdateNotifier(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + const Common::UUID dummy_uuid{}; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, dummy_uuid); +} + +void Module::Interface::GetProfileSyncNotifier(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + const Common::UUID dummy_uuid{}; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, dummy_uuid); +} + +void Module::Interface::LoadSaveDataThumbnail(HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const auto uuid = rp.PopRaw(); + const auto tid = rp.Pop(); + + LOG_WARNING(Service_ACC, "(STUBBED) called, uuid=0x{}, tid={:016X}", uuid.RawString(), tid); + + // Return empty buffer for now + std::vector thumbnail(THUMBNAIL_SIZE); + ctx.WriteBuffer(thumbnail); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::GetSaveDataThumbnailExistence(HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const auto uuid = rp.PopRaw(); + const auto tid = rp.Pop(); + + LOG_WARNING(Service_ACC, "(STUBBED) called, uuid=0x{}, tid={:016X}", uuid.RawString(), tid); + + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(ResultSuccess); + rb.Push(false); // Thumbnail does not exist +} + +void Module::Interface::ListOpenUsersInApplication(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + ctx.WriteBuffer(profile_manager->GetOpenUsers()); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::ActivateOpenContextRetention(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + const Common::UUID dummy_uuid{}; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, dummy_uuid); +} + +void Module::Interface::EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system); +} + +void Module::Interface::LoadSignedDeviceIdentifierCacheForNintendoAccount(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + // Return dummy data + std::array device_identifier{}; + ctx.WriteBuffer(device_identifier); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::GetUserLastOpenedApplication(HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + Common::UUID user_id = rp.PopRaw(); + + LOG_WARNING(Service_ACC, "(STUBBED) called, user_id=0x{}", user_id.RawString()); + + IPC::ResponseBuilder rb{ctx, 4}; + rb.Push(ResultSuccess); + rb.Push(0); // No application opened +} + +void Module::Interface::ActivateOpenContextHolder(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::CancelUserRegistration(HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + Common::UUID user_id = rp.PopRaw(); + + LOG_INFO(Service_ACC, "called, uuid={}", user_id.FormattedString()); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::DeleteUser(HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + Common::UUID user_id = rp.PopRaw(); + + LOG_INFO(Service_ACC, "called, uuid={}", user_id.FormattedString()); + + profile_manager->RemoveUser(user_id); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::SetUserPosition(HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const auto position = rp.Pop(); + const auto uuid = rp.PopRaw(); + + LOG_WARNING(Service_ACC, "(STUBBED) called, position={}, uuid=0x{}", position, uuid.RawString()); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::CompleteUserRegistrationForcibly(HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + Common::UUID user_id = rp.PopRaw(); + + LOG_INFO(Service_ACC, "called, uuid={}", user_id.FormattedString()); + + profile_manager->WriteUserSaveFile(); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::CreateFloatingRegistrationRequest(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + const Common::UUID dummy_uuid{}; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, dummy_uuid); +} + +void Module::Interface::CreateProcedureToRegisterUserWithNintendoAccount(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + const Common::UUID dummy_uuid{}; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, dummy_uuid); +} + +void Module::Interface::ResumeProcedureToRegisterUserWithNintendoAccount(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + const Common::UUID dummy_uuid{}; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, dummy_uuid); +} + +void Module::Interface::CreateProcedureToCreateUserWithNintendoAccount(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + const Common::UUID dummy_uuid{}; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, dummy_uuid); +} + +void Module::Interface::ResumeProcedureToCreateUserWithNintendoAccount(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + const Common::UUID dummy_uuid{}; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, dummy_uuid); +} + +void Module::Interface::ResumeProcedureToCreateUserWithNintendoAccountAfterApplyResponse(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + const Common::UUID dummy_uuid{}; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, dummy_uuid); +} + +void Module::Interface::AuthenticateServiceAsync(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system); +} + +void Module::Interface::GetBaasAccountAdministrator(HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const auto uuid = rp.PopRaw(); + + LOG_INFO(Service_ACC, "called, uuid=0x{}", uuid.RawString()); + + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, uuid); +} + +void Module::Interface::SynchronizeNetworkServiceAccountsSnapshotAsync(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system); +} + +void Module::Interface::ProxyProcedureForGuestLoginWithNintendoAccount(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + const Common::UUID dummy_uuid{}; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, dummy_uuid); +} + +void Module::Interface::ProxyProcedureForFloatingRegistrationWithNintendoAccount(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + const Common::UUID dummy_uuid{}; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, dummy_uuid); +} + +void Module::Interface::ProxyProcedureForDeviceMigrationAuthenticatingOperatingUser(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + const Common::UUID dummy_uuid{}; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, dummy_uuid); +} + +void Module::Interface::ProxyProcedureForDeviceMigrationDownload(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + const Common::UUID dummy_uuid{}; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, dummy_uuid); +} + +void Module::Interface::SuspendBackgroundDaemon(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + const Common::UUID dummy_uuid{}; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, dummy_uuid); +} + +void Module::Interface::CreateDeviceMigrationUserExportRequest(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::UploadNasCredential(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::CreateDeviceMigrationUserImportRequest(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::DeleteUserMigrationInfo(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::SetUserUnqualifiedForDebug(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::UnsetUserUnqualifiedForDebug(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::ListUsersUnqualifiedForDebug(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + ctx.WriteBuffer(std::vector{}); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::RefreshFirmwareSettingsForDebug(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::DebugInvalidateTokenCacheForUser(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::DebugSetUserStateClose(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::DebugSetUserStateOpen(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + Module::Interface::Interface(std::shared_ptr module_, std::shared_ptr profile_manager_, Core::System& system_, const char* name) diff --git a/src/core/hle/service/acc/acc.h b/src/core/hle/service/acc/acc.h index 9b116d2ca..78e3a90d4 100644 --- a/src/core/hle/service/acc/acc.h +++ b/src/core/hle/service/acc/acc.h @@ -49,6 +49,49 @@ public: void DebugActivateOpenContextRetention(HLERequestContext& ctx); void GetBaasAccountManagerForSystemService(HLERequestContext& ctx); void StoreSaveDataThumbnailSystem(HLERequestContext& ctx); + // Additional functions for acc:su + void GetUserRegistrationNotifier(HLERequestContext& ctx); + void GetUserStateChangeNotifier(HLERequestContext& ctx); + void GetBaasUserAvailabilityChangeNotifier(HLERequestContext& ctx); + void GetProfileUpdateNotifier(HLERequestContext& ctx); + void GetProfileSyncNotifier(HLERequestContext& ctx); + void LoadSaveDataThumbnail(HLERequestContext& ctx); + void GetSaveDataThumbnailExistence(HLERequestContext& ctx); + void ListOpenUsersInApplication(HLERequestContext& ctx); + void ActivateOpenContextRetention(HLERequestContext& ctx); + void EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync(HLERequestContext& ctx); + void LoadSignedDeviceIdentifierCacheForNintendoAccount(HLERequestContext& ctx); + void GetUserLastOpenedApplication(HLERequestContext& ctx); + void ActivateOpenContextHolder(HLERequestContext& ctx); + void CancelUserRegistration(HLERequestContext& ctx); + void DeleteUser(HLERequestContext& ctx); + void SetUserPosition(HLERequestContext& ctx); + void CompleteUserRegistrationForcibly(HLERequestContext& ctx); + void CreateFloatingRegistrationRequest(HLERequestContext& ctx); + void CreateProcedureToRegisterUserWithNintendoAccount(HLERequestContext& ctx); + void ResumeProcedureToRegisterUserWithNintendoAccount(HLERequestContext& ctx); + void CreateProcedureToCreateUserWithNintendoAccount(HLERequestContext& ctx); + void ResumeProcedureToCreateUserWithNintendoAccount(HLERequestContext& ctx); + void ResumeProcedureToCreateUserWithNintendoAccountAfterApplyResponse(HLERequestContext& ctx); + void AuthenticateServiceAsync(HLERequestContext& ctx); + void GetBaasAccountAdministrator(HLERequestContext& ctx); + void SynchronizeNetworkServiceAccountsSnapshotAsync(HLERequestContext& ctx); + void ProxyProcedureForGuestLoginWithNintendoAccount(HLERequestContext& ctx); + void ProxyProcedureForFloatingRegistrationWithNintendoAccount(HLERequestContext& ctx); + void ProxyProcedureForDeviceMigrationAuthenticatingOperatingUser(HLERequestContext& ctx); + void ProxyProcedureForDeviceMigrationDownload(HLERequestContext& ctx); + void SuspendBackgroundDaemon(HLERequestContext& ctx); + void CreateDeviceMigrationUserExportRequest(HLERequestContext& ctx); + void UploadNasCredential(HLERequestContext& ctx); + void CreateDeviceMigrationUserImportRequest(HLERequestContext& ctx); + void DeleteUserMigrationInfo(HLERequestContext& ctx); + void SetUserUnqualifiedForDebug(HLERequestContext& ctx); + void UnsetUserUnqualifiedForDebug(HLERequestContext& ctx); + void ListUsersUnqualifiedForDebug(HLERequestContext& ctx); + void RefreshFirmwareSettingsForDebug(HLERequestContext& ctx); + void DebugInvalidateTokenCacheForUser(HLERequestContext& ctx); + void DebugSetUserStateClose(HLERequestContext& ctx); + void DebugSetUserStateOpen(HLERequestContext& ctx); private: Result InitializeApplicationInfoBase(); diff --git a/src/core/hle/service/acc/acc_aa.cpp b/src/core/hle/service/acc/acc_aa.cpp index 90ed0f519..5f4b4d495 100644 --- a/src/core/hle/service/acc/acc_aa.cpp +++ b/src/core/hle/service/acc/acc_aa.cpp @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "core/hle/service/acc/acc_aa.h" diff --git a/src/core/hle/service/acc/acc_e.cpp b/src/core/hle/service/acc/acc_e.cpp index 1855b8953..dc8d79d32 100644 --- a/src/core/hle/service/acc/acc_e.cpp +++ b/src/core/hle/service/acc/acc_e.cpp @@ -16,32 +16,32 @@ ACC_E::ACC_E(std::shared_ptr module_, std::shared_ptr pr {3, &ACC_E::ListOpenUsers, "ListOpenUsers"}, {4, &ACC_E::GetLastOpenedUser, "GetLastOpenedUser"}, {5, &ACC_E::GetProfile, "GetProfile"}, - {6, nullptr, "GetProfileDigest"}, + {6, &ACC_E::GetProfileDigest, "GetProfileDigest"}, {50, &ACC_E::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"}, - {51, nullptr, "TrySelectUserWithoutInteractionDeprecated"}, // [1.0.0-18.1.0] + {51, &ACC_E::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteractionDeprecated"}, // [1.0.0-18.1.0] {52, &ACC_E::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"}, // [19.0.0+] - {99, nullptr, "DebugActivateOpenContextRetention"}, - {100, nullptr, "GetUserRegistrationNotifier"}, - {101, nullptr, "GetUserStateChangeNotifier"}, + {99, &ACC_E::DebugActivateOpenContextRetention, "DebugActivateOpenContextRetention"}, + {100, &ACC_E::GetUserRegistrationNotifier, "GetUserRegistrationNotifier"}, + {101, &ACC_E::GetUserStateChangeNotifier, "GetUserStateChangeNotifier"}, {102, &ACC_E::GetBaasAccountManagerForSystemService, "GetBaasAccountManagerForSystemService"}, - {103, nullptr, "GetBaasUserAvailabilityChangeNotifier"}, - {104, nullptr, "GetProfileUpdateNotifier"}, - {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, - {106, nullptr, "GetProfileSyncNotifier"}, + {103, &ACC_E::GetBaasUserAvailabilityChangeNotifier, "GetBaasUserAvailabilityChangeNotifier"}, + {104, &ACC_E::GetProfileUpdateNotifier, "GetProfileUpdateNotifier"}, + {105, &ACC_E::CheckNetworkServiceAvailabilityAsync, "CheckNetworkServiceAvailabilityAsync"}, + {106, &ACC_E::GetProfileSyncNotifier, "GetProfileSyncNotifier"}, {110, &ACC_E::StoreSaveDataThumbnailSystem, "StoreSaveDataThumbnail"}, - {111, nullptr, "ClearSaveDataThumbnail"}, - {112, nullptr, "LoadSaveDataThumbnail"}, - {113, nullptr, "GetSaveDataThumbnailExistence"}, - {120, nullptr, "ListOpenUsersInApplication"}, - {130, nullptr, "ActivateOpenContextRetention"}, + {111, &ACC_E::ClearSaveDataThumbnail, "ClearSaveDataThumbnail"}, + {112, &ACC_E::LoadSaveDataThumbnail, "LoadSaveDataThumbnail"}, + {113, &ACC_E::GetSaveDataThumbnailExistence, "GetSaveDataThumbnailExistence"}, + {120, &ACC_E::ListOpenUsersInApplication, "ListOpenUsersInApplication"}, + {130, &ACC_E::ActivateOpenContextRetention, "ActivateOpenContextRetention"}, {140, &ACC_E::ListQualifiedUsers, "ListQualifiedUsers"}, - {151, nullptr, "EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync"}, - {152, nullptr, "LoadSignedDeviceIdentifierCacheForNintendoAccount"}, - {170, nullptr, "GetNasOp2MembershipStateChangeNotifier"}, - {191, nullptr, "UpdateNotificationReceiverInfo"}, - {997, nullptr, "DebugInvalidateTokenCacheForUser"}, - {998, nullptr, "DebugSetUserStateClose"}, - {999, nullptr, "DebugSetUserStateOpen"}, + {151, &ACC_E::EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync, "EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync"}, + {152, &ACC_E::LoadSignedDeviceIdentifierCacheForNintendoAccount, "LoadSignedDeviceIdentifierCacheForNintendoAccount"}, + {170, &ACC_E::GetProfileUpdateNotifier, "GetNasOp2MembershipStateChangeNotifier"}, // Reuse notifier + {191, &ACC_E::ActivateOpenContextHolder, "UpdateNotificationReceiverInfo"}, + {997, &ACC_E::DebugInvalidateTokenCacheForUser, "DebugInvalidateTokenCacheForUser"}, + {998, &ACC_E::DebugSetUserStateClose, "DebugSetUserStateClose"}, + {999, &ACC_E::DebugSetUserStateOpen, "DebugSetUserStateOpen"}, }; // clang-format on diff --git a/src/core/hle/service/acc/acc_e_u2.cpp b/src/core/hle/service/acc/acc_e_u2.cpp index a29ce9c45..0a7c7e2ae 100644 --- a/src/core/hle/service/acc/acc_e_u2.cpp +++ b/src/core/hle/service/acc/acc_e_u2.cpp @@ -16,38 +16,38 @@ ACC_E_U2::ACC_E_U2(std::shared_ptr module_, std::shared_ptr module_, std::shared_ptr {3, &ACC_SU::ListOpenUsers, "ListOpenUsers"}, {4, &ACC_SU::GetLastOpenedUser, "GetLastOpenedUser"}, {5, &ACC_SU::GetProfile, "GetProfile"}, - {6, nullptr, "GetProfileDigest"}, + {6, &ACC_SU::GetProfileDigest, "GetProfileDigest"}, {50, &ACC_SU::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"}, - {51, nullptr, "TrySelectUserWithoutInteractionDeprecated"}, // [1.0.0-18.1.0] + {51, &ACC_SU::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteractionDeprecated"}, // [1.0.0-18.1.0] {52, &ACC_SU::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"}, // [19.0.0+] {60, &ACC_SU::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"}, - {99, nullptr, "DebugActivateOpenContextRetention"}, - {100, nullptr, "GetUserRegistrationNotifier"}, - {101, nullptr, "GetUserStateChangeNotifier"}, + {99, &ACC_SU::DebugActivateOpenContextRetention, "DebugActivateOpenContextRetention"}, + {100, &ACC_SU::GetUserRegistrationNotifier, "GetUserRegistrationNotifier"}, + {101, &ACC_SU::GetUserStateChangeNotifier, "GetUserStateChangeNotifier"}, {102, &ACC_SU::GetBaasAccountManagerForSystemService, "GetBaasAccountManagerForSystemService"}, - {103, nullptr, "GetBaasUserAvailabilityChangeNotifier"}, - {104, nullptr, "GetProfileUpdateNotifier"}, - {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, - {106, nullptr, "GetProfileSyncNotifier"}, + {103, &ACC_SU::GetBaasUserAvailabilityChangeNotifier, "GetBaasUserAvailabilityChangeNotifier"}, + {104, &ACC_SU::GetProfileUpdateNotifier, "GetProfileUpdateNotifier"}, + {105, &ACC_SU::CheckNetworkServiceAvailabilityAsync, "CheckNetworkServiceAvailabilityAsync"}, + {106, &ACC_SU::GetProfileSyncNotifier, "GetProfileSyncNotifier"}, {110, &ACC_SU::StoreSaveDataThumbnailSystem, "StoreSaveDataThumbnail"}, - {111, nullptr, "ClearSaveDataThumbnail"}, - {112, nullptr, "LoadSaveDataThumbnail"}, - {113, nullptr, "GetSaveDataThumbnailExistence"}, - {120, nullptr, "ListOpenUsersInApplication"}, - {130, nullptr, "ActivateOpenContextRetention"}, + {111, &ACC_SU::ClearSaveDataThumbnail, "ClearSaveDataThumbnail"}, + {112, &ACC_SU::LoadSaveDataThumbnail, "LoadSaveDataThumbnail"}, + {113, &ACC_SU::GetSaveDataThumbnailExistence, "GetSaveDataThumbnailExistence"}, + {120, &ACC_SU::ListOpenUsersInApplication, "ListOpenUsersInApplication"}, + {130, &ACC_SU::ActivateOpenContextRetention, "ActivateOpenContextRetention"}, {140, &ACC_SU::ListQualifiedUsers, "ListQualifiedUsers"}, - {150, nullptr, "AuthenticateApplicationAsync"}, - {151, nullptr, "EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync"}, - {152, nullptr, "LoadSignedDeviceIdentifierCacheForNintendoAccount"}, - {190, nullptr, "GetUserLastOpenedApplication"}, - {191, nullptr, "ActivateOpenContextHolder"}, + {150, &ACC_SU::AuthenticateApplicationAsync, "AuthenticateApplicationAsync"}, + {151, &ACC_SU::EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync, "EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync"}, + {152, &ACC_SU::LoadSignedDeviceIdentifierCacheForNintendoAccount, "LoadSignedDeviceIdentifierCacheForNintendoAccount"}, + {190, &ACC_SU::GetUserLastOpenedApplication, "GetUserLastOpenedApplication"}, + {191, &ACC_SU::ActivateOpenContextHolder, "ActivateOpenContextHolder"}, {200, &ACC_SU::BeginUserRegistration, "BeginUserRegistration"}, {201, &ACC_SU::CompleteUserRegistration, "CompleteUserRegistration"}, - {202, nullptr, "CancelUserRegistration"}, - {203, nullptr, "DeleteUser"}, - {204, nullptr, "SetUserPosition"}, + {202, &ACC_SU::CancelUserRegistration, "CancelUserRegistration"}, + {203, &ACC_SU::DeleteUser, "DeleteUser"}, + {204, &ACC_SU::SetUserPosition, "SetUserPosition"}, {205, &ACC_SU::GetProfileEditor, "GetProfileEditor"}, - {206, nullptr, "CompleteUserRegistrationForcibly"}, - {210, nullptr, "CreateFloatingRegistrationRequest"}, - {211, nullptr, "CreateProcedureToRegisterUserWithNintendoAccount"}, - {212, nullptr, "ResumeProcedureToRegisterUserWithNintendoAccount"}, - {213, nullptr, "CreateProcedureToCreateUserWithNintendoAccount"}, // [17.0.0+] - {214, nullptr, "ResumeProcedureToCreateUserWithNintendoAccount"}, // [17.0.0+] - {215, nullptr, "ResumeProcedureToCreateUserWithNintendoAccountAfterApplyResponse"}, // [17.0.0+] - {230, nullptr, "AuthenticateServiceAsync"}, - {250, nullptr, "GetBaasAccountAdministrator"}, - {251, nullptr, "SynchronizeNetworkServiceAccountsSnapshotAsync"}, // [20.0.0+] - {290, nullptr, "ProxyProcedureForGuestLoginWithNintendoAccount"}, - {291, nullptr, "ProxyProcedureForFloatingRegistrationWithNintendoAccount"}, - {292, nullptr, "ProxyProcedureForDeviceMigrationAuthenticatingOperatingUser"}, // [20.0.0+] - {293, nullptr, "ProxyProcedureForDeviceMigrationDownload"}, // [20.0.0+] - {299, nullptr, "SuspendBackgroundDaemon"}, - {350, nullptr, "CreateDeviceMigrationUserExportRequest"}, // [20.0.0+] - {351, nullptr, "UploadNasCredential"}, // [20.0.0+] - {352, nullptr, "CreateDeviceMigrationUserImportRequest"}, // [20.0.0+] - {353, nullptr, "DeleteUserMigrationInfo"}, // [20.0.0+] - {900, nullptr, "SetUserUnqualifiedForDebug"}, - {901, nullptr, "UnsetUserUnqualifiedForDebug"}, - {902, nullptr, "ListUsersUnqualifiedForDebug"}, - {910, nullptr, "RefreshFirmwareSettingsForDebug"}, - {997, nullptr, "DebugInvalidateTokenCacheForUser"}, - {998, nullptr, "DebugSetUserStateClose"}, - {999, nullptr, "DebugSetUserStateOpen"}, + {206, &ACC_SU::CompleteUserRegistrationForcibly, "CompleteUserRegistrationForcibly"}, + {210, &ACC_SU::CreateFloatingRegistrationRequest, "CreateFloatingRegistrationRequest"}, + {211, &ACC_SU::CreateProcedureToRegisterUserWithNintendoAccount, "CreateProcedureToRegisterUserWithNintendoAccount"}, + {212, &ACC_SU::ResumeProcedureToRegisterUserWithNintendoAccount, "ResumeProcedureToRegisterUserWithNintendoAccount"}, + {213, &ACC_SU::CreateProcedureToCreateUserWithNintendoAccount, "CreateProcedureToCreateUserWithNintendoAccount"}, // [17.0.0+] + {214, &ACC_SU::ResumeProcedureToCreateUserWithNintendoAccount, "ResumeProcedureToCreateUserWithNintendoAccount"}, // [17.0.0+] + {215, &ACC_SU::ResumeProcedureToCreateUserWithNintendoAccountAfterApplyResponse, "ResumeProcedureToCreateUserWithNintendoAccountAfterApplyResponse"}, // [17.0.0+] + {230, &ACC_SU::AuthenticateServiceAsync, "AuthenticateServiceAsync"}, + {250, &ACC_SU::GetBaasAccountAdministrator, "GetBaasAccountAdministrator"}, + {251, &ACC_SU::SynchronizeNetworkServiceAccountsSnapshotAsync, "SynchronizeNetworkServiceAccountsSnapshotAsync"}, // [20.0.0+] + {290, &ACC_SU::ProxyProcedureForGuestLoginWithNintendoAccount, "ProxyProcedureForGuestLoginWithNintendoAccount"}, + {291, &ACC_SU::ProxyProcedureForFloatingRegistrationWithNintendoAccount, "ProxyProcedureForFloatingRegistrationWithNintendoAccount"}, + {292, &ACC_SU::ProxyProcedureForDeviceMigrationAuthenticatingOperatingUser, "ProxyProcedureForDeviceMigrationAuthenticatingOperatingUser"}, // [20.0.0+] + {293, &ACC_SU::ProxyProcedureForDeviceMigrationDownload, "ProxyProcedureForDeviceMigrationDownload"}, // [20.0.0+] + {299, &ACC_SU::SuspendBackgroundDaemon, "SuspendBackgroundDaemon"}, + {350, &ACC_SU::CreateDeviceMigrationUserExportRequest, "CreateDeviceMigrationUserExportRequest"}, // [20.0.0+] + {351, &ACC_SU::UploadNasCredential, "UploadNasCredential"}, // [20.0.0+] + {352, &ACC_SU::CreateDeviceMigrationUserImportRequest, "CreateDeviceMigrationUserImportRequest"}, // [20.0.0+] + {353, &ACC_SU::DeleteUserMigrationInfo, "DeleteUserMigrationInfo"}, // [20.0.0+] + {900, &ACC_SU::SetUserUnqualifiedForDebug, "SetUserUnqualifiedForDebug"}, + {901, &ACC_SU::UnsetUserUnqualifiedForDebug, "UnsetUserUnqualifiedForDebug"}, + {902, &ACC_SU::ListUsersUnqualifiedForDebug, "ListUsersUnqualifiedForDebug"}, + {910, &ACC_SU::RefreshFirmwareSettingsForDebug, "RefreshFirmwareSettingsForDebug"}, + {997, &ACC_SU::DebugInvalidateTokenCacheForUser, "DebugInvalidateTokenCacheForUser"}, + {998, &ACC_SU::DebugSetUserStateClose, "DebugSetUserStateClose"}, + {999, &ACC_SU::DebugSetUserStateOpen, "DebugSetUserStateOpen"}, }; // clang-format on diff --git a/src/core/hle/service/acc/acc_u1.cpp b/src/core/hle/service/acc/acc_u1.cpp index eecc94387..999d24b62 100644 --- a/src/core/hle/service/acc/acc_u1.cpp +++ b/src/core/hle/service/acc/acc_u1.cpp @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "core/hle/service/acc/acc_u1.h" @@ -16,33 +17,33 @@ ACC_U1::ACC_U1(std::shared_ptr module_, std::shared_ptr {3, &ACC_U1::ListOpenUsers, "ListOpenUsers"}, {4, &ACC_U1::GetLastOpenedUser, "GetLastOpenedUser"}, {5, &ACC_U1::GetProfile, "GetProfile"}, - {6, nullptr, "GetProfileDigest"}, + {6, &ACC_U1::GetProfileDigest, "GetProfileDigest"}, {50, &ACC_U1::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"}, {51, &ACC_U1::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"}, {60, &ACC_U1::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"}, - {99, nullptr, "DebugActivateOpenContextRetention"}, - {100, nullptr, "GetUserRegistrationNotifier"}, - {101, nullptr, "GetUserStateChangeNotifier"}, + {99, &ACC_U1::DebugActivateOpenContextRetention, "DebugActivateOpenContextRetention"}, + {100, &ACC_U1::GetUserRegistrationNotifier, "GetUserRegistrationNotifier"}, + {101, &ACC_U1::GetUserStateChangeNotifier, "GetUserStateChangeNotifier"}, {102, &ACC_U1::GetBaasAccountManagerForSystemService, "GetBaasAccountManagerForSystemService"}, - {103, nullptr, "GetBaasUserAvailabilityChangeNotifier"}, - {104, nullptr, "GetProfileUpdateNotifier"}, - {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, - {106, nullptr, "GetProfileSyncNotifier"}, + {103, &ACC_U1::GetBaasUserAvailabilityChangeNotifier, "GetBaasUserAvailabilityChangeNotifier"}, + {104, &ACC_U1::GetProfileUpdateNotifier, "GetProfileUpdateNotifier"}, + {105, &ACC_U1::CheckNetworkServiceAvailabilityAsync, "CheckNetworkServiceAvailabilityAsync"}, + {106, &ACC_U1::GetProfileSyncNotifier, "GetProfileSyncNotifier"}, {110, &ACC_U1::StoreSaveDataThumbnailApplication, "StoreSaveDataThumbnail"}, - {111, nullptr, "ClearSaveDataThumbnail"}, - {112, nullptr, "LoadSaveDataThumbnail"}, - {113, nullptr, "GetSaveDataThumbnailExistence"}, - {120, nullptr, "ListOpenUsersInApplication"}, - {130, nullptr, "ActivateOpenContextRetention"}, + {111, &ACC_U1::ClearSaveDataThumbnail, "ClearSaveDataThumbnail"}, + {112, &ACC_U1::LoadSaveDataThumbnail, "LoadSaveDataThumbnail"}, + {113, &ACC_U1::GetSaveDataThumbnailExistence, "GetSaveDataThumbnailExistence"}, + {120, &ACC_U1::ListOpenUsersInApplication, "ListOpenUsersInApplication"}, + {130, &ACC_U1::ActivateOpenContextRetention, "ActivateOpenContextRetention"}, {140, &ACC_U1::ListQualifiedUsers, "ListQualifiedUsers"}, - {150, nullptr, "AuthenticateApplicationAsync"}, - {151, nullptr, "EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync"}, - {152, nullptr, "LoadSignedDeviceIdentifierCacheForNintendoAccount"}, - {190, nullptr, "GetUserLastOpenedApplication"}, - {191, nullptr, "ActivateOpenContextHolder"}, - {997, nullptr, "DebugInvalidateTokenCacheForUser"}, - {998, nullptr, "DebugSetUserStateClose"}, - {999, nullptr, "DebugSetUserStateOpen"}, + {150, &ACC_U1::AuthenticateApplicationAsync, "AuthenticateApplicationAsync"}, + {151, &ACC_U1::EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync, "EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync"}, + {152, &ACC_U1::LoadSignedDeviceIdentifierCacheForNintendoAccount, "LoadSignedDeviceIdentifierCacheForNintendoAccount"}, + {190, &ACC_U1::GetUserLastOpenedApplication, "GetUserLastOpenedApplication"}, + {191, &ACC_U1::ActivateOpenContextHolder, "ActivateOpenContextHolder"}, + {997, &ACC_U1::DebugInvalidateTokenCacheForUser, "DebugInvalidateTokenCacheForUser"}, + {998, &ACC_U1::DebugSetUserStateClose, "DebugSetUserStateClose"}, + {999, &ACC_U1::DebugSetUserStateOpen, "DebugSetUserStateOpen"}, }; // clang-format on diff --git a/src/core/hle/service/ldn/client_process_monitor.cpp b/src/core/hle/service/ldn/client_process_monitor.cpp new file mode 100644 index 000000000..a3f8e938d --- /dev/null +++ b/src/core/hle/service/ldn/client_process_monitor.cpp @@ -0,0 +1,44 @@ +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "core/hle/service/cmif_serialization.h" +#include "core/hle/service/ldn/client_process_monitor.h" +#include "core/hle/service/ldn/ldn_results.h" + +// IClientProcessMonitor implementation +// This service was added in Nintendo Switch firmware version 18.0.0+ +// Documentation: https://switchbrew.org/wiki/LDN_services#IClientProcessMonitor + +namespace Service::LDN { + +IClientProcessMonitor::IClientProcessMonitor(Core::System& system_) + : ServiceFramework{system_, "IClientProcessMonitor"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, D<&IClientProcessMonitor::RegisterClient>, "RegisterClient"}, + }; + // clang-format on + + RegisterHandlers(functions); +} + +IClientProcessMonitor::~IClientProcessMonitor() = default; + +Result IClientProcessMonitor::RegisterClient(ClientProcessId process_id, u64 placeholder) { + // RegisterClient is invoked during the final stages of LDN initialization + // Official behavior (from SwitchBrew): + // 1. If object pointer already set from previous call, returns 0 + // 2. Searches for matching PID in global state + // 3. If found: increments reference count and updates state + // 4. If PID is 0 or no match found, returns 0 + // + // For emulator implementation: + // We stub this as LDN process monitoring isn't critical for basic functionality + // Games expect this to succeed for LDN features to work properly + + LOG_INFO(Service_LDN, "called, process_id={}, placeholder={}", process_id.pid, placeholder); + + R_SUCCEED(); +} + +} // namespace Service::LDN diff --git a/src/core/hle/service/ldn/client_process_monitor.h b/src/core/hle/service/ldn/client_process_monitor.h new file mode 100644 index 000000000..d9102136c --- /dev/null +++ b/src/core/hle/service/ldn/client_process_monitor.h @@ -0,0 +1,31 @@ +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +#include "core/hle/service/cmif_types.h" +#include "core/hle/service/service.h" + +namespace Core { +class System; +} + +namespace Service::LDN { + +// IClientProcessMonitor - Added in firmware 18.0.0+ +// Returned by CreateClientProcessMonitor command in ldn:s and ldn:u services +// Used during the final stages of LDN (Local Network) initialization +// Reference: https://switchbrew.org/wiki/LDN_services#IClientProcessMonitor +class IClientProcessMonitor final : public ServiceFramework { +public: + explicit IClientProcessMonitor(Core::System& system_); + ~IClientProcessMonitor() override; + +private: + // RegisterClient - Command 0 + // Input: ClientProcessId (PID), u64 placeholder + // Registers a client process for LDN monitoring and reference counting + Result RegisterClient(ClientProcessId process_id, u64 placeholder); +}; + +} // namespace Service::LDN diff --git a/src/core/hle/service/ldn/ldn.cpp b/src/core/hle/service/ldn/ldn.cpp index f2d638c30..0d16f0f58 100644 --- a/src/core/hle/service/ldn/ldn.cpp +++ b/src/core/hle/service/ldn/ldn.cpp @@ -1,8 +1,10 @@ // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "core/core.h" #include "core/hle/service/cmif_serialization.h" +#include "core/hle/service/ldn/client_process_monitor.h" #include "core/hle/service/ldn/ldn.h" #include "core/hle/service/ldn/monitor_service.h" #include "core/hle/service/ldn/sf_monitor_service.h" @@ -18,7 +20,7 @@ public: explicit IMonitorServiceCreator(Core::System& system_) : ServiceFramework{system_, "ldn:m"} { // clang-format off static const FunctionInfo functions[] = { - {0, C<&IMonitorServiceCreator::CreateMonitorService>, "CreateMonitorService"} + {0, D<&IMonitorServiceCreator::CreateMonitorService>, "CreateMonitorService"} }; // clang-format on @@ -40,6 +42,7 @@ public: // clang-format off static const FunctionInfo functions[] = { {0, C<&ISystemServiceCreator::CreateSystemLocalCommunicationService>, "CreateSystemLocalCommunicationService"}, + {1, C<&ISystemServiceCreator::CreateClientProcessMonitor>, "CreateClientProcessMonitor"}, // 18.0.0+ }; // clang-format on @@ -54,6 +57,13 @@ private: *out_interface = std::make_shared(system); R_SUCCEED(); } + + Result CreateClientProcessMonitor(OutInterface out_interface) { + LOG_DEBUG(Service_LDN, "called"); + + *out_interface = std::make_shared(system); + R_SUCCEED(); + } }; class IUserServiceCreator final : public ServiceFramework { @@ -61,7 +71,8 @@ public: explicit IUserServiceCreator(Core::System& system_) : ServiceFramework{system_, "ldn:u"} { // clang-format off static const FunctionInfo functions[] = { - {0, C<&IUserServiceCreator::CreateUserLocalCommunicationService>, "CreateUserLocalCommunicationService"}, + {0, D<&IUserServiceCreator::CreateUserLocalCommunicationService>, "CreateUserLocalCommunicationService"}, + {1, D<&IUserServiceCreator::CreateClientProcessMonitor>, "CreateClientProcessMonitor"}, // 18.0.0+ }; // clang-format on @@ -76,6 +87,13 @@ private: *out_interface = std::make_shared(system); R_SUCCEED(); } + + Result CreateClientProcessMonitor(OutInterface out_interface) { + LOG_DEBUG(Service_LDN, "called"); + + *out_interface = std::make_shared(system); + R_SUCCEED(); + } }; class ISfServiceCreator final : public ServiceFramework { @@ -84,8 +102,8 @@ public: : ServiceFramework{system_, name_}, is_system{is_system_} { // clang-format off static const FunctionInfo functions[] = { - {0, C<&ISfServiceCreator::CreateNetworkService>, "CreateNetworkService"}, - {8, C<&ISfServiceCreator::CreateNetworkServiceMonitor>, "CreateNetworkServiceMonitor"}, + {0, D<&ISfServiceCreator::CreateNetworkService>, "CreateNetworkService"}, + {8, D<&ISfServiceCreator::CreateNetworkServiceMonitor>, "CreateNetworkServiceMonitor"}, }; // clang-format on @@ -118,7 +136,7 @@ public: explicit ISfMonitorServiceCreator(Core::System& system_) : ServiceFramework{system_, "lp2p:m"} { // clang-format off static const FunctionInfo functions[] = { - {0, C<&ISfMonitorServiceCreator::CreateMonitorService>, "CreateMonitorService"}, + {0, D<&ISfMonitorServiceCreator::CreateMonitorService>, "CreateMonitorService"}, }; // clang-format on diff --git a/src/core/hle/service/ldn/monitor_service.cpp b/src/core/hle/service/ldn/monitor_service.cpp index ea6ac4d5d..4436f310d 100644 --- a/src/core/hle/service/ldn/monitor_service.cpp +++ b/src/core/hle/service/ldn/monitor_service.cpp @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #include "core/hle/service/cmif_serialization.h" @@ -11,14 +12,14 @@ IMonitorService::IMonitorService(Core::System& system_) : ServiceFramework{system_, "IMonitorService"} { // clang-format off static const FunctionInfo functions[] = { - {0, C<&IMonitorService::GetStateForMonitor>, "GetStateForMonitor"}, - {1, nullptr, "GetNetworkInfoForMonitor"}, - {2, nullptr, "GetIpv4AddressForMonitor"}, - {3, nullptr, "GetDisconnectReasonForMonitor"}, - {4, nullptr, "GetSecurityParameterForMonitor"}, - {5, nullptr, "GetNetworkConfigForMonitor"}, - {100, C<&IMonitorService::InitializeMonitor>, "InitializeMonitor"}, - {101, C<&IMonitorService::FinalizeMonitor>, "FinalizeMonitor"}, + {0, D<&IMonitorService::GetStateForMonitor>, "GetStateForMonitor"}, + {1, D<&IMonitorService::GetNetworkInfoForMonitor>, "GetNetworkInfoForMonitor"}, + {2, D<&IMonitorService::GetIpv4AddressForMonitor>, "GetIpv4AddressForMonitor"}, + {3, D<&IMonitorService::GetDisconnectReasonForMonitor>, "GetDisconnectReasonForMonitor"}, + {4, D<&IMonitorService::GetSecurityParameterForMonitor>, "GetSecurityParameterForMonitor"}, + {5, D<&IMonitorService::GetNetworkConfigForMonitor>, "GetNetworkConfigForMonitor"}, + {100, D<&IMonitorService::InitializeMonitor>, "InitializeMonitor"}, + {101, D<&IMonitorService::FinalizeMonitor>, "FinalizeMonitor"}, }; // clang-format on @@ -33,6 +34,37 @@ Result IMonitorService::GetStateForMonitor(Out out_state) { R_SUCCEED(); } +Result IMonitorService::GetNetworkInfoForMonitor(OutLargeData out_network_info) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_network_info = NetworkInfo{}; + R_SUCCEED(); +} + +Result IMonitorService::GetIpv4AddressForMonitor(Out out_address, Out out_subnet_mask) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_address = Ipv4Address{0, 0, 0, 0}; + *out_subnet_mask = Ipv4Address{255, 255, 255, 0}; + R_SUCCEED(); +} + +Result IMonitorService::GetDisconnectReasonForMonitor(Out out_disconnect_reason) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_disconnect_reason = DisconnectReason::None; + R_SUCCEED(); +} + +Result IMonitorService::GetSecurityParameterForMonitor(Out out_security_parameter) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_security_parameter = SecurityParameter{}; + R_SUCCEED(); +} + +Result IMonitorService::GetNetworkConfigForMonitor(Out out_network_config) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_network_config = NetworkConfig{}; + R_SUCCEED(); +} + Result IMonitorService::InitializeMonitor() { LOG_INFO(Service_LDN, "called"); R_SUCCEED(); diff --git a/src/core/hle/service/ldn/monitor_service.h b/src/core/hle/service/ldn/monitor_service.h index e663145b4..c3752892a 100644 --- a/src/core/hle/service/ldn/monitor_service.h +++ b/src/core/hle/service/ldn/monitor_service.h @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #pragma once @@ -20,6 +21,11 @@ public: private: Result GetStateForMonitor(Out out_state); + Result GetNetworkInfoForMonitor(OutLargeData out_network_info); + Result GetIpv4AddressForMonitor(Out out_address, Out out_subnet_mask); + Result GetDisconnectReasonForMonitor(Out out_disconnect_reason); + Result GetSecurityParameterForMonitor(Out out_security_parameter); + Result GetNetworkConfigForMonitor(Out out_network_config); Result InitializeMonitor(); Result FinalizeMonitor(); diff --git a/src/core/hle/service/ldn/sf_monitor_service.cpp b/src/core/hle/service/ldn/sf_monitor_service.cpp index 9e6736ff2..df1396f6e 100644 --- a/src/core/hle/service/ldn/sf_monitor_service.cpp +++ b/src/core/hle/service/ldn/sf_monitor_service.cpp @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #include "core/hle/service/cmif_serialization.h" @@ -11,9 +12,9 @@ ISfMonitorService::ISfMonitorService(Core::System& system_) : ServiceFramework{system_, "ISfMonitorService"} { // clang-format off static const FunctionInfo functions[] = { - {0, C<&ISfMonitorService::Initialize>, "Initialize"}, - {288, C<&ISfMonitorService::GetGroupInfo>, "GetGroupInfo"}, - {320, nullptr, "GetLinkLevel"}, + {0, D<&ISfMonitorService::Initialize>, "Initialize"}, + {288, D<&ISfMonitorService::GetGroupInfo>, "GetGroupInfo"}, + {320, D<&ISfMonitorService::GetLinkLevel>, "GetLinkLevel"}, }; // clang-format on @@ -24,17 +25,20 @@ ISfMonitorService::~ISfMonitorService() = default; Result ISfMonitorService::Initialize(Out out_value) { LOG_WARNING(Service_LDN, "(STUBBED) called"); - *out_value = 0; R_SUCCEED(); } -Result ISfMonitorService::GetGroupInfo( - OutLargeData out_group_info) { +Result ISfMonitorService::GetGroupInfo(OutLargeData out_group_info) { LOG_WARNING(Service_LDN, "(STUBBED) called"); - *out_group_info = GroupInfo{}; R_SUCCEED(); } +Result ISfMonitorService::GetLinkLevel(Out out_link_level) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_link_level = 0; + R_SUCCEED(); +} + } // namespace Service::LDN diff --git a/src/core/hle/service/ldn/sf_monitor_service.h b/src/core/hle/service/ldn/sf_monitor_service.h index d02115201..23d5d5fa2 100644 --- a/src/core/hle/service/ldn/sf_monitor_service.h +++ b/src/core/hle/service/ldn/sf_monitor_service.h @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #pragma once @@ -21,6 +22,7 @@ public: private: Result Initialize(Out out_value); Result GetGroupInfo(OutLargeData out_group_info); + Result GetLinkLevel(Out out_link_level); }; } // namespace Service::LDN diff --git a/src/core/hle/service/ldn/sf_service.cpp b/src/core/hle/service/ldn/sf_service.cpp index 61cabe219..03ed5aa10 100644 --- a/src/core/hle/service/ldn/sf_service.cpp +++ b/src/core/hle/service/ldn/sf_service.cpp @@ -1,6 +1,8 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later +#include "core/hle/service/cmif_serialization.h" #include "core/hle/service/ldn/sf_service.h" namespace Service::LDN { @@ -8,24 +10,24 @@ namespace Service::LDN { ISfService::ISfService(Core::System& system_) : ServiceFramework{system_, "ISfService"} { // clang-format off static const FunctionInfo functions[] = { - {0, nullptr, "Initialize"}, - {256, nullptr, "AttachNetworkInterfaceStateChangeEvent"}, - {264, nullptr, "GetNetworkInterfaceLastError"}, - {272, nullptr, "GetRole"}, - {280, nullptr, "GetAdvertiseData"}, - {288, nullptr, "GetGroupInfo"}, - {296, nullptr, "GetGroupInfo2"}, - {304, nullptr, "GetGroupOwner"}, - {312, nullptr, "GetIpConfig"}, - {320, nullptr, "GetLinkLevel"}, - {512, nullptr, "Scan"}, - {768, nullptr, "CreateGroup"}, - {776, nullptr, "DestroyGroup"}, - {784, nullptr, "SetAdvertiseData"}, - {1536, nullptr, "SendToOtherGroup"}, - {1544, nullptr, "RecvFromOtherGroup"}, - {1552, nullptr, "AddAcceptableGroupId"}, - {1560, nullptr, "ClearAcceptableGroupId"}, + {0, D<&ISfService::Initialize>, "Initialize"}, + {256, D<&ISfService::AttachNetworkInterfaceStateChangeEvent>, "AttachNetworkInterfaceStateChangeEvent"}, + {264, D<&ISfService::GetNetworkInterfaceLastError>, "GetNetworkInterfaceLastError"}, + {272, D<&ISfService::GetRole>, "GetRole"}, + {280, D<&ISfService::GetAdvertiseData>, "GetAdvertiseData"}, + {288, D<&ISfService::GetGroupInfo>, "GetGroupInfo"}, + {296, D<&ISfService::GetGroupInfo2>, "GetGroupInfo2"}, + {304, D<&ISfService::GetGroupOwner>, "GetGroupOwner"}, + {312, D<&ISfService::GetIpConfig>, "GetIpConfig"}, + {320, D<&ISfService::GetLinkLevel>, "GetLinkLevel"}, + {512, D<&ISfService::Scan>, "Scan"}, + {768, D<&ISfService::CreateGroup>, "CreateGroup"}, + {776, D<&ISfService::DestroyGroup>, "DestroyGroup"}, + {784, D<&ISfService::SetAdvertiseData>, "SetAdvertiseData"}, + {1536, D<&ISfService::SendToOtherGroup>, "SendToOtherGroup"}, + {1544, D<&ISfService::RecvFromOtherGroup>, "RecvFromOtherGroup"}, + {1552, D<&ISfService::AddAcceptableGroupId>, "AddAcceptableGroupId"}, + {1560, D<&ISfService::ClearAcceptableGroupId>, "ClearAcceptableGroupId"}, }; // clang-format on @@ -34,4 +36,106 @@ ISfService::ISfService(Core::System& system_) : ServiceFramework{system_, "ISfSe ISfService::~ISfService() = default; +Result ISfService::Initialize(Out out_value) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_value = 0; + R_SUCCEED(); +} + +Result ISfService::AttachNetworkInterfaceStateChangeEvent(OutCopyHandle out_event) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISfService::GetNetworkInterfaceLastError(Out out_error) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_error = 0; + R_SUCCEED(); +} + +Result ISfService::GetRole(Out out_role) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_role = 0; + R_SUCCEED(); +} + +Result ISfService::GetAdvertiseData(OutBuffer out_buffer) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISfService::GetGroupInfo(OutLargeData out_group_info) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_group_info = GroupInfo{}; + R_SUCCEED(); +} + +Result ISfService::GetGroupInfo2(OutLargeData out_group_info) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_group_info = GroupInfo{}; + R_SUCCEED(); +} + +Result ISfService::GetGroupOwner(Out out_mac_address) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_mac_address = MacAddress{}; + R_SUCCEED(); +} + +Result ISfService::GetIpConfig(Out out_address, Out out_subnet_mask) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_address = Ipv4Address{0, 0, 0, 0}; + *out_subnet_mask = Ipv4Address{255, 255, 255, 0}; + R_SUCCEED(); +} + +Result ISfService::GetLinkLevel(Out out_link_level) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_link_level = 0; + R_SUCCEED(); +} + +Result ISfService::Scan(Out out_count, u32 channel, + OutArray out_network_info) { + LOG_WARNING(Service_LDN, "(STUBBED) called, channel={}", channel); + *out_count = 0; + R_SUCCEED(); +} + +Result ISfService::CreateGroup(const GroupInfo& group_info) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISfService::DestroyGroup() { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISfService::SetAdvertiseData(InBuffer buffer_data) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISfService::SendToOtherGroup(InBuffer buffer_data, u64 group_id) { + LOG_WARNING(Service_LDN, "(STUBBED) called, group_id={:016X}", group_id); + R_SUCCEED(); +} + +Result ISfService::RecvFromOtherGroup(Out out_size, OutBuffer out_buffer) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_size = 0; + R_SUCCEED(); +} + +Result ISfService::AddAcceptableGroupId(u64 group_id) { + LOG_WARNING(Service_LDN, "(STUBBED) called, group_id={:016X}", group_id); + R_SUCCEED(); +} + +Result ISfService::ClearAcceptableGroupId() { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + } // namespace Service::LDN diff --git a/src/core/hle/service/ldn/sf_service.h b/src/core/hle/service/ldn/sf_service.h index 05534b567..7227b05c0 100644 --- a/src/core/hle/service/ldn/sf_service.h +++ b/src/core/hle/service/ldn/sf_service.h @@ -1,21 +1,47 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include "core/hle/service/cmif_types.h" +#include "core/hle/service/ldn/ldn_types.h" #include "core/hle/service/service.h" namespace Core { class System; } +namespace Kernel { +class KReadableEvent; +} + namespace Service::LDN { class ISfService final : public ServiceFramework { public: explicit ISfService(Core::System& system_); ~ISfService() override; + +private: + Result Initialize(Out out_value); + Result AttachNetworkInterfaceStateChangeEvent(OutCopyHandle out_event); + Result GetNetworkInterfaceLastError(Out out_error); + Result GetRole(Out out_role); + Result GetAdvertiseData(OutBuffer out_buffer); + Result GetGroupInfo(OutLargeData out_group_info); + Result GetGroupInfo2(OutLargeData out_group_info); + Result GetGroupOwner(Out out_mac_address); + Result GetIpConfig(Out out_address, Out out_subnet_mask); + Result GetLinkLevel(Out out_link_level); + Result Scan(Out out_count, u32 channel, OutArray out_network_info); + Result CreateGroup(const GroupInfo& group_info); + Result DestroyGroup(); + Result SetAdvertiseData(InBuffer buffer_data); + Result SendToOtherGroup(InBuffer buffer_data, u64 group_id); + Result RecvFromOtherGroup(Out out_size, OutBuffer out_buffer); + Result AddAcceptableGroupId(u64 group_id); + Result ClearAcceptableGroupId(); }; } // namespace Service::LDN diff --git a/src/core/hle/service/ldn/sf_service_monitor.cpp b/src/core/hle/service/ldn/sf_service_monitor.cpp index 33e3c1d69..0860969b8 100644 --- a/src/core/hle/service/ldn/sf_service_monitor.cpp +++ b/src/core/hle/service/ldn/sf_service_monitor.cpp @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #include "core/hle/service/cmif_serialization.h" @@ -11,19 +12,19 @@ ISfServiceMonitor::ISfServiceMonitor(Core::System& system_) : ServiceFramework{system_, "ISfServiceMonitor"} { // clang-format off static const FunctionInfo functions[] = { - {0, C<&ISfServiceMonitor::Initialize>, "Initialize"}, - {256, nullptr, "AttachNetworkInterfaceStateChangeEvent"}, - {264, nullptr, "GetNetworkInterfaceLastError"}, - {272, nullptr, "GetRole"}, - {280, nullptr, "GetAdvertiseData"}, - {281, nullptr, "GetAdvertiseData2"}, - {288, C<&ISfServiceMonitor::GetGroupInfo>, "GetGroupInfo"}, - {296, nullptr, "GetGroupInfo2"}, - {304, nullptr, "GetGroupOwner"}, - {312, nullptr, "GetIpConfig"}, - {320, nullptr, "GetLinkLevel"}, - {328, nullptr, "AttachJoinEvent"}, - {336, nullptr, "GetMembers"}, + {0, D<&ISfServiceMonitor::Initialize>, "Initialize"}, + {256, D<&ISfServiceMonitor::AttachNetworkInterfaceStateChangeEvent>, "AttachNetworkInterfaceStateChangeEvent"}, + {264, D<&ISfServiceMonitor::GetNetworkInterfaceLastError>, "GetNetworkInterfaceLastError"}, + {272, D<&ISfServiceMonitor::GetRole>, "GetRole"}, + {280, D<&ISfServiceMonitor::GetAdvertiseData>, "GetAdvertiseData"}, + {281, D<&ISfServiceMonitor::GetAdvertiseData2>, "GetAdvertiseData2"}, + {288, D<&ISfServiceMonitor::GetGroupInfo>, "GetGroupInfo"}, + {296, D<&ISfServiceMonitor::GetGroupInfo2>, "GetGroupInfo2"}, + {304, D<&ISfServiceMonitor::GetGroupOwner>, "GetGroupOwner"}, + {312, D<&ISfServiceMonitor::GetIpConfig>, "GetIpConfig"}, + {320, D<&ISfServiceMonitor::GetLinkLevel>, "GetLinkLevel"}, + {328, D<&ISfServiceMonitor::AttachJoinEvent>, "AttachJoinEvent"}, + {336, D<&ISfServiceMonitor::GetMembers>, "GetMembers"}, }; // clang-format on @@ -34,17 +35,77 @@ ISfServiceMonitor::~ISfServiceMonitor() = default; Result ISfServiceMonitor::Initialize(Out out_value) { LOG_WARNING(Service_LDN, "(STUBBED) called"); - *out_value = 0; R_SUCCEED(); } -Result ISfServiceMonitor::GetGroupInfo( - OutLargeData out_group_info) { +Result ISfServiceMonitor::AttachNetworkInterfaceStateChangeEvent(OutCopyHandle out_event) { LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} +Result ISfServiceMonitor::GetNetworkInterfaceLastError(Out out_error) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_error = 0; + R_SUCCEED(); +} + +Result ISfServiceMonitor::GetRole(Out out_role) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_role = 0; + R_SUCCEED(); +} + +Result ISfServiceMonitor::GetAdvertiseData(OutBuffer out_buffer) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISfServiceMonitor::GetAdvertiseData2(OutBuffer out_buffer) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISfServiceMonitor::GetGroupInfo(OutLargeData out_group_info) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); *out_group_info = GroupInfo{}; R_SUCCEED(); } +Result ISfServiceMonitor::GetGroupInfo2(OutLargeData out_group_info) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_group_info = GroupInfo{}; + R_SUCCEED(); +} + +Result ISfServiceMonitor::GetGroupOwner(Out out_mac_address) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_mac_address = MacAddress{}; + R_SUCCEED(); +} + +Result ISfServiceMonitor::GetIpConfig(Out out_address, Out out_subnet_mask) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_address = Ipv4Address{0, 0, 0, 0}; + *out_subnet_mask = Ipv4Address{255, 255, 255, 0}; + R_SUCCEED(); +} + +Result ISfServiceMonitor::GetLinkLevel(Out out_link_level) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_link_level = 0; + R_SUCCEED(); +} + +Result ISfServiceMonitor::AttachJoinEvent(OutCopyHandle out_event) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISfServiceMonitor::GetMembers(Out out_count, OutArray out_members) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_count = 0; + R_SUCCEED(); +} + } // namespace Service::LDN diff --git a/src/core/hle/service/ldn/sf_service_monitor.h b/src/core/hle/service/ldn/sf_service_monitor.h index 3cfc5005e..249e913ab 100644 --- a/src/core/hle/service/ldn/sf_service_monitor.h +++ b/src/core/hle/service/ldn/sf_service_monitor.h @@ -1,15 +1,21 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include "core/hle/service/cmif_types.h" +#include "core/hle/service/ldn/ldn_types.h" #include "core/hle/service/service.h" namespace Core { class System; } +namespace Kernel { +class KReadableEvent; +} + namespace Service::LDN { struct GroupInfo; @@ -20,7 +26,18 @@ public: private: Result Initialize(Out out_value); + Result AttachNetworkInterfaceStateChangeEvent(OutCopyHandle out_event); + Result GetNetworkInterfaceLastError(Out out_error); + Result GetRole(Out out_role); + Result GetAdvertiseData(OutBuffer out_buffer); + Result GetAdvertiseData2(OutBuffer out_buffer); Result GetGroupInfo(OutLargeData out_group_info); + Result GetGroupInfo2(OutLargeData out_group_info); + Result GetGroupOwner(Out out_mac_address); + Result GetIpConfig(Out out_address, Out out_subnet_mask); + Result GetLinkLevel(Out out_link_level); + Result AttachJoinEvent(OutCopyHandle out_event); + Result GetMembers(Out out_count, OutArray out_members); }; } // namespace Service::LDN diff --git a/src/core/hle/service/ldn/system_local_communication_service.cpp b/src/core/hle/service/ldn/system_local_communication_service.cpp index 7b52223cd..0d44f6004 100644 --- a/src/core/hle/service/ldn/system_local_communication_service.cpp +++ b/src/core/hle/service/ldn/system_local_communication_service.cpp @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #include "core/hle/service/cmif_serialization.h" @@ -10,36 +11,36 @@ ISystemLocalCommunicationService::ISystemLocalCommunicationService(Core::System& : ServiceFramework{system_, "ISystemLocalCommunicationService"} { // clang-format off static const FunctionInfo functions[] = { - {0, nullptr, "GetState"}, - {1, nullptr, "GetNetworkInfo"}, - {2, nullptr, "GetIpv4Address"}, - {3, nullptr, "GetDisconnectReason"}, - {4, nullptr, "GetSecurityParameter"}, - {5, nullptr, "GetNetworkConfig"}, - {100, nullptr, "AttachStateChangeEvent"}, - {101, nullptr, "GetNetworkInfoLatestUpdate"}, - {102, nullptr, "Scan"}, - {103, nullptr, "ScanPrivate"}, - {104, nullptr, "SetWirelessControllerRestriction"}, - {200, nullptr, "OpenAccessPoint"}, - {201, nullptr, "CloseAccessPoint"}, - {202, nullptr, "CreateNetwork"}, - {203, nullptr, "CreateNetworkPrivate"}, - {204, nullptr, "DestroyNetwork"}, - {205, nullptr, "Reject"}, - {206, nullptr, "SetAdvertiseData"}, - {207, nullptr, "SetStationAcceptPolicy"}, - {208, nullptr, "AddAcceptFilterEntry"}, - {209, nullptr, "ClearAcceptFilter"}, - {300, nullptr, "OpenStation"}, - {301, nullptr, "CloseStation"}, - {302, nullptr, "Connect"}, - {303, nullptr, "ConnectPrivate"}, - {304, nullptr, "Disconnect"}, - {400, nullptr, "InitializeSystem"}, - {401, nullptr, "FinalizeSystem"}, - {402, nullptr, "SetOperationMode"}, - {403, C<&ISystemLocalCommunicationService::InitializeSystem2>, "InitializeSystem2"}, + {0, D<&ISystemLocalCommunicationService::GetState>, "GetState"}, + {1, D<&ISystemLocalCommunicationService::GetNetworkInfo>, "GetNetworkInfo"}, + {2, D<&ISystemLocalCommunicationService::GetIpv4Address>, "GetIpv4Address"}, + {3, D<&ISystemLocalCommunicationService::GetDisconnectReason>, "GetDisconnectReason"}, + {4, D<&ISystemLocalCommunicationService::GetSecurityParameter>, "GetSecurityParameter"}, + {5, D<&ISystemLocalCommunicationService::GetNetworkConfig>, "GetNetworkConfig"}, + {100, D<&ISystemLocalCommunicationService::AttachStateChangeEvent>, "AttachStateChangeEvent"}, + {101, D<&ISystemLocalCommunicationService::GetNetworkInfoLatestUpdate>, "GetNetworkInfoLatestUpdate"}, + {102, D<&ISystemLocalCommunicationService::Scan>, "Scan"}, + {103, D<&ISystemLocalCommunicationService::ScanPrivate>, "ScanPrivate"}, + {104, D<&ISystemLocalCommunicationService::SetWirelessControllerRestriction>, "SetWirelessControllerRestriction"}, + {200, D<&ISystemLocalCommunicationService::OpenAccessPoint>, "OpenAccessPoint"}, + {201, D<&ISystemLocalCommunicationService::CloseAccessPoint>, "CloseAccessPoint"}, + {202, D<&ISystemLocalCommunicationService::CreateNetwork>, "CreateNetwork"}, + {203, D<&ISystemLocalCommunicationService::CreateNetworkPrivate>, "CreateNetworkPrivate"}, + {204, D<&ISystemLocalCommunicationService::DestroyNetwork>, "DestroyNetwork"}, + {205, D<&ISystemLocalCommunicationService::Reject>, "Reject"}, + {206, D<&ISystemLocalCommunicationService::SetAdvertiseData>, "SetAdvertiseData"}, + {207, D<&ISystemLocalCommunicationService::SetStationAcceptPolicy>, "SetStationAcceptPolicy"}, + {208, D<&ISystemLocalCommunicationService::AddAcceptFilterEntry>, "AddAcceptFilterEntry"}, + {209, D<&ISystemLocalCommunicationService::ClearAcceptFilter>, "ClearAcceptFilter"}, + {300, D<&ISystemLocalCommunicationService::OpenStation>, "OpenStation"}, + {301, D<&ISystemLocalCommunicationService::CloseStation>, "CloseStation"}, + {302, D<&ISystemLocalCommunicationService::Connect>, "Connect"}, + {303, D<&ISystemLocalCommunicationService::ConnectPrivate>, "ConnectPrivate"}, + {304, D<&ISystemLocalCommunicationService::Disconnect>, "Disconnect"}, + {400, D<&ISystemLocalCommunicationService::InitializeSystem>, "InitializeSystem"}, + {401, D<&ISystemLocalCommunicationService::FinalizeSystem>, "FinalizeSystem"}, + {402, D<&ISystemLocalCommunicationService::SetOperationMode>, "SetOperationMode"}, + {403, D<&ISystemLocalCommunicationService::InitializeSystem2>, "InitializeSystem2"}, }; // clang-format on @@ -48,6 +49,170 @@ ISystemLocalCommunicationService::ISystemLocalCommunicationService(Core::System& ISystemLocalCommunicationService::~ISystemLocalCommunicationService() = default; +Result ISystemLocalCommunicationService::GetState(Out out_state) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_state = State::None; + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::GetNetworkInfo(OutLargeData out_network_info) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_network_info = NetworkInfo{}; + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::GetIpv4Address(Out out_address, Out out_subnet_mask) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_address = Ipv4Address{0, 0, 0, 0}; + *out_subnet_mask = Ipv4Address{255, 255, 255, 0}; + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::GetDisconnectReason(Out out_disconnect_reason) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_disconnect_reason = DisconnectReason::None; + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::GetSecurityParameter(Out out_security_parameter) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_security_parameter = SecurityParameter{}; + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::GetNetworkConfig(Out out_network_config) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_network_config = NetworkConfig{}; + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::AttachStateChangeEvent(OutCopyHandle out_event) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::GetNetworkInfoLatestUpdate( + OutLargeData out_network_info, + OutArray out_node_latest_update) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + *out_network_info = NetworkInfo{}; + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::Scan(Out network_count, WifiChannel channel, + const ScanFilter& scan_filter, + OutArray out_network_info) { + LOG_WARNING(Service_LDN, "(STUBBED) called, channel={}", channel); + *network_count = 0; + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::ScanPrivate(Out network_count, WifiChannel channel, + const ScanFilter& scan_filter, + OutArray out_network_info) { + LOG_WARNING(Service_LDN, "(STUBBED) called, channel={}", channel); + *network_count = 0; + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::SetWirelessControllerRestriction(WirelessControllerRestriction wireless_restriction) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::OpenAccessPoint() { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::CloseAccessPoint() { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::CreateNetwork(const CreateNetworkConfig& create_config) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::CreateNetworkPrivate(const CreateNetworkConfigPrivate& create_config, + InArray address_list) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::DestroyNetwork() { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::Reject() { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::SetAdvertiseData(InBuffer buffer_data) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::SetStationAcceptPolicy(AcceptPolicy accept_policy) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::AddAcceptFilterEntry(MacAddress mac_address) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::ClearAcceptFilter() { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::OpenStation() { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::CloseStation() { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::Connect(const ConnectNetworkData& connect_data, + InLargeData network_info) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::ConnectPrivate(const ConnectNetworkData& connect_data, + InLargeData network_info) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::Disconnect() { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::InitializeSystem(ClientProcessId aruid) { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::FinalizeSystem() { + LOG_WARNING(Service_LDN, "(STUBBED) called"); + R_SUCCEED(); +} + +Result ISystemLocalCommunicationService::SetOperationMode(u32 mode) { + LOG_WARNING(Service_LDN, "(STUBBED) called, mode={}", mode); + R_SUCCEED(); +} + Result ISystemLocalCommunicationService::InitializeSystem2() { LOG_WARNING(Service_LDN, "(STUBBED) called"); R_SUCCEED(); diff --git a/src/core/hle/service/ldn/system_local_communication_service.h b/src/core/hle/service/ldn/system_local_communication_service.h index a02b097ea..ead4d73c1 100644 --- a/src/core/hle/service/ldn/system_local_communication_service.h +++ b/src/core/hle/service/ldn/system_local_communication_service.h @@ -1,15 +1,21 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include "core/hle/service/cmif_types.h" +#include "core/hle/service/ldn/ldn_types.h" #include "core/hle/service/service.h" namespace Core { class System; } +namespace Kernel { +class KReadableEvent; +} + namespace Service::LDN { class ISystemLocalCommunicationService final @@ -19,6 +25,41 @@ public: ~ISystemLocalCommunicationService() override; private: + Result GetState(Out out_state); + Result GetNetworkInfo(OutLargeData out_network_info); + Result GetIpv4Address(Out out_address, Out out_subnet_mask); + Result GetDisconnectReason(Out out_disconnect_reason); + Result GetSecurityParameter(Out out_security_parameter); + Result GetNetworkConfig(Out out_network_config); + Result AttachStateChangeEvent(OutCopyHandle out_event); + Result GetNetworkInfoLatestUpdate(OutLargeData out_network_info, + OutArray out_node_latest_update); + Result Scan(Out network_count, WifiChannel channel, const ScanFilter& scan_filter, + OutArray out_network_info); + Result ScanPrivate(Out network_count, WifiChannel channel, const ScanFilter& scan_filter, + OutArray out_network_info); + Result SetWirelessControllerRestriction(WirelessControllerRestriction wireless_restriction); + Result OpenAccessPoint(); + Result CloseAccessPoint(); + Result CreateNetwork(const CreateNetworkConfig& create_config); + Result CreateNetworkPrivate(const CreateNetworkConfigPrivate& create_config, + InArray address_list); + Result DestroyNetwork(); + Result Reject(); + Result SetAdvertiseData(InBuffer buffer_data); + Result SetStationAcceptPolicy(AcceptPolicy accept_policy); + Result AddAcceptFilterEntry(MacAddress mac_address); + Result ClearAcceptFilter(); + Result OpenStation(); + Result CloseStation(); + Result Connect(const ConnectNetworkData& connect_data, + InLargeData network_info); + Result ConnectPrivate(const ConnectNetworkData& connect_data, + InLargeData network_info); + Result Disconnect(); + Result InitializeSystem(ClientProcessId aruid); + Result FinalizeSystem(); + Result SetOperationMode(u32 mode); Result InitializeSystem2(); }; diff --git a/src/core/hle/service/ldn/user_local_communication_service.cpp b/src/core/hle/service/ldn/user_local_communication_service.cpp index f28368962..c29584550 100644 --- a/src/core/hle/service/ldn/user_local_communication_service.cpp +++ b/src/core/hle/service/ldn/user_local_communication_service.cpp @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #include @@ -25,35 +26,35 @@ IUserLocalCommunicationService::IUserLocalCommunicationService(Core::System& sys room_network{system_.GetRoomNetwork()}, lan_discovery{room_network} { // clang-format off static const FunctionInfo functions[] = { - {0, C<&IUserLocalCommunicationService::GetState>, "GetState"}, - {1, C<&IUserLocalCommunicationService::GetNetworkInfo>, "GetNetworkInfo"}, - {2, C<&IUserLocalCommunicationService::GetIpv4Address>, "GetIpv4Address"}, - {3, C<&IUserLocalCommunicationService::GetDisconnectReason>, "GetDisconnectReason"}, - {4, C<&IUserLocalCommunicationService::GetSecurityParameter>, "GetSecurityParameter"}, - {5, C<&IUserLocalCommunicationService::GetNetworkConfig>, "GetNetworkConfig"}, - {100, C<&IUserLocalCommunicationService::AttachStateChangeEvent>, "AttachStateChangeEvent"}, - {101, C<&IUserLocalCommunicationService::GetNetworkInfoLatestUpdate>, "GetNetworkInfoLatestUpdate"}, - {102, C<&IUserLocalCommunicationService::Scan>, "Scan"}, - {103, C<&IUserLocalCommunicationService::ScanPrivate>, "ScanPrivate"}, - {104, C<&IUserLocalCommunicationService::SetWirelessControllerRestriction>, "SetWirelessControllerRestriction"}, - {200, C<&IUserLocalCommunicationService::OpenAccessPoint>, "OpenAccessPoint"}, - {201, C<&IUserLocalCommunicationService::CloseAccessPoint>, "CloseAccessPoint"}, - {202, C<&IUserLocalCommunicationService::CreateNetwork>, "CreateNetwork"}, - {203, C<&IUserLocalCommunicationService::CreateNetworkPrivate>, "CreateNetworkPrivate"}, - {204, C<&IUserLocalCommunicationService::DestroyNetwork>, "DestroyNetwork"}, + {0, D<&IUserLocalCommunicationService::GetState>, "GetState"}, + {1, D<&IUserLocalCommunicationService::GetNetworkInfo>, "GetNetworkInfo"}, + {2, D<&IUserLocalCommunicationService::GetIpv4Address>, "GetIpv4Address"}, + {3, D<&IUserLocalCommunicationService::GetDisconnectReason>, "GetDisconnectReason"}, + {4, D<&IUserLocalCommunicationService::GetSecurityParameter>, "GetSecurityParameter"}, + {5, D<&IUserLocalCommunicationService::GetNetworkConfig>, "GetNetworkConfig"}, + {100, D<&IUserLocalCommunicationService::AttachStateChangeEvent>, "AttachStateChangeEvent"}, + {101, D<&IUserLocalCommunicationService::GetNetworkInfoLatestUpdate>, "GetNetworkInfoLatestUpdate"}, + {102, D<&IUserLocalCommunicationService::Scan>, "Scan"}, + {103, D<&IUserLocalCommunicationService::ScanPrivate>, "ScanPrivate"}, + {104, D<&IUserLocalCommunicationService::SetWirelessControllerRestriction>, "SetWirelessControllerRestriction"}, + {200, D<&IUserLocalCommunicationService::OpenAccessPoint>, "OpenAccessPoint"}, + {201, D<&IUserLocalCommunicationService::CloseAccessPoint>, "CloseAccessPoint"}, + {202, D<&IUserLocalCommunicationService::CreateNetwork>, "CreateNetwork"}, + {203, D<&IUserLocalCommunicationService::CreateNetworkPrivate>, "CreateNetworkPrivate"}, + {204, D<&IUserLocalCommunicationService::DestroyNetwork>, "DestroyNetwork"}, {205, nullptr, "Reject"}, - {206, C<&IUserLocalCommunicationService::SetAdvertiseData>, "SetAdvertiseData"}, - {207, C<&IUserLocalCommunicationService::SetStationAcceptPolicy>, "SetStationAcceptPolicy"}, - {208, C<&IUserLocalCommunicationService::AddAcceptFilterEntry>, "AddAcceptFilterEntry"}, + {206, D<&IUserLocalCommunicationService::SetAdvertiseData>, "SetAdvertiseData"}, + {207, D<&IUserLocalCommunicationService::SetStationAcceptPolicy>, "SetStationAcceptPolicy"}, + {208, D<&IUserLocalCommunicationService::AddAcceptFilterEntry>, "AddAcceptFilterEntry"}, {209, nullptr, "ClearAcceptFilter"}, - {300, C<&IUserLocalCommunicationService::OpenStation>, "OpenStation"}, - {301, C<&IUserLocalCommunicationService::CloseStation>, "CloseStation"}, - {302, C<&IUserLocalCommunicationService::Connect>, "Connect"}, + {300, D<&IUserLocalCommunicationService::OpenStation>, "OpenStation"}, + {301, D<&IUserLocalCommunicationService::CloseStation>, "CloseStation"}, + {302, D<&IUserLocalCommunicationService::Connect>, "Connect"}, {303, nullptr, "ConnectPrivate"}, - {304, C<&IUserLocalCommunicationService::Disconnect>, "Disconnect"}, - {400, C<&IUserLocalCommunicationService::Initialize>, "Initialize"}, - {401, C<&IUserLocalCommunicationService::Finalize>, "Finalize"}, - {402, C<&IUserLocalCommunicationService::Initialize2>, "Initialize2"}, + {304, D<&IUserLocalCommunicationService::Disconnect>, "Disconnect"}, + {400, D<&IUserLocalCommunicationService::Initialize>, "Initialize"}, + {401, D<&IUserLocalCommunicationService::Finalize>, "Finalize"}, + {402, D<&IUserLocalCommunicationService::Initialize2>, "Initialize2"}, }; // clang-format on