LEAP Documentation 40220
Documentation for the LEAP project
AProjectXGameSession Class Reference

#include <ProjectXGameSession.h>

Inheritance diagram for AProjectXGameSession:

Public Member Functions

virtual void InitOptions (const FString &Options) override
 
virtual void RegisterServer () override
 
virtual FString ApproveLogin (const FString &Options, const FUniqueNetIdRepl &UniqueId) override
 
virtual void AddAdmin (APlayerController *AdminPlayer) override
 
virtual void RemoveAdmin (APlayerController *AdminPlayer) override
 
virtual bool KickPlayer (APlayerController *KickedPlayer, const FText &KickReason) override
 
virtual bool BanPlayer (APlayerController *BannedPlayer, const FText &BanReason) override
 
virtual bool SessionKickPlayer (APlayerController *KickedPlayer, const FText &KickReason)
 
virtual bool IsPlayerBanned (UNetConnection *NetConnection, const FUniqueNetIdRepl &UniqueId) const
 
virtual bool IsPlayerSessionKicked (UNetConnection *NetConnection, const FUniqueNetIdRepl &UniqueId) const
 
bool TravelToSession (int32 ControllerId, FName SessionName)
 
virtual void HandleMatchHasStarted () override
 
virtual void HandleMatchHasEnded () override
 
void FindSessions (TSharedPtr< const FUniqueNetId > UserId, FName InSessionName, int32 PartySize, const TArray< EGameType > &GameTypes, bool bIsLAN, bool bIsPresence, bool bIsMatchmaking, bool bSearchFreshServersOnly)
 
bool JoinSession (TSharedPtr< const FUniqueNetId > UserId, FName SessionName, int32 SessionIndexInSearchResults)
 
bool JoinSession (TSharedPtr< const FUniqueNetId > UserId, FName SessionName, const FOnlineSessionSearchResult &SearchResult)
 
bool HostSession (TSharedPtr< const FUniqueNetId > UserId, FName SessionName, const FString &GameType, const FString &MapName, bool bIsLAN, bool bIsPresence, int32 MaxNumPlayers)
 
bool HostSession (const TSharedPtr< const FUniqueNetId > UserId, const FName SessionName, const FOnlineSessionSettings &SessionSettings)
 
void DestroySession ()
 
void UpdateSession ()
 
FOnCreatePresenceSessionComplete & OnCreatePresenceSessionComplete ()
 
FOnFindSessionsComplete & OnFindSessionsComplete ()
 
FOnJoinSessionComplete & OnJoinSessionComplete ()
 
FOnDestroySessionCompleteDelegate & OnDestroySessionComplete ()
 
void UpdateServerInfoMapName (const FString &MapName)
 
void UpdateServerInfoGameModeName (const EGameType &GameMode)
 
void UpdateServerInfoDifficulty (const EDifficultyLevel &DifficultyLevel)
 
void UpdateServerInfoMaxPlayers (int32 PlayerCountMax)
 
void StartMatchmaking ()
 
bool IsServerOfficial ()
 
TSharedPtr< class FOnlineSessionSearch > GetCurrentSearchSettings () const
 

Public Attributes

TArray< FString > BannedPlayerID
 
TArray< FString > BannedPlayerIP
 
TArray< FString > SessionKickedPlayerID
 
FString ServerPassword = ""
 
FString OfficialServerSessionPassword = ""
 
FString ServerName = "DefaultName"
 
FString ServerRegion = "USEast"
 

Protected Member Functions

virtual void OnCreateSessionComplete (FName SessionName, bool bWasSuccessful)
 
void OnStartOnlineGameComplete (FName SessionName, bool bWasSuccessful)
 
void OnFindSessionsComplete (bool bWasSuccessful)
 
void OnJoinSessionComplete (FName SessionName, EOnJoinSessionCompleteResult::Type Result)
 
virtual void OnDestroySessionComplete (FName SessionName, bool bWasSuccessful)
 

Protected Attributes

FOnCreateSessionCompleteDelegate OnCreateSessionCompleteDelegate
 
FOnStartSessionCompleteDelegate OnStartSessionCompleteDelegate
 
FOnDestroySessionCompleteDelegate OnDestroySessionCompleteDelegate
 
FOnFindSessionsCompleteDelegate OnFindSessionsCompleteDelegate
 
FOnJoinSessionCompleteDelegate OnJoinSessionCompleteDelegate
 
FOnCreatePresenceSessionComplete CreatePresenceSessionCompleteEvent
 
FOnFindSessionsComplete FindSessionsCompleteEvent
 
FOnJoinSessionComplete JoinSessionCompleteEvent
 
FDelegateHandle OnStartSessionCompleteDelegateHandle
 
FDelegateHandle OnCreateSessionCompleteDelegateHandle
 
FDelegateHandle OnDestroySessionCompleteDelegateHandle
 
FDelegateHandle OnFindSessionsCompleteDelegateHandle
 
FDelegateHandle OnJoinSessionCompleteDelegateHandle
 
FProjectXGameSessionParams CurrentSessionParams
 
TSharedPtr< class FProjectXOnlineSessionSettingsHostSettings
 
TSharedPtr< class FOnlineSessionSearch > SearchSettings
 

Member Function Documentation

◆ AddAdmin()

void AProjectXGameSession::AddAdmin ( APlayerController *  AdminPlayer)
overridevirtual

◆ ApproveLogin()

FString AProjectXGameSession::ApproveLogin ( const FString &  Options,
const FUniqueNetIdRepl &  UniqueId 
)
overridevirtual

◆ BanPlayer()

bool AProjectXGameSession::BanPlayer ( APlayerController *  BannedPlayer,
const FText &  BanReason 
)
overridevirtual

◆ DestroySession()

void AProjectXGameSession::DestroySession ( )

◆ FindSessions()

void AProjectXGameSession::FindSessions ( TSharedPtr< const FUniqueNetId >  UserId,
FName  InSessionName,
int32  PartySize,
const TArray< EGameType > &  GameTypes,
bool  bIsLAN,
bool  bIsPresence,
bool  bIsMatchmaking,
bool  bSearchFreshServersOnly 
)

◆ GetCurrentSearchSettings()

TSharedPtr< class FOnlineSessionSearch > AProjectXGameSession::GetCurrentSearchSettings ( ) const
inline

◆ HandleMatchHasEnded()

void AProjectXGameSession::HandleMatchHasEnded ( )
overridevirtual

◆ HandleMatchHasStarted()

void AProjectXGameSession::HandleMatchHasStarted ( )
overridevirtual

◆ HostSession() [1/2]

bool AProjectXGameSession::HostSession ( const TSharedPtr< const FUniqueNetId >  UserId,
const FName  SessionName,
const FOnlineSessionSettings &  SessionSettings 
)

◆ HostSession() [2/2]

bool AProjectXGameSession::HostSession ( TSharedPtr< const FUniqueNetId >  UserId,
FName  SessionName,
const FString &  GameType,
const FString &  MapName,
bool  bIsLAN,
bool  bIsPresence,
int32  MaxNumPlayers 
)

◆ InitOptions()

void AProjectXGameSession::InitOptions ( const FString &  Options)
overridevirtual

◆ IsPlayerBanned()

bool AProjectXGameSession::IsPlayerBanned ( UNetConnection *  NetConnection,
const FUniqueNetIdRepl &  UniqueId 
) const
virtual

◆ IsPlayerSessionKicked()

bool AProjectXGameSession::IsPlayerSessionKicked ( UNetConnection *  NetConnection,
const FUniqueNetIdRepl &  UniqueId 
) const
virtual

◆ IsServerOfficial()

bool AProjectXGameSession::IsServerOfficial ( )
inline

◆ JoinSession() [1/2]

bool AProjectXGameSession::JoinSession ( TSharedPtr< const FUniqueNetId >  UserId,
FName  SessionName,
const FOnlineSessionSearchResult &  SearchResult 
)

◆ JoinSession() [2/2]

bool AProjectXGameSession::JoinSession ( TSharedPtr< const FUniqueNetId >  UserId,
FName  SessionName,
int32  SessionIndexInSearchResults 
)

◆ KickPlayer()

bool AProjectXGameSession::KickPlayer ( APlayerController *  KickedPlayer,
const FText &  KickReason 
)
overridevirtual

◆ OnCreatePresenceSessionComplete()

FOnCreatePresenceSessionComplete & AProjectXGameSession::OnCreatePresenceSessionComplete ( )
inline

◆ OnCreateSessionComplete()

void AProjectXGameSession::OnCreateSessionComplete ( FName  SessionName,
bool  bWasSuccessful 
)
protectedvirtual

◆ OnDestroySessionComplete() [1/2]

FOnDestroySessionCompleteDelegate & AProjectXGameSession::OnDestroySessionComplete ( )
inline

◆ OnDestroySessionComplete() [2/2]

void AProjectXGameSession::OnDestroySessionComplete ( FName  SessionName,
bool  bWasSuccessful 
)
protectedvirtual

◆ OnFindSessionsComplete() [1/2]

FOnFindSessionsComplete & AProjectXGameSession::OnFindSessionsComplete ( )
inline

◆ OnFindSessionsComplete() [2/2]

void AProjectXGameSession::OnFindSessionsComplete ( bool  bWasSuccessful)
protected

◆ OnJoinSessionComplete() [1/2]

FOnJoinSessionComplete & AProjectXGameSession::OnJoinSessionComplete ( )
inline

◆ OnJoinSessionComplete() [2/2]

void AProjectXGameSession::OnJoinSessionComplete ( FName  SessionName,
EOnJoinSessionCompleteResult::Type  Result 
)
protected

◆ OnStartOnlineGameComplete()

void AProjectXGameSession::OnStartOnlineGameComplete ( FName  SessionName,
bool  bWasSuccessful 
)
protected

◆ RegisterServer()

void AProjectXGameSession::RegisterServer ( )
overridevirtual

◆ RemoveAdmin()

void AProjectXGameSession::RemoveAdmin ( APlayerController *  AdminPlayer)
overridevirtual

◆ SessionKickPlayer()

bool AProjectXGameSession::SessionKickPlayer ( APlayerController *  KickedPlayer,
const FText &  KickReason 
)
virtual

◆ StartMatchmaking()

void AProjectXGameSession::StartMatchmaking ( )

◆ TravelToSession()

bool AProjectXGameSession::TravelToSession ( int32  ControllerId,
FName  SessionName 
)

UE_BUILD_SHIPPING

◆ UpdateServerInfoDifficulty()

void AProjectXGameSession::UpdateServerInfoDifficulty ( const EDifficultyLevel DifficultyLevel)

◆ UpdateServerInfoGameModeName()

void AProjectXGameSession::UpdateServerInfoGameModeName ( const EGameType GameMode)

◆ UpdateServerInfoMapName()

void AProjectXGameSession::UpdateServerInfoMapName ( const FString &  MapName)

◆ UpdateServerInfoMaxPlayers()

void AProjectXGameSession::UpdateServerInfoMaxPlayers ( int32  PlayerCountMax)

◆ UpdateSession()

void AProjectXGameSession::UpdateSession ( )

Member Data Documentation

◆ BannedPlayerID

TArray<FString> AProjectXGameSession::BannedPlayerID

◆ BannedPlayerIP

TArray<FString> AProjectXGameSession::BannedPlayerIP

◆ CreatePresenceSessionCompleteEvent

FOnCreatePresenceSessionComplete AProjectXGameSession::CreatePresenceSessionCompleteEvent
protected

◆ CurrentSessionParams

FProjectXGameSessionParams AProjectXGameSession::CurrentSessionParams
protected

Transient properties of a session during game creation/matchmaking

◆ FindSessionsCompleteEvent

FOnFindSessionsComplete AProjectXGameSession::FindSessionsCompleteEvent
protected

◆ HostSettings

TSharedPtr<class FProjectXOnlineSessionSettings> AProjectXGameSession::HostSettings
protected

Current host settings

◆ JoinSessionCompleteEvent

FOnJoinSessionComplete AProjectXGameSession::JoinSessionCompleteEvent
protected

◆ OfficialServerSessionPassword

FString AProjectXGameSession::OfficialServerSessionPassword = ""

◆ OnCreateSessionCompleteDelegate

FOnCreateSessionCompleteDelegate AProjectXGameSession::OnCreateSessionCompleteDelegate
protected

Delegate for creating a new session

◆ OnCreateSessionCompleteDelegateHandle

FDelegateHandle AProjectXGameSession::OnCreateSessionCompleteDelegateHandle
protected

◆ OnDestroySessionCompleteDelegate

FOnDestroySessionCompleteDelegate AProjectXGameSession::OnDestroySessionCompleteDelegate
protected

Delegate for destroying a session

◆ OnDestroySessionCompleteDelegateHandle

FDelegateHandle AProjectXGameSession::OnDestroySessionCompleteDelegateHandle
protected

◆ OnFindSessionsCompleteDelegate

FOnFindSessionsCompleteDelegate AProjectXGameSession::OnFindSessionsCompleteDelegate
protected

Delegate for searching for sessions

◆ OnFindSessionsCompleteDelegateHandle

FDelegateHandle AProjectXGameSession::OnFindSessionsCompleteDelegateHandle
protected

◆ OnJoinSessionCompleteDelegate

FOnJoinSessionCompleteDelegate AProjectXGameSession::OnJoinSessionCompleteDelegate
protected

Delegate after joining a session

◆ OnJoinSessionCompleteDelegateHandle

FDelegateHandle AProjectXGameSession::OnJoinSessionCompleteDelegateHandle
protected

◆ OnStartSessionCompleteDelegate

FOnStartSessionCompleteDelegate AProjectXGameSession::OnStartSessionCompleteDelegate
protected

Delegate after starting a session

◆ OnStartSessionCompleteDelegateHandle

FDelegateHandle AProjectXGameSession::OnStartSessionCompleteDelegateHandle
protected

Handles to various registered delegates

◆ SearchSettings

TSharedPtr<class FOnlineSessionSearch> AProjectXGameSession::SearchSettings
protected

Current search settings

◆ ServerName

FString AProjectXGameSession::ServerName = "DefaultName"

◆ ServerPassword

FString AProjectXGameSession::ServerPassword = ""

◆ ServerRegion

FString AProjectXGameSession::ServerRegion = "USEast"

◆ SessionKickedPlayerID

TArray<FString> AProjectXGameSession::SessionKickedPlayerID

The documentation for this class was generated from the following files: