diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2022-02-05 18:35:39 +0100 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2022-02-05 19:56:21 +0100 |
commit | 25db62ce1534cbd8b93b4284869229e4bd7de54d (patch) | |
tree | dd74d3fc6ba14a0de5e88778cad5b5c65fcba248 /src/core/hle/service/acc/profile_manager.h | |
parent | profile: Migrate to the new UUID implementation (diff) | |
download | yuzu-25db62ce1534cbd8b93b4284869229e4bd7de54d.tar yuzu-25db62ce1534cbd8b93b4284869229e4bd7de54d.tar.gz yuzu-25db62ce1534cbd8b93b4284869229e4bd7de54d.tar.bz2 yuzu-25db62ce1534cbd8b93b4284869229e4bd7de54d.tar.lz yuzu-25db62ce1534cbd8b93b4284869229e4bd7de54d.tar.xz yuzu-25db62ce1534cbd8b93b4284869229e4bd7de54d.tar.zst yuzu-25db62ce1534cbd8b93b4284869229e4bd7de54d.zip |
Diffstat (limited to 'src/core/hle/service/acc/profile_manager.h')
-rw-r--r-- | src/core/hle/service/acc/profile_manager.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/core/hle/service/acc/profile_manager.h b/src/core/hle/service/acc/profile_manager.h index e9c58a826..17347f7ef 100644 --- a/src/core/hle/service/acc/profile_manager.h +++ b/src/core/hle/service/acc/profile_manager.h @@ -8,8 +8,8 @@ #include <optional> #include "common/common_types.h" -#include "common/new_uuid.h" #include "common/swap.h" +#include "common/uuid.h" #include "core/hle/result.h" namespace Service::Account { @@ -18,7 +18,7 @@ constexpr std::size_t MAX_USERS{8}; constexpr std::size_t profile_username_size{32}; using ProfileUsername = std::array<u8, profile_username_size>; -using UserIDArray = std::array<Common::NewUUID, MAX_USERS>; +using UserIDArray = std::array<Common::UUID, MAX_USERS>; /// Contains extra data related to a user. /// TODO: RE this structure @@ -35,7 +35,7 @@ static_assert(sizeof(ProfileData) == 0x80, "ProfileData structure has incorrect /// This holds general information about a users profile. This is where we store all the information /// based on a specific user struct ProfileInfo { - Common::NewUUID user_uuid{}; + Common::UUID user_uuid{}; ProfileUsername username{}; u64 creation_time{}; ProfileData data{}; // TODO(ognik): Work out what this is @@ -43,7 +43,7 @@ struct ProfileInfo { }; struct ProfileBase { - Common::NewUUID user_uuid; + Common::UUID user_uuid; u64_le timestamp; ProfileUsername username; @@ -65,34 +65,34 @@ public: ~ProfileManager(); ResultCode AddUser(const ProfileInfo& user); - ResultCode CreateNewUser(Common::NewUUID uuid, const ProfileUsername& username); - ResultCode CreateNewUser(Common::NewUUID uuid, const std::string& username); - std::optional<Common::NewUUID> GetUser(std::size_t index) const; - std::optional<std::size_t> GetUserIndex(const Common::NewUUID& uuid) const; + ResultCode CreateNewUser(Common::UUID uuid, const ProfileUsername& username); + ResultCode CreateNewUser(Common::UUID uuid, const std::string& username); + std::optional<Common::UUID> GetUser(std::size_t index) const; + std::optional<std::size_t> GetUserIndex(const Common::UUID& uuid) const; std::optional<std::size_t> GetUserIndex(const ProfileInfo& user) const; bool GetProfileBase(std::optional<std::size_t> index, ProfileBase& profile) const; - bool GetProfileBase(Common::NewUUID uuid, ProfileBase& profile) const; + bool GetProfileBase(Common::UUID uuid, ProfileBase& profile) const; bool GetProfileBase(const ProfileInfo& user, ProfileBase& profile) const; bool GetProfileBaseAndData(std::optional<std::size_t> index, ProfileBase& profile, ProfileData& data) const; - bool GetProfileBaseAndData(Common::NewUUID uuid, ProfileBase& profile, ProfileData& data) const; + bool GetProfileBaseAndData(Common::UUID uuid, ProfileBase& profile, ProfileData& data) const; bool GetProfileBaseAndData(const ProfileInfo& user, ProfileBase& profile, ProfileData& data) const; std::size_t GetUserCount() const; std::size_t GetOpenUserCount() const; - bool UserExists(Common::NewUUID uuid) const; + bool UserExists(Common::UUID uuid) const; bool UserExistsIndex(std::size_t index) const; - void OpenUser(Common::NewUUID uuid); - void CloseUser(Common::NewUUID uuid); + void OpenUser(Common::UUID uuid); + void CloseUser(Common::UUID uuid); UserIDArray GetOpenUsers() const; UserIDArray GetAllUsers() const; - Common::NewUUID GetLastOpenedUser() const; + Common::UUID GetLastOpenedUser() const; bool CanSystemRegisterUser() const; - bool RemoveUser(Common::NewUUID uuid); - bool SetProfileBase(Common::NewUUID uuid, const ProfileBase& profile_new); - bool SetProfileBaseAndData(Common::NewUUID uuid, const ProfileBase& profile_new, + bool RemoveUser(Common::UUID uuid); + bool SetProfileBase(Common::UUID uuid, const ProfileBase& profile_new); + bool SetProfileBaseAndData(Common::UUID uuid, const ProfileBase& profile_new, const ProfileData& data_new); private: @@ -103,7 +103,7 @@ private: std::array<ProfileInfo, MAX_USERS> profiles{}; std::size_t user_count{}; - Common::NewUUID last_opened_user{}; + Common::UUID last_opened_user{}; }; }; // namespace Service::Account |