跳到主要内容

Base Data Models

Enums

AccountProvider

Game integrated account service provider.

// namespace: pgos
enum class AccountProvider : uint8_t
membervaluedescription
FAS0Fake account service provided by PGOS.
INTL1Account service provided by Proxima for overseas games.
MSDK2Account service provided by Tencent for China mainland games.
WeGame3Account service provided by WeGame.
PlayFab4Account service provided by PlayFab.
Steam5Account service provided by Steam.
Epic6Account service provided by Epic(EOS), only epicgames identity is supported.
XboxLive7Account service provided by XboxLive.
PlayStationNetwork8Account service provided by PlayStationNetwork.
Nintendo9Account service provided by Nintendo.
JWT10Custom JWT-based authentication using your own identity provider.

ClientOS

The operating system the game client runs on.

// namespace: pgos
enum class ClientOS : uint8_t
membervaluedescription
Unknown0Unknown.
Linux1Linux.
Windows2Windows.
Mac3MacOS.
Android4Android.
IOS5IOS.
Xbox6XBOX.
PlayStation7PSN.
Switch8Switch.
Web9Run on web browser.

PlayerSessionEvt

Purpose: define player-session event in its lifetime.

// namespace: pgos
enum class PlayerSessionEvt : int32_t
membervaluedescription
Dummy0unknown event.
SessionExpired_NetworkAbnormal1triggered 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_TokenExpired2triggered 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_KickoutByGame3triggered 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_KickoutByBan4triggered 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_KickoutByAnotherLogin5triggered when the account performed another login (maybe on another device). it is recommended to notify the player to check the account status.
SessionExpired_KickoutByTitleRegionClosed6triggered when the title region is closed.
SessionExpired_KickoutByAccountCanceled7triggered when the account is cancelled. it is recommended to notify the player to check the account status.
SessionStart8triggered when a player session starts successfully after LoginPGOS is called.
SessionEnd9triggered when player-session ended.

AcceptedStatus

Player response to the proposed battle.

// namespace: pgos
enum class AcceptedStatus : int32_t
membervaluedescription
Dummy0Dummy. Player did not submit the confirmation.
Accepted1Player has accepted the proposed battle.
Rejected2Player has rejected the proposed battle.

BattleSourceType

Battle source type defines.

// namespace: pgos
enum class BattleSourceType : uint8_t
membervaluedescription
None0None.
Matchmaking1Battle generated by matchmaking service.
Lobby2Battle generated by lobby service.
Standalone3Battle generated by game server.
World4Battle generated by world service.

InGameItemType

InGameItem type defines

// namespace: pgos
enum class InGameItemType : uint8_t
membervaluedescription
Dummy0None
Normal1It is the most basic item in in-game item, which would not own any 'content item'.
Bundle2It represents a group of in-game items, which will not be instantiated into the player inventory.
Container3It contains a group of in-game items, which can be instantiated into the player inventory.

ItemInstanceStatus

InGameItem type defines

// namespace: pgos
enum class ItemInstanceStatus : uint8_t
membervaluedescription
Dummy0None
Available1The item instance can be used.
Expired2The item instance has expired and can't be used.

KVDataType

Value types of KVData

// namespace: pgos
enum class KVDataType : uint8_t
membervaluedescription
String0String value.
Integer1Integer number value: can hold Int32/Int64 numbers.
Float2Floating-point number value: can hold float/double numbers.

GameProcessType

Type of game process.

// namespace: pgos
enum class GameProcessType : uint8_t
membervaluedescription
Client0A game client process.
Normal1Game server processes that can hold battle sessions.
ForkingProcess2A ForkingProcess is a special server process which will be forked to child that can hold battle sessions.
ForkedChild3A process that was forked from a ForkingProcess game server. ForkedChild should be able to hold a battle session.

AggregateType

Method for updating statistics items.

// namespace: pgos
enum class AggregateType : uint8_t
membervaluedescription
Overwrite0Overwrite with the latest value.
Sum1Sum the value to the exist value.
Maximum2Overwrite with the maximum value.
Minimum3Overwrite with the minimum value.

ClientSDKInstanceMode

PgosSDK Instance mode running in the Game Client.

// namespace: pgos
enum class ClientSDKInstanceMode : uint8_t
membervaluedescription
Singleton0The PgosSDK instance is a singleton instance in the game client.
LocalPlayerBased1The 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.

// namespace: pgos
enum class DataCenterName : string
membervaluedescription
TCloudGuangzhoutcloud_guangzhouThe name of TCloud data center in Guangzhou.
TCloudShanghaitcloud_shanghaiThe name of TCloud data center in Shanghai.
TCloudSingaporetcloud_singaporeThe name of TCloud data center in Singapore.
TCloudTokyotcloud_tokyoThe name of TCloud data center in Tokyo.
TCloudMumbaitcloud_mumbaiThe name of TCloud data center in Mumbai.
TCloudFrankfurttcloud_frankfurtThe name of TCloud data center in Frankfurt.
TCloudVirginiatcloud_virginiaThe name of TCloud data center in Virginia.
TCloudSiliconvalleytcloud_siliconvalleyThe name of TCloud data center in Siliconvalley.
TCloudSaopaulotcloud_saopauloThe name of TCloud data center in Saopaulo.
AWSSingaporeaws_singaporeThe name of AWS data center in Singapore.
AWSSydneyaws_sydneyThe name of AWS data center in Sydney.
AWSMumbaiaws_mumbaiThe name of AWS data center in Mumbai.
AWSFrankfurtaws_frankfurtThe name of AWS data center in Frankfurt.
AWSOregonaws_oregonThe name of AWS data center in Oregon.
BMFrankfurtbaremetal_frankfurtThe name of bare metal data center in Frankfurt.

CurrencyType

// namespace: pgos
enum class CurrencyType : uint8_t
membervaluedescription
Dummy0Reserved value, not used.
PGOSVC1Virtual currency managed by PGOS.
MidasGlobalToken2Virtual currency(so called Token by Midas) managed by Midas Global.

BooleanFilter

// namespace: pgos
enum class BooleanFilter : uint8_t
membervaluedescription
BooleanAny0No filter.
BooleanTrue1True filter.
BooleanFalse2False filter.

FilterComparisonOperator

// namespace: pgos
enum class FilterComparisonOperator : uint8_t
membervaluedescription
FilterComparisonOperatorEqual0Equal filter.
FilterComparisonOperatorNotEqual1Not equal filter.

Structs

MidasGlobalMetaData

Meta data for Midas Global.

// namespace: pgos
struct MidasGlobalMetaData
fieldtypedescription
app_idpgos::pstringApply Offer id of a Midas payment scenario.
role_idpgos::pstringMidas 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.
platformpgos::pstringPlatform need by midas payment scenario. Must be one of: ANDROID, IOS, WINDOWS(including epic, steam, midaspay), GAME_CONSOLE(including switch, xbox, play station)

PayPlatformData

// namespace: pgos
struct PayPlatformData
fieldtypedescription
midas_globalMidasGlobalMetaData

PgosResult

Common result for PGOS API calls.

// namespace: pgos
struct PgosResult
fieldtypedescription
err_codePgosErrCodeerror code, view pgos_error.h/PgosErrorCode.h for details.
msgpgos::pstringerror message, view pgos_error.h/PgosErrorCode.h for details.

InitSdkParams

Request parameters for init sdk.

// namespace: pgos
struct InitSdkParams
fieldtypedescription
res_dirpgos::pstringDirectory path for PGOS resource files (pgos_config.ini/pgos_server_config.ini, etc.), encoded in ANSI.
log_dirpgos::pstringDirectory path for PGOS log files, encoded in ANSI.
cache_dirpgos::pstringDirectory path for PGOS cache files, encoded in ANSI.

KVDataValue

Value of KVData, with a bunch of useful constructors and operator overloaded functions.

// namespace: pgos
struct KVDataValue
fieldtypedescription
valuepgos::pstringValue data: Please access with operators or As* functions.
typeKVDataTypeValue type: String/Integer/Float.

OnePlayerKVData

A kvdata item for a specified key of a specified player.

// namespace: pgos
struct OnePlayerKVData
fieldtypedescription
player_idpgos::pstringThe player who owns the kvdata.
keypgos::pstringThe query key.
valueKVDataValueValue corresponding to key.

KVDataGroup

A set of kvdata items.

// namespace: pgos
struct KVDataGroup
fieldtypedescription
kvdatapgos::pmap<pgos::pstring, KVDataValue>KVData items, key: item key, value: item value.

KVDataGroupWithVer

A set of kvdata items.

// namespace: pgos
struct KVDataGroupWithVer
fieldtypedescription
kvdatapgos::pmap<pgos::pstring, KVDataValue>KVData items, key: item key, value: item value.
versionuint32_tThe player-wide version of the versioned kvdata

KVDataGroupWithVerAndFails

A set of kvdata items.

// namespace: pgos
struct KVDataGroupWithVerAndFails
fieldtypedescription
kvdatapgos::pmap<pgos::pstring, KVDataValue>KVData items, key: item key, value: item value.
versionuint32_tThe player-wide version of the versioned kvdata
failed_keyspgos::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.

// namespace: pgos
struct PlayerKVDataGroup
fieldtypedescription
player_idpgos::pstringThe player who owns the kvdata.
kvdatapgos::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.

// namespace: pgos
struct PlayerKVDataGroupWithVer
fieldtypedescription
player_idpgos::pstringThe player who owns the kvdata.
kvdatapgos::pmap<pgos::pstring, KVDataValue>KVData items, key: item key, value: item value.
versionuint32_tThe 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.

// namespace: pgos
struct PlayerKVDataGroupWithFails
fieldtypedescription
player_idpgos::pstringThe player who owns the kvdata.
kvdatapgos::pmap<pgos::pstring, KVDataValue>KVData items, key: item key, value: item value.
failed_keyspgos::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.

// namespace: pgos
struct PlayerKVDataGroupWithVerAndFails
fieldtypedescription
player_idpgos::pstringThe player who owns the kvdata.
kvdatapgos::pmap<pgos::pstring, KVDataValue>KVData items, key: item key, value: item value.
versionuint32_tThe player-wide version of the versioned kvdata
failed_keyspgos::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.

// namespace: pgos
struct KVDataGroupWithFails
fieldtypedescription
kvdatapgos::pmap<pgos::pstring, KVDataValue>KVData items, key: item key, value: item value.
failed_keyspgos::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.

// namespace: pgos
struct BatchPlayerKVDataGroup
fieldtypedescription
datapgos::pmap<pgos::pstring, KVDataGroup>New value of the updated kvdatas, key: player_id, value: player's new kvdata.
failed_playerspgos::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.

// namespace: pgos
struct BatchPlayerKVDataGroupWithFails
fieldtypedescription
datapgos::pmap<pgos::pstring, KVDataGroupWithFails>KVData and fails of the players, key: player_id, value: the player's kvdata and fails.
failed_playerspgos::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.

// namespace: pgos
struct BatchPlayerKVDataGroupWithVerAndFails
fieldtypedescription
datapgos::pmap<pgos::pstring, KVDataGroupWithVerAndFails>KVData and fails of the players, key: player_id, value: the player's kvdata and fails.
failed_playerspgos::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)

// namespace: pgos
struct BatchPlayerOperationResult
fieldtypedescription
failed_playerspgos::pmap<pgos::pstring, PgosResult>Players who totally failed, key: player_id, value: failed reason.

KVPair

K-V pair

// namespace: pgos
struct KVPair
fieldtypedescription
keypgos::pstringkey of the K-V pair
valuepgos::pstringvalue of the K-V pair

TitleRegionConfigKVDataQueryResult

The result of querying the specified key-value data of the title region config data.

// namespace: pgos
struct TitleRegionConfigKVDataQueryResult
fieldtypedescription
datapgos::pmap<pgos::pstring, KVDataValue>The queried title region config kvdata items.
failspgos::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.

// namespace: pgos
struct TitleConfigKVDataQueryResult
fieldtypedescription
datapgos::pmap<pgos::pstring, KVDataValue>The queried title config kvdata items.
failspgos::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

// namespace: pgos
struct PlayerInfo
fieldtypedescription
player_idpgos::pstringunique id of player.
display_namepgos::pstringplayer's display name
genderpgos::pstringplayer's gender
avatar_uripgos::pstringplayer's avatar uri
account_providerint32_tAccount 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_idpgos::pstringaccount openID
account_platformpgos::pstringaccount 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_idpgos::pstringaccount platform user id owned by the player (e.g. Steam SteamID, XboxLive Xuid).
osClientOSThe operating system the game client runs on.
custom_infopgos::pmap<pgos::pstring, KVDataValue>custom info from player data, key: item key, value: item value.

PlayerDetail

Detailed info of a player.

// namespace: pgos
struct PlayerDetail : public PlayerInfo

parent: PlayerInfo

fieldtypedescription
languagepgos::pstringplayer's display language, if you want your game to be multilingual.
first_login_timeint64_tplayer's first login Unix timestamp in the title region, in seconds.
last_login_timeint64_tplayer's last login Unix timestamp in the title region, in seconds.
last_logout_timeint64_tplayer's last logout Unix timestamp in the title region, in seconds.
total_timeint64_tplayer's total online time, in seconds.
last_login_ippgos::pstringplayer's last login ip address in the title region.
cur_login_ippgos::pstringplayer's current login ip address in the title region.

ChatChannelInfo

Chat channel info

// namespace: pgos
struct ChatChannelInfo
fieldtypedescription
chat_channel_idpgos::pstringAn 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_namepgos::pstringThe name of chat channel to create
created_timeint64_tThe Unix timestamp(in seconds) when the chat channel was created.

VirtualServerReq

The request parameter of a virtual server call.

// namespace: pgos
struct VirtualServerReq
fieldtypedescription
server_namepgos::pstringThe name of the virtual server.
urlpgos::pstring[Optional] The requested url if there is any. For example: "v1/battle_settlement".
extra_headerspgos::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".
bodypgos::pvector<uint8_t>[Optional] The request binary data.

VirtualServerResp

The response after calling a virtual server request.

// namespace: pgos
struct VirtualServerResp
fieldtypedescription
statusint32_tThe HTTP status code of the response.
resp_headerspgos::pmap<pgos::pstring, pgos::pstring>The HTTP header of the response.
resp_bodypgos::pvector<uint8_t>The HTTP body of the response.

Currency

In-game currency which defined on the portal.

// namespace: pgos
struct Currency
fieldtypedescription
currency_codepgos::pstringThe code of the currency.
currency_namepgos::pstringThe name of the currency.
currency_iconpgos::pstringThe uri of the currency.
currency_typeCurrencyTypeCurrency type.
amountuint32_tThe amount of the currency.

ItemContent

// namespace: pgos
struct ItemContent
fieldtypedescription
item_idpgos::pstringThe id of in-game item. Use item_id to find the 'InGameItem' define through the 'ItemDict::FindItem'.
amountuint32_tThe amount of item in content.

InGameItem

In-game item which defined on the portal.

// namespace: pgos
struct InGameItem
fieldtypedescription
item_idpgos::pstringThe id of the item.
display_namepgos::pstringThe name of the item.
iconpgos::pstringThe uri of the item.
descriptionpgos::pstringThe description of the item.
default_custom_datapgos::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}.
tagspgos::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_typeInGameItemTypeItem type: Dummy / Normal / Bundle / Container.
valid_durationuint32_tThe available duration(in seconds) after the item is instantiated to the player inventory, 0 means valid forever.
is_consumableboolWhether the instance of the item can be consumed by ConsumeInstance.
is_stackableboolWhether the instance of the item can be stacked in the player inventory.
stack_limituint32_tThe limitation of stack count for stackable item instance. 0 means no limit.
is_uniqueboolWhether a player can only own one instance of the item.
item_contentpgos::pvector<ItemContent>The in-game items that this item contains
currency_contentpgos::pvector<Currency>The currencies that this item contains

ItemInstance

// namespace: pgos
struct ItemInstance
fieldtypedescription
instance_idpgos::pstringThe id of the item instance
amountuint32_tThe amount of the item instance
statusItemInstanceStatusItem instance status: Dummy / Available / Expired
itemInGameItemThe 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_datapgos::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_versionuint32_tThe version of the mutable_custom_data.
tagspgos::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_timeint64_tThe Unix timestamp(in seconds) when the item was instantiated to the player inventory
updated_timeint64_tThe Unix timestamp(in seconds) when the item instance info has be updated
expired_timeint64_tThe Unix timestamp(in seconds) when the item instance will be expired, 0 means valid forever.
time_to_liveuint32_tUp 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_platformpgos::pstringPay platform name, such as: 'Steam', 'Xbox', etc. You can use macros starting with 'PAY_PLATFORM' in pgos_common_define.h
pay_platform_dataPayPlatformDataPayment platform meta data.

FailsList

A list of failed items in K-V pair data operations

// namespace: pgos
struct FailsList
fieldtypedescription
failspgos::pmap<pgos::pstring, pgos::pstring>A list of failed items in K-V pair data operations

ItemDict

// namespace: pgos
struct ItemDict
fieldtypedescription
dictpgos::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

// namespace: pgos
struct ItemInstPack
fieldtypedescription
instspgos::pvector<ItemInstance>Item instances in the pack.
item_dictItemDictIn-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

// namespace: pgos
struct ConflictUniqueItem
fieldtypedescription
itemInGameItemEconomy item.
amountuint32_tThe amount of item.

RegionLatencyInfo

The latency(ms) of the region

// namespace: pgos
struct RegionLatencyInfo
fieldtypedescription
providerpgos::pstringcloud provider, such as: aws, tcloud
regionpgos::pstringidc of the fleet
data_centerpgos::pstringThe data center name and its possible values can be viewed in the 'DataCenterName' definition.
latencyint32_tThe latency(ms) of the region

PlayerBlobDataInfo

Player blob data information

// namespace: pgos
struct PlayerBlobDataInfo
fieldtypedescription
urlpgos::pstringA 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.
versionuint32_tThe blob version number, an auto-incrementing number.
last_modified_tsint64_tThe Unix timestamp(in seconds) when the blob was updated.
blob_sizeint64_tSize of the blob (in bytes).
blob_md5pgos::pstringMD5 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.

// namespace: pgos
struct UpdatePBDProgressInfo
fieldtypedescription
player_idpgos::pstringThe player to update blob data.
blob_keypgos::pstringThe blob key to update.
new_blob_sizeint64_tThe new total size of the blob after the update, in bytes.
transfered_sizeint64_tThe 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.

// namespace: pgos
struct HttpDownloadProgressInfo
fieldtypedescription
transfered_sizeint64_tThe size of the data that has been transferred, in bytes.

PgosBuffer

A regular memory buffer definition.

// namespace: pgos
struct PgosBuffer
fieldtypedescription
buffer_ptrconst char*The buffer address pointer, the buffer can be read, but cannot be modified and freed.
buffer_lenint64_tThe length of the buffer, in bytes.

BattleProperty

K-V pair property of a battle session

// namespace: pgos
struct BattleProperty
fieldtypedescription
keypgos::pstringkey of the K-V pair property of a battle session
valuepgos::pstringvalue of the K-V pair property of a battle session

BaseBackendEventParams

A game-defined custom value pass to PGOS backend event.

// namespace: pgos
struct BaseBackendEventParams
fieldtypedescription
event_custom_datapgos::pstring[Optional] A game-defined custom value pass to PGOS backend event. If you need to get a custom value in the event, pass it in, otherwise, ignore this field. The API parameter structures inherited from this structure all support passing a custom data to the related events. The size is limited to 4096 bytes 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. Detail for PGOS backend event: https://pgos.intlgame.com/pgosdoc/manual/service_manual/extensions/event.html. Detail for how to reference the 'event_custom_data':https://pgos.intlgame.com/pgosdoc/manual/service_manual/extensions/virtual_server.html#531-the-protocol-of-pgos_event.

StatItem

Statistics item instance value which includes: value, extra value, and tags.

// namespace: pgos
struct StatItem
fieldtypedescription
stat_namepgos::pstringStat name.
keypgos::pstringStat item key.
valuedoubleThe 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_valuedoubleStat item secondary value. It will overwrite the old one when updated.
tagspgos::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_datapgos::pstringUsed 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_typeAggregateTypeThe method to aggregate.

BatchGetStatPersistentInfoResult

Response for batch get stat persistent info result.

// namespace: pgos
struct BatchGetStatPersistentInfoResult
fieldtypedescription
itemspgos::pvector<StatItem>Stat items obtained.

GetStatCycleInfoResult

Statistics item instance values in a cycle round.

// namespace: pgos
struct GetStatCycleInfoResult
fieldtypedescription
itemStatItemStat item obtained.
cycle_namepgos::pstringThe name of the cycle.
cycle_round_sequint32_tThe sequence number of the cycle round, start from 1.
round_start_timeint64_tThe cycle round start time, Unix time in second.
round_end_timeint64_tThe cycle round end time, Unix time in second.

BatchGetStatCycleInfoResult

Response for batch obtaining stat cycle info result.

// namespace: pgos
struct BatchGetStatCycleInfoResult
fieldtypedescription
itemspgos::pvector<StatItem>Stat items obtained.
cycle_namepgos::pstringThe name of the cycle.
cycle_round_sequint32_tThe sequence number of the cycle round, start from 1.
round_start_timeint64_tThe cycle round start time, Unix time in second.
round_end_timeint64_tThe cycle round end time, Unix time in second.

GetStatPersistentInfoParams

// namespace: pgos
struct GetStatPersistentInfoParams
fieldtypedescription
stat_namepgos::pstringStat name.
keypgos::pstringStat item key.

BatchGetStatPersistentInfoParams

// namespace: pgos
struct BatchGetStatPersistentInfoParams
fieldtypedescription
stat_namespgos::pvector<pgos::pstring>Stat names.
keyspgos::pvector<pgos::pstring>Stat item keys.

GetStatCycleInfoParams

// namespace: pgos
struct GetStatCycleInfoParams
fieldtypedescription
stat_namepgos::pstringThe stat name.
keypgos::pstringThe stat item key.
cycle_namepgos::pstringThe stat cycle name.

BatchGetStatCycleInfoParams

// namespace: pgos
struct BatchGetStatCycleInfoParams
fieldtypedescription
stat_namespgos::pvector<pgos::pstring>The stat names.
keyspgos::pvector<pgos::pstring>The stat item keys.
cycle_namepgos::pstringThe stat cycle name.

BatchGetStatCycleRoundInfoParams

// namespace: pgos
struct BatchGetStatCycleRoundInfoParams
fieldtypedescription
cycle_namespgos::pvector<pgos::pstring>The stat cycle names.

StatCycleRoundInfo

Current round info of cycle.

// namespace: pgos
struct StatCycleRoundInfo
fieldtypedescription
cycle_namepgos::pstringThe stat cycle name.
cycle_round_sequint32_tThe sequence number of the cycle round, start from 1.
round_start_timeint64_tThe cycle round start time, Unix time in seconds.
round_end_timeint64_tThe cycle round end time, Unix time in seconds.

BatchGetStatCycleRoundInfoResult

Response for batch obtaining current round info result.

// namespace: pgos
struct BatchGetStatCycleRoundInfoResult
fieldtypedescription
round_info_mappgos::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.

// namespace: pgos
struct TitleFileInfo
fieldtypedescription
file_namepgos::pstringThe name of the file.
urlpgos::pstringA 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_timeint64_tThe updated time of the file, UNIX time in seconds.
file_sizeint64_tThe size of the file, in bytes.
file_md5pgos::pstringThe MD5 of the file.

GetTitleFileInfoParams

The parameter struct to get title file info.

// namespace: pgos
struct GetTitleFileInfoParams
fieldtypedescription
pathspgos::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_timeuint32_tThe 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.

// namespace: pgos
struct GetTitleFileInfoResult
fieldtypedescription
datapgos::pmap<pgos::pstring, TitleFileInfo>Obtained title file informations, key: file path, value: file info.
failspgos::pmap<pgos::pstring, pgos::pstring>The reason why the query operation failed for these paths, key: file path, value: failed reason.

PlayerDesc

Player description

// namespace: pgos
struct PlayerDesc
fieldtypedescription
player_infoPlayerInfoBase info of a player.
teampgos::pstringThe name of the player's team.
match_attributespgos::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.

// namespace: pgos
struct BattleTeam
fieldtypedescription
namepgos::pstringTeam name
playerspgos::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

// namespace: pgos
struct BattleSourceData
fieldtypedescription
source_typeBattleSourceTypeWhat service that the battle session generated from
configuration_namepgos::pstringconfiguration_name Matchmaking configuration name or lobby configuration name
ruleset_namepgos::pstringRuleset name hit. Filled when battle session source type is BattleSourceType::Matchmaking
teamspgos::pvector<BattleTeam>Teams of the battle session

TagDataFilter

Filter for tag data.

// namespace: pgos
struct TagDataFilter
fieldtypedescription
keypgos::pstringTag name.
valuepgos::pstringTag value.
opFilterComparisonOperatorOperation type.

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*)>;