Repository: skyline-emu/skyline
File: app/src/main/cpp/skyline/services/account/IAccountServiceForApplication.h (C/C++)

Code before:
             */
            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
             */
            Result GetBaasAccountManagerForApplication(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);

            SERVICE_DECL(
                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)
            )
        };
    }

    namespace constant {
        constexpr service::account::UserId DefaultUserId{0x0000000000000001, 0x0000000000000000}; //!< The default user ID
    }
}


Review comment (suggestion):
Comments stick to a more concise syntactical structure and function-level ones describe what a function should do rather than what the implementation specifically does, you'd want to include the part about not locking users being desirable inside the function body not here. The comment here should be something along the lines of `Returns if the user's account is locked or unlocked`.

Code after:
             */
            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
             */
            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);

            /**
            * @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);

            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)
            )
        };
    }

    namespace constant {