108 const cUUID & a_UUID,
110 const AString & a_TexturesSignature,
124 const cUUID & a_UUID,
125 const Json::Value & a_Properties,
std::vector< AString > AStringVector
void AddPlayerNameToUUIDMapping(const AString &a_PlayerName, const cUUID &a_UUID)
Called by the Authenticator to add a PlayerName -> UUID mapping that it has received from authenticat...
cCriticalSection m_CSNameToUUID
Protects m_NameToUUID against simultaneous multi-threaded access.
void SetRankManager(cRankManager *a_RankManager)
Sets the m_RankMgr that is used for name-uuid notifications.
std::map< AString, sProfile > cProfileMap
AString GetPlayerNameFromUUID(const cUUID &a_UUID, bool a_UseOnlyCached=false)
Converts a UUID into a playername.
void NotifyNameUUID(const AString &a_PlayerName, const cUUID &a_PlayerUUID)
Called for each name-uuid pairing that is discovered.
void CacheNamesToUUIDs(const AStringVector &a_PlayerNames)
Makes sure all specified names are in the m_PlayerNameToUUID cache.
void LoadCachesFromDisk(void)
Loads the caches from a disk storage.
void Update(void)
Updates the stale values in the DB from the Mojang servers.
cUUIDProfileMap m_UUIDToProfile
Cache for the UUID-to-profile lookups.
cCriticalSection m_CSUUIDToName
Protects m_UUIDToName against simultaneous multi-threaded access.
void AddPlayerProfile(const AString &a_PlayerName, const cUUID &a_UUID, const Json::Value &a_Properties)
Called by the Authenticator to add a profile that it has received from authenticating a user.
std::map< cUUID, sProfile > cUUIDProfileMap
std::vector< cUUID > GetUUIDsFromPlayerNames(const AStringVector &a_PlayerName, bool a_UseOnlyCached=false)
Converts the player names into UUIDs.
cCriticalSection m_CSUUIDToProfile
Protects m_UUIDToProfile against simultaneous multi-threaded access.
AString m_NameToUUIDUrl
The full URL to check when converting player names to UUIDs.
cProfileMap m_NameToUUID
Cache for the Name-to-UUID lookups.
void QueryNamesToUUIDs(AStringVector &a_PlayerNames)
Queries all the specified names and stores them into the m_PlayerNameToUUID cache.
void Start(cSettingsRepositoryInterface &a_Settings, bool a_ShouldAuth)
Initializes the API; reads the settings from the specified ini file.
cRankManager * m_RankMgr
The rank manager that is notified of the name-uuid pairings.
cCriticalSection m_CSRankMgr
Protects m_RankMgr agains simultaneous multi-threaded access.
void SaveCachesToDisk(void)
Saves the caches to a disk storage.
AString m_UUIDToProfileUrl
The full URL to use for converting UUID to profile.
void CacheUUIDToProfile(const cUUID &a_UUID)
Makes sure the specified UUID is in the m_UUIDToProfile cache.
void QueryUUIDToProfile(const cUUID &a_UUID)
Queries the specified UUID's profile and stores it in the m_UUIDToProfile cache.
cUUID GetUUIDFromPlayerName(const AString &a_PlayerName, bool a_UseOnlyCached=false)
Converts a player name into a UUID.
cUUIDProfileMap m_UUIDToName
Cache for the Name-to-UUID lookups.
std::shared_ptr< cUpdateThread > m_UpdateThread
The thread that periodically updates the stale data in the DB from the Mojang servers.
Holds data for a single player profile.
sProfile(void)
Default constructor for the container's sake.
sProfile(const AString &a_PlayerName, const cUUID &a_UUID, const AString &a_Textures, const AString &a_TexturesSignature, Int64 a_DateTime)
Constructor for the storage creation.
AString m_TexturesSignature