跳到主要内容

Client Lobby API Reference

The Lobby Service works with the DS Hosting and Management service and provides a way for the game to gather players together to start a battle. A player can create a private lobby to play battles with specific people or create an open lobby which anyone can join. The Lobby Service also provides lobby management, search, text chat, and other features.

API List

APIDescription
CreateLobbyCreate a new lobby
GetLobbyDetailInfoGet detail information of a lobby
GetLobbyBriefInfoGet brief information of a lobby
BatchGetLobbyBriefInfoGet brief information of lobby in batch (max 100 lobbies)
EditLobbyInfoEdit detail information of a lobby, only available for lobby owner
SearchLobbySearch the lobby list @param params The optional filter information when searching the lobby list. Note: If these data are not filled (lobby_id, lobby_config, status, protection), all existing lobbies will be returned.
JoinLobbyJoin the specified lobby
QuickJoinLobbyPGOS will attempt to place the player into a lobby instance that meets the lobby global kv data data filtering conditions, note that this operation does not guarantee success. Only Lobby instances with 1) status as Waiting, 2) LobbyPrivacy as Visible, and 3) LobbyProtection as FreeAccess can be quickly joined.
JoinLobbyWithGroupsJoin the specified group in the specified lobby. Try to join the specified groups in the lobby according to the specified priority value from small to large. Slot selection within the group follows the Team Selection Strategy configuration on the portal. The portal's lobby configuration needs to be switched to advanced mode.
JoinLobbyWithTeamsJoin the specified team in the specified lobby. Try to join the specified teams in the lobby according to the specified priority value from small to large. When multiple teams have the same priority, slot selection follows the Team Selection Strategy configuration on the portal. The portal's lobby configuration needs to be switched to advanced mode.
LeaveLobbyLeave current lobby
DismissLobbyDismiss current lobby, only available for lobby owner
KickOutMemberKick out a lobby member, only available for lobby owner
InvitePlayerInvite a player to current lobby
SwitchTeamSlotSwitch to another slot. The operation will be failed if the target slot is already occupied Note that the team slot index starts form 1.
RequestSwitchTeamSlotSwitch team slot with another lobby member. The operation will be failed if the target slot is empty. Note that the team slot index starts form 1.
ConfirmSwitchTeamSlotAgree to swap slots with a lobby member at the specified position. The interface will return a failure if the position of either party in the swap request changes.
RejectSwitchTeamSlotReject a team slot switch request.
TransferOwnershipTransfer the ownership of a lobby to another member, only available for lobby owner
SetLobbyDataUpdate lobby data, only available for lobby owner
SetLobbyGlobalDataUpdate lobby global data, only available for lobby owner
SetLobbyPlayerDataUpdate player lobby data, lobby members can only modify their own custom data.
StartBattleTry to start a battle that contains all lobby members, only available for lobby owner
ReadyForBattleSwitch the READY flag of current lobby member
GetCurrentLobbyDetailGet latest lobby detail information from SDK local cache
SendLobbyChatTextMsgSend a message to the lobby's chat channel. Only enable_chatting in CreateLobbyParams is True when the lobby was created
SendLobbyChatCustomMsgSend a message to the lobby's chat channel. Only enable_chatting in CreateLobbyParams is True when the lobby was created
ApproveJoinLobbyRequestApprove a lobby join request. The interface is for lobby owner use only. Each request is valid for 10 minutes.
RejectJoinLobbyRequestApprove a lobby join request. The interface is for lobby owner use only. Each request is valid for 10 minutes.
GetPlayerLobbyInfoGet the player's current lobby information from server.

Event List

EventDescription
SetOnLobbyMemberJoinedThe event will be triggered when someone joined current lobby.
SetOnLobbyMemberLeftThe event will be triggered when someone left current lobby.
SetOnLobbyTeamUpdatedThe event will be triggered when team struct of current lobby changed.
SetOnLobbyInvitationThe event will be triggered when receive lobby invitations.
SetOnLobbyDismissThe event will be triggered when current lobby is dismissed.
SetOnLobbyOwnerTransferredThe event will be triggered when lobby ownership is transferred.
SetOnLobbyInfoUpdatedThe event will be triggered when current lobby options is changed.
SetOnLobbyDataUpdatedThe event will be triggered when custom lobby data is changed.
SetOnLobbyStatusChangedThe event will be triggered when current lobby's status changed.
SetOnBattleSessionUpdatedThe event will be triggered when the battle session started by current lobby has updated.
SetOnReceiveLobbyChatMsgThe event will be triggered when receive chat messages from current lobby's chat channel.
SetOnLobbySwitchTeamSlotRequestThe event will be triggered when another lobby member send a team-slot switch request.
SetOnLobbySwitchTeamSlotRequestConfirmedThe event will be triggered when a switch request when a team-slot switch request has been confirmed.
SetOnLobbySwitchTeamSlotRequestRejectedThe event will be triggered when a team-slot switch request has been rejected.
SetOnLobbyJoinRequestThe event will be triggered when a player request to join a lobby with protection type LobbyProtection::ApplicationNeeded.
SetOnLobbyJoinRequestApprovedThe event will be triggered when a join request has been approved by lobby owner.
SetOnLobbyJoinRequestRejectedThe event will be triggered when a join request has been reject by lobby owner.
SetOnLobbyGlobalCustomDataUpdatedThe event will be triggered when lobby global custom data updated.
SetOnLobbyPlayerCustomDataUpdatedThe event will be triggered when lobby player custom data updated.

API Details

CreateLobby

Create a new lobby

/**
* Create a new lobby
*
* @param params The information needed to create the lobby.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void CreateLobby(
const CreateLobbyParams& params,
PgosDataCallback<LobbyDetailInfo> result_callback);

Parameters:

ParamTypeDescription
paramsconst CreateLobbyParams&The information needed to create the lobby.
result_callbackPgosDataCallback<LobbyDetailInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

GetLobbyDetailInfo

Get detail information of a lobby

/**
* Get detail information of a lobby
*
* @param lobby_id The lobby id to query.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetLobbyDetailInfo(
const pgos::pstring& lobby_id,
PgosDataCallback<LobbyDetailInfo> result_callback);

Parameters:

ParamTypeDescription
lobby_idconst std::string&The lobby id to query.
result_callbackPgosDataCallback<LobbyDetailInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

GetLobbyBriefInfo

Get brief information of a lobby

/**
* Get brief information of a lobby
*
* @param lobby_id The lobby id to query.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetLobbyBriefInfo(
const pgos::pstring& lobby_id,
PgosDataCallback<LobbyBriefInfo> result_callback);

Parameters:

ParamTypeDescription
lobby_idconst std::string&The lobby id to query.
result_callbackPgosDataCallback<LobbyBriefInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

BatchGetLobbyBriefInfo

Get brief information of lobby in batch (max 100 lobbies)

/**
* Get brief information of lobby in batch (max 100 lobbies)
*
* @param lobby_ids List of lobby id to query.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchGetLobbyBriefInfo(
const pgos::pvector<pgos::pstring>& lobby_ids,
PgosDataCallback<pgos::pvector<LobbyBriefInfo>> result_callback);

Parameters:

ParamTypeDescription
lobby_idsconst std::vector<std::string>&List of lobby id to query.
result_callbackPgosDataCallback<std::vector<LobbyBriefInfo>>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

EditLobbyInfo

Edit detail information of a lobby, only available for lobby owner

/**
* Edit detail information of a lobby, only available for lobby owner
*
* @param params The lobby information that needs to be updated. these data will overwrite the previous data.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void EditLobbyInfo(
const EditLobbyInfoParams& params,
PgosDataCallback<LobbyDetailInfo> result_callback);

Parameters:

ParamTypeDescription
paramsconst EditLobbyInfoParams&The lobby information that needs to be updated. these data will overwrite the previous data.
result_callbackPgosDataCallback<LobbyDetailInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SearchLobby

Search the lobby list @param params The optional filter information when searching the lobby list. Note: If these data are not filled (lobby_id, lobby_config, status, protection), all existing lobbies will be returned.

/**
* Search the lobby list
* @param params The optional filter information when searching the lobby list.
*
* Note: If these data are not filled (lobby_id, lobby_config, status, protection),
* all existing lobbies will be returned.
*
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SearchLobby(
const SearchLobbyParams& params,
PgosDataCallback<SearchLobbyResult> result_callback);

Parameters:

ParamTypeDescription
paramsconst SearchLobbyParams&
result_callbackPgosDataCallback<SearchLobbyResult>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

JoinLobby

Join the specified lobby

/**
* Join the specified lobby
*
* @param params The information needed when join the lobby
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void JoinLobby(
const JoinLobbyParams& params,
PgosDataCallback<LobbyDetailInfo> result_callback);

Parameters:

ParamTypeDescription
paramsconst JoinLobbyParams&The information needed when join the lobby
result_callbackPgosDataCallback<LobbyDetailInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

QuickJoinLobby

PGOS will attempt to place the player into a lobby instance that meets the lobby global kv data data filtering conditions, note that this operation does not guarantee success. Only Lobby instances with 1) status as Waiting, 2) LobbyPrivacy as Visible, and 3) LobbyProtection as FreeAccess can be quickly joined.

/**
* PGOS will attempt to place the player into a lobby instance that meets the lobby global kv data data filtering conditions, note that this operation does not guarantee success.
* Only Lobby instances with 1) status as Waiting, 2) LobbyPrivacy as Visible, and 3) LobbyProtection as FreeAccess can be quickly joined.
*
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void QuickJoinLobby(
const QuickJoinLobbyParams& params,
PgosDataCallback<LobbyDetailInfo> result_callback);

Parameters:

ParamTypeDescription
paramsconst QuickJoinLobbyParams&
result_callbackPgosDataCallback<LobbyDetailInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

JoinLobbyWithGroups

Join the specified group in the specified lobby. Try to join the specified groups in the lobby according to the specified priority value from small to large. Slot selection within the group follows the Team Selection Strategy configuration on the portal. The portal's lobby configuration needs to be switched to advanced mode.

/**
* Join the specified group in the specified lobby. Try to join the specified groups in the lobby according to the specified priority value from small to large.
* Slot selection within the group follows the Team Selection Strategy configuration on the portal.
* The portal's lobby configuration needs to be switched to advanced mode.
*
* @param params The information needed when join the lobby.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void JoinLobbyWithGroups(
const JoinLobbyWithGroupsParams& params,
PgosDataCallback<LobbyDetailInfo> result_callback);

Parameters:

ParamTypeDescription
paramsconst JoinLobbyWithGroupsParams&The information needed when join the lobby.
result_callbackPgosDataCallback<LobbyDetailInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

JoinLobbyWithTeams

Join the specified team in the specified lobby. Try to join the specified teams in the lobby according to the specified priority value from small to large. When multiple teams have the same priority, slot selection follows the Team Selection Strategy configuration on the portal. The portal's lobby configuration needs to be switched to advanced mode.

/**
* Join the specified team in the specified lobby. Try to join the specified teams in the lobby according to the specified priority value from small to large.
* When multiple teams have the same priority, slot selection follows the Team Selection Strategy configuration on the portal.
* The portal's lobby configuration needs to be switched to advanced mode.
*
* @param params The information needed when join the lobby.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void JoinLobbyWithTeams(
const JoinLobbyWithTeamsParams& params,
PgosDataCallback<LobbyDetailInfo> result_callback);

Parameters:

ParamTypeDescription
paramsconst JoinLobbyWithTeamsParams&The information needed when join the lobby.
result_callbackPgosDataCallback<LobbyDetailInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

LeaveLobby

Leave current lobby

/**
* Leave current lobby
*
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void LeaveLobby(
PgosCallback result_callback);

Parameters:

ParamTypeDescription
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

DismissLobby

Dismiss current lobby, only available for lobby owner

/**
* Dismiss current lobby, only available for lobby owner
*
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void DismissLobby(
PgosCallback result_callback);

Parameters:

ParamTypeDescription
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

KickOutMember

Kick out a lobby member, only available for lobby owner

/**
* Kick out a lobby member, only available for lobby owner
*
* @param member_player_id The player id of the lobby member.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void KickOutMember(
const pgos::pstring& member_player_id,
PgosDataCallback<LobbyDetailInfo> result_callback);

Parameters:

ParamTypeDescription
member_player_idconst std::string&The player id of the lobby member.
result_callbackPgosDataCallback<LobbyDetailInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

InvitePlayer

Invite a player to current lobby

/**
* Invite a player to current lobby
*
* @param player_id The invited player id.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void InvitePlayer(
const pgos::pstring& player_id,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
player_idconst std::string&The invited player id.
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SwitchTeamSlot

Switch to another slot. The operation will be failed if the target slot is already occupied Note that the team slot index starts form 1.

/**
* Switch to another slot. The operation will be failed if the target slot is already occupied
* Note that the team slot index starts form 1.
*
* @param target_team_name The name of team to switch to.
* @param target_team_slot The slot of team to switch to.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SwitchTeamSlot(
const pgos::pstring& target_team_name,
uint32_t target_team_slot,
PgosDataCallback<LobbyDetailInfo> result_callback);

Parameters:

ParamTypeDescription
target_team_nameconst std::string&The name of team to switch to.
target_team_slotuint32_tThe slot of team to switch to.
result_callbackPgosDataCallback<LobbyDetailInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

RequestSwitchTeamSlot

Switch team slot with another lobby member. The operation will be failed if the target slot is empty. Note that the team slot index starts form 1.

/**
* Switch team slot with another lobby member. The operation will be failed if the target slot is empty.
* Note that the team slot index starts form 1.
*
* @param target_team_name The name of team to switch to.
* @param target_team_slot The slot index of team to switch to.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void RequestSwitchTeamSlot(
const pgos::pstring& target_team_name,
uint32_t target_team_slot,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
target_team_nameconst std::string&The name of team to switch to.
target_team_slotuint32_tThe slot index of team to switch to.
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

ConfirmSwitchTeamSlot

Agree to swap slots with a lobby member at the specified position. The interface will return a failure if the position of either party in the swap request changes.

/**
* Agree to swap slots with a lobby member at the specified position.
* The interface will return a failure if the position of either party in the swap request changes.
*
* @param request_id Team slot switch request id.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void ConfirmSwitchTeamSlot(
const pgos::pstring& request_id,
PgosDataCallback<LobbyDetailInfo> result_callback);

Parameters:

ParamTypeDescription
request_idconst std::string&Team slot switch request id.
result_callbackPgosDataCallback<LobbyDetailInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

RejectSwitchTeamSlot

Reject a team slot switch request.

/**
* Reject a team slot switch request.
*
* @param request_id Team slot switch request id.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void RejectSwitchTeamSlot(
const pgos::pstring& request_id,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
request_idconst std::string&Team slot switch request id.
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

TransferOwnership

Transfer the ownership of a lobby to another member, only available for lobby owner

/**
* Transfer the ownership of a lobby to another member, only available for lobby owner
*
* @param new_owner_player_id The target player id.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void TransferOwnership(
const pgos::pstring& new_owner_player_id,
PgosDataCallback<LobbyDetailInfo> result_callback);

Parameters:

ParamTypeDescription
new_owner_player_idconst std::string&The target player id.
result_callbackPgosDataCallback<LobbyDetailInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SetLobbyData

Update lobby data, only available for lobby owner

Deprecated, use SetLobbyGlobalData instead.

/**
* Update lobby data, only available for lobby owner
* [DEPRECATED!!!] SetLobbyData was declared deprecated, consider using SetLobbyGlobalData instead.
*
* @param kv_data Lobby data.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetLobbyData(
const pgos::pmap<pgos::pstring, pgos::pstring>& kv_data,
PgosDataCallback<LobbyDetailInfo> result_callback);

Parameters:

ParamTypeDescription
kv_dataconst std::map<std::string, std::string>&Lobby data.
result_callbackPgosDataCallback<LobbyDetailInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SetLobbyGlobalData

Update lobby global data, only available for lobby owner

/**
* Update lobby global data, only available for lobby owner
*
* @param lobby_global_data Lobby global data. Each key-value pair is a string. Special note: When using this parameter to filter room instances (such as in the SearchLobby/QuickJoin interfaces), PGOS supports parsing special string values as lists to enable more complex set-based filtering operations. The string value formats that can be parsed as lists include: [a, b, c] / ["a", "b", "c"] (where the double quotes will be automatically stripped).
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetLobbyGlobalData(
const pgos::pmap<pgos::pstring, pgos::pstring>& lobby_global_data,
PgosDataCallback<LobbyDetailInfo> result_callback);

Parameters:

ParamTypeDescription
lobby_global_dataconst std::map<std::string, std::string>&Lobby global data. Each key-value pair is a string. Special note: When using this parameter to filter room instances (such as in the SearchLobby/QuickJoin interfaces), PGOS supports parsing special string values as lists to enable more complex set-based filtering operations. The string value formats that can be parsed as lists include: [a, b, c] / ["a", "b", "c"] (where the double quotes will be automatically stripped).
result_callbackPgosDataCallback<LobbyDetailInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SetLobbyPlayerData

Update player lobby data, lobby members can only modify their own custom data.

/**
* Update player lobby data, lobby members can only modify their own custom data.
*
* @param lobby_player_data Lobby player data.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetLobbyPlayerData(
const pgos::pstring& lobby_player_data,
PgosDataCallback<LobbyDetailInfo> result_callback);

Parameters:

ParamTypeDescription
lobby_player_dataconst std::string&Lobby player data.
result_callbackPgosDataCallback<LobbyDetailInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

StartBattle

Try to start a battle that contains all lobby members, only available for lobby owner

/**
* Try to start a battle that contains all lobby members, only available for lobby owner
*
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void StartBattle(
PgosDataCallback<LobbyDetailInfo> result_callback);

Parameters:

ParamTypeDescription
result_callbackPgosDataCallback<LobbyDetailInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

ReadyForBattle

Switch the READY flag of current lobby member

/**
* Switch the READY flag of current lobby member
*
* @param ready The READY flag.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void ReadyForBattle(
bool ready,
PgosDataCallback<LobbyDetailInfo> result_callback);

Parameters:

ParamTypeDescription
readyboolThe READY flag.
result_callbackPgosDataCallback<LobbyDetailInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

GetCurrentLobbyDetail

Get latest lobby detail information from SDK local cache

/**
* Get latest lobby detail information from SDK local cache
*
* @param dst The latest lobby detail information
* @return false if not in a lobby, or don't get the detail information of the current lobby
*/
bool GetCurrentLobbyDetail(
LobbyDetailInfo& dst);

Parameters:

ParamTypeDescription
dstLobbyDetailInfo&The latest lobby detail information

Return: bool

false if not in a lobby, or don't get the detail information of the current lobby

SendLobbyChatTextMsg

Send a message to the lobby's chat channel. Only enable_chatting in CreateLobbyParams is True when the lobby was created

/**
* Send a message to the lobby's chat channel.
* Only enable_chatting in CreateLobbyParams is True when the lobby was created
*
* @param params Request struct for sending lobby chat message
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SendLobbyChatTextMsg(
const SendLobbyChatMsgParams& params,
PgosDataCallback<ChatMsgInfo> result_callback);

Parameters:

ParamTypeDescription
paramsconst SendLobbyChatMsgParams&Request struct for sending lobby chat message
result_callbackPgosDataCallback<ChatMsgInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SendLobbyChatCustomMsg

Send a message to the lobby's chat channel. Only enable_chatting in CreateLobbyParams is True when the lobby was created

/**
* Send a message to the lobby's chat channel.
* Only enable_chatting in CreateLobbyParams is True when the lobby was created
*
* @param params Request struct for sending lobby chat message
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SendLobbyChatCustomMsg(
const SendLobbyChatMsgParams& params,
PgosDataCallback<ChatMsgInfo> result_callback);

Parameters:

ParamTypeDescription
paramsconst SendLobbyChatMsgParams&Request struct for sending lobby chat message
result_callbackPgosDataCallback<ChatMsgInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

ApproveJoinLobbyRequest

Approve a lobby join request. The interface is for lobby owner use only. Each request is valid for 10 minutes.

/**
* Approve a lobby join request.
* The interface is for lobby owner use only. Each request is valid for 10 minutes.
*
* @param params
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void ApproveJoinLobbyRequest(
const ApproveJoinLobbyRequestParams& params,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
paramsconst ApproveJoinLobbyRequestParams&
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

RejectJoinLobbyRequest

Approve a lobby join request. The interface is for lobby owner use only. Each request is valid for 10 minutes.

/**
* Approve a lobby join request.
* The interface is for lobby owner use only. Each request is valid for 10 minutes.
*
* @param params
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void RejectJoinLobbyRequest(
const RejectJoinLobbyRequestParams& params,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
paramsconst RejectJoinLobbyRequestParams&
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

GetPlayerLobbyInfo

Get the player's current lobby information from server.

/**
* Get the player's current lobby information from server.
*
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetPlayerLobbyInfo(
PgosDataCallback<LobbyDetailInfo> result_callback);

Parameters:

ParamTypeDescription
result_callbackPgosDataCallback<LobbyDetailInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

Event Details

SetOnLobbyMemberJoined

The event will be triggered when someone joined current lobby.

/**
* OnSetOnLobbyMemberJoined:
* The event will be triggered when someone joined current lobby.
*
* @param event Event result.
*/
void SetOnLobbyMemberJoined(
const LobbyMemberJoinedEvt& event);

Parameters:

ParamTypeDescription
eventconst LobbyMemberJoinedEvt&Event result.

SetOnLobbyMemberLeft

The event will be triggered when someone left current lobby.

/**
* OnSetOnLobbyMemberLeft:
* The event will be triggered when someone left current lobby.
*
* @param event Event result.
*/
void SetOnLobbyMemberLeft(
const LobbyMemberLeftEvt& event);

Parameters:

ParamTypeDescription
eventconst LobbyMemberLeftEvt&Event result.

SetOnLobbyTeamUpdated

The event will be triggered when team struct of current lobby changed.

/**
* OnSetOnLobbyTeamUpdated:
* The event will be triggered when team struct of current lobby changed.
*
* @param event Event result.
*/
void SetOnLobbyTeamUpdated(
const LobbyTeamUpdatedEvt& event);

Parameters:

ParamTypeDescription
eventconst LobbyTeamUpdatedEvt&Event result.

SetOnLobbyInvitation

The event will be triggered when receive lobby invitations.

/**
* OnSetOnLobbyInvitation:
* The event will be triggered when receive lobby invitations.
*
* @param event Event result.
*/
void SetOnLobbyInvitation(
const LobbyInvitationEvt& event);

Parameters:

ParamTypeDescription
eventconst LobbyInvitationEvt&Event result.

SetOnLobbyDismiss

The event will be triggered when current lobby is dismissed.

/**
* OnSetOnLobbyDismiss:
* The event will be triggered when current lobby is dismissed.
*/
void SetOnLobbyDismiss();

Parameters:

(No parameters)

SetOnLobbyOwnerTransferred

The event will be triggered when lobby ownership is transferred.

/**
* OnSetOnLobbyOwnerTransferred:
* The event will be triggered when lobby ownership is transferred.
*
* @param event Event result.
*/
void SetOnLobbyOwnerTransferred(
const LobbyOwnerTransferredEvt& event);

Parameters:

ParamTypeDescription
eventconst LobbyOwnerTransferredEvt&Event result.

SetOnLobbyInfoUpdated

The event will be triggered when current lobby options is changed.

/**
* OnSetOnLobbyInfoUpdated:
* The event will be triggered when current lobby options is changed.
*
* @param event Event result.
*/
void SetOnLobbyInfoUpdated(
const LobbyInfoUpdatedEvt& event);

Parameters:

ParamTypeDescription
eventconst LobbyInfoUpdatedEvt&Event result.

SetOnLobbyDataUpdated

The event will be triggered when custom lobby data is changed.

/**
* OnSetOnLobbyDataUpdated:
* The event will be triggered when custom lobby data is changed.
*
* @param event Event result.
*/
void SetOnLobbyDataUpdated(
const LobbyDataUpdatedEvt& event);

Parameters:

ParamTypeDescription
eventconst LobbyDataUpdatedEvt&Event result.

SetOnLobbyStatusChanged

The event will be triggered when current lobby's status changed.

/**
* OnSetOnLobbyStatusChanged:
* The event will be triggered when current lobby's status changed.
*
* @param event Event result.
*/
void SetOnLobbyStatusChanged(
const LobbyStatusChangedEvt& event);

Parameters:

ParamTypeDescription
eventconst LobbyStatusChangedEvt&Event result.

SetOnBattleSessionUpdated

The event will be triggered when the battle session started by current lobby has updated.

/**
* OnSetOnBattleSessionUpdated:
* The event will be triggered when the battle session started by current lobby has updated.
*
* @param event Event result.
*/
void SetOnBattleSessionUpdated(
const BattleSessionUpdatedEvt& event);

Parameters:

ParamTypeDescription
eventconst BattleSessionUpdatedEvt&Event result.

SetOnReceiveLobbyChatMsg

The event will be triggered when receive chat messages from current lobby's chat channel.

/**
* OnSetOnReceiveLobbyChatMsg:
* The event will be triggered when receive chat messages from current lobby's chat channel.
*
* @param event Event result.
*/
void SetOnReceiveLobbyChatMsg(
const ReceiveLobbyChatMsgEvt& event);

Parameters:

ParamTypeDescription
eventconst ReceiveLobbyChatMsgEvt&Event result.

SetOnLobbySwitchTeamSlotRequest

The event will be triggered when another lobby member send a team-slot switch request.

/**
* OnSetOnLobbySwitchTeamSlotRequest:
* The event will be triggered when another lobby member send a team-slot switch request.
*
* @param event Event result.
*/
void SetOnLobbySwitchTeamSlotRequest(
const LobbySwitchTeamSlotRequestEvt& event);

Parameters:

ParamTypeDescription
eventconst LobbySwitchTeamSlotRequestEvt&Event result.

SetOnLobbySwitchTeamSlotRequestConfirmed

The event will be triggered when a switch request when a team-slot switch request has been confirmed.

/**
* OnSetOnLobbySwitchTeamSlotRequestConfirmed:
* The event will be triggered when a switch request when a team-slot switch request has been confirmed.
*
* @param event Event result.
*/
void SetOnLobbySwitchTeamSlotRequestConfirmed(
const LobbySwitchTeamSlotRequestConfirmedEvt& event);

Parameters:

ParamTypeDescription
eventconst LobbySwitchTeamSlotRequestConfirmedEvt&Event result.

SetOnLobbySwitchTeamSlotRequestRejected

The event will be triggered when a team-slot switch request has been rejected.

/**
* OnSetOnLobbySwitchTeamSlotRequestRejected:
* The event will be triggered when a team-slot switch request has been rejected.
*
* @param event Event result.
*/
void SetOnLobbySwitchTeamSlotRequestRejected(
const LobbySwitchTeamSlotRequestRejectedEvt& event);

Parameters:

ParamTypeDescription
eventconst LobbySwitchTeamSlotRequestRejectedEvt&Event result.

SetOnLobbyJoinRequest

The event will be triggered when a player request to join a lobby with protection type LobbyProtection::ApplicationNeeded.

/**
* OnSetOnLobbyJoinRequest:
* The event will be triggered when a player request to join a lobby with protection type LobbyProtection::ApplicationNeeded.
*
* @param event Event result.
*/
void SetOnLobbyJoinRequest(
const LobbyJoinRequestEvt& event);

Parameters:

ParamTypeDescription
eventconst LobbyJoinRequestEvt&Event result.

SetOnLobbyJoinRequestApproved

The event will be triggered when a join request has been approved by lobby owner.

/**
* OnSetOnLobbyJoinRequestApproved:
* The event will be triggered when a join request has been approved by lobby owner.
*
* @param event Event result.
*/
void SetOnLobbyJoinRequestApproved(
const LobbyJoinRequestApprovedEvt& event);

Parameters:

ParamTypeDescription
eventconst LobbyJoinRequestApprovedEvt&Event result.

SetOnLobbyJoinRequestRejected

The event will be triggered when a join request has been reject by lobby owner.

/**
* OnSetOnLobbyJoinRequestRejected:
* The event will be triggered when a join request has been reject by lobby owner.
*
* @param event Event result.
*/
void SetOnLobbyJoinRequestRejected(
const LobbyJoinRequestRejectedEvt& event);

Parameters:

ParamTypeDescription
eventconst LobbyJoinRequestRejectedEvt&Event result.

SetOnLobbyGlobalCustomDataUpdated

The event will be triggered when lobby global custom data updated.

/**
* OnSetOnLobbyGlobalCustomDataUpdated:
* The event will be triggered when lobby global custom data updated.
*
* @param event Event result.
*/
void SetOnLobbyGlobalCustomDataUpdated(
const LobbyGlobalCustomDataUpdatedEvt& event);

Parameters:

ParamTypeDescription
eventconst LobbyGlobalCustomDataUpdatedEvt&Event result.

SetOnLobbyPlayerCustomDataUpdated

The event will be triggered when lobby player custom data updated.

/**
* OnSetOnLobbyPlayerCustomDataUpdated:
* The event will be triggered when lobby player custom data updated.
*
* @param event Event result.
*/
void SetOnLobbyPlayerCustomDataUpdated(
const LobbyPlayerCustomDataUpdatedEvt& event);

Parameters:

ParamTypeDescription
eventconst LobbyPlayerCustomDataUpdatedEvt&Event result.