gpg:: StatsManager
#include <stats_manager.h>
获取和设置各种与统计数据相关的数据。
摘要
公共类型 |
|
---|---|
FetchForPlayerCallback
|
typedefstd::function< void(const FetchForPlayerResponse &)>
定义一个接收 FetchForPlayerResponse 的回调类型。 |
公共函数 |
|
---|---|
FetchForPlayer(FetchForPlayerCallback callback)
|
void
异步加载当前登录玩家的所有统计数据。
|
FetchForPlayer(DataSource data_source, FetchForPlayerCallback callback)
|
void
异步加载当前登录玩家的所有统计数据。
|
FetchForPlayerBlocking()
|
同步加载当前登录玩家的所有统计数据,直接返回 FetchForPlayerResponse。
|
FetchForPlayerBlocking(DataSource data_source)
|
同步加载当前登录玩家的所有统计数据,直接返回 FetchForPlayerResponse。
|
FetchForPlayerBlocking(Timeout timeout)
|
同步加载当前登录玩家的所有统计数据,直接返回 FetchForPlayerResponse。
|
FetchForPlayerBlocking(DataSource data_source, Timeout timeout)
|
同步加载当前登录玩家的所有统计数据,直接返回 FetchForPlayerResponse。
|
结构体 |
|
---|---|
gpg:: |
保存所有 PlayerStats 数据以及响应状态。 |
公共类型
FetchForPlayerCallback
std::function< void(const FetchForPlayerResponse &)> FetchForPlayerCallback
定义一个接收 FetchForPlayerResponse 的回调类型。
此回调类型提供给下面的 FetchForPlayer(*)
函数。
公共函数
FetchForPlayer
void FetchForPlayer( FetchForPlayerCallback callback )
异步加载当前登录玩家的所有统计数据。
在操作完成时调用提供的 FetchForPlayerCallback。如果未指定 data_source,此函数调用等同于调用 FetchForPlayer(DataSource data_source, FetchForPlayerCallback callback)
,且 data_source 指定为 CACHE_OR_NETWORK。
FetchForPlayer
void FetchForPlayer( DataSource data_source, FetchForPlayerCallback callback )
异步加载当前登录玩家的所有统计数据。
在操作完成时调用提供的 FetchForPlayerCallback。将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。
FetchForPlayerBlocking
FetchForPlayerResponse FetchForPlayerBlocking()
同步加载当前登录玩家的所有统计数据,直接返回 FetchForPlayerResponse。
如果未指定 data_source 或超时,则此函数调用等同于调用 FetchForPlayerResponse FetchForPlayerBLOCK(DataSource data_source, Timeout time),并将 data_source 指定为 CACHE_OR_NETWORK,并将超时指定为 10 年。
FetchForPlayerBlocking
FetchForPlayerResponse FetchForPlayerBlocking( DataSource data_source )
同步加载当前登录玩家的所有统计数据,直接返回 FetchForPlayerResponse。
将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。如果未指定超时,则系统会使用您指定的 data_source 值并将超时指定为 10 年,调用此函数等同于调用 FetchForPlayerResponse FetchForPlayerBlocking(DataSource data_source, Timeout time)。
FetchForPlayerBlocking
FetchForPlayerResponse FetchForPlayerBlocking( Timeout timeout )
同步加载当前登录玩家的所有统计数据,直接返回 FetchForPlayerResponse。
将超时指定为任意毫秒数。如果未指定 data_source,则此函数调用等同于调用 FetchForPlayerResponse FetchForPlayerBLOCK(DataSource data_source, Timeout time),并将 data_source 指定为 CACHE_OR_NETWORK,并将超时值设为包含您指定的值。
FetchForPlayerBlocking
FetchForPlayerResponse FetchForPlayerBlocking( DataSource data_source, Timeout timeout )
同步加载当前登录玩家的所有统计数据,直接返回 FetchForPlayerResponse。
将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。将超时指定为任意毫秒数。