Loading...
Searching...
No Matches
FOnlineCloudSaveAccelByte Class Reference

#include <OnlineCloudSaveInterfaceAccelByte.h>

Inheritance diagram for FOnlineCloudSaveAccelByte:

Public Member Functions

 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, OnGetUserRecordCompleted, const FOnlineError &, const FString &, const FAccelByteModelsUserRecord &)
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, OnReplaceUserRecordCompleted, const FOnlineError &, const FString &)
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, OnDeleteUserRecordCompleted, const FOnlineError &, const FString &)
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, OnBulkGetPublicUserRecordCompleted, const FOnlineError &, const FListAccelByteModelsUserRecord &)
 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, OnGetGameRecordCompleted, const FOnlineError &, const FString &, const FAccelByteModelsGameRecord &)
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, OnReplaceGameRecordCompleted, const FOnlineError &, const FString &)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnDeleteGameRecordTTLConfigCompleted, const FOnlineError &, const FString &)
 DEFINE_ONLINE_DELEGATE_THREE_PARAM (OnGetAdminGameRecordCompleted, const FOnlineError &, const FString &, const FAccelByteModelsAdminGameRecord &)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnModifyAdminGameRecordCompleted, const FOnlineError &, const FString &)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnDeleteAdminGameRecordTTLConfigCompleted, const FOnlineError &, const FString &)
bool GetUserRecord (int32 LocalUserNum, const FString &Key)
 Get a record (arbitrary JSON data) by its key in user-level.
bool GetUserRecord (int32 LocalUserNum, const FString &Key, const FUniqueNetIdAccelByteUserRef &RecordUserId)
 Get a record (arbitrary JSON data) by its key in user-level. Only for request by Game Server.
bool GetPublicUserRecord (int32 LocalUserNum, const FString &Key)
 Get a public record (arbitrary JSON data) by its key in user-level.
bool GetPublicUserRecord (int32 LocalUserNum, const FString &Key, const FUniqueNetIdAccelByteUserRef &RecordUserId)
 Get a public record (arbitrary JSON data) by its key in user-level.
bool ReplaceUserRecord (int32 LocalUserNum, const FString &Key, const FJsonObject &RecordRequest, const FUniqueNetIdAccelByteUserRef &TargetUserId=FUniqueNetIdAccelByteUser::Invalid())
 Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one.
bool ReplacePublicUserRecord (int32 LocalUserNum, const FString &Key, const FJsonObject &RecordRequest, const FUniqueNetIdAccelByteUserRef &TargetUserId=FUniqueNetIdAccelByteUser::Invalid())
 Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one.
bool BulkReplaceUserRecord (const FString &Key, const TMap< FUniqueNetIdAccelByteUserRef, FJsonObject > &Request)
 Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one.
bool DeleteUserRecord (int32 LocalUserNum, const FString &Key, const FUniqueNetIdAccelByteUserRef &TargetUserId=FUniqueNetIdAccelByteUser::Invalid())
 Delete a record under the given key in user-level.
bool BulkGetUserRecord (const FString &Key, const TArray< FUniqueNetIdAccelByteUserRef > &UniqueNetIds)
 Get a record (arbitrary JSON data) by its key and userId in user-level. Only for request by Game Server.
bool BulkGetPublicUserRecord (int32 LocalUserNum, const FString &Key, const TArray< FString > &UserIds)
 Get a public record (arbitrary JSON data) by its key and userId in user-level.
bool BulkGetPublicUserRecord (int32 LocalUserNum, const FString &Key, const TArray< FUniqueNetIdAccelByteUserRef > &UniqueNetIds)
 Get a public record (arbitrary JSON data) by its key and userId in user-level.
bool GetGameRecord (int32 LocalUserNum, const FString &Key, bool bAlwaysRequestToService=false)
 Get a record by its key in namespace-level.
bool GetGameRecordFromCache (const FString &Key, FAccelByteModelsGameRecord &OutRecord)
 Get a record by its key in namespace-level from cache.
bool ReplaceGameRecord (int32 LocalUserNum, const FString &Key, const FJsonObject &RecordRequest)
 Replace a record by its key in namespace-level.
bool ReplaceGameRecord (int32 LocalUserNum, const FString &Key, ESetByMetadataRecord SetBy, const FJsonObject &RecordRequest, const FTTLConfig &TTLConfig)
 Replace a record by its key in namespace-level.
bool DeleteGameRecordTTLConfig (int32 LocalUserNum, const FString &Key)
 Delete the ttl config of the game record.
bool GetAdminGameRecord (int32 LocalUserNum, const FString &Key, bool bAlwaysRequestToService=false)
 Get a record by its key in namespace-level. Only for request by Game Server.
bool GetAdminGameRecordFromCache (const FString &Key, FAccelByteModelsAdminGameRecord &OutRecord)
 Get a record by its key in namespace-level from cache. Only for request by Game Server.
bool CreateAdminGameRecord (int32 LocalUserNum, const FString &Key, const FJsonObject &RecordRequest, const TArray< FString > &Tags, const FTTLConfig &TTLConfig)
 Replace a record by its key in namespace-level. Only for request by Game Server.
bool ReplaceAdminGameRecord (int32 LocalUserNum, const FString &Key, const FJsonObject &RecordRequest, const FTTLConfig &TTLConfig)
 Replace a record by its key in namespace-level. Only for request by Game Server.
bool DeleteAdminGameRecordTTLConfig (int32 LocalUserNum, const FString &Key)
 Delete the ttl config of the admin game record.

Static Public Member Functions

static bool GetFromSubsystem (const IOnlineSubsystem *Subsystem, FOnlineCloudSaveAccelBytePtr &OutInterfaceInstance)
static bool GetFromWorld (const UWorld *World, FOnlineCloudSaveAccelBytePtr &OutInterfaceInstance)

Protected Member Functions

 FOnlineCloudSaveAccelByte ()

Protected Attributes

FOnlineSubsystemAccelByteWPtr AccelByteSubsystem = nullptr

Detailed Description

Implementation of Cloud Save service from AccelByte services

Constructor & Destructor Documentation

◆ FOnlineCloudSaveAccelByte()

FOnlineCloudSaveAccelByte::FOnlineCloudSaveAccelByte ( )
inlineprotected

Hidden default constructor, the constructor that takes in a subsystem instance should be used instead.

Member Function Documentation

◆ BulkGetPublicUserRecord() [1/2]

bool FOnlineCloudSaveAccelByte::BulkGetPublicUserRecord ( int32 LocalUserNum,
const FString & Key,
const TArray< FString > & UserIds )

Get a public record (arbitrary JSON data) by its key and userId in user-level.

Parameters
LocalUserNumIndex of user that is attempting to get bulk public user record
KeyKey of record.
UserIdsList UserId(s) of the record owner.

◆ BulkGetPublicUserRecord() [2/2]

bool FOnlineCloudSaveAccelByte::BulkGetPublicUserRecord ( int32 LocalUserNum,
const FString & Key,
const TArray< FUniqueNetIdAccelByteUserRef > & UniqueNetIds )

Get a public record (arbitrary JSON data) by its key and userId in user-level.

Parameters
LocalUserNumIndex of user that is attempting to get bulk public user record
KeyKey of record.
UniqueNetIdsList UniqueNetId(UserId)(s) of the record owner.

◆ BulkGetUserRecord()

bool FOnlineCloudSaveAccelByte::BulkGetUserRecord ( const FString & Key,
const TArray< FUniqueNetIdAccelByteUserRef > & UniqueNetIds )

Get a record (arbitrary JSON data) by its key and userId in user-level. Only for request by Game Server.

Parameters
KeyKey of record.
UniqueNetIdsList UniqueNetId(UserId)(s) of the record owner.

◆ BulkReplaceUserRecord()

bool FOnlineCloudSaveAccelByte::BulkReplaceUserRecord ( const FString & Key,
const TMap< FUniqueNetIdAccelByteUserRef, FJsonObject > & Request )

Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one.

Parameters
KeyThe record key to replace
Requestcontain the userId and the record value to replace

◆ CreateAdminGameRecord()

bool FOnlineCloudSaveAccelByte::CreateAdminGameRecord ( int32 LocalUserNum,
const FString & Key,
const FJsonObject & RecordRequest,
const TArray< FString > & Tags,
const FTTLConfig & TTLConfig )

Replace a record by its key in namespace-level. Only for request by Game Server.

Parameters
LocalUserNumIndex of user that is attempting to get game record
KeyThe record key to get
RecordRequestRecord to replace in the form of Json object
Tagsthe tags of the record.
TTLConfigThe configuration to control the action taken if the record has expired. If the action set to NONE, then it will not send the TTL (Time to live) meta data.

◆ DeleteAdminGameRecordTTLConfig()

bool FOnlineCloudSaveAccelByte::DeleteAdminGameRecordTTLConfig ( int32 LocalUserNum,
const FString & Key )

Delete the ttl config of the admin game record.

Parameters
LocalUserNumIndex of user that is attempting to delete the ttl config
KeyThe record key to delete

◆ DeleteGameRecordTTLConfig()

bool FOnlineCloudSaveAccelByte::DeleteGameRecordTTLConfig ( int32 LocalUserNum,
const FString & Key )

Delete the ttl config of the game record.

Parameters
LocalUserNumIndex of user that is attempting to delete the ttl config
KeyThe record key to delete

◆ DeleteUserRecord()

bool FOnlineCloudSaveAccelByte::DeleteUserRecord ( int32 LocalUserNum,
const FString & Key,
const FUniqueNetIdAccelByteUserRef & TargetUserId = FUniqueNetIdAccelByteUser::Invalid() )

Delete a record under the given key in user-level.

Parameters
LocalUserNumIndex of user that is attempting to get record
KeyThe record key to delete
TargetUserIdTarget of AccelByte User Net Id for server to call the request

◆ GetAdminGameRecord()

bool FOnlineCloudSaveAccelByte::GetAdminGameRecord ( int32 LocalUserNum,
const FString & Key,
bool bAlwaysRequestToService = false )

Get a record by its key in namespace-level. Only for request by Game Server.

Parameters
LocalUserNumIndex of user that is attempting to get game record
KeyThe record key to get

◆ GetAdminGameRecordFromCache()

bool FOnlineCloudSaveAccelByte::GetAdminGameRecordFromCache ( const FString & Key,
FAccelByteModelsAdminGameRecord & OutRecord )

Get a record by its key in namespace-level from cache. Only for request by Game Server.

Parameters
LocalUserNumIndex of user that is attempting to get game record
KeyThe record key to get

◆ GetFromSubsystem()

bool FOnlineCloudSaveAccelByte::GetFromSubsystem ( const IOnlineSubsystem * Subsystem,
FOnlineCloudSaveAccelBytePtr & 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 FOnlineCloudSaveAccelByte::GetFromWorld ( const UWorld * World,
FOnlineCloudSaveAccelBytePtr & 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

◆ GetGameRecord()

bool FOnlineCloudSaveAccelByte::GetGameRecord ( int32 LocalUserNum,
const FString & Key,
bool bAlwaysRequestToService = false )

Get a record by its key in namespace-level.

Parameters
LocalUserNumIndex of user that is attempting to get game record
KeyThe record key to get

◆ GetGameRecordFromCache()

bool FOnlineCloudSaveAccelByte::GetGameRecordFromCache ( const FString & Key,
FAccelByteModelsGameRecord & OutRecord )

Get a record by its key in namespace-level from cache.

Parameters
LocalUserNumIndex of user that is attempting to get game record
KeyThe record key to get

◆ GetPublicUserRecord() [1/2]

bool FOnlineCloudSaveAccelByte::GetPublicUserRecord ( int32 LocalUserNum,
const FString & Key )

Get a public record (arbitrary JSON data) by its key in user-level.

Parameters
LocalUserNumIndex of user that is attempting to get record
KeyThe record key to delete

◆ GetPublicUserRecord() [2/2]

bool FOnlineCloudSaveAccelByte::GetPublicUserRecord ( int32 LocalUserNum,
const FString & Key,
const FUniqueNetIdAccelByteUserRef & RecordUserId )

Get a public record (arbitrary JSON data) by its key in user-level.

Parameters
LocalUserNumIndex of user that is attempting to get record
KeyThe record key to delete
RecordUserIdThe UserId of the record owner

◆ GetUserRecord() [1/2]

bool FOnlineCloudSaveAccelByte::GetUserRecord ( int32 LocalUserNum,
const FString & Key )

Get a record (arbitrary JSON data) by its key in user-level.

Parameters
LocalUserNumIndex of user that is attempting to get record
KeyThe record key to delete

◆ GetUserRecord() [2/2]

bool FOnlineCloudSaveAccelByte::GetUserRecord ( int32 LocalUserNum,
const FString & Key,
const FUniqueNetIdAccelByteUserRef & RecordUserId )

Get a record (arbitrary JSON data) by its key in user-level. Only for request by Game Server.

Parameters
LocalUserNumIndex of user that is attempting to get record
KeyThe record key to delete
RecordUserIdThe UserId of the record owner

◆ ReplaceAdminGameRecord()

bool FOnlineCloudSaveAccelByte::ReplaceAdminGameRecord ( int32 LocalUserNum,
const FString & Key,
const FJsonObject & RecordRequest,
const FTTLConfig & TTLConfig )

Replace a record by its key in namespace-level. Only for request by Game Server.

Parameters
LocalUserNumIndex of user that is attempting to get game record
KeyThe record key to get
RecordRequestRecord to replace in the form of Json object
TTLConfigThe configuration to control the action taken if the record has expired. If the action set to NONE, then it will not send the TTL (Time to live) meta data.

◆ ReplaceGameRecord() [1/2]

bool FOnlineCloudSaveAccelByte::ReplaceGameRecord ( int32 LocalUserNum,
const FString & Key,
const FJsonObject & RecordRequest )

Replace a record by its key in namespace-level.

Parameters
LocalUserNumIndex of user that is attempting to get game record
KeyThe record key to get
RecordRequestRecord to replace in the form of Json object

◆ ReplaceGameRecord() [2/2]

bool FOnlineCloudSaveAccelByte::ReplaceGameRecord ( int32 LocalUserNum,
const FString & Key,
ESetByMetadataRecord SetBy,
const FJsonObject & RecordRequest,
const FTTLConfig & TTLConfig )

Replace a record by its key in namespace-level.

Parameters
LocalUserNumIndex of user that is attempting to get game record
KeyThe record key to get
SetByMetadata record set by server or client
RecordRequestRecord to replace in the form of Json object
TTLConfigThe configuration to control the action taken if the record has expired. If the action set to NONE, then it will not send the TTL (Time to live) meta data.

◆ ReplacePublicUserRecord()

bool FOnlineCloudSaveAccelByte::ReplacePublicUserRecord ( int32 LocalUserNum,
const FString & Key,
const FJsonObject & RecordRequest,
const FUniqueNetIdAccelByteUserRef & TargetUserId = FUniqueNetIdAccelByteUser::Invalid() )

Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one.

Parameters
LocalUserNumIndex of user that is attempting to get record
KeyThe record key to replace
RecordRequestRecord to replace in the form of Json object
TargetUserIdTarget of AccelByte User Net Id for server to call the request

◆ ReplaceUserRecord()

bool FOnlineCloudSaveAccelByte::ReplaceUserRecord ( int32 LocalUserNum,
const FString & Key,
const FJsonObject & RecordRequest,
const FUniqueNetIdAccelByteUserRef & TargetUserId = FUniqueNetIdAccelByteUser::Invalid() )

Replace a record in user-level. If the record doesn't exist, it will create and save the record. If already exists, it will replace the existing one.

Parameters
LocalUserNumIndex of user that is attempting to get record
KeyThe record key to replace
RecordRequestRecord to replace in the form of Json object
TargetUserIdTarget of AccelByte User Net Id for server to call the request

Member Data Documentation

◆ AccelByteSubsystem

FOnlineSubsystemAccelByteWPtr FOnlineCloudSaveAccelByte::AccelByteSubsystem = nullptr
protected

Instance of the subsystem that created this interface