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 result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetPrivacySettings(
PgosDataCallback<PrivacySettingInfo> result_callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| result_callback | PgosDataCallback<PrivacySettingInfo> | The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD. |
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 result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetPrivacySettings(
const PrivacySettingInfo& settings,
PgosCallback result_callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| settings | const PrivacySettingInfo& | New settings to be set. |
| result_callback | PgosCallback | The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD. |
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 valid_item_type Specify a privacy item for modification.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetPrivacyItem(
const PrivacySettingInfo& settings,
PrivacyItemType valid_item_type,
PgosCallback result_callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| settings | const PrivacySettingInfo& | New settings to be set. Only the item corresponding to 'valid_item_type' will be modified. |
| valid_item_type | PrivacyItemType | Specify a privacy item for modification. |
| result_callback | PgosCallback | The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD. |
Return: void
GetLocalCacheSize
Get total bytes of local cache files
/**
* Get total bytes of local cache files
*
* @return Bytes of local cache file
*/
int64_t GetLocalCacheSize();
Parameters:
(No parameters)
Return: int64_t
Bytes of local cache file
ClearLocalCache
Clear local cache files
/**
* Clear local cache files
*
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void ClearLocalCache(
PgosCallback result_callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| result_callback | PgosCallback | The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD. |
Return: void