LootLocker Unreal SDK 10.4.0
Game backend SDK for Unreal Engine
Loading...
Searching...
No Matches
ULootLockerPresenceManager Class Reference

Manager for LootLocker presence functionality Coordinates presence connections for multiple players/sessions and provides lifecycle management through external event integration. More...

#include <LootLockerPresenceManager.h>

Inheritance diagram for ULootLockerPresenceManager:
Collaboration diagram for ULootLockerPresenceManager:

Public Member Functions

 ULootLockerPresenceManager ()
 
void ConnectPresence (const FString &PlayerUlid, const FLootLockerPresenceCallbackDelegate &OnComplete)
 Manually connect presence for a specific player.
 
void DisconnectPresence (const FString &PlayerUlid, const FLootLockerPresenceCallbackDelegate &OnComplete)
 Manually disconnect presence for a specific player.
 
void UpdateStatus (const FString &PlayerUlid, const FString &Status, const TMap< FString, FString > &Metadata, const FLootLockerPresenceCallbackDelegate &OnComplete)
 Update status for a player's presence connection.
 
void UpdateSessionToken (const FString &PlayerUlid, const FString &NewToken)
 Update session token for an existing presence connection.
 
void ConnectPresenceForAllActiveSessions (const FLootLockerPresenceCallbackDelegate &OnComplete)
 Connect presence for all currently authenticated players/sessions.
 
void DisconnectAll (const FLootLockerPresenceCallbackDelegate &OnComplete)
 Disconnect all active presence connections.
 
void PauseAllConnections ()
 Pause all active presence connections (keeps connections alive but stops activity) Called when app goes to background, network is lost, etc.
 
void PauseConnection (const FString &PlayerUlid)
 Pause presence connection for a specific player.
 
void ResumeAllConnections ()
 Resume all paused presence connections Called when app returns to foreground, network is restored, etc.
 
void ResumeConnection (const FString &PlayerUlid)
 Resume presence connection for a specific player.
 
void GracefullyShutdown ()
 Gracefully shutdown all presence connections Called during application termination.
 
bool IsPresenceActiveForPlayer (const FString &PlayerUlid) const
 Check if presence is active for a specific player.
 
ELootLockerPresenceConnectionState GetPresenceStateForPlayer (const FString &PlayerUlid) const
 Get connection state for a specific player.
 
FLootLockerPresenceConnectionStats GetConnectionStatsForPlayer (const FString &PlayerUlid) const
 Get connection statistics for a specific player.
 
TArray< FString > GetConnectedPlayerUlids () const
 Get list of all currently connected player ULIDs.
 
int32 GetActiveConnectionCount () const
 Get count of currently active presence connections.
 

Static Public Member Functions

static bool IsEnabled ()
 Check if presence manager is globally enabled.
 
static void SetEnabled (bool bEnabled)
 Enable or disable presence manager globally.
 
static bool IsAutoConnectEnabled ()
 Check if auto-connect is enabled.
 
static void SetAutoConnectEnabled (bool bEnabled)
 Enable or disable auto-connect behavior.
 
static bool IsPauseOnBackgroundEnabled ()
 Check if pause-on-background is enabled.
 
static void SetPauseOnBackgroundEnabled (bool bEnabled)
 Enable or disable pause-on-background behavior.
 
static bool IsEnabledInEditor ()
 Check if presence is enabled in editor.
 
static void SetEnabledInEditor (bool bEnabled)
 Enable or disable presence in editor.
 
static ULootLockerPresenceManagerGetInstance ()
 Get the singleton instance of the presence manager.
 
static void Initialize ()
 Initialize the presence manager subsystem.
 
static void Shutdown ()
 Shutdown and cleanup the presence manager subsystem.
 
static void NotifyPlayerActivated (const FString &PlayerUlid)
 Notify manager that a player has been activated (e.g., logged in)
 
static void NotifyPlayerDeactivated (const FString &PlayerUlid)
 Notify manager that a player has been deactivated (e.g., logged out)
 

Protected Member Functions

virtual void BeginDestroy () override
 

Detailed Description

Manager for LootLocker presence functionality Coordinates presence connections for multiple players/sessions and provides lifecycle management through external event integration.

Constructor & Destructor Documentation

◆ ULootLockerPresenceManager()

ULootLockerPresenceManager::ULootLockerPresenceManager ( )

Member Function Documentation

◆ BeginDestroy()

virtual void ULootLockerPresenceManager::BeginDestroy ( )
overrideprotectedvirtual

◆ ConnectPresence()

void ULootLockerPresenceManager::ConnectPresence ( const FString &  PlayerUlid,
const FLootLockerPresenceCallbackDelegate OnComplete 
)

Manually connect presence for a specific player.

Parameters
PlayerUlidThe player ULID to connect presence for
OnCompleteCallback when connection attempt completes

◆ ConnectPresenceForAllActiveSessions()

void ULootLockerPresenceManager::ConnectPresenceForAllActiveSessions ( const FLootLockerPresenceCallbackDelegate OnComplete)

Connect presence for all currently authenticated players/sessions.

Parameters
OnCompleteCallback when all connection attempts complete

◆ DisconnectAll()

void ULootLockerPresenceManager::DisconnectAll ( const FLootLockerPresenceCallbackDelegate OnComplete)

Disconnect all active presence connections.

Parameters
OnCompleteCallback when all disconnections complete

◆ DisconnectPresence()

void ULootLockerPresenceManager::DisconnectPresence ( const FString &  PlayerUlid,
const FLootLockerPresenceCallbackDelegate OnComplete 
)

Manually disconnect presence for a specific player.

Parameters
PlayerUlidThe player ULID to disconnect presence for
OnCompleteCallback when disconnection completes

◆ GetActiveConnectionCount()

int32 ULootLockerPresenceManager::GetActiveConnectionCount ( ) const

Get count of currently active presence connections.

Returns
Number of active connections

◆ GetConnectedPlayerUlids()

TArray< FString > ULootLockerPresenceManager::GetConnectedPlayerUlids ( ) const

Get list of all currently connected player ULIDs.

Returns
Array of player ULIDs with active presence connections

◆ GetConnectionStatsForPlayer()

FLootLockerPresenceConnectionStats ULootLockerPresenceManager::GetConnectionStatsForPlayer ( const FString &  PlayerUlid) const

Get connection statistics for a specific player.

Parameters
PlayerUlidThe player ULID to get statistics for
Returns
Connection statistics structure

◆ GetInstance()

static ULootLockerPresenceManager * ULootLockerPresenceManager::GetInstance ( )
static

Get the singleton instance of the presence manager.

◆ GetPresenceStateForPlayer()

ELootLockerPresenceConnectionState ULootLockerPresenceManager::GetPresenceStateForPlayer ( const FString &  PlayerUlid) const

Get connection state for a specific player.

Parameters
PlayerUlidThe player ULID to check
Returns
Current connection state

◆ GracefullyShutdown()

void ULootLockerPresenceManager::GracefullyShutdown ( )

Gracefully shutdown all presence connections Called during application termination.

◆ Initialize()

static void ULootLockerPresenceManager::Initialize ( )
static

Initialize the presence manager subsystem.

◆ IsAutoConnectEnabled()

static bool ULootLockerPresenceManager::IsAutoConnectEnabled ( )
static

Check if auto-connect is enabled.

Returns
True if auto-connect is enabled

◆ IsEnabled()

static bool ULootLockerPresenceManager::IsEnabled ( )
static

Check if presence manager is globally enabled.

Returns
True if presence connections are enabled

◆ IsEnabledInEditor()

static bool ULootLockerPresenceManager::IsEnabledInEditor ( )
static

Check if presence is enabled in editor.

Returns
True if presence is enabled in editor

◆ IsPauseOnBackgroundEnabled()

static bool ULootLockerPresenceManager::IsPauseOnBackgroundEnabled ( )
static

Check if pause-on-background is enabled.

Returns
True if pause-on-background is enabled

◆ IsPresenceActiveForPlayer()

bool ULootLockerPresenceManager::IsPresenceActiveForPlayer ( const FString &  PlayerUlid) const

Check if presence is active for a specific player.

Parameters
PlayerUlidThe player ULID to check
Returns
True if presence is active and connected

◆ NotifyPlayerActivated()

static void ULootLockerPresenceManager::NotifyPlayerActivated ( const FString &  PlayerUlid)
static

Notify manager that a player has been activated (e.g., logged in)

Parameters
PlayerUlidThe player ULID that was activated

◆ NotifyPlayerDeactivated()

static void ULootLockerPresenceManager::NotifyPlayerDeactivated ( const FString &  PlayerUlid)
static

Notify manager that a player has been deactivated (e.g., logged out)

Parameters
PlayerUlidThe player ULID that was deactivated

◆ PauseAllConnections()

void ULootLockerPresenceManager::PauseAllConnections ( )

Pause all active presence connections (keeps connections alive but stops activity) Called when app goes to background, network is lost, etc.

◆ PauseConnection()

void ULootLockerPresenceManager::PauseConnection ( const FString &  PlayerUlid)

Pause presence connection for a specific player.

Parameters
PlayerUlidThe player ULID to pause presence for

◆ ResumeAllConnections()

void ULootLockerPresenceManager::ResumeAllConnections ( )

Resume all paused presence connections Called when app returns to foreground, network is restored, etc.

◆ ResumeConnection()

void ULootLockerPresenceManager::ResumeConnection ( const FString &  PlayerUlid)

Resume presence connection for a specific player.

Parameters
PlayerUlidThe player ULID to resume presence for

◆ SetAutoConnectEnabled()

static void ULootLockerPresenceManager::SetAutoConnectEnabled ( bool  bEnabled)
static

Enable or disable auto-connect behavior.

Parameters
bEnabledWhether to enable auto-connect

◆ SetEnabled()

static void ULootLockerPresenceManager::SetEnabled ( bool  bEnabled)
static

Enable or disable presence manager globally.

Parameters
bEnabledWhether to enable presence connections

◆ SetEnabledInEditor()

static void ULootLockerPresenceManager::SetEnabledInEditor ( bool  bEnabled)
static

Enable or disable presence in editor.

Parameters
bEnabledWhether to enable presence in editor

◆ SetPauseOnBackgroundEnabled()

static void ULootLockerPresenceManager::SetPauseOnBackgroundEnabled ( bool  bEnabled)
static

Enable or disable pause-on-background behavior.

Parameters
bEnabledWhether to enable pause-on-background

◆ Shutdown()

static void ULootLockerPresenceManager::Shutdown ( )
static

Shutdown and cleanup the presence manager subsystem.

◆ UpdateSessionToken()

void ULootLockerPresenceManager::UpdateSessionToken ( const FString &  PlayerUlid,
const FString &  NewToken 
)

Update session token for an existing presence connection.

Parameters
PlayerUlidThe player ULID to update token for
NewTokenThe new session token

◆ UpdateStatus()

void ULootLockerPresenceManager::UpdateStatus ( const FString &  PlayerUlid,
const FString &  Status,
const TMap< FString, FString > &  Metadata,
const FLootLockerPresenceCallbackDelegate OnComplete 
)

Update status for a player's presence connection.

Parameters
PlayerUlidThe player ULID to update status for
StatusThe new status string (e.g., "online", "in_game", "away")
MetadataOptional metadata key-value pairs
OnCompleteCallback when status update completes