Implement IAccountServiceForApplication::IsUserRegistrationRequestPermitted

This commit is contained in:
kaikecarlos 2022-03-27 08:06:43 -03:00 committed by PixelyIon
parent e8cc760b10
commit 49c0ba1207
2 changed files with 24 additions and 12 deletions

View File

@ -90,4 +90,9 @@ namespace skyline::service::account {
response.Push<u32>(0); // We don't want to lock the user
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

@ -92,18 +92,25 @@ namespace skyline {
*/
Result InitializeApplicationInfo(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
SERVICE_DECL(
SFUNC(0x0, IAccountServiceForApplication, GetUserCount),
SFUNC(0x1, IAccountServiceForApplication, GetUserExistence),
SFUNC(0x2, IAccountServiceForApplication, ListAllUsers),
SFUNC(0x3, IAccountServiceForApplication, ListOpenUsers),
SFUNC(0x4, IAccountServiceForApplication, GetLastOpenedUser),
SFUNC(0x5, IAccountServiceForApplication, GetProfile),
SFUNC(0x64, IAccountServiceForApplication, InitializeApplicationInfoV0),
SFUNC(0x65, IAccountServiceForApplication, GetBaasAccountManagerForApplication),
SFUNC(0x8C, IAccountServiceForApplication, InitializeApplicationInfo),
SFUNC(0x96, IAccountServiceForApplication, IsUserAccountSwitchLocked)
)
/**
* @brief Returns if the user registration request is permitted or not
* @url https://switchbrew.org/wiki/Account_services#IsUserRegistrationRequestPermitted
*/
Result IsUserRegistrationRequestPermitted(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
SERVICE_DECL(
SFUNC(0x0, IAccountServiceForApplication, GetUserCount),
SFUNC(0x1, IAccountServiceForApplication, GetUserExistence),
SFUNC(0x2, IAccountServiceForApplication, ListAllUsers),
SFUNC(0x3, IAccountServiceForApplication, ListOpenUsers),
SFUNC(0x4, IAccountServiceForApplication, GetLastOpenedUser),
SFUNC(0x5, IAccountServiceForApplication, GetProfile),
SFUNC(0x32, IAccountServiceForApplication, IsUserRegistrationRequestPermitted),
SFUNC(0x64, IAccountServiceForApplication, InitializeApplicationInfoV0),
SFUNC(0x65, IAccountServiceForApplication, GetBaasAccountManagerForApplication),
SFUNC(0x8C, IAccountServiceForApplication, InitializeApplicationInfo),
SFUNC(0x96, IAccountServiceForApplication, IsUserAccountSwitchLocked)
)
};
}