account: Added accountIsUserRegistrationRequestPermitted and accountTrySelectUserWithoutInteraction.

This commit is contained in:
yellows8 2019-12-03 13:13:11 -05:00
parent 4078de1eff
commit 42aa0800f7
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
2 changed files with 21 additions and 0 deletions

View File

@ -74,6 +74,12 @@ Result accountGetLastOpenedUser(AccountUid *uid);
/// Get an AccountProfile for the specified userId. /// Get an AccountProfile for the specified userId.
Result accountGetProfile(AccountProfile* out, AccountUid uid); Result accountGetProfile(AccountProfile* out, AccountUid uid);
/// IsUserRegistrationRequestPermitted
Result accountIsUserRegistrationRequestPermitted(bool *out);
/// TrySelectUserWithoutInteraction
Result accountTrySelectUserWithoutInteraction(AccountUid *uid, bool is_network_service_account_required);
/// Close the AccountProfile. /// Close the AccountProfile.
void accountProfileClose(AccountProfile* profile); void accountProfileClose(AccountProfile* profile);

View File

@ -116,6 +116,21 @@ Result accountGetProfile(AccountProfile* out, AccountUid uid) {
); );
} }
Result accountIsUserRegistrationRequestPermitted(bool *out) {
u64 pid_placeholder=0;
u8 tmp=0;
Result rc = serviceDispatchInOut(&g_accSrv, 50, pid_placeholder, tmp,
.in_send_pid = true,
);
if (R_SUCCEEDED(rc) && out) *out = tmp & 1;
return rc;
}
Result accountTrySelectUserWithoutInteraction(AccountUid *uid, bool is_network_service_account_required) {
u8 tmp=is_network_service_account_required!=0;
return serviceDispatchInOut(&g_accSrv, 51, tmp, *uid);
}
// IProfile // IProfile
void accountProfileClose(AccountProfile* profile) { void accountProfileClose(AccountProfile* profile) {