From 543ac3042eb33b835eb4f4b190ad0d56c3377cb7 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Wed, 11 May 2022 23:16:43 +0100 Subject: [PATCH] Cleanup account services and stub StoreSaveDataThumbnail --- .../account/IAccountServiceForApplication.cpp | 4 ++ .../account/IAccountServiceForApplication.h | 47 +++++-------------- .../account/IManagerForApplication.cpp | 1 + 3 files changed, 17 insertions(+), 35 deletions(-) diff --git a/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.cpp b/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.cpp index cb02c0eb..a05925db 100644 --- a/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.cpp +++ b/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.cpp @@ -86,6 +86,10 @@ namespace skyline::service::account { return {}; } + Result IAccountServiceForApplication::StoreSaveDataThumbnail(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + return {}; + } + Result IAccountServiceForApplication::IsUserAccountSwitchLocked(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { response.Push(0); // We don't want to lock the user return {}; diff --git a/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.h b/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.h index 560d21d4..5097915c 100644 --- a/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.h +++ b/app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.h @@ -40,63 +40,39 @@ namespace skyline { public: IAccountServiceForApplication(const DeviceState &state, ServiceManager &manager); - /** - * @brief Returns the amount of user accounts on the console - */ Result GetUserCount(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); - /** - * @brief Checks if the given user ID exists - */ Result GetUserExistence(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); - /** - * @brief Returns a list of all user accounts on the console - */ Result ListAllUsers(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); - /** - * @brief Returns a list of all open user accounts on the console - */ Result ListOpenUsers(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); - /** - * @brief Returns the user ID of the last active user on the console - */ Result GetLastOpenedUser(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); - /** - * @brief Provides information about the running application for account services to use - * @url https://switchbrew.org/wiki/Account_services#InitializeApplicationInfoV0 - */ - Result InitializeApplicationInfoV0(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); - - /** - * @brief Returns a handle to an IProfile which can be used for reading user information - */ Result GetProfile(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); /** - * @brief Returns a handle to an IManagerForApplication which can be used for reading Nintendo Online info + * @url https://switchbrew.org/wiki/Account_services#IsUserRegistrationRequestPermitted */ + Result IsUserRegistrationRequestPermitted(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + + /** + * @url https://switchbrew.org/wiki/Account_services#InitializeApplicationInfoV0 + */ + Result InitializeApplicationInfoV0(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + Result GetBaasAccountManagerForApplication(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); - /** - * @brief Returns if the user's account is locked or unlocked - */ - Result IsUserAccountSwitchLocked(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + Result StoreSaveDataThumbnail(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); /** - * @brief Provides information about the running application for account services to use * @url https://switchbrew.org/wiki/Account_services#InitializeApplicationInfo */ Result InitializeApplicationInfo(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); - /** - * @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); + Result IsUserAccountSwitchLocked(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + SERVICE_DECL( SFUNC(0x0, IAccountServiceForApplication, GetUserCount), @@ -108,6 +84,7 @@ namespace skyline { SFUNC(0x32, IAccountServiceForApplication, IsUserRegistrationRequestPermitted), SFUNC(0x64, IAccountServiceForApplication, InitializeApplicationInfoV0), SFUNC(0x65, IAccountServiceForApplication, GetBaasAccountManagerForApplication), + SFUNC(0x6E, IAccountServiceForApplication, StoreSaveDataThumbnail), SFUNC(0x8C, IAccountServiceForApplication, InitializeApplicationInfo), SFUNC(0x96, IAccountServiceForApplication, IsUserAccountSwitchLocked) ) diff --git a/app/src/main/cpp/skyline/services/account/IManagerForApplication.cpp b/app/src/main/cpp/skyline/services/account/IManagerForApplication.cpp index 2cd7b406..d5fc0791 100644 --- a/app/src/main/cpp/skyline/services/account/IManagerForApplication.cpp +++ b/app/src/main/cpp/skyline/services/account/IManagerForApplication.cpp @@ -7,6 +7,7 @@ namespace skyline::service::account { IManagerForApplication::IManagerForApplication(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {} Result IManagerForApplication::CheckAvailability(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + response.Push(false); return {}; } }