Base Data Models
Enums
AccountProvider
Game integrated account service provider.
enum class AccountProvider : uint8_t
| member | value | description |
|---|
| FAS | 0 | Fake account service provided by PGOS. |
| INTL | 1 | Account service provided by Proxima for overseas games. |
| MSDK | 2 | Account service provided by Tencent for China mainland games. |
| WeGame | 3 | Account service provided by WeGame. |
| PlayFab | 4 | Account service provided by PlayFab. |
| Steam | 5 | Account service provided by Steam. |
| Epic | 6 | Account service provided by Epic(EOS), only epicgames identity is supported. |
| XboxLive | 7 | Account service provided by XboxLive. |
| PlayStationNetwork | 8 | Account service provided by PlayStationNetwork. |
| Nintendo | 9 | Account service provided by Nintendo. |
| JWT | 10 | Custom JWT-based authentication using your own identity provider. |
ClientOS
The operating system the game client runs on.
enum class ClientOS : uint8_t
| member | value | description |
|---|
| Unknown | 0 | Unknown. |
| Linux | 1 | Linux. |
| Windows | 2 | Windows. |
| Mac | 3 | MacOS. |
| Android | 4 | Android. |
| IOS | 5 | IOS. |
| Xbox | 6 | XBOX. |
| PlayStation | 7 | PSN. |
| Switch | 8 | Switch. |
| Web | 9 | Run on web browser. |
PlayerSessionEvt
Purpose: define player-session event in its lifetime.
enum class PlayerSessionEvt : int32_t
| member | value | description |
|---|
| Dummy | 0 | unknown event. |
| SessionExpired_NetworkAbnormal | 1 | triggered when the network is abnormal. It is recommended that game clients silently call 'ReLoginPGOS' to create a new player session to regain access to PGOS services. If the result of 'ReLoginPGOS' still fails, then notify the player to check the local network environment. |
| SessionExpired_TokenExpired | 2 | triggered when the PGOS PLAYER TOKEN expired. This usually happens when: the game client loses the network for a long time (for example, the app enters the background mode on the mobile device), and then regains the network (the app enters the foreground mode) and reconnects with PGOS. It is recommended that game clients silently call 'ReLoginPGOS' to create a new player session to regain access to PGOS services. If the result of 'ReLoginPGOS' API still fails, then notify the player to re-login using the account service. |
| SessionExpired_KickoutByGame | 3 | triggered when the game behavior kicks the player out (by the virtual_server API: KickOutPlayer()). it is recommended to notify the player to check the account status. |
| SessionExpired_KickoutByBan | 4 | triggered when the player is banned by the virtual_server API: BanPlayer(kickout=true). it is recommended to notify the player to check the account status. |
| SessionExpired_KickoutByAnotherLogin | 5 | triggered when the account performed another login (maybe on another device). it is recommended to notify the player to check the account status. |
| SessionExpired_KickoutByTitleRegionClosed | 6 | triggered when the title region is closed. |
| SessionExpired_KickoutByAccountCanceled | 7 | triggered when the account is cancelled. it is recommended to notify the player to check the account status. |
| SessionStart | 8 | triggered when a player session starts successfully after LoginPGOS is called. |
| SessionEnd | 9 | triggered when player-session ended. |
AcceptedStatus
Player response to the proposed battle.
enum class AcceptedStatus : int32_t
| member | value | description |
|---|
| Dummy | 0 | Dummy. Player did not submit the confirmation. |
| Accepted | 1 | Player has accepted the proposed battle. |
| Rejected | 2 | Player has rejected the proposed battle. |
BattleSourceType
Battle source type defines.
enum class BattleSourceType : uint8_t
| member | value | description |
|---|
| None | 0 | None. |
| Matchmaking | 1 | Battle generated by matchmaking service. |
| Lobby | 2 | Battle generated by lobby service. |
| Standalone | 3 | Battle generated by game server. |
| World | 4 | Battle generated by world service. |
InGameItemType
InGameItem type defines
enum class InGameItemType : uint8_t
| member | value | description |
|---|
| Dummy | 0 | None |
| Normal | 1 | It is the most basic item in in-game item, which would not own any 'content item'. |
| Bundle | 2 | It represents a group of in-game items, which will not be instantiated into the player inventory. |
| Container | 3 | It contains a group of in-game items, which can be instantiated into the player inventory. |
ItemInstanceStatus
InGameItem type defines
enum class ItemInstanceStatus : uint8_t
| member | value | description |
|---|
| Dummy | 0 | None |
| Available | 1 | The item instance can be used. |
| Expired | 2 | The item instance has expired and can't be used. |
KVDataType
Value types of KVData
enum class KVDataType : uint8_t
| member | value | description |
|---|
| String | 0 | String value. |
| Integer | 1 | Integer number value: can hold Int32/Int64 numbers. |
| Float | 2 | Floating-point number value: can hold float/double numbers. |
GameProcessType
Type of game process.
enum class GameProcessType : uint8_t
| member | value | description |
|---|
| Client | 0 | A game client process. |
| Normal | 1 | Game server processes that can hold battle sessions. |
| ForkingProcess | 2 | A ForkingProcess is a special server process which will be forked to child that can hold battle sessions. |
| ForkedChild | 3 | A process that was forked from a ForkingProcess game server. ForkedChild should be able to hold a battle session. |
AggregateType
Method for updating statistics items.
enum class AggregateType : uint8_t
| member | value | description |
|---|
| Overwrite | 0 | Overwrite with the latest value. |
| Sum | 1 | Sum the value to the exist value. |
| Maximum | 2 | Overwrite with the maximum value. |
| Minimum | 3 | Overwrite with the minimum value. |
ClientSDKInstanceMode
PgosSDK Instance mode running in the Game Client.
enum class ClientSDKInstanceMode : uint8_t
| member | value | description |
|---|
| Singleton | 0 | The PgosSDK instance is a singleton instance in the game client. |
| LocalPlayerBased | 1 | The number of PgosSDK instances in the game client is based on the number of local players, with each local player having their own PgosSDK instance. |
DataCenterName
Enumerate all possible names of the data center in PGOS DS Hosting.
enum class DataCenterName : string
| member | value | description |
|---|
| TCloudGuangzhou | tcloud_guangzhou | The name of TCloud data center in Guangzhou. |
| TCloudShanghai | tcloud_shanghai | The name of TCloud data center in Shanghai. |
| TCloudSingapore | tcloud_singapore | The name of TCloud data center in Singapore. |
| TCloudTokyo | tcloud_tokyo | The name of TCloud data center in Tokyo. |
| TCloudMumbai | tcloud_mumbai | The name of TCloud data center in Mumbai. |
| TCloudFrankfurt | tcloud_frankfurt | The name of TCloud data center in Frankfurt. |
| TCloudVirginia | tcloud_virginia | The name of TCloud data center in Virginia. |
| TCloudSiliconvalley | tcloud_siliconvalley | The name of TCloud data center in Siliconvalley. |
| TCloudSaopaulo | tcloud_saopaulo | The name of TCloud data center in Saopaulo. |
| AWSSingapore | aws_singapore | The name of AWS data center in Singapore. |
| AWSSydney | aws_sydney | The name of AWS data center in Sydney. |
| AWSMumbai | aws_mumbai | The name of AWS data center in Mumbai. |
| AWSFrankfurt | aws_frankfurt | The name of AWS data center in Frankfurt. |
| AWSOregon | aws_oregon | The name of AWS data center in Oregon. |
| BMFrankfurt | baremetal_frankfurt | The name of bare metal data center in Frankfurt. |
CurrencyType
enum class CurrencyType : uint8_t
| member | value | description |
|---|
| Dummy | 0 | Reserved value, not used. |
| PGOSVC | 1 | Virtual currency managed by PGOS. |
| MidasGlobalToken | 2 | Virtual currency(so called Token by Midas) managed by Midas Global. |
BooleanFilter
enum class BooleanFilter : uint8_t
| member | value | description |
|---|
| BooleanAny | 0 | No filter. |
| BooleanTrue | 1 | True filter. |
| BooleanFalse | 2 | False filter. |
FilterComparisonOperator
enum class FilterComparisonOperator : uint8_t
| member | value | description |
|---|
| FilterComparisonOperatorEqual | 0 | Equal filter. |
| FilterComparisonOperatorNotEqual | 1 | Not equal filter. |
Structs
Meta data for Midas Global.
struct MidasGlobalMetaData
| field | type | description |
|---|
| app_id | pgos::pstring | Apply Offer id of a Midas payment scenario. |
| role_id | pgos::pstring | Midas Role ID. Each Role ID has its own independent Midas token balance. Note: The game client needs to provide the role ID only when the is_role_id_mapped parameter obtained through the GetMidasGlobalAddonInfo interface is false. Otherwise, this parameter will be ignored. |
| platform | pgos::pstring | Platform need by midas payment scenario. Must be one of: ANDROID, IOS, WINDOWS(including epic, steam, midaspay), GAME_CONSOLE(including switch, xbox, play station) |
PgosResult
Common result for PGOS API calls.
| field | type | description |
|---|
| err_code | PgosErrCode | error code, view pgos_error.h/PgosErrorCode.h for details. |
| msg | pgos::pstring | error message, view pgos_error.h/PgosErrorCode.h for details. |
InitSdkParams
Request parameters for init sdk.
| field | type | description |
|---|
| res_dir | pgos::pstring | Directory path for PGOS resource files (pgos_config.ini/pgos_server_config.ini, etc.), encoded in ANSI. |
| log_dir | pgos::pstring | Directory path for PGOS log files, encoded in ANSI. |
| cache_dir | pgos::pstring | Directory path for PGOS cache files, encoded in ANSI. |
KVDataValue
Value of KVData, with a bunch of useful constructors and operator overloaded functions.
| field | type | description |
|---|
| value | pgos::pstring | Value data: Please access with operators or As* functions. |
| type | KVDataType | Value type: String/Integer/Float. |
OnePlayerKVData
A kvdata item for a specified key of a specified player.
| field | type | description |
|---|
| player_id | pgos::pstring | The player who owns the kvdata. |
| key | pgos::pstring | The query key. |
| value | KVDataValue | Value corresponding to key. |
KVDataGroup
A set of kvdata items.
| field | type | description |
|---|
| kvdata | pgos::pmap<pgos::pstring, KVDataValue> | KVData items, key: item key, value: item value. |
KVDataGroupWithVer
A set of kvdata items.
struct KVDataGroupWithVer
| field | type | description |
|---|
| kvdata | pgos::pmap<pgos::pstring, KVDataValue> | KVData items, key: item key, value: item value. |
| version | uint32_t | The player-wide version of the versioned kvdata |
KVDataGroupWithVerAndFails
A set of kvdata items.
struct KVDataGroupWithVerAndFails
| field | type | description |
|---|
| kvdata | pgos::pmap<pgos::pstring, KVDataValue> | KVData items, key: item key, value: item value. |
| version | uint32_t | The player-wide version of the versioned kvdata |
| failed_keys | pgos::pmap<pgos::pstring, PgosResult> | KVData items that failed to query, key: item key, value: failed reason. |
PlayerKVDataGroup
A set of kvdata items for a specified player, including the keys that failed to be retrieved.
| field | type | description |
|---|
| player_id | pgos::pstring | The player who owns the kvdata. |
| kvdata | pgos::pmap<pgos::pstring, KVDataValue> | KVData items, key: item key, value: item value. |
PlayerKVDataGroupWithVer
A set of kvdata items for a specified player, including the keys that failed to be retrieved.
struct PlayerKVDataGroupWithVer
| field | type | description |
|---|
| player_id | pgos::pstring | The player who owns the kvdata. |
| kvdata | pgos::pmap<pgos::pstring, KVDataValue> | KVData items, key: item key, value: item value. |
| version | uint32_t | The player-wide version of the versioned kvdata |
PlayerKVDataGroupWithFails
A set of kvdata items for a specified player, including the keys that failed to be retrieved.
struct PlayerKVDataGroupWithFails
| field | type | description |
|---|
| player_id | pgos::pstring | The player who owns the kvdata. |
| kvdata | pgos::pmap<pgos::pstring, KVDataValue> | KVData items, key: item key, value: item value. |
| failed_keys | pgos::pmap<pgos::pstring, PgosResult> | KVData items that failed to query, key: item key, value: failed reason. |
PlayerKVDataGroupWithVerAndFails
A set of kvdata items for a specified player, including the keys that failed to be retrieved.
struct PlayerKVDataGroupWithVerAndFails
| field | type | description |
|---|
| player_id | pgos::pstring | The player who owns the kvdata. |
| kvdata | pgos::pmap<pgos::pstring, KVDataValue> | KVData items, key: item key, value: item value. |
| version | uint32_t | The player-wide version of the versioned kvdata |
| failed_keys | pgos::pmap<pgos::pstring, PgosResult> | KVData items that failed to query, key: item key, value: failed reason. |
KVDataGroupWithFails
A set of kvdata items, including the keys that failed to be retrieved.
struct KVDataGroupWithFails
| field | type | description |
|---|
| kvdata | pgos::pmap<pgos::pstring, KVDataValue> | KVData items, key: item key, value: item value. |
| failed_keys | pgos::pmap<pgos::pstring, PgosResult> | KVData items that failed to query, key: item key, value: failed reason. |
BatchPlayerKVDataGroup
Batch players' respective kvdata items, including players who completely failed to retrieve.
struct BatchPlayerKVDataGroup
| field | type | description |
|---|
| data | pgos::pmap<pgos::pstring, KVDataGroup> | New value of the updated kvdatas, key: player_id, value: player's new kvdata. |
| failed_players | pgos::pmap<pgos::pstring, PgosResult> | Players who totally failed, key: player_id, value: failed reason. |
BatchPlayerKVDataGroupWithFails
Batch players' respective kvdata items, including players who completely failed to retrieve and keys that failed to retrieve for players who partially succeeded.
struct BatchPlayerKVDataGroupWithFails
| field | type | description |
|---|
| data | pgos::pmap<pgos::pstring, KVDataGroupWithFails> | KVData and fails of the players, key: player_id, value: the player's kvdata and fails. |
| failed_players | pgos::pmap<pgos::pstring, PgosResult> | Players who totally failed, key: player_id, value: failed reason. |
BatchPlayerKVDataGroupWithVerAndFails
Batch players' respective kvdata items, including players who completely failed to retrieve and keys that failed to retrieve for players who partially succeeded.
struct BatchPlayerKVDataGroupWithVerAndFails
| field | type | description |
|---|
| data | pgos::pmap<pgos::pstring, KVDataGroupWithVerAndFails> | KVData and fails of the players, key: player_id, value: the player's kvdata and fails. |
| failed_players | pgos::pmap<pgos::pstring, PgosResult> | Players who totally failed, key: player_id, value: failed reason. |
BatchPlayerOperationResult
Batch operation results for multiple players. (Only includes failed players and their failure reasons)
struct BatchPlayerOperationResult
| field | type | description |
|---|
| failed_players | pgos::pmap<pgos::pstring, PgosResult> | Players who totally failed, key: player_id, value: failed reason. |
KVPair
K-V pair
| field | type | description |
|---|
| key | pgos::pstring | key of the K-V pair |
| value | pgos::pstring | value of the K-V pair |
TitleRegionConfigKVDataQueryResult
The result of querying the specified key-value data of the title region config data.
struct TitleRegionConfigKVDataQueryResult
| field | type | description |
|---|
| data | pgos::pmap<pgos::pstring, KVDataValue> | The queried title region config kvdata items. |
| fails | pgos::pmap<pgos::pstring, pgos::pstring> | The reason why the query operation failed for these keys, key: item key, value: failed reason. |
TitleConfigKVDataQueryResult
The result of querying the specified key-value data of the title config data.
struct TitleConfigKVDataQueryResult
| field | type | description |
|---|
| data | pgos::pmap<pgos::pstring, KVDataValue> | The queried title config kvdata items. |
| fails | pgos::pmap<pgos::pstring, pgos::pstring> | The reason why the query operation failed for these keys, key: item key, value: failed reason. |
PlayerInfo
Base info of a player
| field | type | description |
|---|
| player_id | pgos::pstring | unique id of player. |
| display_name | pgos::pstring | player's display name |
| gender | pgos::pstring | player's gender |
| avatar_uri | pgos::pstring | player's avatar uri |
| 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. 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 | account openID |
| account_platform | pgos::pstring | account platform name, such as: 'Steam', 'EpicGames', 'PlayStationNetwork', etc. PGOS will get and save it from the parameters passed in when the game calls 'LoginPGOS'. |
| account_id | pgos::pstring | account platform user id owned by the player (e.g. Steam SteamID, XboxLive Xuid). |
| os | ClientOS | The operating system the game client runs on. |
| custom_info | pgos::pmap<pgos::pstring, KVDataValue> | custom info from player data, key: item key, value: item value. |
PlayerDetail
Detailed info of a player.
struct PlayerDetail : public PlayerInfo
parent: PlayerInfo
| field | type | description |
|---|
| language | pgos::pstring | player's display language, if you want your game to be multilingual. |
| first_login_time | int64_t | player's first login Unix timestamp in the title region, in seconds. |
| last_login_time | int64_t | player's last login Unix timestamp in the title region, in seconds. |
| last_logout_time | int64_t | player's last logout Unix timestamp in the title region, in seconds. |
| total_time | int64_t | player's total online time, in seconds. |
| last_login_ip | pgos::pstring | player's last login ip address in the title region. |
| cur_login_ip | pgos::pstring | player's current login ip address in the title region. |
ChatChannelInfo
Chat channel info
| field | type | description |
|---|
| 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. |
| chat_channel_name | pgos::pstring | The name of chat channel to create |
| created_time | int64_t | The Unix timestamp(in seconds) when the chat channel was created. |
VirtualServerReq
The request parameter of a virtual server call.
| field | type | description |
|---|
| server_name | pgos::pstring | The name of the virtual server. |
| url | pgos::pstring | [Optional] The requested url if there is any. For example: "v1/battle_settlement". |
| extra_headers | pgos::pmap<pgos::pstring, pgos::pstring> | Extra header fields required by the game. It is advisable to add a "Content-Type" field to avoid being rejected by the server, based on the request body format. for example: extra_headers["Content-Type"] = "text/plain" Here are the fields reserved for PGOS that cannot be used by the game: "SDKVersion", "ProtoVersion", "TitleId", "TitleRegionId", "SessionId", "PlayerId", "PlayerTicket", "RoutingKey", "UicAccountInfo", "SecretID", "Pid", "ServerTicket", "DstAddr", "DstCode", "AccTicket". |
| body | pgos::pvector<uint8_t> | [Optional] The request binary data. |
VirtualServerResp
The response after calling a virtual server request.
| field | type | description |
|---|
| status | int32_t | The HTTP status code of the response. |
| resp_headers | pgos::pmap<pgos::pstring, pgos::pstring> | The HTTP header of the response. |
| resp_body | pgos::pvector<uint8_t> | The HTTP body of the response. |
Currency
In-game currency which defined on the portal.
| 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 | uint32_t | The amount of the currency. |
ItemContent
| field | type | description |
|---|
| item_id | pgos::pstring | The id of in-game item. Use item_id to find the 'InGameItem' define through the 'ItemDict::FindItem'. |
| amount | uint32_t | The amount of item in content. |
InGameItem
In-game item which defined on the portal.
| field | type | description |
|---|
| item_id | pgos::pstring | The id of the item. |
| display_name | pgos::pstring | The name of the item. |
| icon | pgos::pstring | The uri of the item. |
| description | pgos::pstring | The description of the item. |
| default_custom_data | pgos::pmap<pgos::pstring, pgos::pstring> | The kv data of the item. Fill in the attributes of item on the portal, such as the attack value attached to the weapon : {"attack":200}. |
| tags | pgos::pmap<pgos::pstring, pgos::pstring> | The tags of item Fill in the tags of item on the portal, such as the category of item: {"Category":"Equipment"} |
| item_type | InGameItemType | Item type: Dummy / Normal / Bundle / Container. |
| valid_duration | uint32_t | The available duration(in seconds) after the item is instantiated to the player inventory, 0 means valid forever. |
| is_consumable | bool | Whether the instance of the item can be consumed by ConsumeInstance. |
| is_stackable | bool | Whether the instance of the item can be stacked in the player inventory. |
| stack_limit | uint32_t | The limitation of stack count for stackable item instance. 0 means no limit. |
| is_unique | bool | Whether a player can only own one instance of the item. |
| item_content | pgos::pvector<ItemContent> | The in-game items that this item contains |
| currency_content | pgos::pvector<Currency> | The currencies that this item contains |
ItemInstance
| field | type | description |
|---|
| instance_id | pgos::pstring | The id of the item instance |
| amount | uint32_t | The amount of the item instance |
| status | ItemInstanceStatus | Item instance status: Dummy / Available / Expired |
| item | InGameItem | The base definition data of this instance which is shared by all instances generated from the same item id. Please access and edit this data in the In-Game Items page of the PGOS Portal. |
| mutable_custom_data | pgos::pmap<pgos::pstring, KVDataValue> | The mutable kv data of the instance. Only the server can fill and modify data. The key must be prefixed with "int", "flt", or "str_", which respectively indicate that the value type is integer, float, or string. Max 32 keys, each key limited to 128 bytes and each value limited to 4096 bytes(in a narrow-character string). |
| mutable_custom_data_version | uint32_t | The version of the mutable_custom_data. |
| tags | pgos::pmap<pgos::pstring, pgos::pstring> | The custom tags of the instance. Max 32 keys, each key limited to 128 bytes and each value limited to 1024 bytes(in a narrow-character string). |
| created_time | int64_t | The Unix timestamp(in seconds) when the item was instantiated to the player inventory |
| updated_time | int64_t | The Unix timestamp(in seconds) when the item instance info has be updated |
| expired_time | int64_t | The Unix timestamp(in seconds) when the item instance will be expired, 0 means valid forever. |
| time_to_live | uint32_t | Up to now, the remaining time (in seconds) of the validity period of an item. For an item that valid forever, its value is 0. This is not an accurate reference value, for cases that need to be accurate, please refer to 'expired_time'. |
| pay_platform | pgos::pstring | Pay platform name, such as: 'Steam', 'Xbox', etc. You can use macros starting with 'PAY_PLATFORM' in pgos_common_define.h |
| pay_platform_data | PayPlatformData | Payment platform meta data. |
FailsList
A list of failed items in K-V pair data operations
| field | type | description |
|---|
| fails | pgos::pmap<pgos::pstring, pgos::pstring> | A list of failed items in K-V pair data operations |
ItemDict
| field | type | description |
|---|
| dict | pgos::pmap<pgos::pstring, InGameItem> | A mapping of in-game item defines, the key is 'item id', and you can use 'ItemDict::FindItem' to search. |
ItemInstPack
| field | type | description |
|---|
| insts | pgos::pvector<ItemInstance> | Item instances in the pack. |
| item_dict | ItemDict | In-game item defines that may be referenced in the 'item_content' of a item instance. 'ItemDict::FindItem' could be used to search for particular item. |
ConflictUniqueItem
struct ConflictUniqueItem
| field | type | description |
|---|
| item | InGameItem | Economy item. |
| amount | uint32_t | The amount of item. |
RegionLatencyInfo
The latency(ms) of the region
| field | type | description |
|---|
| provider | pgos::pstring | cloud provider, such as: aws, tcloud |
| region | pgos::pstring | idc of the fleet |
| data_center | pgos::pstring | The data center name and its possible values can be viewed in the 'DataCenterName' definition. |
| latency | int32_t | The latency(ms) of the region |
PlayerBlobDataInfo
Player blob data information
struct PlayerBlobDataInfo
| field | type | description |
|---|
| url | pgos::pstring | A downloadable blob url, valid for one hour after the information is obtained. To download it, you can use the download function provided by the PGOS Utility module or use the download function implemented by yourself. |
| version | uint32_t | The blob version number, an auto-incrementing number. |
| last_modified_ts | int64_t | The Unix timestamp(in seconds) when the blob was updated. |
| blob_size | int64_t | Size of the blob (in bytes). |
| blob_md5 | pgos::pstring | MD5 of the blob. |
UpdatePBDProgressInfo
Update player blob data progress information.
It will be used as the parameter type in the callback after calling the UpdatePBDFrom* API.
struct UpdatePBDProgressInfo
| field | type | description |
|---|
| player_id | pgos::pstring | The player to update blob data. |
| blob_key | pgos::pstring | The blob key to update. |
| new_blob_size | int64_t | The new total size of the blob after the update, in bytes. |
| transfered_size | int64_t | The size of the data that has been transferred, in bytes. |
HttpDownloadProgressInfo
Http download progress information.
It will be used as the parameter type in the callback after calling the HttpDownload* API.
struct HttpDownloadProgressInfo
| field | type | description |
|---|
| transfered_size | int64_t | The size of the data that has been transferred, in bytes. |
PgosBuffer
A regular memory buffer definition.
| field | type | description |
|---|
| buffer_ptr | const char* | The buffer address pointer, the buffer can be read, but cannot be modified and freed. |
| buffer_len | int64_t | The length of the buffer, in bytes. |
BattleProperty
K-V pair property of a battle session
| field | type | description |
|---|
| key | pgos::pstring | key of the K-V pair property of a battle session |
| value | pgos::pstring | value of the K-V pair property of a battle session |
BaseBackendEventParams
A game-defined custom value pass to PGOS backend event.
struct BaseBackendEventParams
StatItem
Statistics item instance value which includes: value, extra value, and tags.
| field | type | description |
|---|
| stat_name | pgos::pstring | Stat name. |
| key | pgos::pstring | Stat item key. |
| value | double | The meaning of the value varies in different scenarios: 1. Get stat item persistent value: it is item persistent value. 2. Get stat item cycle value: it is item cycle value. 3. Update stat item value: it is the value to be aggregated into the stat item. |
| secondary_value | double | Stat item secondary value. It will overwrite the old one when updated. |
| tags | pgos::pvector<pgos::pstring> | Stat item tags. It will overwrite the old one when updated if 'ignore_tags' is false. Max 10 values, each value limited to 64 bytes(in a narrow-character string) |
| custom_data | pgos::pstring | Used to store additional information. It will overwrite the old one when updated if 'ignore_custom_data' is false. Limited to 512 bytes(in a narrow-character string) |
| aggregate_type | AggregateType | The method to aggregate. |
BatchGetStatPersistentInfoResult
Response for batch get stat persistent info result.
struct BatchGetStatPersistentInfoResult
| field | type | description |
|---|
| items | pgos::pvector<StatItem> | Stat items obtained. |
GetStatCycleInfoResult
Statistics item instance values in a cycle round.
struct GetStatCycleInfoResult
| field | type | description |
|---|
| item | StatItem | Stat item obtained. |
| cycle_name | pgos::pstring | The name of the cycle. |
| cycle_round_seq | uint32_t | The sequence number of the cycle round, start from 1. |
| round_start_time | int64_t | The cycle round start time, Unix time in second. |
| round_end_time | int64_t | The cycle round end time, Unix time in second. |
BatchGetStatCycleInfoResult
Response for batch obtaining stat cycle info result.
struct BatchGetStatCycleInfoResult
| field | type | description |
|---|
| items | pgos::pvector<StatItem> | Stat items obtained. |
| cycle_name | pgos::pstring | The name of the cycle. |
| cycle_round_seq | uint32_t | The sequence number of the cycle round, start from 1. |
| round_start_time | int64_t | The cycle round start time, Unix time in second. |
| round_end_time | int64_t | The cycle round end time, Unix time in second. |
GetStatPersistentInfoParams
struct GetStatPersistentInfoParams
| field | type | description |
|---|
| stat_name | pgos::pstring | Stat name. |
| key | pgos::pstring | Stat item key. |
BatchGetStatPersistentInfoParams
struct BatchGetStatPersistentInfoParams
| field | type | description |
|---|
| stat_names | pgos::pvector<pgos::pstring> | Stat names. |
| keys | pgos::pvector<pgos::pstring> | Stat item keys. |
GetStatCycleInfoParams
struct GetStatCycleInfoParams
| field | type | description |
|---|
| stat_name | pgos::pstring | The stat name. |
| key | pgos::pstring | The stat item key. |
| cycle_name | pgos::pstring | The stat cycle name. |
BatchGetStatCycleInfoParams
struct BatchGetStatCycleInfoParams
| field | type | description |
|---|
| stat_names | pgos::pvector<pgos::pstring> | The stat names. |
| keys | pgos::pvector<pgos::pstring> | The stat item keys. |
| cycle_name | pgos::pstring | The stat cycle name. |
BatchGetStatCycleRoundInfoParams
struct BatchGetStatCycleRoundInfoParams
| field | type | description |
|---|
| cycle_names | pgos::pvector<pgos::pstring> | The stat cycle names. |
StatCycleRoundInfo
Current round info of cycle.
struct StatCycleRoundInfo
| field | type | description |
|---|
| cycle_name | pgos::pstring | The stat cycle name. |
| cycle_round_seq | uint32_t | The sequence number of the cycle round, start from 1. |
| round_start_time | int64_t | The cycle round start time, Unix time in seconds. |
| round_end_time | int64_t | The cycle round end time, Unix time in seconds. |
BatchGetStatCycleRoundInfoResult
Response for batch obtaining current round info result.
struct BatchGetStatCycleRoundInfoResult
| field | type | description |
|---|
| round_info_map | pgos::pmap<pgos::pstring, StatCycleRoundInfo> | Current round infos. key: cycle_name |
TitleFileInfo
Title File detail infomation. Title File is a cloud file within title-wide, which can be managed on the portal console.
| field | type | description |
|---|
| file_name | pgos::pstring | The name of the file. |
| url | pgos::pstring | A downloadable blob url, its validity time is specified by the 'url_valid_time' parameter when getting it. To download it, you can use the download function provided by the PGOS Utility module or use the download function implemented by yourself. |
| updated_time | int64_t | The updated time of the file, UNIX time in seconds. |
| file_size | int64_t | The size of the file, in bytes. |
| file_md5 | pgos::pstring | The MD5 of the file. |
GetTitleFileInfoParams
The parameter struct to get title file info.
struct GetTitleFileInfoParams
| field | type | description |
|---|
| paths | pgos::pvector<pgos::pstring> | The list contains the full paths of title files from which information will be retrieved, with a maximum size of 100 paths. Note: file&folder names are case-insensitive, meaning that "/config/rules.json" and "/CONFIG/RULES.JSON" are considered the same file. |
| url_valid_time | uint32_t | The valid duration(in seconds) of the file download URL, after which the URL will no longer be downloadable. Its value must be greater than 0, otherwise the operation will fail. |
GetTitleFileInfoResult
Response for getting title file info.
struct GetTitleFileInfoResult
| field | type | description |
|---|
| data | pgos::pmap<pgos::pstring, TitleFileInfo> | Obtained title file informations, key: file path, value: file info. |
| fails | pgos::pmap<pgos::pstring, pgos::pstring> | The reason why the query operation failed for these paths, key: file path, value: failed reason. |
PlayerDesc
Player description
| field | type | description |
|---|
| player_info | PlayerInfo | Base info of a player. |
| team | pgos::pstring | The name of the player's team. |
| match_attributes | pgos::pmap<pgos::pstring, KVDataValue> | Attributes used by the Matchmaking, map key: attribute name, map value: attribute value. |
BattleTeam
The structure of a team in a battle session.
| field | type | description |
|---|
| name | pgos::pstring | Team name |
| players | pgos::pvector<PlayerDesc> | A ordered array of team members. When a team slot is empty in battle session from a lobby, the player_id will be filled as empty |
BattleSourceData
Creation source data of a battle session
| field | type | description |
|---|
| source_type | BattleSourceType | What service that the battle session generated from |
| configuration_name | pgos::pstring | configuration_name Matchmaking configuration name or lobby configuration name |
| ruleset_name | pgos::pstring | Ruleset name hit. Filled when battle session source type is BattleSourceType::Matchmaking |
| teams | pgos::pvector<BattleTeam> | Teams of the battle session |
TagDataFilter
Filter for tag data.
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*)>;