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< string > | GetSessionPlayerList () |
void | GetSessionPlayerListEx (TStringArray outPlayerList) |
Native callback function to retrieve the session player list. | |
Private Attributes | |
protected int | m_GetSessionAttempts |
string | m_CurrentHandle |
|
private |
not implemented
Clears the current activity
The async result is returned in the OnClearActivity callback. Expected errors:
|
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.
session_address | server IP address. |
session_port | server port. |
Referenced by OnlineServices::EnterGameplaySession().
|
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:
join_handle | the parsed join handle. |
Referenced by TryGetSession().
References ClientData::GetSimplePlayerList().
Referenced by GetSessionPlayerListEx().
|
inlineprivate |
Native callback function to retrieve the session player list.
outPlayerList | Output list of players in the session. |
References GetSessionPlayerList().
|
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.
session_address | server IP address. |
session_port | server port. |
invitee_list | list of users to invite |
Referenced by OnEnterGameplaySession(), and OnlineServices::SetPendingInviteList().
|
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.
session_address | server IP address. |
session_port | server port. |
Referenced by OnlineServices::LeaveGameplaySession().
|
inlineprivate |
Callback function.
error | error indicating success or fail of the async operation. |
|
inlineprivate |
Callback function.
session_address | server IP address. Empty if failed. |
session_port | server port. 0 if failed. |
error | error indicating success or fail of the async operation. |
References OnlineServices::ErrorCaught(), OnlineServices::GetPendingInviteList(), InviteToGameplaySessionAsync(), and SetGameplayActivityAsync().
Callback function.
session_address | server IP address. |
session_port | server port. |
References NotificationSystem::AddNotification(), NotificationSystem::DEFAULT_TIME_DISPLAYED, DISCONNECT_SESSION_FLAGS_FORCE, g_Game, GetGame(), CGame::GetHostAddress(), m_GetSessionAttempts, MENU_INVITE_TIMER, and OnlineServices::SetInviteServerInfo().
|
inlineprivate |
//! Callback function, not implemented
Callback function
error | error 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().
|
inlineprivate |
Callback function.
error | indicating success or fail of the async operation. |
|
inlineprivate |
Callback function.
error | error indicating success or fail of the async operation. |
Alerts engine that players in current session have changed.
newPlayers | players 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().
|
inlineprivate |
Callback function.
error | error indicating success or fail of the async operation. |
References OnlineServices::ErrorCaught().
|
inlineprivate |
Callback function.
error | indicating success or fail of the async operation. |
References OnlineServices::ErrorCaught().
|
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.
session_address | server IP address. |
session_port | server port. |
Referenced by OnEnterGameplaySession(), and OnlineServices::SetGameplayActivity().
|
private |
Notifiy about interactive multiplayer state.
Referenced by OnlineServices::SetMultiplayState().
|
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".
session_address | server IP address. |
session_port | server port. |
Referenced by OnlineServices::ShowInviteScreen().
|
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:
join_handle | the parsed join handle. |
References DISCONNECT_SESSION_FLAGS_JOIN, g_Game, GetSessionAsync(), m_CurrentHandle, and m_GetSessionAttempts.
Referenced by OnlineServices::GetSession(), and OnGetSessionError().
|
private |
Referenced by OnlineServices::GetSessionHandle(), OnlineServices::SetSessionHandle(), and TryGetSession().
|
private |
Referenced by OnGetGameplaySession(), OnGetSessionError(), and TryGetSession().