跳到主要内容

Client Settings API Reference

The Setttings module provides the game with the ability to manage player-related settings. Currently, it consists of two sections: Privacy Settings and Local Cache Management.

API List

APIDescription
GetPrivacySettingsQuery privacy settings of the currently logged in player.
SetPrivacySettingsSet privacy settings of the currently logged in player (all fields must be set together).
SetPrivacyItemSet privacy settings of the currently logged in player (Set one of the privacy options).
GetLocalCacheSizeGet total bytes of local cache files
ClearLocalCacheClear local cache files

API Details

GetPrivacySettings

Query privacy settings of the currently logged in player.

/**
* Query privacy settings of the currently logged in player.
*
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetPrivacySettings(
TFunction<void(const FPgosResult& Ret, const FPgosClientPrivacySettingInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientPrivacySettingInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SetPrivacySettings

Set privacy settings of the currently logged in player (all fields must be set together).

/**
* Set privacy settings of the currently logged in player (all fields must be set together).
*
* @param Settings New settings to be set.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetPrivacySettings(
const FPgosClientPrivacySettingInfo& Settings,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
Settingsconst FPgosClientPrivacySettingInfo&New settings to be set.
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SetPrivacyItem

Set privacy settings of the currently logged in player (Set one of the privacy options).

/**
* Set privacy settings of the currently logged in player (Set one of the privacy options).
*
* @param Settings New settings to be set. Only the item corresponding to 'valid_item_type' will be modified.
* @param ValidItemype Specify a privacy item for modification.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetPrivacyItem(
const FPgosClientPrivacySettingInfo& Settings,
EPgosClientPrivacyItemType ValidItemype,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
Settingsconst FPgosClientPrivacySettingInfo&New settings to be set. Only the item corresponding to 'valid_item_type' will be modified.
ValidItemypeEPgosClientPrivacyItemTypeSpecify a privacy item for modification.
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetLocalCacheSize

Get total bytes of local cache files

/**
* Get total bytes of local cache files
*
* @return Bytes of local cache file
*/
int64 GetLocalCacheSize() const;

Parameters:

(No parameters)

Return: int64

Bytes of local cache file

ClearLocalCache

Clear local cache files

/**
* Clear local cache files
*
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void ClearLocalCache(
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void