Loading...
Searching...
No Matches
FOnlineUserAccelByte Class Reference
Inheritance diagram for FOnlineUserAccelByte:

Public Member Functions

 FOnlineUserAccelByte (FOnlineSubsystemAccelByte *InSubsystem)
virtual bool CreateUserProfile (const FUniqueNetId &UserId)
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, OnCreateUserProfileComplete, bool, const FOnlineError &)
 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, OnQueryUserProfileComplete, bool, const TArray< FUniqueNetIdRef > &, const FOnlineError &)
virtual bool QueryUserProfile (int32 LocalUserNum, const TArray< TSharedRef< const FUniqueNetId > > &UserIds)
 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, OnGetUserPlatformLinksComplete, bool, const TArray< FPlatformLink > &, const FOnlineError &)
virtual bool GetUserPlatformLinks (int32 LocalUserNum)
virtual bool QueryUserInfo (int32 LocalUserNum, const TArray< TSharedRef< const FUniqueNetId > > &UserIds) override
virtual bool GetAllUserInfo (int32 LocalUserNum, TArray< TSharedRef< class FOnlineUser > > &OutUsers) override
virtual TSharedPtr< FOnlineUser > GetUserInfo (int32 LocalUserNum, const class FUniqueNetId &UserId) override
virtual bool QueryUserIdMapping (const FUniqueNetId &UserId, const FString &DisplayNameOrEmail, const FOnQueryUserMappingComplete &Delegate=FOnQueryUserMappingComplete()) override
virtual bool QueryUserIdMappingWithPlatform (const FUniqueNetId &UserId, const FString &DisplayNameOrEmail, EAccelBytePlatformType PlatformType, const FOnQueryUserMappingComplete &Delegate)
virtual bool QueryUserIdMappingWithPlatformId (const FUniqueNetId &UserId, const FString &DisplayNameOrEmail, const FString &PlatformId, const FOnQueryUserMappingComplete &Delegate)
virtual bool QueryExternalIdMappings (const FUniqueNetId &UserId, const FExternalIdQueryOptions &QueryOptions, const TArray< FString > &ExternalIds, const FOnQueryExternalIdMappingsComplete &Delegate=FOnQueryExternalIdMappingsComplete()) override
virtual void GetExternalIdMappings (const FExternalIdQueryOptions &QueryOptions, const TArray< FString > &ExternalIds, TArray< FUniqueNetIdPtr > &OutIds) override
virtual FUniqueNetIdPtr GetExternalIdMapping (const FExternalIdQueryOptions &QueryOptions, const FString &ExternalId) override
virtual void ListUserByUserId (const int32 LocalUserNum, const TArray< FString > &UserIds)
 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, OnListUserByUserIdComplete, bool, const FListUserDataResponse &, const FOnlineError &)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnLinkOtherPlatformComplete, bool, const FOnlineError &)
void LinkOtherPlatform (const FUniqueNetId &UserId, EAccelBytePlatformType PlatformType, const FString &Ticket)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnUnlinkOtherPlatformComplete, bool, const FOnlineError &)
void UnlinkOtherPlatform (const FUniqueNetId &UserId, EAccelBytePlatformType PlatformType)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnLinkOtherPlatformIdComplete, bool, const FOnlineError &)
void LinkOtherPlatformId (const FUniqueNetId &UserId, const FString &PlatformId, const FString &Ticket)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnUnlinkOtherPlatformIdComplete, bool, const FOnlineError &)
void UnlinkOtherPlatformId (const FUniqueNetId &UserId, const FString &PlatformId)
 DEFINE_ONLINE_DELEGATE_THREE_PARAM (OnCheckUserAccountAvailabilityComplete, bool, bool, const FOnlineErrorAccelByte &)
void CheckUserAccountAvailability (const FUniqueNetId &UserId, const FString &DisplayName, bool bIsSearchUniqueDisplayName=false)
void AddNewLinkedUserAccountToCache (const TSharedRef< const FUniqueNetId > &UserId, const TArray< FPlatformLink > &LinkedAccounts)
bool RemoveLinkedUserAccountFromCache (const TSharedRef< const FUniqueNetId > &UserId)
void GetLinkedUserAccountFromCache (const TSharedRef< const FUniqueNetId > &UserId, TArray< FAccelByteUserPlatformLinkInformationRef > &OutLinkedAccounts)
 DEFINE_ONLINE_DELEGATE_THREE_PARAM (OnValidateUserInputComplete, const FUserInputValidationResponse &, bool, const FOnlineError &)
void ValidateUserInput (int32 LocalUserNum, const FUserInputValidationRequest &UserInputValidationRequest)
virtual bool QueryUserIdsMapping (const FUniqueNetId &UserId, const FString &DisplayNameOrEmail, const FOnQueryUserIdsMappingComplete &Delegate=FOnQueryUserIdsMappingComplete(), int32 Offset=0, int32 Limit=100)
void AddExternalIdMappings (const TMap< FString, TSharedRef< const FUniqueNetId > > &InMap)
void PostLoginBulkGetUserProfileCompleted (int32 LocalUserNum, bool bWasSuccessful, const TArray< FUniqueNetIdRef > &UserIds, const FOnlineError &ErrorStr)

Static Public Member Functions

static bool GetFromWorld (const UWorld *World, TSharedPtr< FOnlineUserAccelByte, ESPMode::ThreadSafe > &OutInterfaceInstance)
static bool GetFromSubsystem (const IOnlineSubsystem *Subsystem, TSharedPtr< FOnlineUserAccelByte, ESPMode::ThreadSafe > &OutInterfaceInstance)
static bool GetFromSubsystem (const FOnlineSubsystemAccelByte *SubsystemAB, TSharedPtr< FOnlineUserAccelByte, ESPMode::ThreadSafe > &OutInterfaceInstance)

Public Attributes

PACKAGE_SCOPE : void AddUserInfo(const TSharedRef<const FUniqueNetId>& UserId
PACKAGE_SCOPE const TSharedRef< FUserOnlineAccountAccelByte > & UserInfo

Member Function Documentation

◆ AddExternalIdMappings()

void FOnlineUserAccelByte::AddExternalIdMappings ( const TMap< FString, TSharedRef< const FUniqueNetId > > & InMap)
inline

Internal method used by FOnlineAsyncTaskAccelByteQueryExternalIdMappings to move external ID to AccelByte ID references back to this interface.

◆ AddNewLinkedUserAccountToCache()

void FOnlineUserAccelByte::AddNewLinkedUserAccountToCache ( const TSharedRef< const FUniqueNetId > & UserId,
const TArray< FPlatformLink > & LinkedAccounts )

Add a third-party account linked with the AccelByte account to cache.

Parameters
UserIdUnique net ID of the user for whom we want to add the linked account
LinkedAccountThird-party account information

◆ CheckUserAccountAvailability()

void FOnlineUserAccelByte::CheckUserAccountAvailability ( const FUniqueNetId & UserId,
const FString & DisplayName,
bool bIsSearchUniqueDisplayName = false )

Check users's account availability, available only using displayName field.

Parameters
UserIdThe user's user ID
DisplayNameUser's display name value to be checked.
bIsSearchUniqueDisplayNameWhether search account availability by unique display name.

◆ CreateUserProfile()

bool FOnlineUserAccelByte::CreateUserProfile ( const FUniqueNetId & UserId)
virtual

Starts an async task that create the profiles for the requesting user. Will trigger OnCreateUserProfileComplete Online Delegate when Complete

Parameters
UserIdthe user id requesting the create

◆ DEFINE_ONLINE_DELEGATE_THREE_PARAM()

FOnlineUserAccelByte::DEFINE_ONLINE_DELEGATE_THREE_PARAM ( OnCheckUserAccountAvailabilityComplete ,
bool ,
bool ,
const FOnlineErrorAccelByte &  )

Delegate called when a controller-user check user account availability.

◆ DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM() [1/2]

FOnlineUserAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM ( MAX_LOCAL_PLAYERS ,
OnGetUserPlatformLinksComplete ,
bool ,
const TArray< FPlatformLink > & ,
const FOnlineError &  )

Delegate used when the userProfile query request has completed

Parameters
LocalUserNumthe controller number of the associated user that made the request
bWasSuccessfultrue if the async action completed without error, false if there was an error
UserIdslist of user ids that were queried
Errorinformation about the error condition

◆ DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM() [2/2]

FOnlineUserAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM ( MAX_LOCAL_PLAYERS ,
OnQueryUserProfileComplete ,
bool ,
const TArray< FUniqueNetIdRef > & ,
const FOnlineError &  )

Delegate used when the userProfile query request has completed

Parameters
LocalUserNumthe controller number of the associated user that made the request
bWasSuccessfultrue if the async action completed without error, false if there was an error
UserIdslist of user ids that were queried
Errorinformation about the error condition

◆ DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM()

FOnlineUserAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM ( MAX_LOCAL_PLAYERS ,
OnCreateUserProfileComplete ,
bool ,
const FOnlineError &  )

Delegate used when the userProfile create request has completed

Parameters
LocalUserNumthe controller number of the associated user that made the request
bWasSuccessfultrue if the async action completed without error, false if there was an error
Errorinformation about the error condition

◆ GetFromSubsystem()

bool FOnlineUserAccelByte::GetFromSubsystem ( const IOnlineSubsystem * Subsystem,
TSharedPtr< FOnlineUserAccelByte, ESPMode::ThreadSafe > & OutInterfaceInstance )
static

Convenience method to get an instance of this interface from the subsystem passed in.

Parameters
SubsystemSubsystem instance that we wish to get this interface from
OutInterfaceInstanceInstance of the interface that we got from the subsystem, or nullptr if not found
Returns
boolean that is true if we could get an instance of the interface, false otherwise

◆ GetFromWorld()

bool FOnlineUserAccelByte::GetFromWorld ( const UWorld * World,
TSharedPtr< FOnlineUserAccelByte, ESPMode::ThreadSafe > & OutInterfaceInstance )
static

Convenience method to get an instance of this interface from the subsystem associated with the world passed in.

Parameters
WorldWorld instance that we wish to get the interface from
OutInterfaceInstanceInstance of the interface that we got from the subsystem, or nullptr if not found
Returns
boolean that is true if we could get an instance of the interface, false otherwise

◆ GetLinkedUserAccountFromCache()

void FOnlineUserAccelByte::GetLinkedUserAccountFromCache ( const TSharedRef< const FUniqueNetId > & UserId,
TArray< FAccelByteUserPlatformLinkInformationRef > & OutLinkedAccounts )

Get all third-party account linked mappings for a user by their unique net ID.

Parameters
UserIdUnique net ID of the user for whom we wish to get.
OutLinkedAccountsA list of linked account from the selected user.

◆ GetUserPlatformLinks()

bool FOnlineUserAccelByte::GetUserPlatformLinks ( int32 LocalUserNum)
virtual

Starts an async task that queries/reads user's platform accounts linked to user's account.

Parameters
LocalUserNumthe user requesting the query

◆ ListUserByUserId()

void FOnlineUserAccelByte::ListUserByUserId ( const int32 LocalUserNum,
const TArray< FString > & UserIds )
virtual

Get bulk list user by UserId. Only for request by Game Server

Parameters
LocalUserNumIndex of user(server) that is attempting to create the stats
UserIdsUser to create stats for

◆ QueryUserProfile()

bool FOnlineUserAccelByte::QueryUserProfile ( int32 LocalUserNum,
const TArray< TSharedRef< const FUniqueNetId > > & UserIds )
virtual

Starts an async task that queries/reads the profiles for a list of users

Parameters
LocalUserNumthe user requesting the query
UserIdslist of users to read info about

◆ RemoveLinkedUserAccountFromCache()

bool FOnlineUserAccelByte::RemoveLinkedUserAccountFromCache ( const TSharedRef< const FUniqueNetId > & UserId)

Remove all third-party account linked mappings for a user by their unique net ID.

Parameters
UserIdUnique net ID of the user for whom we wish to remove mappings.

Member Data Documentation

◆ UserInfo

PACKAGE_SCOPE const TSharedRef<FUserOnlineAccountAccelByte>& FOnlineUserAccelByte::UserInfo
Initial value:
{
IDToUserInfoMap.Add(UserId, UserInfo)