Client Data Models
Enums
MatchmakingStatus
Battle session status
enum class MatchmakingStatus : int32_t
| member | value | description |
|---|
| Dummy | 0 | Dummy |
| Starting | 1 | matchmaking is starting |
| Preparing | 2 | the multi-player matchmaking's preparation phase. note: when the MatchmakingObserver receives this status, it requires players to join or reject the matchmaking request. mutilplayer matchmaking : when one of the players start a matchmaking request, the other players will receive the 'Preparing' matchmaking status, and then decide to join or reject the matchmaking request. When everyone has joined, matchmaking start Searching. |
| Searching | 3 | search players for matchmaking |
| Accepting | 4 | wait for players to accepting the result of matchmaking |
| Placing | 5 | placing battle session on game DS |
| Completed | 7 | The matchmaking request ends with a successful result. Check battle_session_info for detail information about the battle. Note: when the MatchmakingObserver receives this status, you need to connect the DS server via IP and port that could obtain from battle_session_info. |
| TimedOut | 8 | matchmaking request timeout |
| Terminated | 9 | matchmaking request is terminated |
| Canceled | 10 | matchmaking request is canceled. The request may have been canceled by the player or the matchmaking result has been rejected by the player |
| Error | 11 | matchmaking request error |
MatchmakingMutexType
Mutex type of matchmaking request
enum class MatchmakingMutexType : int32_t
| member | value | description |
|---|
| PerMatchmakingConfig | 0 | There is no limit to the number of battle sessions a player can be in. multiple matchmaking requests from a player in the same matchmaking config are not allowed at the same time. |
| PerPlayer | 1 | If a player has any on going battle sessions or matchmaking in progress, they will not be able to start new matchmaking request. |
PlayerBattleSessionStatus
Player battle session status
enum class PlayerBattleSessionStatus : int32_t
| member | value | description |
|---|
| Dummy | 0 | Dummy |
| Pending | 1 | The player battle session requires DS to call the ReservePlayerBattleSession interface for approval. |
| Reserved | 2 | Reserved players can be validated through the AcceptPlayerBattleSession interface. |
| Active | 3 | Player battle session status turn to ACTIVE after AcceptPlayerBattleSession is called successfully. |
| Completed | 4 | This is the terminal status of player battle session.The status will turn to COMPLETED after RemovePlayerBattleSession is called or player actively leave the battle session. |
| Disconnected | 5 | The player has disconnected from DS server. |
P2PPlayerBattleSessionStatus
Status of a P2P player battle session
enum class P2PPlayerBattleSessionStatus : int32_t
| member | value | description |
|---|
| Dummy | 0 | Dummy |
| Reserved | 2 | Reserved players can be validated through the AcceptPlayerBattleSession interface. |
| Active | 3 | Player battle session status turn to ACTIVE after AcceptPlayerBattleSession is called successfully. |
| Completed | 4 | This is the terminal status of player battle session.The status will turn to COMPLETED after RemovePlayerBattleSession is called or player actively leave the battle session. |
| Disconnected | 5 | The player has disconnected from DS server. |
BattleSessionStatus
Battle session status
enum class BattleSessionStatus : int32_t
| member | value | description |
|---|
| Dummy | 0 | Dummy |
| Placing | 1 | the battle session is currently waiting to be placed on a game DS. |
| Active | 2 | the battle session have been successfully created. |
| Terminated | 3 | the battle session have been terminated. |
| Error | 5 | the battle session error, check status_msg for more information. |
| Cancelled | 6 | the battle session is cancelled. |
| TimedOut | 7 | the battle session timeout |
| Failed | 8 | the battle session failed, check status_msg for more information. |
P2PBattleSessionStatus
P2P Battle session status
enum class P2PBattleSessionStatus : int32_t
| member | value | description |
|---|
| Dummy | 0 | Dummy |
| Placing | 1 | the battle session is currently waiting to be placed on a game DS. |
| Active | 2 | the battle session have been successfully created. |
| HostHealthChecking | 3 | P2P clients should report the host health state within a limited time. |
| NewHostSelected | 4 | the new host has been selected and must accept the identity within a limited time. The new host needs to call the ActivateP2PBattleSession interface to reactivate the battle session. |
| Terminated | 101 | the battle session have been terminated. |
| Error | 102 | the battle session error, check status_msg for more information. |
| TimedOut | 103 | the battle session timeout |
| Failed | 104 | the battle session failed, check status_msg for more information. |
FriendRequestProcessStatus
Friend request process status
enum class FriendRequestProcessStatus : int32_t
| member | value | description |
|---|
| Pending | 0 | friend request pending |
| Accepted | 1 | request Accepted |
| Expired | 2 | it may be timed out, the current validity period is 7 days |
ReadStatus
Message read status
enum class ReadStatus : int32_t
| member | value | description |
|---|
| Unread | 0 | message unread |
| Read | 1 | message read |
LobbyStatus
Lobby status
| member | value | description |
|---|
| Dummy | 0 | Dummy |
| Waiting | 1 | StartBattle has not been called |
| Preparing | 2 | StartBattle was called, but not all lobby members are READY |
| Playing | 3 | A battle session that contains all lobby members is ready to be joined |
LobbyPrivacy
Lobby privacy type
| member | value | description |
|---|
| Dummy | 0 | Dummy |
| Visible | 1 | Lobby can be searched |
| Invisible | 2 | Lobby can only be searched using the exact lobby_id |
LobbyProtection
Lobby protection type
enum class LobbyProtection
| member | value | description |
|---|
| Dummy | 0 | Dummy should be used when searching lobbies for all protection types |
| PasswordNeeded | 1 | Password needed when joining lobbies |
| PasswordUnneeded | 2 | Password unneeded when joining lobbies |
| FreeAccess | 2 | Players can join lobby directly |
| ApplicationNeeded | 3 | A join request will be sent to the owner after calling the JoinLobby interface, and the owner's approval is required to successfully join the lobby |
LobbyJoiningSource
The source of the player join the lobby
enum class LobbyJoiningSource
| member | value | description |
|---|
| Dummy | 0 | Dummy |
| JoiningByLobbyID | 1 | Search for the lobby and join. |
| JoiningFromInvitation | 2 | Join the lobby through the event of 'OnLobbyInvitation' when the player is invited to join the lobby. |
| JoiningAsOwner | 3 | The lobby creator. |
| JoiningByQuickJoin | 4 | Joined by QuickJoin interface. |
LobbyStatusReason
The reason that the lobby status changes
enum class LobbyStatusReason
| member | value | description |
|---|
| Dummy | 0 | Dummy |
| SomeoneNotReady | 1 | The lobby owner starts the battle, and lobby status changes from Waiting to Preparing. |
| PlacingFailed | 2 | Placing is failed, and lobby status changes from Placing to Waiting. |
| PreparingTimeout | 3 | Preparing is timeout because there are members not ready, and lobby status changes from Preparing to Waiting. |
| BattleCompleted | 4 | Battle is completed, and lobby status changes from Playing to Waiting. |
| PreparationInterrupted | 5 | Because of member changing, preparing status is interrupted and changes to Waiting. |
LobbyStartBattleCondition
The action when the lobby owner invokes the StartBattle interface depends on the Ready flag of lobby members.
enum class LobbyStartBattleCondition
| member | value | description |
|---|
| AllReadyOtherwiseWaiting | 0 | The lobby will enter the Preparing stage, waiting for unready players to get ready. |
| AllReadyOtherwiseError | 1 | The lobby owner will receive an error if not all players are ready. |
| IgnoringReadyFlag | 2 | The lobby will enter the Playing stage directly, ignoring the Ready flag. |
OnlineStatus
Online status: online or offline
enum class OnlineStatus : uint8_t
| member | value | description |
|---|
| Offline | 0 | Player is online |
| Online | 1 | Player is offline |
StoreOrderStatus
enum class StoreOrderStatus : uint8_t
| member | value | description |
|---|
| Dummy | 0 | None. |
| StoreOrderProcessing | 1 | Order is being processed. |
| StoreOrderCompleted | 2 | Purchase successful. |
| StoreOrderFailed | 3 | Purchase failed. |
StoreItemStatus
enum class StoreItemStatus : uint8_t
| member | value | description |
|---|
| Dummy | 0 | None. |
| Available | 1 | The item can be purchased normally. |
| Owned | 2 | The unique item can't be purchased because the player already owns. |
| ExceedLimit | 3 | The store item can't be purchased because the player have reached the maximum purchase limit. |
StoreCategoryType
enum class StoreCategoryType : uint8_t
| member | value | description |
|---|
| Simple | 0 | A simple category be used to manage the publish and retire of store items. |
| Manual | 1 | The category schedule will be enabled to support multi-period publish schedule management. Could be used to implement advanced features such as limited-time sales and regular product updates. |
| Rotation | 2 | The category schedule will be a rotation schedule. |
GroupJoinRule
Join rules of the group.
enum class GroupJoinRule : uint8_t
| member | value | description |
|---|
| Any | 0 | Players can freely join the group. |
| MemberInvite | 1 | Must be invited by group members to join the group. |
| AdminInvite | 2 | Must be invited by group administrator to join the group. |
| Forbid | 3 | No one is allowed to join. |
ChatMsgType
Message type.
enum class ChatMsgType : uint8_t
| member | value | description |
|---|
| MsgTypeText | 0 | Type of text message, sent via SendGroupTextMsg. |
| MsgTypeCustom | 1 | Type of custom message, sent via SendGroupCustomMsg. |
| MsgTypeEvent | 2 | Type of event message, sent by the system. |
| MsgTypeSystem | 3 | Type of system message, sent by the system. |
GroupEventType
Type of event message.
enum class GroupEventType : uint8_t
| member | value | description |
|---|
| Dummy | 0 | |
| GroupNameChanged | 1 | Group name has been changed. |
| GroupDescChanged | 2 | Group description has been changed. |
| GroupMemberJoined | 3 | New member joined. |
| GroupMemberLeft | 4 | Member left the group. |
| GroupMemberRemoved | 5 | Member removed. |
| GroupAnnouncementChanged | 6 | Group announcement has been changed. |
| GroupOwnerChanged | 7 | Group owner has changed. |
| GroupAdminGranted | 8 | Member granted to group administrator. |
| GroupAdminRevoked | 9 | Group administrator is revoked. |
GroupOfficialFilterType
Group searching filter type for official.
enum class GroupOfficialFilterType : uint8_t
| member | value | description |
|---|
| Dummy | 0 | Don't filter official groups when searching. |
| NotOfficial | 1 | Only search unofficial groups. |
| Official | 2 | Only search official groups. |
GroupRoomFilterType
Group searching filter type for left rooms.
enum class GroupRoomFilterType : uint8_t
| member | value | description |
|---|
| Dummy | 0 | Don't filter group rooms when searching. |
| NotFull | 1 | Only search groups that are not full. |
| Full | 2 | Only search full groups. |
GroupOrderBy
The basis for sorting group search result.
enum class GroupOrderBy : uint8_t
| member | value | description |
|---|
| Dummy | 0 | No sorting of search result. |
| MemberCount | 1 | Search result sorted by members count. |
| CreatedTime | 2 | Search result sorted by creation time. |
GroupOrderType
The order type for group search result.
enum class GroupOrderType : uint8_t
| member | value | description |
|---|
| Dummy | 0 | No sorting of search results. |
| Asc | 1 | Ascending order for search result. |
| Desc | 2 | Descending order for search result. |
MailCategory
enum class MailCategory : uint8_t
| member | value | description |
|---|
| All | 0 | All categories. |
| System | 1 | System category. |
| Notice | 2 | Notice category. |
| Campaign | 3 | Campaign category. |
| Award | 4 | Award category. |
| Gift | 5 | Gift category. Usually received gifts from other players. |
| Custom | 6 | Custom category. Category for developer customization. |
GoalType
enum class GoalType : uint8_t
| member | value | description |
|---|
| Dummy | 0 | |
| Simple | 1 | |
| Hyper | 2 | |
GoalRewardWay
enum class GoalRewardWay : uint8_t
| member | value | description |
|---|
| Dummy | 0 | |
| Manual | 1 | Goal reward need to be claimed manually |
| Mail | 2 | When the goal is achieved, the rewards will be automatically granted through the preset email template |
ScheduleStatus
enum class ScheduleStatus : uint8_t
| member | value | description |
|---|
| Dummy | 0 | |
| Published | 1 | |
| Retired | 2 | |
PrivacyItemType
enum class PrivacyItemType : uint8_t
| member | value | description |
|---|
| Dummy | 0 | |
| AllowSearchedByOthers | 1 | |
| AllowFriendRequest | 2 | |
| AllowNonFriendPersChat | 3 | |
| AllowGroupInvitation | 4 | |
| ChatStrategy | 5 | |
PrivacyChatStrategy
Text and voice chat privacy settings
enum class PrivacyChatStrategy : uint8_t
| member | value | description |
|---|
| Allow | 0 | Everyone, can see and be seen chat messages from anyone (except block list) |
| OnlyFriends | 1 | Friends, can only see friends and be seen by friends |
| Blocked | 2 | Not allowed at all, won't see anyone's messages, and won't send any messages out |
LobbyOrderBy
enum class LobbyOrderBy : uint8_t
| member | value | description |
|---|
| LOBBY_ORDER_BY_DEFAULT | 0 | Sort by status: Waiting, Preparing, Playing;then by create time from older to newer |
| LOBBY_ORDER_BY_CREATE_TIME | 1 | Sort by lobby create time |
| LOBBY_ORDER_BY_UPDATE_TIME | 2 | Sort by lobby last update time |
| LOBBY_ORDER_BY_JOINED_MEMBER_COUNT | 3 | Sort by joined member count |
| LOBBY_ORDER_BY_MISSING_MEMBER_COUNT | 4 | Sort by empty slot count |
LobbyOrderType
The order type for group search result.
enum class LobbyOrderType : uint8_t
| member | value | description |
|---|
| LOBBY_ORDER_TYPE_ASCENDING | 0 | Ascending order for search result. |
| LOBBY_ORDER_TYPE_DESCENDING | 1 | Descending order for search result. |
PartyJoinStrategy
The strategy controls the rules who could join the party
enum class PartyJoinStrategy : uint8_t
| member | value | description |
|---|
| Public | 0 | Open to anyone, it's the default strategy |
| OnlyFriendsOfLeader | 1 | Only friends of the leader could join the party |
| OnlyFriendsOfMembers | 2 | Only friends of any member could join the party |
| OnlyInvited | 3 | Only invited players could join the party |
| NotAllowed | 4 | No one can join |
PartyInviteStrategy
The strategy controls the rules who could invite others to the party
enum class PartyInviteStrategy : uint8_t
| member | value | description |
|---|
| AllMembersCanInvite | 0 | All members of the party can invite others, it's the default strategy |
| OnlyLeaderCanInvite | 1 | Only the party leader can invite others |
PgosEventChannelStatus
Various status definitions of the PGOS event channel.
The Event Channel serves as a data pipeline for the PGOS backend to send event notifications (e.g., chat_messages/friend_requests) to the client.
enum class PgosEventChannelStatus : uint8_t
| member | value | description |
|---|
| Dummy | 0 | Invalid status. |
| Creating | 1 | When the client is connecting or reconnecting to the backend in order to establish the channel, the status is set to 'Creating'. |
| Available | 2 | When the channel is successfully established, the status is set to 'Available', indicating that the event notification service is functioning properly. |
| Unavailable | 3 | When the client expectedly(logout) or unexpectedly(network exception) disconnects from the backend, the status is set to 'Unavailable', and the event notification service stops working. The SDK will automatically attempt to rebuild the channel until it succeeds, with a gradually slowing frequency. It starts by trying to rebuild every 3 seconds and eventually reduces the frequency to once every 5 minutes. |
MidasRoleIDMethod
enum class MidasRoleIDMethod : uint8_t
| member | value | description |
|---|
| Game | 0 | |
| PGOS | 1 | |
JoinWorldInvitationStatus
Describe the status of the join world invitation.
enum class JoinWorldInvitationStatus : uint8_t
| member | value | description |
|---|
| Dummy | 0 | Invalid status. |
| Pending | 1 | Means: there are still invited players who have not yet confirmed whether to accept or reject the invitation. |
| Completed | 2 | Means: all invited players have made their choices to accept/reject, or the invitation has timed out. And no more 'OnJoinWorldInvitationUpdated' event of this invitation_ticket. Now, the player who accepted the invitation has been added to the battle session. Typically, the player who accepts the invitation will receive the 'OnWorldBattleSessionUpdated' event after the invitation status is marked as 'Completed'. However, if the player is already in the assigned battle session before the invitation, and has obtained the battle session's IP&port (which means he has received the relevant event of the battle session status being Active), then he may not be pushed the 'OnWorldBattleSessionUpdated' event. |
| Error | 3 | Means: An error has occurred (e.g. not enough slots left in the world). Please refer to the 'error_msg' in 'JoinWorldInvitationInfo' structure for more details. |
JoinWorldInvitationAction
The player's action type in response to a join world invitation.
enum class JoinWorldInvitationAction : uint8_t
| member | value | description |
|---|
| Undecided | 0 | The player has not yet decided. |
| Accepted | 1 | The player has decided to accept the invitation. |
| Rejected | 2 | The player has decided to reject the invitation. |
LeaveWorldInvitationStatus
Describe the status of the leave world invitation.
enum class LeaveWorldInvitationStatus : uint8_t
| member | value | description |
|---|
| Dummy | 0 | Invalid status. |
| Pending | 1 | Means: there are still invited players who have not yet confirmed whether to accept or reject the invitation. |
| Completed | 2 | Means: all invited players have made their choices to accept/reject, or the invitation has timed out. And no more 'OnLeaveWorldInvitationUpdated' event of this invitation_ticket. Now, the player who accepted the invitation has been removed from the world. |
| Error | 3 | Please refer to the 'error_msg' in 'LeaveWorldInvitationInfo' structure for more details. |
LeaveWorldInvitationAction
The player's action type in response to a leave world invitation.
enum class LeaveWorldInvitationAction : uint8_t
| member | value | description |
|---|
| Undecided | 0 | The player has not yet decided. |
| Accepted | 1 | The player has decided to accept the invitation. |
| Rejected | 2 | The player has decided to reject the invitation. |
P2PConnectionType
The type of P2P connection.
enum class P2PConnectionType : uint8_t
| member | value | description |
|---|
| Unspecified | 0 | Unspecified. Will try to connect via p2p first. |
| P2P | 1 | Try to connect via p2p. |
| Relay | 2 | Try to connect via relay. |
NatType
The type of NAT.
enum class NatType : uint8_t
| member | value | description |
|---|
| Unknown | 0 | |
| Open | 1 | No Nat |
| FullCone | 2 | Full Cone |
| AddressRestrictedCone | 3 | Address restricted cone |
| PortRestrictedCone | 4 | Port restricted cone |
| Symmetric | 5 | Symmetric |
| SymmetricUDPFirewall | 6 | No NAT with UDP firewall |
| UDPBlocked | 7 | |
Structs
Balance
The currency in the player's wallet.
| field | type | description |
|---|
| currency_code | pgos::pstring | The code of the currency. |
| currency_name | pgos::pstring | The name of the currency. |
| currency_icon | pgos::pstring | The uri of the currency. |
| currency_type | CurrencyType | Currency type. |
| amount | int64_t | The balance of the currency. |
| max_deposit | int64_t | The maximum balance that a player can hold for this currency. A value of 0 represents no limitation. |
MidasGlobalBalance
struct MidasGlobalBalance : public Balance
parent: Balance
| field | type | description |
|---|
| resource_id | pgos::pstring | Resource id of a Midas Token, provided by Midas, view on Midas portal. |
| gift_balance | pgos::pstring | Balance obtained by gift. |
| accumulated_topup_amount | pgos::pstring | Accumulated topup amount. |
| accumulated_gift_amount | pgos::pstring | Accumulated gift amount. |
| total_consume | pgos::pstring | Total consumed amount. |
| first_topup | bool | To show if it is the first topup. |
FasLoginInfo
FAS: The data of the simulated account
| field | type | description |
|---|
| open_id | pgos::pstring | Open id of the fake account |
| token | pgos::pstring | Token of the fake account |
| user_name | pgos::pstring | Username of the fake account |
| token_valid_time | int64_t | The valid time of the current token |
FasRefreshTokenInfo
The new token after refreshing it
struct FasRefreshTokenInfo
| field | type | description |
|---|
| token | pgos::pstring | The new token generated after refreshing |
LoginPGOSParams
Request parameters for login PGOS.
struct LoginPGOSParams : public BaseBackendEventParams
parent: BaseBackendEventParams
| field | type | description |
|---|
| account_provider | int32_t | Account provider: 0 means FAS, 1 means INTL, 2 means MSDK, 3 means WeGame, 4 means PlayFab, 5 means Steam, 6 means Epic, 7 means XboxLive, 8 means PlayStationNetwork, 9 means Nintendo, 10 means JWT. The default value is -1 (not set), at which point PgosSDK will try to read it from the configuration: account_provider. Using int32 instead of enum type is to make SDK better compatible with the new account provider. More info for account provider: https://pgos.intlgame.com/pgosdoc/manual/service_manual/player_management/player_auth.html#311-login-param |
| account_open_id | pgos::pstring | Open id of the logged in account service. |
| account_token | pgos::pstring | Token of the open id. |
| title_region_id | pgos::pstring | Title region the player wants to login, can be obtained from PGOS portal console. |
| extra_param | pgos::pmap<pgos::pstring, pgos::pstring> | [Optional] Extra parameter for the account provider, Its value depends on the account provider used to log in. view the manual for detail: https://pgos.intlgame.com/pgosdoc/manual/service_manual/player_management/player_auth.html#31-log-in-pgos. |
LogoutPGOSParams
Request parameters for logout PGOS.
struct LogoutPGOSParams : public BaseBackendEventParams
parent: BaseBackendEventParams
PlayerBannedEvt
The event will be triggered when the player is banned.
| field | type | description |
|---|
| ban_reason | pgos::pstring | Reason for ban. |
| ban_created_time | int64_t | Ban creation time. Unix timestamp in seconds. |
| ban_duration | int64_t | Ban duration in seconds. |
| ban_expired_time | int64_t | Ban expiration time. Unix timestamp in seconds, if the value <= 0, it is considered to be permanently banned. |
AuthBanInfo
Auth ban info.
struct AuthBanInfo : public PlayerBannedEvt
parent: PlayerBannedEvt
| field | type | description |
|---|
| is_banned | bool | Whether the player is banned. |
AuthenticationInfo
The authentication data when the game needs to identify the player and manage the player session status of the players
struct AuthenticationInfo
| field | type | description |
|---|
| player_id | pgos::pstring | The id of the player |
| session_id | pgos::pstring | The id of the current authenticated session |
| is_first_login | bool | Whether the player is logging in for the first time |
| is_display_name_modified | bool | Whether the display name of the current player has been modified. The display name is initially an empty string before being modified. |
| account_platform | pgos::pstring | account platform name, such as: 'Steam', 'Epic', 'PlayStationNetwork'. |
| ban_info | AuthBanInfo | Whether the player is banned |
BatchGetPlayerInfoCltRsp
Response that client batch getting playerInfo.
struct BatchGetPlayerInfoCltRsp
| field | type | description |
|---|
| data | pgos::pmap<pgos::pstring, PlayerInfo> | Player infos, key: player_id, value: player_info. |
| fail_players | pgos::pmap<pgos::pstring, pgos::pstring> | Players who totally failed, key: player_id, value: failed reason. |
MatchmakingPlayerInfo
Player who is in the matchmaking process
struct MatchmakingPlayerInfo
| field | type | description |
|---|
| player_id | pgos::pstring | The player id |
| team | pgos::pstring | The team of the players |
| match_attributes | pgos::pmap<pgos::pstring, KVDataValue> | Attributes needed by the Matchmaking Ruleset, map key: attribute name, map value: attribute value. |
RequestedPlayerInfo
Player in current matchmaking request.
struct RequestedPlayerInfo
| field | type | description |
|---|
| player_info | PlayerInfo | Base info of a player. |
| ready | bool | Whether the player has joined matchmaking. |
| region_latencies | pgos::pvector<RegionLatencyInfo> | The latency(ms) of the player in different regions. If the latency of the player exceeds the max latency of Queue, then the player cannot join the battle. |
MatchedPlayerInfo
Player who has already matched
| field | type | description |
|---|
| player_info | PlayerInfo | Base info of a player. |
| accepted_status | AcceptedStatus | Player response to the proposed battle. |
| team | pgos::pstring | The team of the players |
CancelMatchmakingInfo
Cancel a matchmaking request
struct CancelMatchmakingInfo
| field | type | description |
|---|
| ticket_id | pgos::pstring | Ticket id for the matchmaking request |
| canceled | bool | Whether the player has canceled the matchmaking request |
| reason | pgos::pstring | The reason for the cancel action, not necessary |
StartMatchmakingParams
Params to start a matchmaking request.
struct StartMatchmakingParams
| field | type | description |
|---|
| configuration_name | pgos::pstring | Name of matchmaking configuration |
| player_info_list | pgos::pvector<MatchmakingPlayerInfo> | Players who start matchmaking together, and they must be set to the same team. |
| mutex_type | MatchmakingMutexType | Mutex type of matchmaking request. PerMatchmakingConfig as default value. |
StartMatchmakingInfo
Start a matchmaking request
struct StartMatchmakingInfo
| field | type | description |
|---|
| ticket_id | pgos::pstring | Ticket id for the matchmaking request |
CurrentMatchmakingsInfo
Current activate matchmaking tickets of the player.
struct CurrentMatchmakingsInfo
| field | type | description |
|---|
| tickets_map | pgos::pmap<pgos::pstring, pgos::pstring> | The mapping of matchmaking configuration to matchmaking ticket. |
PlayerBattleSessionInfo
A player-battle-session is a session between a player and an active battle-session
struct PlayerBattleSessionInfo
| field | type | description |
|---|
| player_id | pgos::pstring | The player id |
| battle_session_id | pgos::pstring | The battle session id to query |
| player_battle_session_id | pgos::pstring | The id of player session in the battle, !!! NOT BATTLE SESSION ID !!! |
| ip_address | pgos::pstring | The access ip address of the battle session |
| port | uint32_t | The access port of the battle session |
| status | PlayerBattleSessionStatus | |
| team_name | pgos::pstring | Team name in a world battle session. |
BattleSessionInfo
A battle session corresponds a running game.
| field | type | description |
|---|
| battle_session_id | pgos::pstring | The battle session id to query |
| created_time | int64_t | The Unix timestamp(in seconds) when the battle session was created. |
| ip_address | pgos::pstring | The IP address of the DS holding the battle session, and it will be assigned the value when the status is 'Active'. |
| port | uint32_t | The port of the DS holding the battle session, and it will be assigned the value when the status is 'Active'. |
| status | BattleSessionStatus | Placing the battle session is currently waiting to be placed on game DS Active the battle session has been successfully created, now you can connect to the DS using the IP address and port Terminated the battle session has been terminated Error the battle session error, check status_msg for more information Canceled the battle session is canceled Timeout the battle session timeout Failed the battle session failed, check status_msg for more information |
| status_msg | pgos::pstring | The message of the battle status |
| last_updated_time | int64_t | The Unix timestamp(in seconds) for the last update in the battle status |
| terminated_time | int64_t | The Unix timestamp(in seconds) when the player disconnected from game server. |
| placing_timeout | uint32_t | Timeout for placing status |
| cur_player_battle_session_info | PlayerBattleSessionInfo | Player battle session of current player |
| battle_properties | pgos::pvector<BattleProperty> | K-V pair property of a battle session |
| battle_session_data | pgos::pstring | Custom string data of a battle session. Preset in matchmaking configuration |
| source_type | BattleSourceType | What service that the battle session generated from |
| configuration_name | pgos::pstring | Configuration name of matchmaking, lobby or world service |
| bucket_path | pgos::pmap<pgos::pstring, pgos::pstring> | Mapping from bucket filter attribute name to attribute value. [for WORLD battle session only] |
| ruleset_name | pgos::pstring | Ruleset name hit. Filled when battle session source type is BattleSourceType::Matchmaking |
| locked | bool | True if the battle session is locked by game server A battle session generated from world service could be locked/unlocked by calling Lock/UnlockWorldBattleSession. |
| zone | pgos::pstring | Zone where the battle session placed. |
P2PPlayerBattleSession
A player-battle-session is a session between a player and a activated battle-session.
struct P2PPlayerBattleSession
| field | type | description |
|---|
| battle_session_id | pgos::pstring | The battle session id. |
| player_battle_session_id | pgos::pstring | The id of player session in the battle, !!! NOT BATTLE SESSION ID !!! |
| player_id | pgos::pstring | The player id |
| status | P2PPlayerBattleSessionStatus | |
| created_time | int64_t | The Unix timestamp(in seconds) when the battle session was created. |
| terminated_time | int64_t | The Unix timestamp(in seconds) when the battle session was terminated. |
P2PBattleSessionBase
A battle session corresponds a running game.
struct P2PBattleSessionBase
| field | type | description |
|---|
| battle_session_id | pgos::pstring | The battle session id to query |
| host_player_id | pgos::pstring | Host player of the P2P battle session |
| status | P2PBattleSessionStatus | Battle session status |
| status_msg | pgos::pstring | The message of the battle status |
| source_type | BattleSourceType | What service that the battle session generated from |
| configuration_name | pgos::pstring | Configuration name of matchmaking, lobby or world service |
| ruleset_name | pgos::pstring | Ruleset name hit. Filled when battle session source type is BattleSourceType::Matchmaking |
| battle_properties | pgos::pvector<BattleProperty> | K-V pair property of a battle session |
| battle_session_data | pgos::pstring | Custom string data of a battle session. Preset in matchmaking configuration |
| max_players | int32_t | Maximum number of players in the battle session If the source of the battle session is Matchmaking, the max_players is calculated from the teams section of ruleset script If the source of the game is Lobby, the max_players is calculated from the teams section of lobby config |
| total_players | int32_t | Total number of players in the battle session. Only players with a player battle session status of COMPLETED will be excluded |
| created_time | int64_t | The Unix timestamp(in seconds) when the battle session was created. |
| terminated_time | int64_t | The Unix timestamp(in seconds) when the player disconnected from game server. |
P2PBattleSession
A battle session corresponds a running game.
struct P2PBattleSession : public P2PBattleSessionBase
parent: P2PBattleSessionBase
| field | type | description |
|---|
| cur_player_battle_session_info | P2PPlayerBattleSession | Player battle session of current player |
MatchmakingProcessInfo
Detailed process of a matchmaking request.
struct MatchmakingProcessInfo
| field | type | description |
|---|
| matchmaking_status | MatchmakingStatus | Starting Matchmaking request is starting. Preparing Waiting for players confirmation for a multi-player matchmaking request. Note: when the MatchmakingObserver receives this status, it requires players to join or reject the mutilplayer matchmaking request. When one of the players start a mutilplayer matchmaking request, the other players will receive the 'Preparing' matchmaking status, and then decide to join or reject the matchmaking request. When everyone has joined, matchmaking start Searching. Searching Search players who fit the ruleset. Accepting Wait for players to accept the result of matchmaking. Placing Placing battle session on game DS. Pending Deprecated since <v0.12.7>. Use Placing instead. Completed The matchmaking request ends with a successful result. Check battle_session_info for detail information about the battle. Note: when the MatchmakingObserver receives this status, you need to connect the DS server via IP and port that could obtain from battle_session_info. Timeout Matchmaking request timeout. Terminated Matchmaking request is terminated. Canceled Matchmaking request is canceled. The request may have been canceled by the player or the matchmaking result has been rejected by the player. Error Matchmaking request error. |
| matchmaking_message | pgos::pstring | The message of the matchmaking status. |
| last_updated_status_time | int64_t | The Unix timestamp(in seconds) for the last update in the matchmaking status. |
| ticket_id | pgos::pstring | Ticket id for the matchmaking request. |
| configuration_name | pgos::pstring | The target matchmaking configuration name of current matchmaking request. |
| requested_players | pgos::pvector<RequestedPlayerInfo> | Players in current matchmaking request. |
| matched_players | pgos::pvector<MatchedPlayerInfo> | Players already matched. |
| matchmaking_creator_id | pgos::pstring | Originator of the matchmaking request. |
| match_start_time | int64_t | The Unix timestamp(in seconds) when the matchmaking started. |
| match_end_time | int64_t | The Unix timestamp(in seconds) when the matchmaking ended. |
| estimated_searching_time | uint32_t | Not used. |
| preparing_timeout | uint32_t | The maximum time(in seconds) to wait for all request members to accept the request. |
| searching_timeout | uint32_t | The maximum time(in seconds) to wait for searching matched players. |
| accepting_timeout | uint32_t | The maximum time(in seconds) to wait for accepting a matched battle |
| placing_timeout | uint32_t | Timeout(in seconds) for Placing status. |
| concurrent_player_count | uint32_t | Number of players searching in current match config |
| battle_session_info | BattleSessionInfo | A battle session contains matched players. |
| battle_session_provider | pgos::pstring | Provider of battle session management: @ PGOS for PGOS battle service @ STANDALONE for self-build battle session management service. @ P2P for battle session hosted by game P2P game client |
| p2p_host_player_id | pgos::pstring | Host player id for a P2P battle provide by P2P matchmaking. Only be filled when @battle_session_provider is set to P2P. OnStartP2PBattleSession event of P2PBattle module should be handled by the host client to obtain detail information of a P2P battle sesssion. |
| p2p_battle_session_id | pgos::pstring | P2P Battle sesssion id provide by P2P matchmaking. Only be filled when @battle_session_provider is set to P2P. Battle session activation events will be pushed through OnP2PBattleSessionUpdated events of P2PBattle module. |
GetConcurrentMatchmakingPlayerCountParams
struct GetConcurrentMatchmakingPlayerCountParams
| field | type | description |
|---|
| configuration_name | pgos::pstring | Matchmaking configuration name. |
GetConcurrentMatchmakingPlayerCountResult
struct GetConcurrentMatchmakingPlayerCountResult
| field | type | description |
|---|
| count | uint32_t | Players in current matchmaking pool. |
PartyCustomData
Custom data for party.
| field | type | description |
|---|
| version | int | Custom data version, always incremental over the lifetime of the party. |
| global_custom_data | pgos::pstring | Global custom data. Only Leader has permission to modify it. |
| player_custom_data | pgos::pmap<pgos::pstring, pgos::pstring> | Player custom data. The map key is party member's player ID, the map value is the party member's custom data. Each party member could modify it's player custom data. |
PartyInfo
Detailed information of a party
| field | type | description |
|---|
| party_id | pgos::pstring | The party id |
| name | pgos::pstring | Name of the party |
| leader | PlayerInfo | Player who is the leader of the party A leader can: Kick out members: a leader can kick out any member at any time. Dismiss the party. Transfer leadership to another member. |
| members | pgos::pvector<PlayerInfo> | Players of the party |
| created_time | int64_t | The Unix timestamp(in seconds) when the party was created. |
| max_player | uint32_t | Max number of players in the party, unlimited if it is 0. |
| custom_data | PartyCustomData | Custom data of the party(including global and player). |
| join_strategy | PartyJoinStrategy | The strategy controls the rules who could join the party. |
| invite_strategy | PartyInviteStrategy | The strategy controls the rules who could invite others to the party. |
SetPartyStrategyParams
The parameters of join/invite strategy used to SetPartyStrategy
struct SetPartyStrategyParams
| field | type | description |
|---|
| party_id | pgos::pstring | The party id |
| join_strategy | PartyJoinStrategy | The strategy controls the rules who could join the party. |
| invite_strategy | PartyInviteStrategy | The strategy controls the rules who could invite others to the party. |
CreatePartyParams
Request struct for create party
| field | type | description |
|---|
| party_name | pgos::pstring | Optional name of the new party |
| max_player | uint32_t | The maximum limit on the count of party members, pass 0 if you don't want to limit |
| enable_chatting | bool | If true, the party members can use SendPartyChatTextMsg/SendPartyChatCustomMsg/SetOnReceiveChatMsg |
| join_strategy | PartyJoinStrategy | The strategy controls the rules who could join the party. |
| invite_strategy | PartyInviteStrategy | The strategy controls the rules who could invite others to the party. |
SendPartyChatMsgParams
Request struct for sending party chat message
struct SendPartyChatMsgParams
| field | type | description |
|---|
| content | pgos::pstring | The message content to be sent |
| custom_data | pgos::pstring | Additional information added by the game |
BattleDataInfo
Raw battle history data
| field | type | description |
|---|
| battle_session_id | pgos::pstring | The battle session id to query |
| data | pgos::pmap<pgos::pstring, pgos::pstring> | Battle custom kv data, such as {key1:value1, key2:value2} |
| tags | pgos::pvector<pgos::pstring> | Battle custom tags, you can filter battles by tags, such as [Entertainment] |
| fails | pgos::pmap<pgos::pstring, pgos::pstring> | A list of failed items in K-V pair data operations |
| battle_created_time | int64_t | The Unix timestamp(in seconds) when the battle session was created. |
BattleListInfo
A list of battle history data
| field | type | description |
|---|
| battle_data_list | pgos::pvector<BattleDataInfo> | A list of raw battle history data |
| next_offset | uint32_t | The next starting position of the list |
BattleBriefInfo
A special battle history data that is preset by PGOS.
| field | type | description |
|---|
| battle_session_id | pgos::pstring | The battle session id to query |
| brief | pgos::pstring | Custom battle brief, such as current player's KDA |
| tags | pgos::pvector<pgos::pstring> | Battle custom tags, you can filter battles by tags, such as [Entertainment] |
| battle_created_time | int64_t | The Unix timestamp(in seconds) when the battle session was created. |
BattleDetailInfo
A special battle history data that is preset by PGOS.
| field | type | description |
|---|
| battle_session_id | pgos::pstring | The battle session id to query |
| detail | pgos::pstring | Custom battle detail, such as the KDA of all players |
| tags | pgos::pvector<pgos::pstring> | Battle custom tags, you can filter battles by tags, such as [Entertainment] |
| battle_created_time | int64_t | The Unix timestamp(in seconds) when the battle session was created. |
BattleBriefListInfo
A list of battle brief info
struct BattleBriefListInfo
| field | type | description |
|---|
| battle_data_list | pgos::pvector<BattleBriefInfo> | A list of raw battle history data |
| next_offset | uint32_t | The next starting position of the list |
MentionedPlayer
The mentioned player.
When the value of player_id is '@ALL', it means mentioning all players.
| field | type | description |
|---|
| player_id | pgos::pstring | Unique id of player, When the value of player_id is '@ALL', it means mentioning all players. |
| player_display_name | pgos::pstring | Player's display name. Populated by the game developer when sending a message. |
ChatMsgContent
Instant/Party/Lobby chat message content
| field | type | description |
|---|
| text_content | pgos::pstring | Take the value from here when msg type is MsgTypeText |
| custom_content | pgos::pstring | Take the value from here when msg type is MsgTypeCustom |
ChatMsgInfo
Instant/Party/Lobby chat messages
| field | type | description |
|---|
| sender | PlayerInfo | The player who send the message |
| sent_time | int64_t | The time the message was sent |
| msg_type | ChatMsgType | The type of the message |
| content | ChatMsgContent | The message to be sent |
| seq | int64_t | The sequence number of the message |
| custom_data | pgos::pstring | Additional information added by the game |
SendPersonalMsgParams
Request struct for sending personal message
struct SendPersonalMsgParams
| field | type | description |
|---|
| peer_player_id | pgos::pstring | Peer player's ID |
| content | pgos::pstring | Content |
| custom_data | pgos::pstring | Additional information added by the game |
UnreadMsgCountNotifyEvt
Event result of unread message count changed
struct UnreadMsgCountNotifyEvt
| field | type | description |
|---|
| total_unread_count | int32_t | Total unread count of personal chat or group chat |
PersonalMsgContent
Personal chat message content
struct PersonalMsgContent
| field | type | description |
|---|
| text_content | pgos::pstring | Take the value from here when msg type is MsgTypeText |
| custom_content | pgos::pstring | Take the value from here when msg type is MsgTypeCustom |
PersonalMsgInfo
Personal chat message info
| field | type | description |
|---|
| sender | PlayerInfo | The player who sent the message |
| sent_time | int64_t | The time the message was sent |
| msg_type | ChatMsgType | The type of the message |
| content | PersonalMsgContent | The message to be sent |
| seq | int64_t | The sequence number of the message |
| custom_data | pgos::pstring | Additional information added by the game |
ReceivePersonalMsgEvt
Event result of receive personal chat message
struct ReceivePersonalMsgEvt
| field | type | description |
|---|
| msg | PersonalMsgInfo | Personal chat message received |
| unread_count | int32_t | Count of unread message from sender |
PersonalChatItem
Personal chat info
| field | type | description |
|---|
| peer_player_info | PlayerInfo | The peer player info |
| unread_count | int32_t | Unread message count |
| msg_latest | PersonalMsgInfo | Recent chat message info |
GetMyPersonalChatListResult
My personal chat list
struct GetMyPersonalChatListResult
| field | type | description |
|---|
| personal_chat_list | pgos::pvector<PersonalChatItem> | Personal chat list |
GetPersonalChatMsgListResult
Result of get personal chat message list
struct GetPersonalChatMsgListResult
| field | type | description |
|---|
| msg_list | pgos::pvector<PersonalMsgInfo> | Chat message info list |
| already_read_seq | int64_t | Messages with seq less than or equal to this have already been read |
| has_more | bool | Whether has more message |
| next_seq | int64_t | The starting sequence for the next query |
GetGmeTicketResult
struct GetGmeTicketResult
| field | type | description |
|---|
| gme_ticket | pgos::pstring | Result of the gme ticket request, which is base64 encoded |
| voice_app_id | pgos::pstring | Indicates the gme app id registed on portal |
| gme_type | pgos::pstring | Service provider: aws, tcloud_chinese_mainland, tcloud_intl, etc. |
JoinInstantChatResult
The result of players joining instant chat
struct JoinInstantChatResult
| field | type | description |
|---|
| chat_channel_id | pgos::pstring | The chat channel |
ReceiveInstantChatMsgEvt
Event result of receive instant chat message
struct ReceiveInstantChatMsgEvt
| field | type | description |
|---|
| chat_channel_id | pgos::pstring | ID of chat channel where the message was received |
| chat_msg_info | ChatMsgInfo | Instant chat message received |
InstantChatMemberJoinedEvt
Event result of member joined instant chat
struct InstantChatMemberJoinedEvt
| field | type | description |
|---|
| chat_channel_id | pgos::pstring | Instant chat channel the player joined |
| added_members | pgos::pvector<PlayerInfo> | Players added to the instant chat |
InstantChatMemberLeftEvt
Event result of member left instant chat
struct InstantChatMemberLeftEvt
| field | type | description |
|---|
| chat_channel_id | pgos::pstring | Instant chat channel the player left |
| left_members | pgos::pvector<PlayerInfo> | Players left from the channel |
GetInstantChatMembersResult
All the players in the channel
struct GetInstantChatMembersResult
| field | type | description |
|---|
| all_members | pgos::pvector<PlayerInfo> | All the players in the channel |
SendInstantChatMsgParams
Request struct for sending instant chat message
struct SendInstantChatMsgParams
| field | type | description |
|---|
| chat_channel_id | pgos::pstring | The chat channel ID |
| content | pgos::pstring | The message content to be sent |
| custom_data | pgos::pstring | Additional information added by the game |
GetInstantChatMemberIDsResult
All player IDs in a channel
struct GetInstantChatMemberIDsResult
| field | type | description |
|---|
| all_member_ids | pgos::pvector<pgos::pstring> | All the players in the channel |
GetInstantChatMemberCountResult
The num of players in a channel
struct GetInstantChatMemberCountResult
| field | type | description |
|---|
| all_member_count | int32_t | The num of players in a channel |
LobbyPlayer
Player in lobby
| field | type | description |
|---|
| player_info | PlayerInfo | Base info of a player. |
| team_name | pgos::pstring | Current team of the player. Team name is pre-set in lobby configuration |
| team_slot | uint32_t | Slot index of the player. Starting value is 1 |
| source | LobbyJoiningSource | The source of the player join the lobby |
| ready | bool | Ready flag of the player |
LobbyTeam
Team struct of current lobby
| field | type | description |
|---|
| name | pgos::pstring | Team name is pre-set in lobby configuration |
| capacity | uint32_t | Capacity of the team |
| players | pgos::pmap<pgos::pstring, LobbyPlayer> | A map from team slot(in string format) to LobbyPlayer for all players in the team. |
| group | pgos::pstring | The group to which the team belongs |
| start_battle_condition | LobbyStartBattleCondition | The action when the lobby owner invokes the StartBattle interface depends on the Ready flag of lobby members. |
LobbyBriefInfo
Brief information of a lobby
| field | type | description |
|---|
| lobby_id | pgos::pstring | A unique lobby ID which was displayed on the game client. |
| lobby_owner | LobbyPlayer | The name of the lobby owner. |
| name | pgos::pstring | The name of the lobby. |
| status | LobbyStatus | The current lobby status. |
| privacy | LobbyPrivacy | Lobby privacy type: Dummy, Invisible, or Invisible |
| protection | LobbyProtection | Lobby protection type: Dummy, PasswordNeeded, PasswordUnNeeded |
| player_count | uint32_t | The number of players in the lobby |
| player_limit | uint32_t | Sum of capacities of all teams |
| kv_data | pgos::pmap<pgos::pstring, pgos::pstring> | Global kv data of the lobby. Only owner has the permission to modify it. |
| player_kv_data | pgos::pmap<pgos::pstring, pgos::pstring> | Player custom data of each lobby member. The map key is lobby member's player ID, the map value is the lobby member's custom data. Each lobby member could modify it's player kv data. |
| game_mode | pgos::pstring | The game mode of the lobby. Each game mode can be configured with a placer on the portal |
LobbyDetailInfo
Detailed information of a lobby
struct LobbyDetailInfo : public LobbyBriefInfo
parent: LobbyBriefInfo
| field | type | description |
|---|
| status_reason | LobbyStatusReason | The reason that the lobby status changes. |
| password | pgos::pstring | Password needed to join the lobby |
| teams | pgos::pvector<LobbyTeam> | The team struct of current lobby. |
| lobby_config | pgos::pstring | Lobby configuration name of current lobby |
| chat_channel_id | pgos::pstring | An unique chat channel ID for the lobby's chat channel; empty if enable_chatting was set to false when the lobby was created. |
| battle_session_id | pgos::pstring | The battle session that started from the lobby |
| preparing_timeout | uint32_t | The maximum time to wait for all request members to accept the request |
| placing_timeout | uint32_t | The maximum time to wait for placing the battle session |
| battle_session_provider | pgos::pstring | Provider of battle session management service. PGOS for PGOS battle service, STANDALONE for self-build battle session management service. |
CreateLobbyParams
The information needed to create the lobby.
| field | type | description |
|---|
| lobby_config | pgos::pstring | Lobby configuration name of current lobby |
| name | pgos::pstring | The name of the lobby. |
| privacy | LobbyPrivacy | Lobby privacy type: Dummy, Invisible, or Invisible |
| password | pgos::pstring | Password needed to join the lobby |
| enable_chatting | bool | If true, the lobby members can use SendLobbyChatTextMsg/SendLobbyChatCustomMsg/SetOnReceiveLobbyChatMsg |
| kv_data | pgos::pmap<pgos::pstring, pgos::pstring> | 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). |
| protection | LobbyProtection | Optional, the lobby protection policy. |
| game_mode | pgos::pstring | Optional, the game mode of the lobby. After starting the battle, the placer corresponding to the game mode on the portal will be used. If this game mode does not have a placer configured, the default placer configured on the portal will be used. |
EditLobbyInfoParams
The lobby information that needs to be updated. These data will overwrite the previous data.
struct EditLobbyInfoParams
| field | type | description |
|---|
| name | pgos::pstring | The name of the lobby. |
| privacy | LobbyPrivacy | Lobby privacy type: Dummy, Invisible, or Invisible |
| password | pgos::pstring | Password needed to join the lobby |
| kv_data | pgos::pmap<pgos::pstring, pgos::pstring> | Deprecated since <v0.33.2>, use SetSetLobbyGlobalData instead |
| protection | LobbyProtection | The lobby protection policy. |
| game_mode | pgos::pstring | the game mode of the lobby. After starting the battle, the placer corresponding to the game mode on the portal will be used. If this game mode does not have a placer configured, the default placer configured on the portal will be used. |
JoinLobbyParams
The information needed when join the lobby
| field | type | description |
|---|
| lobby_id | pgos::pstring | The lobby id to join |
| password | pgos::pstring | The lobby password. If the lobby is not encrypted, it doesn't need to be filled. |
| join_token | pgos::pstring | It is from the event of 'OnLobbyInvitation' if the player is invited to join a lobby, Otherwise it doesn't need to be filled. |
| payload | pgos::pstring | Join request payload will be passed to the lobby owner in OnLobbyJoinRequest event for a lobby with LobbyProtection::ApplicationNeeded. |
JoinLobbyWithGroupsParams
The information needed when join the lobby
struct JoinLobbyWithGroupsParams : public JoinLobbyParams
parent: JoinLobbyParams
| field | type | description |
|---|
| selected_groups | pgos::pmap<pgos::pstring, uint32_t> | Try to join the specified groups in the lobby according to the specified priority value from small to large. key: group, value: priority.(priority cannot be less than 0) |
JoinLobbyWithTeamsParams
The information needed when join the lobby
struct JoinLobbyWithTeamsParams : public JoinLobbyParams
parent: JoinLobbyParams
| field | type | description |
|---|
| selected_teams | pgos::pmap<pgos::pstring, uint32_t> | Try to join the specified teams in the lobby according to the specified priority value from small to large. key: team name, value: priority.(priority cannot be less than 0) |
SearchLobbyDataFilter
Lobby data search filter
struct SearchLobbyDataFilter
| field | type | description |
|---|
| equal_values | pgos::pvector<pgos::pstring> | [Only for single string value] List all values that meet the filtering data. This field does not take effect when 'treat_as_list_value' is true. |
| not_equal_values | pgos::pvector<pgos::pstring> | [Only for single string value] List all values that do not meet the filtering data. This field does not take effect when 'treat_as_list_value' is true. |
| set_is_subset_values | pgos::pvector<pgos::pstring> | [Only for list value] Target data list value is subset of giving list. This field does not take effect when 'treat_as_list_value' is false. |
| set_intersection_values | pgos::pvector<pgos::pstring> | [Only for list value] The intersection between the target list and the given list is not empty. This field does not take effect when 'treat_as_list_value' is false. |
| treat_as_list_value | bool | Whether to treat the target value in lobby_data as a list value, defaulting to false. |
SearchLobbyParams
The optional filter information when searching the lobby list.
| field | type | description |
|---|
| lobby_id | pgos::pstring | Optional, search for the specified lobby by id. It can search for the lobby of 'Invisible' |
| lobby_config | pgos::pstring | Optional, search for the lobby of the specified config, such as 'lobby 1v1' |
| status | LobbyStatus | Optional, search for the lobby in the specific state |
| protection | LobbyProtection | Optional, for example, only search for the lobby without password |
| offset | uint32_t | The starting position of the search |
| count | uint32_t | The search count |
| order_by | LobbyOrderBy | Search order |
| order_type | LobbyOrderType | Order direction |
| lobby_data | pgos::pmap<pgos::pstring, SearchLobbyDataFilter> | Filter by global kv data of the lobby. The map key is lobby data key, and the map value is lobby data filter. |
SearchLobbyResult
The result of the search lobby request
| field | type | description |
|---|
| lobbies | pgos::pvector<LobbyBriefInfo> | A list of lobbies filtered by our search. If these data are not filled (lobby_id, lobby_config, status, protection), all existing lobbies will be returned. |
| total_matched_lobbies_count | int64_t | The total number of lobbies filtered by the search |
QuickJoinLobbyParams
struct QuickJoinLobbyParams
| field | type | description |
|---|
| lobby_config | pgos::pstring | Required, lobby configuration name. |
| lobby_data | pgos::pmap<pgos::pstring, SearchLobbyDataFilter> | Optional, filter by global kv data of the lobby. The map key is lobby data key, and the map value is lobby data filter. |
| selected_groups | pgos::pmap<pgos::pstring, uint32_t> | Optional, selected_groups will be used when PGOS place the player into lobby instance. Try to join the specified groups in the lobby according to the specified priority value from small to large. key: group, value: priority.(priority cannot be less than 0) |
| selected_teams | pgos::pmap<pgos::pstring, uint32_t> | Optional, selected_teams will be used when PGOS place the player into lobby instance. Try to join the specified teams in the lobby according to the specified priority value from small to large. key: team name, value: priority.(priority cannot be less than 0) |
SendLobbyChatMsgParams
Request struct for sending lobby chat message
struct SendLobbyChatMsgParams
| field | type | description |
|---|
| content | pgos::pstring | The message content to be sent |
| custom_data | pgos::pstring | Additional information added by the game |
Request struct for set friend remark.
struct SetFriendRemarkParams
| field | type | description |
|---|
| player_id | pgos::pstring | Player's ID |
| remark | pgos::pstring | remark to the friend |
AddFriendParams
Request struct for add friend.
| field | type | description |
|---|
| player_id | pgos::pstring | The player id to add |
| message | pgos::pstring | Request message |
BatchAddFriendParams
Request struct for batch add friend.
struct BatchAddFriendParams
| field | type | description |
|---|
| player_ids | pgos::pvector<pgos::pstring> | The player ids to add |
| message | pgos::pstring | Request message |
FriendReqInfo
The friend request details.
| field | type | description |
|---|
| player_info | PlayerInfo | Basic player information such as display name and avatar. |
| message | pgos::pstring | The request message sent from the player who wants to add you as a friend. |
| created_time | int64_t | The Unix timestamp(in seconds) when the request was created. |
BatchAddFriendRsp
Response that add batch friends.
| field | type | description |
|---|
| fail_players | pgos::pmap<pgos::pstring, pgos::pstring> | Players who totally failed, key: player_id, value: failed reason. |
FriendReqListInfo
The list of friend requests.
| field | type | description |
|---|
| friend_request_info_list | pgos::pvector<FriendReqInfo> | The list of friend requests |
GetMyFriendsLimitResult
Response to get my friends limit.
struct GetMyFriendsLimitResult
| field | type | description |
|---|
| friends_limit | uint32_t | The maximum limit of friends you can have. |
BatchAccountIDToPlayerIDResult
The result of batch account ids to player ids.
struct BatchAccountIDToPlayerIDResult
| field | type | description |
|---|
| data | pgos::pmap<pgos::pstring, pgos::pstring> | Result of successful conversion, key: account id, value: player id. |
| fails | pgos::pmap<pgos::pstring, pgos::pstring> | Partial failure result, key: account id, value: failed reason. |
BlocklistInfo
My blocklist details
| field | type | description |
|---|
| player_info_list | pgos::pvector<PlayerInfo> | Players in my blocklist |
All blocklist's player IDs
struct SyncAccountPlatformBlocklistResult
| field | type | description |
|---|
| all_blocklist | pgos::pvector<pgos::pstring> | All players in blocklist |
PlayerPresence
The player's current status information which is set by game, such as in party , in lobby, in battle.
| field | type | description |
|---|
| status | OnlineStatus | Online status is provided by PGOS Server. It has two values: online and offline. |
| presence | pgos::pstring | The player's current status information which is set by game, such as in party , in lobby, in battle. |
BatchGetPlayerPresenceRsp
Response of querying multiple players' presence
struct BatchGetPlayerPresenceRsp
| field | type | description |
|---|
| player_presences | pgos::pmap<pgos::pstring, PlayerPresence> | Presences of the players, key: player_id, value: the player's presence. |
| fail_players | pgos::pmap<pgos::pstring, pgos::pstring> | Players who totally failed, key: player_id, value: failed reason. |
PlayerFriendInfo
Details of a player's friend
| field | type | description |
|---|
| player_info | PlayerInfo | Basic player information such as display name and avatar. |
| player_presence | PlayerPresence | The player's current status information which is set by game, such as in party , in lobby, in battle. |
| remark | pgos::pstring | remark to the player, for example, "Tommy, a humorous man, met in the battle." |
PlayerSearchInfo
Details of player search
| field | type | description |
|---|
| player_info | PlayerInfo | Basic player information such as display name and avatar. |
| player_presence | PlayerPresence | The player's current status information which is set by game, such as in party , in lobby, in battle. |
| remark | pgos::pstring | The remark of the player |
| is_friend | bool | Whether the searched player is a friend |
| is_blocked | bool | Whether the searched player is placed in the blocked list |
FriendListInfo
Friend list details
| field | type | description |
|---|
| friend_info_list | pgos::pvector<PlayerFriendInfo> | Friend list details |
PlayerSearchInfoList
A list of player search details
struct PlayerSearchInfoList
| field | type | description |
|---|
| info_list | pgos::pvector<PlayerSearchInfo> | A list of player search details |
Players of external platform such as Steam
struct PlatformPlayerInfo
| field | type | description |
|---|
| account_open_id | pgos::pstring | Account openIDs of external platform such as Steam. |
| player_info | PlayerInfo | Basic player information such as display name and avatar. |
| player_presence | PlayerPresence | The player's current status information which is set by game, such as in party , in lobby, in battle. |
| remark | pgos::pstring | The remark of the player |
| is_friend | bool | Whether the searched player is a friend |
| is_blocked | bool | Whether the searched player is placed in the blocked list |
A map of players of external platform such as Steam.
struct PlatformPlayerInfoMap
| field | type | description |
|---|
| transform_item_map | pgos::pmap<pgos::pstring, PlatformPlayerInfo> | A map of players of external platform such as Steam. Key: player's open_id, Value: PlatformPlayerInfo |
AcceptFriendRequestResult
Result of accept friend request.
struct AcceptFriendRequestResult
| field | type | description |
|---|
| friend_info | PlayerFriendInfo | New friend information obtained after accepting. |
SearchPlayerFilter
Filter param for search player.
struct SearchPlayerFilter
| field | type | description |
|---|
| os | pgos::pvector<ClientOS> | OS filter. Currently supports passing in at most one OS. Empty means no filtering based on OS. |
SearchPlayersParams
Request struct for search players
struct SearchPlayersParams
| field | type | description |
|---|
| search_key | pgos::pstring | Key words to for searching, now only supports searching based on player id and player name. Search results are paged back. |
| offset | uint32_t | Index of the first data in all search results. |
| count | uint32_t | Maximum count of results returned in one page, the maximum value of 'count' is 50 |
SearchPlayersWithFilterParams
Request struct for search players with filter
struct SearchPlayersWithFilterParams
| field | type | description |
|---|
| search_key | pgos::pstring | Key words to for searching, now only supports searching based on player id and player name. Search results are paged back. |
| search_filter | SearchPlayerFilter | Filter by OS etc.. |
| offset | uint32_t | Index of the first data in all search results. |
| count | uint32_t | Maximum count of results returned in one page, the maximum value of 'count' is 50 |
UniqueItemDeduction
Price deduction for unique items in the store item configured on the portal.
struct UniqueItemDeduction
| field | type | description |
|---|
| item_id | pgos::pstring | The id of the unique item. |
| deduction_price | uint32_t | The deduction price of the unique item configured on the portal. |
| is_deducted | bool | True means that the player owns the unique item and a deduction occurred when purchasing the store item. |
CompensationCurrency
Currency compensation.
struct CompensationCurrency
| field | type | description |
|---|
| currency_code | pgos::pstring | The code of the currency. |
| amount | uint32_t | The amount of the currency. |
UniqueItemCompensation
Compensation for unique items in the store item configured on the portal. This used when pay_platform is MidasGlobal
struct UniqueItemCompensation
StoreItemPrice
The price of a store item.
| field | type | description |
|---|
| currency_code | pgos::pstring | The code of the currency. |
| currency_name | pgos::pstring | The name of the currency. |
| currency_icon | pgos::pstring | The uri of the currency. |
| price | uint32_t | The actual price used to purchase the store item with the currency. selling_price deducts the deduction_price where is_deducted is true in unique_item_deductions. |
| selling_price | uint32_t | Selling price in the store, defined in the store item of the portal. When creating a store item on the portal, you can directly use the price defined in the in-game item (default_price), at this time selling_price is equal to default_price, or you can use custom selling price. |
| original_price | uint32_t | Deprecated since <v0.25.0>. Use selling_price instead. |
| default_price | uint32_t | The price of in-game item. defined in the in-game item of the portal. |
| unique_item_deductions | pgos::pmap<pgos::pstring, UniqueItemDeduction> | Price deduction for unique items in the store item configured on the portal. Key: unique item id. |
ItemPrice
The currency code and price used to purchase the item
| field | type | description |
|---|
| currency_code | pgos::pstring | The code of the currency. |
| price | uint32_t | The actual price used to purchase the store item with the currency. |
GetBalancesResult
| field | type | description |
|---|
| balances | pgos::pvector<Balance> | The balances that the player owns. |
StoreItemPurchaseLimit
Purchase amount limit of store item.
struct StoreItemPurchaseLimit
| field | type | description |
|---|
| max_purchase_amount | uint32_t | The maximum amount limit that players can purchase for this store item. 0 means no limit. |
| purchased_amount | uint32_t | When max_purchase_amount is greater than 0, record the amount that the player has purchased. Please note that when the category period is switched, its value will be recalculated. |
StoreItem
| field | type | description |
|---|
| pay_platform | pgos::pstring | Pay platform name, such as: 'Pgos', 'MidasGlobal', etc. You can use macros starting with 'PAY_PLATFORM' in pgos_common_define.h @ Pgos, make a virtual currency payment to PGOS to purchase this item. @ MidasGlobal, make a cash payment through Midas to purchase this item. |
| store_item_id | pgos::pstring | The id of the store item. |
| status | StoreItemStatus | Store item status: Dummy / Available / Owned / ExceedLimit. |
| prices | pgos::pvector<StoreItemPrice> | The currency to purchase the store item, it may be multiple. |
| item | InGameItem | The in-game item related to the store item. |
| tags | pgos::pmap<pgos::pstring, pgos::pstring> | The tags of store item Fill in the tags of item on the portal. |
| purchase_limit | StoreItemPurchaseLimit | Purchase amount limit of store item. |
| compensations | pgos::pmap<pgos::pstring, UniqueItemCompensation> | The compensation for unique items in the store item configured on the portal when pay_platform is MidasGlobal. Key: unique item id. |
StoreCategoryBrief
The brief information of the store category.
struct StoreCategoryBrief
| field | type | description |
|---|
| category_id | pgos::pstring | The id of the category. |
| name | pgos::pstring | The name of the category. |
| description | pgos::pstring | The description of the category. |
| tags | pgos::pmap<pgos::pstring, pgos::pstring> | The custom tags of the category. |
| type | StoreCategoryType | The type of the category. |
| published_start_time | int64_t | The Unix timestamp (in seconds) for the start time of the currently active period. It is always 0 under the simple type. |
| published_end_time | int64_t | The Unix timestamp (in seconds) for the end time of the currently active period. It is always 0 under the simple type. |
StoreCategory
The information of the store category.
struct StoreCategory : public StoreCategoryBrief
parent: StoreCategoryBrief
| field | type | description |
|---|
| content_items | pgos::pvector<StoreItem> | Store items in the category. |
Store
| field | type | description |
|---|
| store_id | pgos::pstring | The id of the store. |
| display_name | pgos::pstring | The name of the store. |
| description | pgos::pstring | The description of the store. |
| tags | pgos::pmap<pgos::pstring, pgos::pstring> | The custom tags of the store. |
| categories | pgos::pvector<StoreCategory> | The category list of the the store, each category has a store item list. |
| item_dict | ItemDict | In-game item defines that may be referenced in the 'item_content', and you can use 'ItemDict::FindItem' to search. |
| platform_item_mapping | pgos::pmap<pgos::pstring, pgos::pstring> | The mapping relationship between PGOS in-game items and 3rd-party platform items configured on the PGOS portal. key: PGOS in-game item id, value: 3rd-party platform item id. |
StoreBrief
The brief information of the store.
| field | type | description |
|---|
| store_id | pgos::pstring | The id of the store. |
| display_name | pgos::pstring | The name of the store. |
| description | pgos::pstring | The description of the store. |
| tags | pgos::pmap<pgos::pstring, pgos::pstring> | The custom tags of the store. |
| category_briefs | pgos::pvector<StoreCategoryBrief> | The category brief list of the the store. |
GetStoreBriefsParams
struct GetStoreBriefsParams
| field | type | description |
|---|
| store_ids | pgos::pvector<pgos::pstring> | List of store IDs to be queried. |
GetStoreBriefsResult
struct GetStoreBriefsResult
| field | type | description |
|---|
| store_briefs | pgos::pmap<pgos::pstring, StoreBrief> | List of store brief information queried. |
GetStoreParams
| field | type | description |
|---|
| store_id | pgos::pstring | The specified store id. |
| pay_platform | pgos::pstring | [Optional] Pay platform name, such as: 'Steam', 'Xbox', etc. You can use macros starting with 'PAY_PLATFORM' in pgos_common_define.h After specifying the pay platform, the result will bring the platform_item_mapping of the corresponding platform configured on the portal. |
struct GetStoreWithPlatformParams : public GetStoreParams
parent: GetStoreParams
GetStoreCategoriesParams
struct GetStoreCategoriesParams
| field | type | description |
|---|
| store_id | pgos::pstring | The specified store id. |
| category_ids | pgos::pvector<pgos::pstring> | List of category IDs to be queried. |
| pay_platform | pgos::pstring | [Optional] Pay platform name, such as: 'Steam', 'Xbox', etc. You can use macros starting with 'PAY_PLATFORM' in pgos_common_define.h After specifying the pay platform, the result will bring the platform_item_mapping of the corresponding platform configured on the portal. |
GetStoreCategoriesResult
struct GetStoreCategoriesResult
| field | type | description |
|---|
| categories | pgos::pvector<StoreCategory> | The specified categories that have been queried. |
| fails | pgos::pmap<pgos::pstring, pgos::pstring> | Categories that failed to query, key: player id, value: failed reason. |
| item_dict | ItemDict | In-game item defines that may be referenced in the 'item_content', and you can use 'ItemDict::FindItem' to search. |
| store_id | pgos::pstring | The id of the store. |
| display_name | pgos::pstring | The name of the store. |
| description | pgos::pstring | The description of the store. |
| tags | pgos::pmap<pgos::pstring, pgos::pstring> | The custom tags of the store. |
| platform_item_mapping | pgos::pmap<pgos::pstring, pgos::pstring> | The mapping relationship between PGOS in-game items and 3rd-party platform items configured on the PGOS portal. key: PGOS in-game item id, value: 3rd-party platform item id. |
InstanceOperationResult
struct InstanceOperationResult
| field | type | description |
|---|
| instance_id | pgos::pstring | The instance id of this operation. |
| left_amount | uint32_t | The number of instance remaining after this operation. |
ConsumeInstanceParams
Request struct for consume instance.
struct ConsumeInstanceParams : public BaseBackendEventParams
parent: BaseBackendEventParams
| field | type | description |
|---|
| instance_id | pgos::pstring | The item instance id. |
| idempotency_token | pgos::pstring | [Optional] Used to ensure the idempotence of the function. Idempotence means that regardless of how many times the function is called, the result remains the same. By passing a unique idempotency_token, it ensures that the function does not produce duplicate side effects or results when called repeatedly. Note: To avoid generating the same idempotency_token as other players, it is recommended to concatenate it with the player's own player ID. |
ConsumeInstanceResult
struct ConsumeInstanceResult : public InstanceOperationResult
parent: InstanceOperationResult
| field | type | description |
|---|
| custom_err_code | int32_t | The error code returned by the virtual server bound to the consumer action. |
| custom_err_msg | pgos::pstring | The error msg returned by the virtual server bound to the consumer action. |
| func_result | pgos::pstring | The json string returned by the virtual server bound to the consumer action. |
| replayed | bool | Whether the request is replayed. When it is True, it indicates that the result of the function is obtained by replaying with the same idempotency_token. This means that the result of the function has been generated in a previous call and is being reused in the current call. |
OpenContainerInstanceParams
Request struct for open container instance.
struct OpenContainerInstanceParams : public BaseBackendEventParams
parent: BaseBackendEventParams
| field | type | description |
|---|
| instance_id | pgos::pstring | The container instance id. |
OpenContainerResult
struct OpenContainerResult : public InstanceOperationResult
parent: InstanceOperationResult
| field | type | description |
|---|
| item_insts | ItemInstPack | The item instances obtained after opening the container. |
| currencies | pgos::pvector<Currency> | The currencies obtained after opening the container. |
| conflict_unique_items | pgos::pvector<ConflictUniqueItem> | Unique items that already in inventory cause failed to be synchronized. |
RevokeInstanceParams
Request struct for revoke instance.
struct RevokeInstanceParams : public BaseBackendEventParams
parent: BaseBackendEventParams
| field | type | description |
|---|
| instance_id | pgos::pstring | The item instance id. |
struct SetInstanceTagsParams
| field | type | description |
|---|
| instance_id | pgos::pstring | The item instance id. |
| update_data | pgos::pmap<pgos::pstring, pgos::pstring> | Update the data of the specified keys in the tags. If the key does not exist, it indicates inserting new data. |
| delete_keys | pgos::pvector<pgos::pstring> | Delete the data of specified keys in the tags. The key from update_data cannot be included. |
struct SetInstanceTagsResult
| field | type | description |
|---|
| tags | pgos::pmap<pgos::pstring, pgos::pstring> | Latest tags of item instance. |
CreateStoreOrderParams
Request struct for create order.
struct CreateStoreOrderParams : public BaseBackendEventParams
parent: BaseBackendEventParams
| field | type | description |
|---|
| store_id | pgos::pstring | The store id of this store item. |
| store_item_id | pgos::pstring | The store item id. |
| amount | uint32_t | The amount of store item will be purchased. |
| price | ItemPrice | The currency code and actual price to purchase the item, it must be one of the prices of this store item. |
CreateStoreOrderResult
struct CreateStoreOrderResult
| field | type | description |
|---|
| order_id | pgos::pstring | Order ID required for purchase. |
CommitStoreOrderParams
Request struct for commit order.
struct CommitStoreOrderParams
| field | type | description |
|---|
| order_id | pgos::pstring | The previously created order ID. |
CommitStoreOrderResult
struct CommitStoreOrderResult
| field | type | description |
|---|
| spent_currency_code | pgos::pstring | The code of currency that has been spent to purchase the store item. |
| spent_currency_amount | uint32_t | The amount of currency that has been spent to purchase the store item. |
| item_insts | ItemInstPack | The item instances obtained after purchase. |
| currencies | pgos::pvector<Currency> | The currencies obtained after purchase. |
| status | StoreOrderStatus | Order status. |
| failed_currencies | pgos::pmap<pgos::pstring, pgos::pstring> | Currencies that failed to grant. Mapping from currency code to failure reason. |
QueryStoreOrderParams
struct QueryStoreOrderParams
| field | type | description |
|---|
| order_id | pgos::pstring | The previously created order ID. |
QueryStoreOrderResult
struct QueryStoreOrderResult : public CommitStoreOrderResult
parent: CommitStoreOrderResult
struct CheckBeforePlatformPurchaseParams
| field | type | description |
|---|
| item_id | pgos::pstring | The PGOS in-game item id corresponding to the item id of the 3rd-party platform to be purchased. |
| amount | uint32_t | The amount of item will be purchased. |
| pay_platform | pgos::pstring | Pay platform name, such as: 'Steam', 'EpicGames', etc. You can use macros starting with 'PAY_PLATFORM' in pgos_common_define.h |
Request struct for sync player inventory from 3rd-party platform.
struct SyncPlayerPlatformInventoryParams : public BaseBackendEventParams
parent: BaseBackendEventParams
| field | type | description |
|---|
| pay_platform | pgos::pstring | Pay platform name, such as: 'Steam', 'EpicGames', etc. You can use macros starting with 'PAY_PLATFORM' in pgos_common_define.h |
struct SyncPlayerPlatformInventoryResult
| field | type | description |
|---|
| item_insts | ItemInstPack | The item instances obtained after synchronized. |
| currencies | pgos::pvector<Currency> | The currencies obtained after synchronized. |
| conflict_unique_items | pgos::pvector<ConflictUniqueItem> | Unique items that already in inventory cause failed to be synchronized. |
SyncSteamPlayerInventoryParams
Request struct for sync player inventory from Steam platform.
struct SyncSteamPlayerInventoryParams : public BaseBackendEventParams
parent: BaseBackendEventParams
SyncSteamPurchaseParams
Request struct for sync item instance from Steam.
struct SyncSteamPurchaseParams : public BaseBackendEventParams
parent: BaseBackendEventParams
| field | type | description |
|---|
| steam_item_inst_id | uint64_t | Steam item instance id. |
SyncSteamPurchaseResult
struct SyncSteamPurchaseResult : public SyncPlayerPlatformInventoryResult
parent: SyncPlayerPlatformInventoryResult
SyncXboxPlayerInventoryParams
Request struct for sync player inventory from Xbox platform.
struct SyncXboxPlayerInventoryParams : public BaseBackendEventParams
parent: BaseBackendEventParams
| field | type | description |
|---|
| xbox_xsts_token | pgos::pstring | Xbox XSTS token. |
SyncXboxPurchaseParams
Request struct for sync item instance from Xbox.
struct SyncXboxPurchaseParams : public BaseBackendEventParams
parent: BaseBackendEventParams
| field | type | description |
|---|
| xbox_product_id | pgos::pstring | Xbox product id. Also referred to as the Store ID for the product within the Microsoft Store catalog. |
| xbox_xsts_token | pgos::pstring | Xbox XSTS token. |
SyncXboxPurchaseResult
struct SyncXboxPurchaseResult : public SyncPlayerPlatformInventoryResult
parent: SyncPlayerPlatformInventoryResult
InventoryGrantedEvt
struct InventoryGrantedEvt
| field | type | description |
|---|
| item_insts | ItemInstPack | The item instances granted. |
| src_type | pgos::pstring | Source type of granted. For example, "Store", "Midas", "Portal", "Client", "DS", "VS", "System", "Mail" etc. |
CurrencyChange
| field | type | description |
|---|
| currency_code | pgos::pstring | The code of currency that has been changed. |
| before_value | int64_t | The amount of changed currency before this change. |
| after_value | int64_t | The amount of changed currency after this change. |
BalanceUpdatedEvt
| field | type | description |
|---|
| currencies | pgos::pvector<CurrencyChange> | The details of changed currencies. |
| reason | pgos::pstring | The reason caused the currencies changes. Usually will be 'Deduct' or 'Grant' |
VirtualServerEvt
| field | type | description |
|---|
| json_str | pgos::pstring | The message is in json format. |
AddFriendRequestEvt
struct AddFriendRequestEvt
AddFriendResponseEvt
struct AddFriendResponseEvt
FriendRemovedEvt
| field | type | description |
|---|
| player_info | PlayerInfo | The player details. |
BadgeNumOfFriendReqEvt
struct BadgeNumOfFriendReqEvt
| field | type | description |
|---|
| badge_num | uint32_t | The badge number of outstanding friend requests. |
FriendPresenceChangedEvt
struct FriendPresenceChangedEvt
| field | type | description |
|---|
| player_id | pgos::pstring | The friend whose presence changed. |
| player_presence | PlayerPresence | Friend's new presence. |
LobbyMemberJoinedEvt
struct LobbyMemberJoinedEvt
| field | type | description |
|---|
| joined_player | LobbyPlayer | The player who newly joined the lobby. |
| lobby_id | pgos::pstring | Lobby id. |
LobbyMemberLeftEvt
struct LobbyMemberLeftEvt
| field | type | description |
|---|
| left_player | LobbyPlayer | The player who left the lobby. |
| is_kick_out | bool | Was the player kicked out by lobby owner. |
| lobby_id | pgos::pstring | Lobby id. |
LobbyTeamUpdatedEvt
struct LobbyTeamUpdatedEvt
| field | type | description |
|---|
| lobby_players | pgos::pvector<LobbyPlayer> | The players who update ready flag or change team slot. |
| lobby_id | pgos::pstring | Lobby id. |
LobbyInvitationEvt
struct LobbyInvitationEvt
| field | type | description |
|---|
| lobby_detail | LobbyDetailInfo | The updated lobby details. |
| inviter | LobbyPlayer | The player who sent the invitation. |
| join_token | pgos::pstring | If the invited player wants to join the lobby, this value of 'join_token' needs to be filled to the 'join_token' of 'JoinLobby'. |
LobbyOwnerTransferredEvt
struct LobbyOwnerTransferredEvt
| field | type | description |
|---|
| new_owner | LobbyPlayer | The new lobby owner. |
| lobby_id | pgos::pstring | Lobby id. |
LobbyInfoUpdatedEvt
struct LobbyInfoUpdatedEvt
LobbyDataUpdatedEvt
struct LobbyDataUpdatedEvt
LobbyStatusChangedEvt
struct LobbyStatusChangedEvt
| field | type | description |
|---|
| status | LobbyStatus | The current lobby status. |
| battle_session_id | pgos::pstring | The battle session that started from the lobby |
| battle_session_provider | pgos::pstring | Provider of battle session management service. PGOS for PGOS battle service, STANDALONE for self-build battle session management service. |
| lobby_id | pgos::pstring | Lobby id. |
BattleSessionUpdatedEvt
struct BattleSessionUpdatedEvt
| field | type | description |
|---|
| battle_session | BattleSessionInfo | The updated battle session details. |
ReceiveLobbyChatMsgEvt
struct ReceiveLobbyChatMsgEvt
| field | type | description |
|---|
| chat_msg_info | ChatMsgInfo | Lobby chat messages received. |
LobbySwitchTeamSlotRequestEvt
struct LobbySwitchTeamSlotRequestEvt
| field | type | description |
|---|
| from_player_info | LobbyPlayer | Lobby player who send the switch request. |
| request_id | pgos::pstring | Team slot switch request id. |
| lobby_id | pgos::pstring | Lobby id. |
LobbySwitchTeamSlotRequestConfirmedEvt
struct LobbySwitchTeamSlotRequestConfirmedEvt
| field | type | description |
|---|
| from_player_info | LobbyPlayer | Lobby player who confirm the switch request. |
| request_id | pgos::pstring | Team slot switch request id. |
| lobby_id | pgos::pstring | Lobby id. |
LobbySwitchTeamSlotRequestRejectedEvt
struct LobbySwitchTeamSlotRequestRejectedEvt
| field | type | description |
|---|
| from_player_info | LobbyPlayer | Lobby player who reject the switch request. |
| request_id | pgos::pstring | Team slot switch request id. |
| lobby_id | pgos::pstring | Lobby id. |
PartyStrategyChangedEvt
struct PartyStrategyChangedEvt
| field | type | description |
|---|
| party_id | pgos::pstring | The party id. |
| join_strategy | PartyJoinStrategy | The strategy controls the rules who could join the party. |
| invite_strategy | PartyInviteStrategy | The strategy controls the rules who could invite others to the party. |
PartyMemberJoinedEvt
struct PartyMemberJoinedEvt
| field | type | description |
|---|
| party_id | pgos::pstring | The party id. |
| joined_member | PlayerInfo | The player who newly joined the party. |
PartyMemberLeftEvt
struct PartyMemberLeftEvt
| field | type | description |
|---|
| party_id | pgos::pstring | The party id. |
| left_player | PlayerInfo | The player who left the party. |
| kicked | bool | Was the player kicked out by party leader. |
PartyDismissedEvt
| field | type | description |
|---|
| party_id | pgos::pstring | The party id that was dismissed. |
PartyLeaderTransferredEvt
struct PartyLeaderTransferredEvt
| field | type | description |
|---|
| party_id | pgos::pstring | The party id. |
| new_leader | PlayerInfo | The player who transferred to new leader. |
ReceivePartyInvitationEvt
struct ReceivePartyInvitationEvt
| field | type | description |
|---|
| party_id | pgos::pstring | The party id. |
| inviter | PlayerInfo | The player who sent the invitation. |
ReceivePartyChatMsgEvt
struct ReceivePartyChatMsgEvt
| field | type | description |
|---|
| chat_msg_info | ChatMsgInfo | Party chat messages received. |
PartyCustomDataChangedEvt
struct PartyCustomDataChangedEvt
| field | type | description |
|---|
| party_id | pgos::pstring | The party id. |
| custom_data | PartyCustomData | Party custom data. |
PartyInfoUpdatedEvt
struct PartyInfoUpdatedEvt
| field | type | description |
|---|
| party_info | PartyInfo | The party info. |
MatchmakingProcessChangedEvt
struct MatchmakingProcessChangedEvt
PlayerSessionChangedEvt
struct PlayerSessionChangedEvt
| field | type | description |
|---|
| evt | PlayerSessionEvt | The triggered event id, view event enum for detail. |
| session_id | pgos::pstring | The id of the current player session |
| msg | pgos::pstring | Message for the triggered event. |
GroupInfo
Group info could be access by players both in or not in the group.
| field | type | description |
|---|
| group_id | pgos::pstring | The group id. |
| name | pgos::pstring | The group name. |
| icon | pgos::pstring | Uri of the group. |
| description | pgos::pstring | The description of the group. |
| tags | pgos::pvector<pgos::pstring> | Custom tags of the group. |
| owner_info | PlayerInfo | The player info of group owner. |
| member_count | int32_t | Current member count of the group. |
| max_members | int32_t | Max member count of the group. |
| is_official | bool | Is it a official group. |
| created_time | int64_t | The Unix timestamp(in seconds) when the group was created. |
| join_rule | GroupJoinRule | The rules for players to join the group. |
| global_custom_data | pgos::pmap<pgos::pstring, pgos::pstring> | Group global custom data. Can be modified by the group owner or administrators. |
GroupDetail
Group detail could be access only by players in the group.
struct GroupDetail : public GroupInfo
parent: GroupInfo
| field | type | description |
|---|
| announcement | pgos::pstring | Announcement of the group. |
| is_public | bool | Could or couldn't be seen by player not in the group. |
GroupMember
| field | type | description |
|---|
| player_info | PlayerInfo | Base info of the player. |
| nickname | pgos::pstring | Nick name of a group member. |
| remark | pgos::pstring | Remark of a group member. Remark can only be modified by group owner and group admin. |
| player_presence | PlayerPresence | Player presence info. |
| is_owner | bool | True if the member is group owner. |
| is_admin | bool | True if the member is group admin. |
| joined_time | int64_t | The Unix timestamp(in seconds) when the member joined. |
| custom_data | pgos::pstring | The custom data for group member. Could be Can be modified by the player or administrator. |
MutedGroupMember
| field | type | description |
|---|
| player_id | pgos::pstring | Player's ID. |
| display_name | pgos::pstring | Player's display name. |
| group_nickname | pgos::pstring | Nickname in the group. |
| remark | pgos::pstring | Remark of a group member. Remark can only be modified by group owner and group admin. |
| operator_id | pgos::pstring | Id of the operator. |
| operator_display_name | pgos::pstring | Display name of the operator. |
| mute_created_time | int64_t | The Unix timestamp(in seconds) when the mute is created. |
| mute_expired_time | int64_t | The Unix timestamp(in seconds) when the mute is expired, 0 means mute forever. |
| joined_time | int64_t | The Unix timestamp(in seconds) when the member joined. |
GroupMemberBrief
| field | type | description |
|---|
| player_id | pgos::pstring | Player's ID. |
| display_name | pgos::pstring | Player's display name. |
| group_nickname | pgos::pstring | Nickname of a group member. |
GroupInvitation
| field | type | description |
|---|
| inviter_info | PlayerInfo | Base info of the player. |
| id | pgos::pstring | Invitation id. |
| msg | pgos::pstring | Invitation message. Set by the inviter. |
| group_info | GroupInfo | Base info of the group. |
| created_time | int64_t | The Unix timestamp(in seconds) when the invitation was created. |
| expired_time | int64_t | The Unix timestamp(in seconds) when the invitation's expired. |
GroupInvitationEvt
struct GroupInvitationEvt
RemovedFromGroupEvt
struct RemovedFromGroupEvt
| field | type | description |
|---|
| group_id | pgos::pstring | The group from which the player was removed. |
MutedInGroupEvt
| field | type | description |
|---|
| group_id | pgos::pstring | The group in which the player is muted. |
| operator_id | pgos::pstring | Id of the operator. |
| operator_display_name | pgos::pstring | Display name of the operator. |
| mute_created_time | int64_t | The Unix timestamp(in seconds) when the mute is created. |
| mute_expired_time | int64_t | The Unix timestamp(in seconds) when the mute is expired, 0 means mute forever. |
UnmutedInGroupEvt
| field | type | description |
|---|
| group_id | pgos::pstring | The group in which the player is unmuted. |
| operator_id | pgos::pstring | Id of the operator. |
| operator_display_name | pgos::pstring | Display name of the operator. |
GroupDismissedEvt
| field | type | description |
|---|
| group_id | pgos::pstring | The group id. |
| dismiss_reason | pgos::pstring | Reason for group dismissed. |
BadgeNumOfGroupInvitationEvt
struct BadgeNumOfGroupInvitationEvt
| field | type | description |
|---|
| badge_num | uint32_t | The badge number of group invitation. |
GroupDetailChangedEvt
struct GroupDetailChangedEvt
| field | type | description |
|---|
| group_detail | GroupDetail | Group detail information. |
GroupGlobalCustomDataChangedEvt
struct GroupGlobalCustomDataChangedEvt
| field | type | description |
|---|
| group_id | pgos::pstring | Group id. |
| global_custom_data | pgos::pmap<pgos::pstring, pgos::pstring> | Updated group global custom data. |
GroupPlayerCustomDataChangedEvt
struct GroupPlayerCustomDataChangedEvt
| field | type | description |
|---|
| group_id | pgos::pstring | Group id. |
| player_custom_data | pgos::pmap<pgos::pstring, pgos::pstring> | Updated custom data for each player. |
CreateGroupParams
| field | type | description |
|---|
| name | pgos::pstring | The group name. |
| icon | pgos::pstring | Uri of the group. |
| description | pgos::pstring | The description of the group. |
| tags | pgos::pvector<pgos::pstring> | Custom tags of the group. |
| join_rule | GroupJoinRule | The rules for players to join the group. |
| is_public | bool | Could or couldn't be seen by player not in the group. |
SetGroupNameParams
struct SetGroupNameParams
| field | type | description |
|---|
| group_id | pgos::pstring | Group ID. |
| group_name | pgos::pstring | Group name. |
SetGroupDescParams
struct SetGroupDescParams
| field | type | description |
|---|
| group_id | pgos::pstring | |
| group_description | pgos::pstring | |
SetGroupAnnouncementParams
struct SetGroupAnnouncementParams
| field | type | description |
|---|
| group_id | pgos::pstring | |
| group_announcement | pgos::pstring | |
struct SetGroupTagsParams
| field | type | description |
|---|
| group_id | pgos::pstring | |
| tags | pgos::pvector<pgos::pstring> | |
SetMyGroupNicknameParams
struct SetMyGroupNicknameParams
| field | type | description |
|---|
| group_id | pgos::pstring | |
| nickname | pgos::pstring | |
struct SetGroupMemberRemarkParams
| field | type | description |
|---|
| group_id | pgos::pstring | |
| player_id | pgos::pstring | |
| remark | pgos::pstring | |
struct BatchSetGroupMemberRemarkParams
| field | type | description |
|---|
| group_id | pgos::pstring | |
| player_ids | pgos::pvector<pgos::pstring> | |
| remark | pgos::pstring | |
InvitePlayersToGroupParams
struct InvitePlayersToGroupParams
| field | type | description |
|---|
| group_id | pgos::pstring | |
| invite_msg | pgos::pstring | |
| player_ids | pgos::pvector<pgos::pstring> | |
CreateGroupRsp
| field | type | description |
|---|
| group_detail | GroupDetail | |
| is_profane | bool | Whether the updated data contains profanity words. |
SearchGroupParams
SearchGroupRsp
| field | type | description |
|---|
| group_list | pgos::pvector<GroupInfo> | List of groups. |
| total_num | uint32_t | The total number of groups that meet the filters. |
| next_offset | uint32_t | The next starting position of the list. |
GetGroupDiscoveryListParams
struct GetGroupDiscoveryListParams
| field | type | description |
|---|
| owner_os | pgos::pvector<ClientOS> | Only obtain groups where the group owner's OS is the specified OS. Currently supports passing in at most one OS. Empty means no filtering based on OS. |
| recommend_count | uint32_t | Get the number of recommended groups additionally, cannot exceed 50. Recommended groups can be configured on the portal. |
| offset | uint32_t | The starting position of the list. |
| count | uint32_t | The query count, cannot exceed 50. |
GetGroupDiscoveryListResult
struct GetGroupDiscoveryListResult
| field | type | description |
|---|
| recommend_group_list | pgos::pvector<GroupInfo> | Additional recommended groups. |
| group_list | pgos::pvector<GroupInfo> | List of groups. |
| next_offset | uint32_t | The next starting position of the list. |
| total_num | uint32_t | The total number of group discoveries. |
InvitePlayersToGroupRsp
Response that invite players to a group.
struct InvitePlayersToGroupRsp
| field | type | description |
|---|
| group_id | pgos::pstring | Players that failed to invite, key: player id, value: failed reason. |
| invitation_map | pgos::pmap<pgos::pstring, pgos::pstring> | Players that success to invite, key: player id, value: invitation_id. |
| fails | pgos::pmap<pgos::pstring, pgos::pstring> | Players that failed to invite, key: player id, value: failed reason. |
BatchGetGroupInfoRsp
struct BatchGetGroupInfoRsp
| field | type | description |
|---|
| group_info_list | pgos::pvector<GroupInfo> | The group info list. |
| fails | pgos::pmap<pgos::pstring, pgos::pstring> | Groups that failed to query, key: group id, value: failed reason. |
BatchGetGroupDetailRsp
struct BatchGetGroupDetailRsp
| field | type | description |
|---|
| group_detail_list | pgos::pvector<GroupDetail> | The group detail data list. |
| fails | pgos::pmap<pgos::pstring, pgos::pstring> | Groups that failed to query, key: group id, value: failed reason. |
GetGroupMembersRsp
struct GetGroupMembersRsp
| field | type | description |
|---|
| group_members | pgos::pmap<pgos::pstring, GroupMember> | Group members, key: player id, value: group member information. |
| muted_members | pgos::pmap<pgos::pstring, MutedGroupMember> | Muted group members, key: player id, value: muted member information. |
GetGroupMemberRsp
| field | type | description |
|---|
| is_member | bool | Whether the player is a member of a group. |
| member_info | GroupMember | Group member information. |
AcceptGroupInvitationRsp
struct AcceptGroupInvitationRsp
| field | type | description |
|---|
| group_detail | GroupDetail | The group detail data. |
| badge_num | uint32_t | The badge number of outstanding group invitations. |
RejectGroupInvitationRsp
struct RejectGroupInvitationRsp
| field | type | description |
|---|
| badge_num | uint32_t | The badge number of outstanding group invitations. |
UpdateGroupRsp
| field | type | description |
|---|
| group_detail | GroupDetail | The updated group detail. |
| is_profane | bool | Whether the updated data contains profanity words. |
PrivacySettingInfo
The privacy settings of player, the initial default values of the setting items can be set on the PGOS portal.
struct PrivacySettingInfo
| field | type | description |
|---|
| allow_searched_by_others | bool | Whether allow being searched by other players, true: allowed, false: not allowed. |
| allow_friend_request | bool | Whether allow receiving other players' add-friend requests, true: allow, false: not allow. |
| allow_nonfriend_perschat | bool | Whether allow non-friend players to have a personal chat with you, true: allow, false: not allow. |
| allow_group_invitation | bool | Whether allow other players to invite you to join a group, true: allow, false: not allow. |
| chat_strategy | PrivacyChatStrategy | Text and voice chat privacy settings. |
TssAccountInfo
Account information for user input check. For the meaning of each field, see the TSS documentation.
| field | type | description |
|---|
| account | pgos::pstring | See the TSS documentation for the meaning of the field. |
| account_type | int32_t | See the TSS documentation for the meaning of the field. |
| area_id | int32_t | See the TSS documentation for the meaning of the field. |
| plat_id | int32_t | See the TSS documentation for the meaning of the field. |
| world_id | int32_t | See the TSS documentation for the meaning of the field. |
| role_id | pgos::pstring | See the TSS documentation for the meaning of the field. |
| role_name | pgos::pstring | See the TSS documentation for the meaning of the field. |
| role_pic_url | pgos::pstring | See the TSS documentation for the meaning of the field. |
| role_level | int32_t | See the TSS documentation for the meaning of the field. |
| user_sign | pgos::pstring | See the TSS documentation for the meaning of the field. |
| user_desc | pgos::pstring | See the TSS documentation for the meaning of the field. |
TssHandledIn
Contextual information of the API.
| field | type | description |
|---|
| scene_name | pgos::pstring | Scene name defined by PGOS. |
| module | pgos::pstring | Module name where the API is located. |
| func_name | pgos::pstring | Name of the API. |
| func_params | pgos::pstring | Request parameters of the API. |
TssHandledOut
TSS information that needs to be returned.
| field | type | description |
|---|
| scene_id | int32_t | See the TSS documentation for the meaning of the field. |
| account_info | TssAccountInfo | See the TSS documentation for the meaning of the field. |
| extra | pgos::pstring | See the TSS documentation for the meaning of the field. |
SendGroupMsgParams
Request struct for sending group message
struct SendGroupMsgParams
| field | type | description |
|---|
| group_id | pgos::pstring | Group ID |
| content | pgos::pstring | Content, content length cannot exceed 1024 characters |
| custom_data | pgos::pstring | Additional information added by the game, content size cannot exceed 8KB in a narrow-character string, if it is a wide-character string, it should be converted to a utf-8 narrow-character string before calculating its length. |
| mentioned_players | pgos::pvector<MentionedPlayer> | The mentioned player list. The mentioned players will receive the corresponding events. When the value of player_id is '@ALL', it means mentioning all players. |
GroupNameChangedEvt
Event result of group name changed
struct GroupNameChangedEvt
| field | type | description |
|---|
| operator_info | GroupMemberBrief | The person who modified the group information |
| group_name | pgos::pstring | New group name |
GroupDescChangedEvt
Event result of group description change
struct GroupDescChangedEvt
| field | type | description |
|---|
| operator_info | GroupMemberBrief | The person who modified the group information |
| group_desc | pgos::pstring | New group description |
GroupMemberJoinedEvt
Event result of new member of the group
struct GroupMemberJoinedEvt
| field | type | description |
|---|
| member_info | GroupMember | New member |
| is_invited | bool | Whether the member was invited in |
| inviter_info | GroupMemberBrief | Who invited the member |
GroupMemberLeftEvt
Event result of member left the group
struct GroupMemberLeftEvt
GroupMemberRemovedEvt
Event result of member removed from group
struct GroupMemberRemovedEvt
GroupAnnouncementChangedEvt
Event result of group description change
struct GroupAnnouncementChangedEvt
| field | type | description |
|---|
| operator_info | GroupMemberBrief | The person who modified the group information |
| announcement | pgos::pstring | New announcement |
GroupOwnerChangedEvt
Event result of group owner change
struct GroupOwnerChangedEvt
GroupAdminGrantedEvt
Event result of group admin granted
struct GroupAdminGrantedEvt
GroupAdminRevokedEvt
Event result of group admin revoked
struct GroupAdminRevokedEvt
GroupMsgEventContent
Group chat event message content
struct GroupMsgEventContent
GroupMsgContent
Group chat message content
| field | type | description |
|---|
| text_content | pgos::pstring | Take the value from here when msg type is MsgTypeText |
| event_content | GroupMsgEventContent | Take the value from here when msg type is MsgTypeEvent |
| custom_content | pgos::pstring | Take the value from here when msg type is MsgTypeCustom |
GroupMsgInfo
Group chat message info
| field | type | description |
|---|
| sender | GroupMember | The member who sent the message |
| sent_time | int64_t | The time the message was sent |
| msg_type | ChatMsgType | The type of the message |
| content | GroupMsgContent | The message to be sent |
| seq | int64_t | The sequence number of the message |
| custom_data | pgos::pstring | Additional information added by the game |
| mentioned_players | pgos::pvector<MentionedPlayer> | The mentioned player list. The mentioned players will receive the corresponding events. When the value of player_id is '@ALL', it means mentioning all players. |
GroupBrief
Group brief information
| field | type | description |
|---|
| group_id | pgos::pstring | Unique id of group |
| name | pgos::pstring | Group name |
| icon | pgos::pstring | Group icon |
| global_custom_data | pgos::pmap<pgos::pstring, pgos::pstring> | Group global custom data. Can be modified by the group owner or administrators. |
GroupItem
Group item
| field | type | description |
|---|
| group_brief | GroupBrief | Group brief information |
| latest_msg | GroupMsgInfo | Recent chat message info |
| unread_count | int32_t | Unread message count |
GetMyGroupListResult
My group list
struct GetMyGroupListResult
| field | type | description |
|---|
| group_list | pgos::pvector<GroupItem> | My group list |
GetGroupChatMsgListResult
Result of get group chat message list
struct GetGroupChatMsgListResult
| field | type | description |
|---|
| msg_list | pgos::pvector<GroupMsgInfo> | Chat message info list |
| already_read_seq | int64_t | Messages with seq less than or equal to this have already been read |
| has_more | bool | Whether has more message |
| next_seq | int64_t | The starting sequence for the next query |
ReceiveGroupMsgEvt
Event result of receive group chat message
struct ReceiveGroupMsgEvt
| field | type | description |
|---|
| msg | GroupMsgInfo | Group chat message received |
| group_brief | GroupBrief | Group brief info |
| unread_count | int32_t | Count of unread message from group |
SendGroupMsgResult
Result of send a group message
struct SendGroupMsgResult
GroupMentionedInfo
Result of get group mentioned record.
struct GroupMentionedInfo
GroupNewMentionedEvt
Event result of new mentioned.
struct GroupNewMentionedEvt
GetMailListParams
Request parameters for get mail list.
| field | type | description |
|---|
| category | MailCategory | Query the specified category. |
| offset | uint32_t | The starting position of the list. |
| count | uint32_t | The query count. |
UnclaimedItem
In-game Item not claimed.
| field | type | description |
|---|
| item | InGameItem | Economy item. |
| amount | uint32_t | The amount of item. |
MailAttachmentInfo
Mail attachment information.
struct MailAttachmentInfo
| field | type | description |
|---|
| items | pgos::pvector<UnclaimedItem> | Items waiting to be claimed. |
| currencies | pgos::pvector<Currency> | Currencies waiting to be claimed. |
| is_gift_from_player | bool | Is it a gift from the player. |
| giver | PlayerInfo | If 'is_gift_from_player' is true, 'giver' represents the player who gave the gift. |
| is_claimed | bool | Is it claimed. |
MailInfo
Mail information.
| field | type | description |
|---|
| mail_id | pgos::pstring | Mail ID. |
| title | pgos::pstring | Mail title. |
| category | MailCategory | Mail category. |
| content | pgos::pstring | Mail content. |
| attachment | MailAttachmentInfo | Mail attachment. |
| custom_data | pgos::pstring | Custom data for mail. |
| sent_time | int64_t | The time the mail was sent. |
| is_read | bool | Whether the mail is marked as read. |
GetMailListResult
Result of get mail list.
| field | type | description |
|---|
| mail_list | pgos::pvector<MailInfo> | Mail info list. |
| has_more | bool | Has more. |
| next_offset | int32_t | The next starting position of the list. |
| total_num | uint32_t | The total number of mails in the specified category. When the query category is 'All', it indicates the total number of mails in all categories. |
ClaimMailAttachmentResult
Result of claim mail attachment.
struct ClaimMailAttachmentResult
| field | type | description |
|---|
| item_insts | ItemInstPack | The item instances obtained after claim attachments. |
| currencies | pgos::pvector<Currency> | The currencies obtained after claim attachments. |
| conflict_unique_items | pgos::pvector<UnclaimedItem> | Unique items that already in inventory cause failed to be granted. |
| fails | pgos::pmap<pgos::pstring, pgos::pstring> | Mails that failed to claim attachments, key: mail ID, value: failed reason. |
GetMailBadgeNumResult
Result of get mail badge number.
struct GetMailBadgeNumResult
| field | type | description |
|---|
| category_badge_num | pgos::pmap<MailCategory, uint32_t> | Mail unread count by category. |
| total_badge_num | uint32_t | Total unread count. |
BadgeNumOfMailEvt
Event result of badge num of mail.
| field | type | description |
|---|
| total_badge_num | uint32_t | Total unread count. |
ReceiveNewMailEvt
Event result of receive new mail.
| field | type | description |
|---|
| mail | MailInfo | New mail. |
RelationshipInfo
Information of the relationship with other players.
| field | type | description |
|---|
| is_blocked | bool | Whether the player is blocked |
| is_friend | bool | Whether the player is in friend list |
| friend_remark | pgos::pstring | Friend remark. Only valid if the player is in friend_list |
| befriend_time | int64_t | The time when the player became friend, in seconds. Only valid if the player is in friend_list |
GetPlayerProfileResult
Result of get player profile
struct GetPlayerProfileResult
| field | type | description |
|---|
| player_info | PlayerInfo | |
| player_presence | PlayerPresence | |
| relationship_info | RelationshipInfo | |
| last_play_time | int64_t | The time when the current logged in player played games with the player last time, in seconds |
PublicChatSystemContent
Public chat system message content.
struct PublicChatSystemContent
| field | type | description |
|---|
| msg | pgos::pstring | System message content. |
| duration_sec | uint32_t | Indicates how long a system message will expire. The players will receive the system messages that were sent before they join, as long as the message doesn't expire. |
PublicChatMsgContent
Public chat message content
struct PublicChatMsgContent
| field | type | description |
|---|
| text_content | pgos::pstring | Take the value from here when msg type is MsgTypeText. |
| system_content | PublicChatSystemContent | Take the value from here when msg type is MsgTypeSystem. |
| custom_content | pgos::pstring | Take the value from here when msg type is MsgTypeCustom. |
PublicChatMsgInfo
Public chat message info.
| field | type | description |
|---|
| msg_type | ChatMsgType | The type of the message. |
| content | PublicChatMsgContent | The message to be sent. |
| sender | PlayerInfo | The player who sent the message. |
| sent_time | int64_t | The time the message was sent. |
| seq | int64_t | The sequence number of the message |
| custom_data | pgos::pstring | Custom data for message. |
| mentioned_players | pgos::pvector<MentionedPlayer> | The mentioned player list. The mentioned players will receive the corresponding events. When the value of player_id is '@ALL', it means mentioning all players. |
PublicChatChannelInfo
The channel info of public chat
struct PublicChatChannelInfo
| field | type | description |
|---|
| channel_name | pgos::pstring | Channel name. |
JoinPublicChatResult
Result of join public chat.
struct JoinPublicChatResult
SendPublicChatMsgParams
Request parameters for sending public chat message.
struct SendPublicChatMsgParams
| field | type | description |
|---|
| channel_name | pgos::pstring | The name of the channel on which the message was sent. |
| content | pgos::pstring | The content of the message to be sent. |
| custom_data | pgos::pstring | Custom data for message. |
| mentioned_players | pgos::pvector<MentionedPlayer> | The mentioned player list. The mentioned players will receive the corresponding events. When the value of player_id is '@ALL', it means mentioning all players. |
SendPublicChatMsgResult
Result of send public chat message.
struct SendPublicChatMsgResult
ReceivePublicChatMsgEvt
Event result of receive public chat message.
struct ReceivePublicChatMsgEvt
PublicChatMentionedInfo
Result of get public chat mentioned record.
struct PublicChatMentionedInfo
PublicChatNewMentionedEvt
Event result of new mentioned.
struct PublicChatNewMentionedEvt
GoalRewardItem
In-game item as goal rewards.
| field | type | description |
|---|
| item | InGameItem | In-game item. |
| amount | uint32_t | Amount of the item. |
PlayerGoalPass
Pass for rewards in a hyper goal.
| field | type | description |
|---|
| pass_id | pgos::pstring | The identifier of the pass. |
| name | pgos::pstring | Name of the pass. |
| description | pgos::pstring | Description of the pass. |
| icon | pgos::pstring | Icon records the resource address of the pass icon shown to players. |
| is_activated | bool | Whether the pass is activated for the player. |
GoalReward
The reward that will available to players when a goal or a tier is reached.
| field | type | description |
|---|
| reward_id | pgos::pstring | The identifier of the reward. |
| pass_id | pgos::pstring | The access pass's id for the reward. |
| is_claimed | bool | True if the reward is claimed by the player. |
| claimed_time | int64_t | Unix timestamp that the reward is claimed. |
| items | pgos::pvector<GoalRewardItem> | The in-game items in this reward |
| currencies | pgos::pvector<Currency> | The currencies in this reward |
PlayerGoalTier
| field | type | description |
|---|
| tier_id | pgos::pstring | The identifier of the tier. |
| name | pgos::pstring | Name of the tier. |
| order | uint32_t | Order of the tier. |
| achieve_value | uint32_t | The value of achieve data of a player to achieve the tier. |
| is_achieved | bool | True if the tier is achieved by the player. |
| achieved_time | int64_t | Unix timestamp that the reward is claimed. |
| tier_rewards | pgos::pvector<GoalReward> | Rewards of the tier. |
GoalBaseInfo
| field | type | description |
|---|
| player_goal_id | pgos::pstring | Id of the player goal. The player goal id will be different when the goal appears in different available periods. |
| goal_id | pgos::pstring | The identifier of the goal. |
| type | GoalType | Type of the goal. |
| name | pgos::pstring | Name of the goal. |
| description | pgos::pstring | Description of the goal. |
| icon | pgos::pstring | Icon records the resource address of the goal icon shown to players. |
| tags | pgos::pvector<pgos::pstring> | Tag strings of the goal. |
SimpleGoal
struct SimpleGoal : public GoalBaseInfo
parent: GoalBaseInfo
| field | type | description |
|---|
| achieve_value | uint32_t | The value of achieve data of a player to achieve the simple goal. |
| current_value | uint32_t | The current value of the achieve data. |
| is_achieved | bool | True if the simple goal is achieved by the player. |
| achieved_time | int64_t | Unix timestamp that the reward is claimed. |
| reward | GoalReward | The reward players can get if they achieve the goal. |
HyperGoal
struct HyperGoal : public GoalBaseInfo
parent: GoalBaseInfo
| field | type | description |
|---|
| passes | pgos::pvector<PlayerGoalPass> | Passes of the hyper goal. |
| tiers | pgos::pvector<PlayerGoalTier> | Tiers of the hyper goal. |
| current_tier_id | pgos::pstring | The tier that the player is challenging now. When the Algorithm Type is Absolute, current value is the same as the value of player's achieve data. When the Algorithm Type is Increment, current value is the incremental value obtained by the player achieve data in the current tier. |
| current_value | uint32_t | The current value of the achieve data of the hyper goal. |
AvailablePeriod
Available period info.
| field | type | description |
|---|
| period_id | pgos::pstring | Period id. |
| player_goal_ids | pgos::pvector<pgos::pstring> | Player goal ids within the available period. |
| simple_goals | pgos::pmap<pgos::pstring, SimpleGoal> | Mapping of player goal id to simple player goal. |
| hyper_goals | pgos::pmap<pgos::pstring, HyperGoal> | Mapping of player goal id to hyper player goal. |
| start_time | int64_t | Start Unix timestamp of the period. |
| end_time | int64_t | End Unix timestamp of the period. |
| length | int64_t | Length of the available period. Counting in second. |
GoalsSchedule
Goal schedule info.
| field | type | description |
|---|
| schedule_id | pgos::pstring | The identifier of a goals schedule. |
| name | pgos::pstring | Name of a goals schedule. |
| description | pgos::pstring | Description of a goals schedule. |
| status | ScheduleStatus | Status of a goals schedule. |
| periods | pgos::pmap<pgos::pstring, AvailablePeriod> | Available periods of the schedule. For current period, a fully AvailablePeriod structure will be returned. For next period, only the time schedule of of the period will be returned. |
| current_period_id | pgos::pstring | The nearest available period to the current time, which is already active. |
| next_period_id | pgos::pstring | The nearest available period to the current time that is not yet active. |
| reward_way | GoalRewardWay | The reward way of the goals within the goals schedule. |
GetGoalTiersResult
struct GetGoalTiersResult
| field | type | description |
|---|
| tiers | pgos::pvector<PlayerGoalTier> | Tiers info. |
| next_order | uint32_t | Next tier's roder. |
ClaimGoalsRewardResult
Result of claim goal rewards.
struct ClaimGoalsRewardResult
| field | type | description |
|---|
| item_insts | ItemInstPack | The item instances obtained after claim attachments. |
| currencies | pgos::pvector<Currency> | The currencies obtained after claim attachments. |
| conflict_unique_items | pgos::pvector<UnclaimedItem> | Unique items that already in inventory that failed to be granted. |
SimpleGoalAchievedEvt
The event will be triggered when a simple goal achieved.
struct SimpleGoalAchievedEvt
| field | type | description |
|---|
| achieved_goal | SimpleGoal | The simple goal that has been achieved. |
HyperGoalAchievedEvt
The event will be triggered when some tiers of a hyper goal achieved.
struct HyperGoalAchievedEvt
| field | type | description |
|---|
| achieved_goal | HyperGoal | |
| achieved_tiers_ids | pgos::pvector<pgos::pstring> | The tier id that has been achieved. |
TitleRegionClosedEvt
The event will be triggered when the title region is closed.
After the title region is closed, players can no longer access new logins, new matchmaking, or new battle session placements.
struct TitleRegionClosedEvt
| field | type | description |
|---|
| current_time | int64_t | The current Unix timestamp of the backend server. (in seconds) |
| kicked_offline_time | int64_t | The approximate Unix timestamp at which the player will be kicked offline. (in seconds) If the value is 0, the PGOS backend will kick the player offline soon. If the value is -1, the PGOS backend will still allow the current player to remain online, and battle sessions the player is in will not be affected. |
EventChannelStatusChangedEvt
The event will be triggered when the event channel status has been changed.
The Event Channel serves as a data pipeline for the PGOS backend to send event notifications (e.g., chat_messages/friend_requests) to the client.
Its status can be influenced by factors such as API calls (e.g., login/logout) and fluctuations in the network environment.
In certain scenarios, the event helps the game/player understand the possible reasons for PGOS/game service degradation.
struct EventChannelStatusChangedEvt
| field | type | description |
|---|
| current_status | PgosEventChannelStatus | Indicate the current status of the event channel. |
| last_status | PgosEventChannelStatus | Indicate the status of the event channel in the previous StatusChanged event. If there is no previous event (meaning it is the first event), its value is set to 'Dummy'. |
DescribeBattleSessionsResult
struct DescribeBattleSessionsResult
| field | type | description |
|---|
| battle_sessions | pgos::pvector<BattleSessionInfo> | The battle sesions that a player is participating in. |
DSHostingLatencies
The latencies from the client to the DS hosting data centers.
struct DSHostingLatencies
| field | type | description |
|---|
| latencies | pgos::pmap<pgos::pstring, int32_t> | The latencies from the client to the DS hosting data centers. Key: The data center name and its possible values can be viewed in the 'DataCenterName' definition. Value: The latency to the data center, in milliseconds. |
GameCustomMsgEvt
The event will be triggered when the game calls the HTTP API 'PushMsg'.
| field | type | description |
|---|
| msg_type | pgos::pstring | Corresponds to the 'msg_type' parameter of the HTTP API 'PushMsg'. |
| msg | pgos::pstring | Corresponds to the 'msg' parameter of the HTTP API 'PushMsg'. |
CycleInfo
Information of cycle which configured on the portal.
| field | type | description |
|---|
| cycle_name | pgos::pstring | Cycle name. |
| cycle_start_time | int64_t | Start time of the cycle. Unix time in second. |
| cycle_end_time | int64_t | End time of the cycle. Unix time in second. |
| lock_time_span | uint32_t | Lock time span of this cycle. After setting, the period before the end of each round will be locked, and the leaderboard data will not be updated during the locked period. Unix time in second. |
LeaderboardRoundInfo
Information of leaderboard round.
struct LeaderboardRoundInfo
| field | type | description |
|---|
| round_seq | uint32_t | The sequence number of the leaderboard round. Start from 1, the numbers are increasing in sequence, increasing by 1 in each round. 0 means the data of this round info is invalid or has been cleared. |
| round_start_time | int64_t | The round start time. Unix time in second. |
| round_end_time | int64_t | The round end time. Unix time in second. |
| round_locked | bool | True if this round has been locked or end. |
LeaderboardInfo
Information of leaderboard.
| field | type | description |
|---|
| leaderboard_name | pgos::pstring | The name of the leaderboard. |
| stat_name | pgos::pstring | The name of the stat bound to the leaderboard. |
| is_cycled | bool | Is this leaderboard a cycled leaderboard. |
| cycle_info | CycleInfo | The information of cycle bound to the leaderboard. This is only meaningful if is_cycled is true. |
| round_info | LeaderboardRoundInfo | Round information for a specified time or current time. This is only meaningful if is_cycled is true. |
LBRankingItem
Ranking item of leaderboard.
| field | type | description |
|---|
| rank | uint32_t | The ranking number, start from 1. |
| key | pgos::pstring | Stat item key. |
| value | double | Stat item value. |
| secondary_value | double | Stat item secondary value. |
| custom_data | pgos::pstring | Stat item custom data, used to store additional information. |
LBRankingListResult
Response for get ranking list.
struct LBRankingListResult
| field | type | description |
|---|
| items | pgos::pvector<LBRankingItem> | List of ranking items. |
| leaderboard_info | LeaderboardInfo | Leaderboard information. |
| total_num | uint32_t | The total number of ranking items. |
| next_offset | uint32_t | The next starting position of the list. |
LBRankingItemPos
Current ranking list item with neighbor items.
GetRankingListParams
struct GetRankingListParams
| field | type | description |
|---|
| leaderboard_name | pgos::pstring | The name of the leaderboard to query. |
| offset | uint32_t | The starting position of the query. |
| count | uint32_t | The query count. |
| leaderboard_round_seq | uint32_t | [Option] Query the ranking list of the specified round in the cycled leaderboard. The default value 0 means querying the ranking of the current round. |
GetFriendsRankingListParams
struct GetFriendsRankingListParams
| field | type | description |
|---|
| leaderboard_name | pgos::pstring | The name of the leaderboard to query. |
| leaderboard_round_seq | uint32_t | [Option] Query the ranking list of the specified round in the cycled leaderboard. The default value 0 means querying the ranking of the current round. |
LBFriendsRankingListResult
Response for get friends ranking list.
struct LBFriendsRankingListResult
| field | type | description |
|---|
| items | pgos::pvector<LBRankingItem> | List of friends ranking items. The stat item key was filled with player id. |
| friend_infos | pgos::pmap<pgos::pstring, PlayerFriendInfo> | Friends' details. key: player id Note that this only contains the player information of friends, not my own. The 'items' contains my ranking. |
| leaderboard_info | LeaderboardInfo | Leaderboard information. |
GetRankingItemPosParams
struct GetRankingItemPosParams
| field | type | description |
|---|
| leaderboard_name | pgos::pstring | The name of the leaderboard to query. |
| key | pgos::pstring | The stat item key to query. |
| neighbor_cnt | uint32_t | Specify the desired number of preceding and subsequent neighbors, ranging from 0 to 10. For example: if neighbor_cnt is 3, then you will get 3 preceding neighbors and 3 subsequent neighbors. |
| leaderboard_round_seq | uint32_t | [Option] Query the ranking list of the specified round in the cycled leaderboard. The default value 0 means querying the ranking of the current round. |
SetGroupGlobalCustomDataParams
struct SetGroupGlobalCustomDataParams
| field | type | description |
|---|
| group_id | pgos::pstring | The group id. |
| global_custom_data | pgos::pmap<pgos::pstring, pgos::pstring> | Custom data to be modified or added. |
SetGroupGlobalCustomDataResult
struct SetGroupGlobalCustomDataResult
| field | type | description |
|---|
| global_custom_data | pgos::pmap<pgos::pstring, pgos::pstring> | Updated full global custom data. |
DelGroupGlobalCustomDataParams
struct DelGroupGlobalCustomDataParams
| field | type | description |
|---|
| group_id | pgos::pstring | The group id. |
| keys | pgos::pvector<pgos::pstring> | Custom data keys to delete. |
DelGroupGlobalCustomDataResult
struct DelGroupGlobalCustomDataResult
| field | type | description |
|---|
| global_custom_data | pgos::pmap<pgos::pstring, pgos::pstring> | Updated full global custom data. |
| fails | pgos::pmap<pgos::pstring, pgos::pstring> | Keys failed to delete, and also with the reason. |
ClearGroupGlobalCustomDataParams
struct ClearGroupGlobalCustomDataParams
| field | type | description |
|---|
| group_id | pgos::pstring | The group id. |
SetGroupMyPlayerCustomDataParams
struct SetGroupMyPlayerCustomDataParams
| field | type | description |
|---|
| group_id | pgos::pstring | The group id. |
| player_custom_data | pgos::pstring | Custom data for current player. |
SetGroupMyPlayerCustomDataResult
struct SetGroupMyPlayerCustomDataResult
| field | type | description |
|---|
| player_custom_data | pgos::pstring | Updated custom data for current player. |
BatchSetGroupPlayerCustomDataParams
struct BatchSetGroupPlayerCustomDataParams
| field | type | description |
|---|
| group_id | pgos::pstring | The group id. |
| player_custom_data | pgos::pmap<pgos::pstring, pgos::pstring> | Map from player id to player custom data. |
BatchSetGroupPlayerCustomDataResult
struct BatchSetGroupPlayerCustomDataResult
| field | type | description |
|---|
| player_custom_data | pgos::pmap<pgos::pstring, pgos::pstring> | Updated custom data for each player. |
| fails | pgos::pmap<pgos::pstring, pgos::pstring> | Keys failed to set, and also with the reason. |
JoinWorldParams
| field | type | description |
|---|
| world_config | pgos::pstring | World config name that request to join. |
| filter_attributes | pgos::pmap<pgos::pstring, KVDataValue> | Attributes needed by world buckets filters, map key: attribute name, map value: attribute value. |
| team_name | pgos::pstring | The team name that the player will join in the world battle session. If empty, the player will be assigned to a [default] team. |
JoinWorldResult
| field | type | description |
|---|
| battle_session | BattleSessionInfo | The battle session that the world assigned for the players. |
InviteJoinWorldParams
struct InviteJoinWorldParams
| field | type | description |
|---|
| world_config | pgos::pstring | World config name that request to join. |
| filter_attributes | pgos::pmap<pgos::pstring, KVDataValue> | Attributes needed by world buckets filters, map key: attribute name, map value: attribute value. |
| invited_player_ids | pgos::pvector<pgos::pstring> | Player IDs who will be invited to join the same world. (Must include at least 1 player) These invited players will receive the 'OnJoinWorldInvitationUpdated' event on their game client. Players who accept (AcceptJoinWorldInvitation API) the invitation will be assigned to the same world battle session as the current player. Players who reject (RejectJoinWorldInvitation API) the invitation will skip the invitation and will not be affected. The inviter (current player) will also receive the 'OnJoinWorldInvitationUpdated' event to know the status of the invitation being accepted or rejected. The inviter will automatically accept the invitation. |
| team_name | pgos::pstring | The team name that the player will join in the world battle session. If empty, the player will be assigned to a [default] team. |
InviteJoinWorldResult
struct InviteJoinWorldResult
| field | type | description |
|---|
| world_config | pgos::pstring | The world configuration name associated with the invitation ticket. |
| invitation_ticket | pgos::pstring | The ticket of the join world invitation. |
InviteLeaveWorldParams
struct InviteLeaveWorldParams
| field | type | description |
|---|
| world_config | pgos::pstring | World config name that request to join. |
| invited_player_ids | pgos::pvector<pgos::pstring> | Player IDs who will be invited to leave the same world. (Must include at least 1 player) These invited players will receive the 'OnLeaveWorldInvitationUpdated' event on their game client. Players who accept (AcceptLeaveWorldInvitation API) the invitation will be removed from the world. Players who reject (RejectLeaveWorldInvitation API) the invitation will skip the invitation and will not be affected. The inviter (current player) will also receive the 'OnLeaveWorldInvitationUpdated' event to know the status of the invitation being accepted or rejected. The inviter will automatically leave the world. |
InviteLeaveWorldResult
struct InviteLeaveWorldResult
| field | type | description |
|---|
| world_config | pgos::pstring | The world configuration name associated with the invitation ticket. |
| invitation_ticket | pgos::pstring | The ticket of the leave world invitation. |
LeaveWorldParams
| field | type | description |
|---|
| world_config | pgos::pstring | World config name that request to leave. |
JoinWorldBattleSessionParams
struct JoinWorldBattleSessionParams
| field | type | description |
|---|
| world_config | pgos::pstring | World config name that request to join. |
| battle_session_id | pgos::pstring | The world battle session id to join. |
| payload | pgos::pstring | The game custom data, which will be passed to the DS (dedicated server). It can be obtained by monitoring the 'OnBattleSessionUpdated' event of the Hosting module: FServerBattleSessionUpdatedEvt.new_player_battle_sessions.payload. |
| team_name | pgos::pstring | The team name that the player will join in the world battle session. If empty, the player will be assigned to a [default] team. |
JoinWorldBattleSessionResult
struct JoinWorldBattleSessionResult
InviteJoinWorldBattleSessionParams
struct InviteJoinWorldBattleSessionParams
| field | type | description |
|---|
| world_config | pgos::pstring | World config name that request to join. |
| battle_session_id | pgos::pstring | The world battle session id to join. |
| payload | pgos::pstring | The game custom data, which will be passed to the DS (dedicated server). It can be obtained by monitoring the Hosting module event (OnBattleSessionUpdatedEvt): BattleSessionUpdatedEvt.new_player_battle_sessions.payload. |
| invited_player_ids | pgos::pvector<pgos::pstring> | Player IDs who will be invited to join the same world battle session. (Must include at least 1 player) These invited players will receive the 'OnJoinWorldInvitationUpdated' event on their game client. Players who accept (AcceptJoinWorldInvitation API) the invitation will be assigned to the same world battle session as the current player. Players who reject (RejectJoinWorldInvitation API) the invitation will skip the invitation and will not be affected. The inviter (current player) will also receive the 'OnJoinWorldInvitationUpdated' event to know the status of the invitation being accepted or rejected. The inviter will automatically accept the invitation. |
| team_name | pgos::pstring | The team name that the player will join in the world battle session. If empty, the player will be assigned to a [default] team. |
InviteJoinWorldBattleSessionResult
struct InviteJoinWorldBattleSessionResult
| field | type | description |
|---|
| world_config | pgos::pstring | The world configuration name associated with the invitation ticket. |
| invitation_ticket | pgos::pstring | The ticket of the join world invitation. |
AcceptJoinWorldInvitationParams
struct AcceptJoinWorldInvitationParams
| field | type | description |
|---|
| invitation_ticket | pgos::pstring | The ticket of the join world invitation. |
RejectJoinWorldInvitationParams
struct RejectJoinWorldInvitationParams
| field | type | description |
|---|
| invitation_ticket | pgos::pstring | The ticket of the join world invitation. |
AcceptLeaveWorldInvitationParams
struct AcceptLeaveWorldInvitationParams
| field | type | description |
|---|
| invitation_ticket | pgos::pstring | The ticket of the leave world invitation. |
RejectLeaveWorldInvitationParams
struct RejectLeaveWorldInvitationParams
| field | type | description |
|---|
| invitation_ticket | pgos::pstring | The ticket of the leave world invitation. |
QueryMyWorldBattleSessionsParams
struct QueryMyWorldBattleSessionsParams
| field | type | description |
|---|
| world_configs | pgos::pvector<pgos::pstring> | Worlds to query. |
QueryMyWorldBattleSessionsResult
struct QueryMyWorldBattleSessionsResult
| field | type | description |
|---|
| world_battle_sessions | pgos::pmap<pgos::pstring, BattleSessionInfo> | A map from world config name to the battle session. Only contains the worlds that the player has joined. |
QueryPlayerWorldBattleSessionsParams
struct QueryPlayerWorldBattleSessionsParams
| field | type | description |
|---|
| player_id | pgos::pstring | Player to query. |
| world_configs | pgos::pvector<pgos::pstring> | Worlds to query. |
QueryPlayerWorldBattleSessionsResult
struct QueryPlayerWorldBattleSessionsResult
| field | type | description |
|---|
| world_battle_sessions | pgos::pmap<pgos::pstring, BattleSessionInfo> | A map from world config name to the battle session. Only contains the worlds that the player has joined. |
QueryJoinWorldInvitationParams
struct QueryJoinWorldInvitationParams
| field | type | description |
|---|
| invitation_ticket | pgos::pstring | The invitation ticket to query. |
JoinWorldInvitationInfo
The join world invitation detail information.
struct JoinWorldInvitationInfo
| field | type | description |
|---|
| world_config | pgos::pstring | The world configuration name associated with the invitation ticket. |
| inviter | PlayerInfo | The player who initiated the invitation. |
| invitation_ticket | pgos::pstring | The ticket of the join world invitation. |
| status | JoinWorldInvitationStatus | The status of the Join World invitation. Typically, the player who accepts the invitation will receive the 'OnWorldBattleSessionUpdated' event after the invitation status is marked as 'Completed'. However, if the player is already in the assigned battle session before the invitation, and has obtained the battle session's IP&port (which means he has received the relevant event of the battle session status being Active), then he may not be pushed the 'OnWorldBattleSessionUpdated' event. |
| error_msg | pgos::pstring | The error message when the status is 'Error'. |
| my_action_to_invitation | JoinWorldInvitationAction | The current player's action to this join world invitation. Call 'AcceptJoinWorldInvitation' API to accept the invitation and will receive the 'OnJoinWorldInvitationUpdated' event until the status is 'Completed'. Alternatively, call the 'RejectJoinWorldInvitation' API to reject the invitation and stop receiving the 'OnJoinWorldInvitationUpdated' event for this 'invitation_ticket'. Note: Once you have made your choice, you cannot change your decision. |
| accepted_players | pgos::pvector<PlayerInfo> | Players who have accepted the invitation. (including the inviter) |
| rejected_players | pgos::pvector<PlayerInfo> | Players who have rejected the invitation. |
| undecided_players | pgos::pvector<PlayerInfo> | Players who have not yet made a decision. |
| invitation_created_time | int64_t | The Unix timestamp(in seconds) when the invitation was created. |
| invitation_timeout | uint32_t | The maximum time(in seconds) to wait for all invited players to accept/reject. After the time (invitation_created_time+invitation_timeout), the event status will be updated to 'Completed'. |
| battle_session_id | pgos::pstring | The world battle session joined by the players who accepted the invitation. It will be empty until the 'status' changes to 'JoinWorldInvitationStatus::Completed'. |
LeaveWorldInvitationInfo
The leave world invitation detail information.
struct LeaveWorldInvitationInfo
| field | type | description |
|---|
| world_config | pgos::pstring | The world configuration name associated with the invitation ticket. |
| inviter | PlayerInfo | The player who initiated the invitation. |
| invitation_ticket | pgos::pstring | The ticket of the leave world invitation. |
| status | LeaveWorldInvitationStatus | The status of the leave World invitation. |
| error_msg | pgos::pstring | The error message when the status is 'Error'. |
| my_action_to_invitation | LeaveWorldInvitationAction | The current player's action to this leave world invitation. Call 'AcceptLeaveWorldInvitation' API to accept the invitation and will receive the 'OnLeaveWorldInvitationUpdated' event until the status is 'Completed'. Alternatively, call the 'RejectLeaveWorldInvitation' API to reject the invitation and stop receiving the 'OnLeaveWorldInvitationUpdated' event for this 'invitation_ticket'. Note: Once you have made your choice, you cannot change your decision. |
| accepted_players | pgos::pvector<PlayerInfo> | Players who have accepted the invitation. (including the inviter) |
| rejected_players | pgos::pvector<PlayerInfo> | Players who have rejected the invitation. |
| undecided_players | pgos::pvector<PlayerInfo> | Players who have not yet made a decision. |
| invitation_created_time | int64_t | The Unix timestamp(in seconds) when the invitation was created. |
| invitation_timeout | uint32_t | The maximum time(in seconds) to wait for all invited players to accept/reject. After the time (invitation_created_time+invitation_timeout), the event status will be updated to 'Completed'. |
QueryJoinWorldInvitationResult
struct QueryJoinWorldInvitationResult
GetRecommendedPlayersParams
struct GetRecommendedPlayersParams
| field | type | description |
|---|
| count | uint32_t | Specifies the (maximum) number of players to be returned, its value range is: [1~50] |
GetPotentialFriendsParams
struct GetPotentialFriendsParams
| field | type | description |
|---|
| count | uint32_t | Specifies the (maximum) number of players to be returned, its value range is: [1~50] |
| offset | uint32_t | Specifies the offset of the first player to be returned. |
WorldBattleSessionUpdatedEvt
struct WorldBattleSessionUpdatedEvt
| field | type | description |
|---|
| world_config | pgos::pstring | The world configuration name associated with this update. |
| battle_session | BattleSessionInfo | The updated details of the battle session that the current player joined. |
WorldBattlePropertiesUpdatedEvt
struct WorldBattlePropertiesUpdatedEvt
| field | type | description |
|---|
| source_type | BattleSourceType | The source type of the battle session. |
| configuration_name | pgos::pstring | World config name. |
| battle_session_id | pgos::pstring | World battle session id. |
| battle_properties | pgos::pvector<BattleProperty> | |
JoinWorldInvitationUpdatedEvt
struct JoinWorldInvitationUpdatedEvt
LeaveWorldInvitationUpdatedEvt
struct LeaveWorldInvitationUpdatedEvt
LobbyJoinRequestEvt
struct LobbyJoinRequestEvt
| field | type | description |
|---|
| lobby_id | pgos::pstring | Lobby id. |
| player_id | pgos::pstring | Player id who request to join the lobby. |
| payload | pgos::pstring | Payload data from the request player. |
| token | pgos::pstring | The token required to process this join request, which should be used in ApproveJoinRequest/RejectJoinRequest interface. |
LobbyJoinRequestApprovedEvt
struct LobbyJoinRequestApprovedEvt
| field | type | description |
|---|
| lobby_detail | LobbyDetailInfo | The lobby details information. |
LobbyJoinRequestRejectedEvt
struct LobbyJoinRequestRejectedEvt
| field | type | description |
|---|
| lobby_id | pgos::pstring | Lobby id. |
LobbyGlobalCustomDataUpdatedEvt
struct LobbyGlobalCustomDataUpdatedEvt
| field | type | description |
|---|
| kv_data | pgos::pmap<pgos::pstring, pgos::pstring> | Global kv data of the lobby. Only owner has the permission to modify it. |
| lobby_id | pgos::pstring | Lobby id. |
LobbyPlayerCustomDataUpdatedEvt
struct LobbyPlayerCustomDataUpdatedEvt
| field | type | description |
|---|
| player_kv_data | pgos::pmap<pgos::pstring, pgos::pstring> | Player custom data of each lobby member. The map key is lobby member's player ID, the map value is the lobby member's custom data. Each lobby member could modify it's player kv data. |
| lobby_id | pgos::pstring | Lobby id. |
ApproveJoinLobbyRequestParams
struct ApproveJoinLobbyRequestParams
| field | type | description |
|---|
| lobby_id | pgos::pstring | Lobby id. |
| player_id | pgos::pstring | Player id who request to join the lobby. |
| token | pgos::pstring | The token required to process this join request, which could be obtained from LobbyJoinRequestEvt. |
RejectJoinLobbyRequestParams
struct RejectJoinLobbyRequestParams
| field | type | description |
|---|
| lobby_id | pgos::pstring | Lobby id. |
| player_id | pgos::pstring | Player id who request to join the lobby. |
| token | pgos::pstring | The token required to process this join request, which could be obtained from LobbyJoinRequestEvt. |
IncrMyKVDataIdempotentParams
struct IncrMyKVDataIdempotentParams
| field | type | description |
|---|
| increments | pgos::pmap<pgos::pstring, KVDataValue> | Increments to update, key: kvdata key, value: increment of the value. |
| idempotency_token | pgos::pstring | [Optional] Used to ensure the idempotence of the function. An idempotent operation produces the same outcome regardless of how many times it's executed, without causing any side effects or altering the system's state. The scope of the idempotent token is for each player. |
IncrMyKVDataIdempotentResult
struct IncrMyKVDataIdempotentResult
| field | type | description |
|---|
| kvdata | pgos::pmap<pgos::pstring, KVDataValue> | KVData items, key: item key, value: item value. |
| replayed | bool | Whether the request is replayed. When it is True, it indicates that the result of the function is obtained by replaying with the same idempotency_token. This means that the result of the function has been generated in a previous call and is being reused in the current call. |
GetMidasGlobalAddonInfoResult
struct GetMidasGlobalAddonInfoResult
| field | type | description |
|---|
| is_role_id_mapped | bool | The management method for the Midas Role ID in the Midas Global addon. If the value is true, the role_id field will be populated by PGOS with the Role ID assigned to the current logged-in player based on the Midas Global addon configuration. If the value is false, the role_id field will not be populated. Please use the SetMidasGlobalMetaData interface to actively set the Midas Role ID. |
| role_id | pgos::pstring | |
| partition_id | pgos::pstring | |
| provider_app_id | pgos::pstring | |
struct SetMidasGlobalMetaDataParams : public MidasGlobalMetaData
parent: MidasGlobalMetaData
struct SetMidasGlobalMetaDataResult
| field | type | description |
|---|
| is_role_id_mapped | bool | Echo back the role ID management mode configured in the Midas Global addon. |
| role_id | pgos::pstring | Echo back the final adopted role ID. It will be the same as the calling parameter if is_role_id_mapped is false. If is_role_id_mapped is true, PGOS will populate it based on the current player's login information. |
MidasGlobalTransaction
struct MidasGlobalTransaction
| field | type | description |
|---|
| payment_method | pgos::pstring | Pay method, enumeration values can be filled in: GOOGLE_PLAY, APPLE_STORE, STEAM, EPIC, MICROSOFT_STORE, SWITCH, PLAY_STATION |
| region_code | pgos::pstring | Region code in uppercase, refer to ISO 3166. |
| currency_code | pgos::pstring | Currency code, refer to ISO 4217. |
MidasGlobalProductInfo
struct MidasGlobalProductInfo
| field | type | description |
|---|
| midas_unified_product_id | pgos::pstring | Midas unified product id. |
| store_item_id | pgos::pstring | PGOS store item that mapped to the Midas product and the Store where it will be listed for sale are need. |
| store_id | pgos::pstring | PGOS store item that mapped to the Midas product and the Store where it will be listed for sale are need. |
CreateMidasGlobalOrderParams
struct CreateMidasGlobalOrderParams
| field | type | description |
|---|
| product_info | MidasGlobalProductInfo | Purchase item information. |
| transaction | MidasGlobalTransaction | Transaction information. |
| payload | pgos::pstring | Transparent field, with a maximum limit of 256 characters. |
| language | pgos::pstring | Related to multilingualism, refer to ISO 639-1. |
CreateMidasGlobalOrderResult
struct CreateMidasGlobalOrderResult
| field | type | description |
|---|
| order_id | pgos::pstring | Order ID. |
| pay_info | pgos::pstring | Payment informatio, required by the Pay interface provided by the Midas Client SDK. |
GetMidasGlobalBalanceDetailParams
struct GetMidasGlobalBalanceDetailParams
| field | type | description |
|---|
| currency_codes | pgos::pvector<pgos::pstring> | Currency code of a PGOS virtual currency. Note: This interface is only used to query virtual currency with CurrencyType as MidasGlobalToken. |
GetMidasGlobalBalanceDetailResult
struct GetMidasGlobalBalanceDetailResult
ActivateP2PBattleSessionParams
struct ActivateP2PBattleSessionParams
| field | type | description |
|---|
| battle_session_id | pgos::pstring | |
AcceptP2PPlayerBattleSessionParams
struct AcceptP2PPlayerBattleSessionParams
| field | type | description |
|---|
| battle_session_id | pgos::pstring | The id of a P2P battle session |
| player_battle_session_id | pgos::pstring | The id of player session in the battle, only a Reserved player session id could be accepted. !!! NOT BATTLE SESSION ID !!! |
| player_id | pgos::pstring | Player id. |
DisconnectP2PPlayerBattleSessionParams
struct DisconnectP2PPlayerBattleSessionParams
| field | type | description |
|---|
| battle_session_id | pgos::pstring | The id of a P2P battle session |
| player_battle_session_id | pgos::pstring | The id of player session in the battle, !!! NOT BATTLE SESSION ID !!! |
| player_id | pgos::pstring | Keep it empty if do not need PGOS to validate it. |
RemoveP2PPlayerBattleSessionParams
struct RemoveP2PPlayerBattleSessionParams
| field | type | description |
|---|
| battle_session_id | pgos::pstring | The id of a P2P battle session |
| player_battle_session_id | pgos::pstring | The id of player session in the battle, !!! NOT BATTLE SESSION ID !!! |
| player_id | pgos::pstring | Keep it empty if do not need PGOS to validate it. |
DescribeP2PPlayerBattleSessionsParams
Request info to describe player battle sessions
struct DescribeP2PPlayerBattleSessionsParams
| field | type | description |
|---|
| battle_session_id | pgos::pstring | The P2P battle session id. |
| player_battle_session_id | pgos::pstring | The id of player session in the battle, !!! NOT BATTLE SESSION ID !!! Leave this parameter blank to iterate through all players in the battle session. |
| offset | uint32_t | The next token |
| count | uint32_t | The limit of the player battle sessions request. |
DescribeP2PPlayerBattleSessionsResult
Information about the players in the battle session.
struct DescribeP2PPlayerBattleSessionsResult
| field | type | description |
|---|
| next_offset | uint32_t | The next offset. |
| has_more | bool | If has more players. |
| total_num | uint32_t | None-completed players count in the battle session. |
| player_battle_sessions | pgos::pvector<P2PPlayerBattleSession> | A list of player battle sessions. Empty if there's no more sessions. |
DescribeP2PBattleSessionsResult
struct DescribeP2PBattleSessionsResult
| field | type | description |
|---|
| battle_sessions | pgos::pvector<P2PBattleSession> | The battle sesions that a player is participating in. |
TerminateP2PPlayerBattleSessionParams
struct TerminateP2PPlayerBattleSessionParams
| field | type | description |
|---|
| battle_session_id | pgos::pstring | The battle session id |
| player_battle_session_id | pgos::pstring | The player battle session id, !!! NOT BATTLE SESSION ID !!! |
ReportHostHealthParams
struct ReportHostHealthParams
| field | type | description |
|---|
| battle_session_id | pgos::pstring | The battle session id |
| player_battle_session_id | pgos::pstring | The player battle session id of reporter |
| host_player_id | pgos::pstring | Host player id |
| is_host_healthy | bool | Is the current client considering the host healthy or not |
StartP2PBattleSessionEvt
struct StartP2PBattleSessionEvt
| field | type | description |
|---|
| battle_session | P2PBattleSession | The battle session. |
| battle_source_data | BattleSourceData | Creation source data of a battle session, contains information about the source type of the battle and player information filled in by the battle creator. |
P2PBattleSessionTerminateEvt
struct P2PBattleSessionTerminateEvt
| field | type | description |
|---|
| battle_session_id | pgos::pstring | The battle session id |
| termination_time | int64_t | PGOS will forcefully terminate the session after waiting this time. |
P2PPlayerBattleSessionsTerminatedEvt
This event is called periodically to notify game DS of those player battle sessions that have been terminated from client side.
struct P2PPlayerBattleSessionsTerminatedEvt
| field | type | description |
|---|
| battle_session_id | pgos::pstring | The battle session id. |
| player_battle_session_id | pgos::pstring | The player battle session id that have been terminated. |
P2PBattleSessionUpdatedEvt
struct P2PBattleSessionUpdatedEvt
| field | type | description |
|---|
| battle_session | P2PBattleSession | The updated battle session details. |
P2PConnectParams
| field | type | description |
|---|
| peer_player_id | pgos::pstring | The player id. |
| connection_type | P2PConnectionType | The connection type to used. If not specified, PGOS will try to connect via p2p and then via relay. |
| token | pgos::pstring | The token to be used for authentication by the game client. |
| response_timeout | uint32_t | The number of milliseconds that the local player waits for a response from the remote player |
P2PConnectResult
| field | type | description |
|---|
| peer_player_id | pgos::pstring | The player id. |
| connection_type | P2PConnectionType | The connection type to used. |
| connection_id | pgos::pstring | A unique id that represents a A->B connection. |
P2PConnectRequestEvt
Event result of receiving a p2p connection request.
struct P2PConnectRequestEvt
| field | type | description |
|---|
| peer_player_id | pgos::pstring | The player id of the player who sent the request. |
| connection_id | pgos::pstring | The connection id of the connection. |
| token | pgos::pstring | The token to be used for authentication by the game client. |
P2PMessageEvt
Event result of receiving a p2p message.
| field | type | description |
|---|
| peer_player_id | pgos::pstring | The player id of the player who sent the message. |
| connection_id | pgos::pstring | The connection id of the connection. |
| message | pgos::pvector<uint8_t> | The message. |
P2PConnectionClosedEvt
Event result when the p2p connection has been closed.
struct P2PConnectionClosedEvt
| field | type | description |
|---|
| peer_player_id | pgos::pstring | The player id of the player you connect to. |
| connection_id | pgos::pstring | The connection id of the connection. |
| reason | PgosResult | The reason of the connection close. Should be ok if the connection is closed by yourself. |
DetectNatTypeResult
struct DetectNatTypeResult
| field | type | description |
|---|
| nat_type | NatType | The detected nat type. |
P2PConnectionInfo
The information of P2P connection.
| field | type | description |
|---|
| peer_player_id | pgos::pstring | The player id of the player you connect to. |
| peer_nat_type | NatType | The nat type of the peer player. |
| connection_id | pgos::pstring | The connection id of the connection. |
| connection_type | P2PConnectionType | The connection type to used. |
| is_connected | bool | Whether the connection is connected. |
| is_initiator | bool | Whether the connection is initiated by you. |
| rtt | int | The RTT of the connection. -1 if not connected. |
| srtt | int | The smoothed RTT of the connection. -1 if not connected. |
| loss_rate | float | The packet loss rate of the connection. -1 if not connected. |
SendP2PMessageParams
struct SendP2PMessageParams
| field | type | description |
|---|
| connection_id | pgos::pstring | The connection id of the connection. |
| message | pgos::pvector<uint8_t> | The message to be sent. |
TerminateP2PBattleSessionParams
struct TerminateP2PBattleSessionParams
| field | type | description |
|---|
| battle_session_id | pgos::pstring | P2P battle session id. |
IntoLoginQueueEvt
Event result when the player is placed into the login queue.
| field | type | description |
|---|
| queue_position | uint32_t | The queue position of the player. |
| estimated_wait_time | uint32_t | The estimated wait time of the player in seconds. |
LoginQueueUpdatedEvt
Event result when the login queue status is updated.
struct LoginQueueUpdatedEvt : public IntoLoginQueueEvt
parent: IntoLoginQueueEvt
GetInventoryWithFilterParams
Get inventory with filter params.
struct GetInventoryWithFilterParams
GetMutualFriendsCountParams
Get mutual friends count params.
struct GetMutualFriendsCountParams
| field | type | description |
|---|
| player_ids | pgos::pvector<pgos::pstring> | The player ids to get mutual friends count with |
GetMutualFriendsCountResult
Get mutual friends count result.
struct GetMutualFriendsCountResult
| field | type | description |
|---|
| mutual_friends_count | pgos::pmap<pgos::pstring, uint32_t> | The mutual friends count of each target player. |
PotentialFriendInfo
Basic player information of a potential friend
struct PotentialFriendInfo : public PlayerSearchInfo
parent: PlayerSearchInfo
| field | type | description |
|---|
| mutual_friend_count | uint32_t | The number of mutual friends between this player and the target player. |
GetPotentialFriendsResult
The result of [GetPotentialFriends]
struct GetPotentialFriendsResult
| field | type | description |
|---|
| info_list | pgos::pvector<PotentialFriendInfo> | A list of potential friends information |
| has_more | bool | Whether there is more friends or not |
| next_offset | uint32_t | The starting offset for the next query |
LatencyTestRoundCompletedEvt
Event details when a latency test round is completed.]
struct LatencyTestRoundCompletedEvt
| field | type | description |
|---|
| round_idx | uint32_t | The index of the test round, specifying which round this is (starting from 0). |
| data | DSHostingLatencies | The latencies from the client to the DS hosting data centers. |
Common Define
PgosCallback
The result callback after the API execution ends.
using PgosCallback = std::function<void(const PgosResult&)>;
Type Reference:
PgosDataCallback
The result callback after the API execution ends.
template <typename T>
using PgosDataCallback = std::function<void(const PgosResult&, const T*)>;
Type Reference:
PgosInterCallback
Intermediate callback that may be executed multiple times during API execution.
template <typename T>
using PgosInterCallback = std::function<void(const T*)>;