diff --git a/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.cpp b/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.cpp index bdf7b438..030f0dcd 100644 --- a/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.cpp +++ b/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.cpp @@ -73,6 +73,16 @@ namespace skyline::service::account { 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 {}; + } + + Result IAccountServiceForApplication::TrySelectUserWithoutInteraction(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + response.Push(constant::DefaultUserId); + return {}; + } + Result IAccountServiceForApplication::GetBaasAccountManagerForApplication(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { auto id{request.Pop()}; if (id == UserId{}) @@ -86,6 +96,16 @@ namespace skyline::service::account { return {}; } + Result IAccountServiceForApplication::ListQualifiedUsers(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + try { + // We only support one active user currently. And we don't have parental control, so we can assume all users are qualified + return WriteUserList(request.outputBuf.at(0), {constant::DefaultUserId}); + } catch (const std::out_of_range &) { + return result::InvalidInputBuffer; + } + return {}; + } + Result IAccountServiceForApplication::StoreSaveDataThumbnail(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { return {}; } @@ -110,9 +130,4 @@ namespace skyline::service::account { 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 f359ce3a..f6a4b051 100644 --- a/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.h +++ b/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.h @@ -57,6 +57,11 @@ namespace skyline { */ Result IsUserRegistrationRequestPermitted(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** + * @url https://switchbrew.org/wiki/Account_services#TrySelectUserWithoutInteraction + */ + Result TrySelectUserWithoutInteraction(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** * @url https://switchbrew.org/wiki/Account_services#InitializeApplicationInfoV0 */ @@ -75,6 +80,8 @@ namespace skyline { */ Result InitializeApplicationInfo(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + Result ListQualifiedUsers(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); @@ -87,12 +94,14 @@ namespace skyline { SFUNC(0x4, IAccountServiceForApplication, GetLastOpenedUser), SFUNC(0x5, IAccountServiceForApplication, GetProfile), SFUNC(0x32, IAccountServiceForApplication, IsUserRegistrationRequestPermitted), + SFUNC(0x33, IAccountServiceForApplication, TrySelectUserWithoutInteraction), 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(0x8D, IAccountServiceForApplication, ListQualifiedUsers), SFUNC(0x96, IAccountServiceForApplication, IsUserAccountSwitchLocked), SFUNC(0xA0, IAccountServiceForApplication, InitializeApplicationInfoV2) )