From 413f162cf2077f598a62bad4769cf6383581705d Mon Sep 17 00:00:00 2001 From: Dima Date: Wed, 2 Nov 2022 20:38:33 +0300 Subject: [PATCH] Stub some account functions --- .../account/IAccountServiceForApplication.cpp | 12 ++++++++++-- .../services/account/IAccountServiceForApplication.h | 12 +++++++++--- .../services/account/IManagerForApplication.cpp | 4 ++++ .../services/account/IManagerForApplication.h | 5 ++++- 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.cpp b/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.cpp index 1cfac685..bdf7b438 100644 --- a/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.cpp +++ b/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.cpp @@ -90,8 +90,7 @@ namespace skyline::service::account { return {}; } - Result IAccountServiceForApplication::IsUserAccountSwitchLocked(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { - response.Push(0); // We don't want to lock the user + Result IAccountServiceForApplication::LoadOpenContext(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { return {}; } @@ -103,6 +102,15 @@ namespace skyline::service::account { } } + Result IAccountServiceForApplication::IsUserAccountSwitchLocked(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + response.Push(0); // We don't want to lock the user + return {}; + } + + Result IAccountServiceForApplication::InitializeApplicationInfoV2(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + return {}; + } + Result IAccountServiceForApplication::IsUserRegistrationRequestPermitted(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { response.Push(false); // Registration isn't permitted via the application account service return {}; diff --git a/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.h b/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.h index b938eb4f..f359ce3a 100644 --- a/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.h +++ b/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.h @@ -66,15 +66,19 @@ namespace skyline { Result StoreSaveDataThumbnail(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + Result LoadOpenContext(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + + Result ListOpenContextStoredUsers(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** * @url https://switchbrew.org/wiki/Account_services#InitializeApplicationInfo */ Result InitializeApplicationInfo(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); - Result ListOpenContextStoredUsers(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); - Result IsUserAccountSwitchLocked(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + Result InitializeApplicationInfoV2(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + SERVICE_DECL( SFUNC(0x0, IAccountServiceForApplication, GetUserCount), SFUNC(0x1, IAccountServiceForApplication, GetUserExistence), @@ -86,9 +90,11 @@ namespace skyline { SFUNC(0x64, IAccountServiceForApplication, InitializeApplicationInfoV0), SFUNC(0x65, IAccountServiceForApplication, GetBaasAccountManagerForApplication), SFUNC(0x6E, IAccountServiceForApplication, StoreSaveDataThumbnail), + SFUNC(0x82, IAccountServiceForApplication, LoadOpenContext), SFUNC(0x83, IAccountServiceForApplication, ListOpenContextStoredUsers), SFUNC(0x8C, IAccountServiceForApplication, InitializeApplicationInfo), - SFUNC(0x96, IAccountServiceForApplication, IsUserAccountSwitchLocked) + SFUNC(0x96, IAccountServiceForApplication, IsUserAccountSwitchLocked), + SFUNC(0xA0, IAccountServiceForApplication, InitializeApplicationInfoV2) ) }; } diff --git a/app/src/main/cpp/skyline/services/account/IManagerForApplication.cpp b/app/src/main/cpp/skyline/services/account/IManagerForApplication.cpp index d5fc0791..bee8f3c0 100644 --- a/app/src/main/cpp/skyline/services/account/IManagerForApplication.cpp +++ b/app/src/main/cpp/skyline/services/account/IManagerForApplication.cpp @@ -10,4 +10,8 @@ namespace skyline::service::account { response.Push(false); return {}; } + + Result IManagerForApplication::StoreOpenContext(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + return {}; + } } diff --git a/app/src/main/cpp/skyline/services/account/IManagerForApplication.h b/app/src/main/cpp/skyline/services/account/IManagerForApplication.h index 5ac2c1a1..ff703a07 100644 --- a/app/src/main/cpp/skyline/services/account/IManagerForApplication.h +++ b/app/src/main/cpp/skyline/services/account/IManagerForApplication.h @@ -19,8 +19,11 @@ namespace skyline::service::account { */ Result CheckAvailability(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + Result StoreOpenContext(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + SERVICE_DECL( - SFUNC(0x0, IManagerForApplication, CheckAvailability) + SFUNC(0x0, IManagerForApplication, CheckAvailability), + SFUNC(0xA0, IManagerForApplication, StoreOpenContext) ) }; } \ No newline at end of file