Stub TrySelectUserWithoutInteraction and ListQualifiedUsers

This commit is contained in:
Dima 2022-11-20 12:35:21 +03:00 committed by Billy Laws
parent 5a9a2861df
commit a6f3aa3062
2 changed files with 29 additions and 5 deletions

View File

@ -73,6 +73,16 @@ namespace skyline::service::account {
return {}; return {};
} }
Result IAccountServiceForApplication::IsUserRegistrationRequestPermitted(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
response.Push<u8>(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) { Result IAccountServiceForApplication::GetBaasAccountManagerForApplication(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
auto id{request.Pop<UserId>()}; auto id{request.Pop<UserId>()};
if (id == UserId{}) if (id == UserId{})
@ -86,6 +96,16 @@ namespace skyline::service::account {
return {}; 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) { Result IAccountServiceForApplication::StoreSaveDataThumbnail(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
return {}; return {};
} }
@ -110,9 +130,4 @@ namespace skyline::service::account {
Result IAccountServiceForApplication::InitializeApplicationInfoV2(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { Result IAccountServiceForApplication::InitializeApplicationInfoV2(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
return {}; return {};
} }
Result IAccountServiceForApplication::IsUserRegistrationRequestPermitted(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
response.Push<u8>(false); // Registration isn't permitted via the application account service
return {};
}
} }

View File

@ -57,6 +57,11 @@ namespace skyline {
*/ */
Result IsUserRegistrationRequestPermitted(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); 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 * @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 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 IsUserAccountSwitchLocked(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
Result InitializeApplicationInfoV2(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(0x4, IAccountServiceForApplication, GetLastOpenedUser),
SFUNC(0x5, IAccountServiceForApplication, GetProfile), SFUNC(0x5, IAccountServiceForApplication, GetProfile),
SFUNC(0x32, IAccountServiceForApplication, IsUserRegistrationRequestPermitted), SFUNC(0x32, IAccountServiceForApplication, IsUserRegistrationRequestPermitted),
SFUNC(0x33, IAccountServiceForApplication, TrySelectUserWithoutInteraction),
SFUNC(0x64, IAccountServiceForApplication, InitializeApplicationInfoV0), SFUNC(0x64, IAccountServiceForApplication, InitializeApplicationInfoV0),
SFUNC(0x65, IAccountServiceForApplication, GetBaasAccountManagerForApplication), SFUNC(0x65, IAccountServiceForApplication, GetBaasAccountManagerForApplication),
SFUNC(0x6E, IAccountServiceForApplication, StoreSaveDataThumbnail), SFUNC(0x6E, IAccountServiceForApplication, StoreSaveDataThumbnail),
SFUNC(0x82, IAccountServiceForApplication, LoadOpenContext), SFUNC(0x82, IAccountServiceForApplication, LoadOpenContext),
SFUNC(0x83, IAccountServiceForApplication, ListOpenContextStoredUsers), SFUNC(0x83, IAccountServiceForApplication, ListOpenContextStoredUsers),
SFUNC(0x8C, IAccountServiceForApplication, InitializeApplicationInfo), SFUNC(0x8C, IAccountServiceForApplication, InitializeApplicationInfo),
SFUNC(0x8D, IAccountServiceForApplication, ListQualifiedUsers),
SFUNC(0x96, IAccountServiceForApplication, IsUserAccountSwitchLocked), SFUNC(0x96, IAccountServiceForApplication, IsUserAccountSwitchLocked),
SFUNC(0xA0, IAccountServiceForApplication, InitializeApplicationInfoV2) SFUNC(0xA0, IAccountServiceForApplication, InitializeApplicationInfoV2)
) )