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
| API | Description |
|---|---|
| CreateLobby | Create a new lobby |
| GetLobbyDetailInfo | Get detail information of a lobby |
| GetLobbyBriefInfo | Get brief information of a lobby |
| BatchGetLobbyBriefInfo | Get brief information of lobby in batch (max 100 lobbies) |
| EditLobbyInfo | Edit detail information of a lobby, only available for lobby owner |
| 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. |
| JoinLobby | Join the specified lobby |
| 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. |
| 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. |
| 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. |
| LeaveLobby | Leave current lobby |
| DismissLobby | Dismiss current lobby, only available for lobby owner |
| KickOutMember | Kick out a lobby member, only available for lobby owner |
| InvitePlayer | Invite a player to current lobby |
| 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. |
| 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. |
| 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. |
| RejectSwitchTeamSlot | Reject a team slot switch request. |
| TransferOwnership | Transfer the ownership of a lobby to another member, only available for lobby owner |
| SetLobbyData | Update lobby data, only available for lobby owner |
| SetLobbyGlobalData | Update lobby global data, only available for lobby owner |
| SetLobbyPlayerData | Update player lobby data, lobby members can only modify their own custom data. |
| StartBattle | Try to start a battle that contains all lobby members, only available for lobby owner |
| ReadyForBattle | Switch the READY flag of current lobby member |
| GetCurrentLobbyDetail | Get latest lobby detail information from SDK local cache |
| SendLobbyChatTextMsg | Send a message to the lobby's chat channel. Only enable_chatting in CreateLobbyParams is True when the lobby was created |
| SendLobbyChatCustomMsg | Send a message to the lobby's chat channel. Only enable_chatting in CreateLobbyParams is True when the lobby was created |
| ApproveJoinLobbyRequest | Approve a lobby join request. The interface is for lobby owner use only. Each request is valid for 10 minutes. |
| RejectJoinLobbyRequest | Approve a lobby join request. The interface is for lobby owner use only. Each request is valid for 10 minutes. |
| GetPlayerLobbyInfo | Get the player's current lobby information from server. |
Event List
| Event | Description |
|---|---|
| SetOnLobbyMemberJoined | The event will be triggered when someone joined current lobby. |
| SetOnLobbyMemberLeft | The event will be triggered when someone left current lobby. |
| SetOnLobbyTeamUpdated | The event will be triggered when team struct of current lobby changed. |
| SetOnLobbyInvitation | The event will be triggered when receive lobby invitations. |
| SetOnLobbyDismiss | The event will be triggered when current lobby is dismissed. |
| SetOnLobbyOwnerTransferred | The event will be triggered when lobby ownership is transferred. |
| SetOnLobbyInfoUpdated | The event will be triggered when current lobby options is changed. |
| SetOnLobbyDataUpdated | The event will be triggered when custom lobby data is changed. |
| SetOnLobbyStatusChanged | The event will be triggered when current lobby's status changed. |
| SetOnBattleSessionUpdated | The event will be triggered when the battle session started by current lobby has updated. |
| SetOnReceiveLobbyChatMsg | The event will be triggered when receive chat messages from current lobby's chat channel. |
| SetOnLobbySwitchTeamSlotRequest | The event will be triggered when another lobby member send a team-slot switch request. |
| SetOnLobbySwitchTeamSlotRequestConfirmed | The event will be triggered when a switch request when a team-slot switch request has been confirmed. |
| SetOnLobbySwitchTeamSlotRequestRejected | The event will be triggered when a team-slot switch request has been rejected. |
| SetOnLobbyJoinRequest | The event will be triggered when a player request to join a lobby with protection type LobbyProtection::ApplicationNeeded. |
| SetOnLobbyJoinRequestApproved | The event will be triggered when a join request has been approved by lobby owner. |
| SetOnLobbyJoinRequestRejected | The event will be triggered when a join request has been reject by lobby owner. |
| SetOnLobbyGlobalCustomDataUpdated | The event will be triggered when lobby global custom data updated. |
| SetOnLobbyPlayerCustomDataUpdated | The 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:
| Param | Type | Description |
|---|---|---|
| params | const CreateLobbyParams& | The information needed to create the lobby. |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| lobby_id | const std::string& | The lobby id to query. |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| lobby_id | const std::string& | The lobby id to query. |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| lobby_ids | const std::vector<std::string>& | List of lobby id to query. |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| params | const EditLobbyInfoParams& | The lobby information that needs to be updated. these data will overwrite the previous data. |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| params | const SearchLobbyParams& | |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| params | const JoinLobbyParams& | The information needed when join the lobby |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| params | const QuickJoinLobbyParams& | |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| params | const JoinLobbyWithGroupsParams& | The information needed when join the lobby. |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| params | const JoinLobbyWithTeamsParams& | The information needed when join the lobby. |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| result_callback | PgosCallback | The 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:
| Param | Type | Description |
|---|---|---|
| result_callback | PgosCallback | The 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:
| Param | Type | Description |
|---|---|---|
| member_player_id | const std::string& | The player id of the lobby member. |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| player_id | const std::string& | The invited player id. |
| result_callback | PgosCallback | The 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:
| Param | Type | Description |
|---|---|---|
| target_team_name | const std::string& | The name of team to switch to. |
| target_team_slot | uint32_t | The slot of team to switch to. |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| target_team_name | const std::string& | The name of team to switch to. |
| target_team_slot | uint32_t | The slot index of team to switch to. |
| result_callback | PgosCallback | The 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:
| Param | Type | Description |
|---|---|---|
| request_id | const std::string& | Team slot switch request id. |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| request_id | const std::string& | Team slot switch request id. |
| result_callback | PgosCallback | The 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:
| Param | Type | Description |
|---|---|---|
| new_owner_player_id | const std::string& | The target player id. |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| kv_data | const std::map<std::string, std::string>& | Lobby data. |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| lobby_global_data | const 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_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| lobby_player_data | const std::string& | Lobby player data. |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| ready | bool | The READY flag. |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| dst | LobbyDetailInfo& | 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:
| Param | Type | Description |
|---|---|---|
| params | const SendLobbyChatMsgParams& | Request struct for sending lobby chat message |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| params | const SendLobbyChatMsgParams& | Request struct for sending lobby chat message |
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| params | const ApproveJoinLobbyRequestParams& | |
| result_callback | PgosCallback | The 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:
| Param | Type | Description |
|---|---|---|
| params | const RejectJoinLobbyRequestParams& | |
| result_callback | PgosCallback | The 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:
| Param | Type | Description |
|---|---|---|
| result_callback | PgosDataCallback<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:
| Param | Type | Description |
|---|---|---|
| event | const 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:
| Param | Type | Description |
|---|---|---|
| event | const 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:
| Param | Type | Description |
|---|---|---|
| event | const 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:
| Param | Type | Description |
|---|---|---|
| event | const 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:
| Param | Type | Description |
|---|---|---|
| event | const 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:
| Param | Type | Description |
|---|---|---|
| event | const 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:
| Param | Type | Description |
|---|---|---|
| event | const 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:
| Param | Type | Description |
|---|---|---|
| event | const 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:
| Param | Type | Description |
|---|---|---|
| event | const 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:
| Param | Type | Description |
|---|---|---|
| event | const 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:
| Param | Type | Description |
|---|---|---|
| event | const 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:
| Param | Type | Description |
|---|---|---|
| event | const 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:
| Param | Type | Description |
|---|---|---|
| event | const 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:
| Param | Type | Description |
|---|---|---|
| event | const 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:
| Param | Type | Description |
|---|---|---|
| event | const 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:
| Param | Type | Description |
|---|---|---|
| event | const 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:
| Param | Type | Description |
|---|---|---|
| event | const 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:
| Param | Type | Description |
|---|---|---|
| event | const LobbyPlayerCustomDataUpdatedEvt& | Event result. |