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
| API | Description |
|---|---|
| GetPrivacySettings | Query privacy settings of the currently logged in player. |
| SetPrivacySettings | Set privacy settings of the currently logged in player (all fields must be set together). |
| SetPrivacyItem | Set privacy settings of the currently logged in player (Set one of the privacy options). |
| GetLocalCacheSize | Get total bytes of local cache files |
| ClearLocalCache | Clear 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:
| Param | Type | Description |
|---|---|---|
| ResultCallback | TFunction<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:
| Param | Type | Description |
|---|---|---|
| Settings | const FPgosClientPrivacySettingInfo& | New settings to be set. |
| ResultCallback | TFunction<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:
| Param | Type | Description |
|---|---|---|
| Settings | const FPgosClientPrivacySettingInfo& | New settings to be set. Only the item corresponding to 'valid_item_type' will be modified. |
| ValidItemype | EPgosClientPrivacyItemType | Specify a privacy item for modification. |
| ResultCallback | TFunction<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:
| Param | Type | Description |
|---|---|---|
| ResultCallback | TFunction<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