PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
BiosSessionService Class Reference

Private Member Functions

proto native EBiosError EnterGameplaySessionAsync (string session_address, int session_port)
 Enter a gameplay session.
 
proto native EBiosError LeaveGameplaySessionAsync (string session_address, int session_port)
 Leave a gameplay session.
 
proto native void OnSessionPlayerListUpdate (array< string > newPlayers)
 Alerts engine that players in current session have changed.
 
void TryGetSession (string join_handle="")
 Gets a session from a join handle.
 
proto native EBiosError GetSessionAsync (string join_handle)
 Gets a session from a join handle.
 
proto native EBiosError SetGameplayActivityAsync (string session_address, int session_port)
 Sets the activity to a gameplay session.
 
proto native EBiosError ClearActivityAsync ()
 not implemented
 
proto native EBiosError ShowInviteToGameplaySessionAsync (string session_address, int session_port)
 Show system UI to invite friends to current gameplay session.
 
proto native EBiosError InviteToGameplaySessionAsync (string session_address, int session_port, array< string > invitee_list)
 Send invite to list of users.
 
proto native void SetMultiplayState (bool is_active)
 Notifiy about interactive multiplayer state.
 
void OnSetActivity (EBiosError error)
 Callback function.
 
void OnClearActivity (EBiosError error)
 Callback function.
 
void OnGetGameplaySession (string session_address, int session_port)
 Callback function.
 
void OnGetSessionError (EBiosError error)
 //! Callback function, not implemented
 
void OnEnterGameplaySession (string session_address, int session_port, EBiosError error)
 Callback function.
 
void OnLeaveGameplaySession (EBiosError error)
 Callback function.
 
void OnShowInviteToGameplaySession (EBiosError error)
 Callback function.
 
void OnInviteToGameplaySession (EBiosError error)
 Callback function.
 
array< stringGetSessionPlayerList ()
 
void GetSessionPlayerListEx (TStringArray outPlayerList)
 Native callback function to retrieve the session player list.
 

Private Attributes

protected int m_GetSessionAttempts
 
string m_CurrentHandle
 

Member Function Documentation

◆ ClearActivityAsync()

proto native EBiosError ClearActivityAsync ( )
private

not implemented

Clears the current activity

The async result is returned in the OnClearActivity callback. Expected errors:

Returns
EBiosError indicating if the async operation is pending.

◆ EnterGameplaySessionAsync()

proto native EBiosError EnterGameplaySessionAsync ( string  session_address,
int  session_port 
)
private

Enter a gameplay session.

The async result is returned in the OnEnterGameplaySession callback. Expected errors: LOGICAL - if the user is currently in an active gameplay session.

Parameters
session_addressserver IP address.
session_portserver port.
Returns
EBiosError indicating if the async operation is pending.

Referenced by OnlineServices::EnterGameplaySession().

◆ GetSessionAsync()

proto native EBiosError GetSessionAsync ( string  join_handle)
private

Gets a session from a join handle.

The async result is returned in the OnGetGameplaySession, OnGetLobbySession or OnGetSessionError callback, dependinng on the type of session, or error. Expected errors:

Parameters
join_handlethe parsed join handle.
Returns
EBiosError indicating if the async operation is pending.

Referenced by TryGetSession().

◆ GetSessionPlayerList()

array< string > GetSessionPlayerList ( )
inlineprivate

◆ GetSessionPlayerListEx()

void GetSessionPlayerListEx ( TStringArray  outPlayerList)
inlineprivate

Native callback function to retrieve the session player list.

Parameters
outPlayerListOutput list of players in the session.

References GetSessionPlayerList().

◆ InviteToGameplaySessionAsync()

proto native EBiosError InviteToGameplaySessionAsync ( string  session_address,
int  session_port,
array< string invitee_list 
)
private

Send invite to list of users.

The async result is returned in the OnInviteToGameplaySession callback. The user must be inside the session. That means, OnEnterGameplaySession must be called with no errors.

Parameters
session_addressserver IP address.
session_portserver port.
invitee_listlist of users to invite
Returns
EBiosError indicating if the async operation is pending.

Referenced by OnEnterGameplaySession(), and OnlineServices::SetPendingInviteList().

◆ LeaveGameplaySessionAsync()

proto native EBiosError LeaveGameplaySessionAsync ( string  session_address,
int  session_port 
)
private

Leave a gameplay session.

The async result is returned in the OnLeaveGameplaySession callback. If there is an unexpected error the state is cleared. Expected errors: ERR_NOT_FOUND - when attempting to leave a gameplay session the user is not part of. ERR_LOGICAL - when the user is not in a gameplay session.

Parameters
session_addressserver IP address.
session_portserver port.
Returns
EBiosError indicating if the async operation is pending.

Referenced by OnlineServices::LeaveGameplaySession().

◆ OnClearActivity()

void OnClearActivity ( EBiosError  error)
inlineprivate

Callback function.

Parameters
errorerror indicating success or fail of the async operation.

◆ OnEnterGameplaySession()

void OnEnterGameplaySession ( string  session_address,
int  session_port,
EBiosError  error 
)
inlineprivate

Callback function.

Parameters
session_addressserver IP address. Empty if failed.
session_portserver port. 0 if failed.
errorerror indicating success or fail of the async operation.

References OnlineServices::ErrorCaught(), OnlineServices::GetPendingInviteList(), InviteToGameplaySessionAsync(), and SetGameplayActivityAsync().

◆ OnGetGameplaySession()

void OnGetGameplaySession ( string  session_address,
int  session_port 
)
inlineprivate

◆ OnGetSessionError()

void OnGetSessionError ( EBiosError  error)
inlineprivate

//! Callback function, not implemented

Callback function

Parameters
errorerror indicating fail of the async operation. Cannot be OK.

References CALL_CATEGORY_SYSTEM, ScriptCallQueue::CallLater(), DISCONNECT_SESSION_FLAGS_JOIN, OnlineServices::ErrorCaught(), g_Game, CGame::GetCallQueue(), GetGame(), m_GetSessionAttempts, and TryGetSession().

◆ OnInviteToGameplaySession()

void OnInviteToGameplaySession ( EBiosError  error)
inlineprivate

Callback function.

Parameters
errorindicating success or fail of the async operation.

◆ OnLeaveGameplaySession()

void OnLeaveGameplaySession ( EBiosError  error)
inlineprivate

Callback function.

Parameters
errorerror indicating success or fail of the async operation.

◆ OnSessionPlayerListUpdate()

proto native void OnSessionPlayerListUpdate ( array< string newPlayers)
private

Alerts engine that players in current session have changed.

Parameters
newPlayersplayers that have just joined the server. When player joins a server, ALL players already on server count as new players.

Referenced by ClientData::SyncEvent_OnRecievedPlayerList().

◆ OnSetActivity()

void OnSetActivity ( EBiosError  error)
inlineprivate

Callback function.

Parameters
errorerror indicating success or fail of the async operation.

References OnlineServices::ErrorCaught().

◆ OnShowInviteToGameplaySession()

void OnShowInviteToGameplaySession ( EBiosError  error)
inlineprivate

Callback function.

Parameters
errorindicating success or fail of the async operation.

References OnlineServices::ErrorCaught().

◆ SetGameplayActivityAsync()

proto native EBiosError SetGameplayActivityAsync ( string  session_address,
int  session_port 
)
private

Sets the activity to a gameplay session.

The async result is returned in the OnSetActivity callback. Expected errors: ERR_NOT_FOUND - when attempting to set a gameplay session activity the user is not part of.

Parameters
session_addressserver IP address.
session_portserver port.
Returns
EBiosError indicating if the async operation is pending.

Referenced by OnEnterGameplaySession(), and OnlineServices::SetGameplayActivity().

◆ SetMultiplayState()

proto native void SetMultiplayState ( bool  is_active)
private

Notifiy about interactive multiplayer state.

Referenced by OnlineServices::SetMultiplayState().

◆ ShowInviteToGameplaySessionAsync()

proto native EBiosError ShowInviteToGameplaySessionAsync ( string  session_address,
int  session_port 
)
private

Show system UI to invite friends to current gameplay session.

The async result is returned in the OnShowInviteToGameplaySession callback. On Xbox, if session with session_address and session_port does not exist, then xbox show message "We could not send the invite".

Parameters
session_addressserver IP address.
session_portserver port.
Returns
EBiosError indicating if the async operation is pending.

Referenced by OnlineServices::ShowInviteScreen().

◆ TryGetSession()

void TryGetSession ( string  join_handle = "")
inlineprivate

Gets a session from a join handle.

The async result is returned in the OnGetGameplaySession, OnGetLobbySession or OnGetSessionError callback, dependinng on the type of session, or error. Expected errors:

Parameters
join_handlethe parsed join handle.
Returns
EBiosError indicating if the async operation is pending.

References DISCONNECT_SESSION_FLAGS_JOIN, g_Game, GetSessionAsync(), m_CurrentHandle, and m_GetSessionAttempts.

Referenced by OnlineServices::GetSession(), and OnGetSessionError().

Field Documentation

◆ m_CurrentHandle

◆ m_GetSessionAttempts

protected int m_GetSessionAttempts
private

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