gpg::StatsManager

#include <stats_manager.h>

Gets and sets various stats-related data.

Summary

Public types

FetchForPlayerCallback typedef
std::function< void(const FetchForPlayerResponse &)>
Defines a callback type that receives a FetchForPlayerResponse.

Public functions

FetchForPlayer(FetchForPlayerCallback callback)
void
Asynchronously loads all stats data for the currently signed-in player.
FetchForPlayer(DataSource data_source, FetchForPlayerCallback callback)
void
Asynchronously loads all stats data for the currently signed-in player.
FetchForPlayerBlocking()
Synchronously loads all stats data for the currently signed-in player, directly returning the FetchForPlayerResponse.
FetchForPlayerBlocking(DataSource data_source)
Synchronously loads all stats data for the currently signed-in player, directly returning the FetchForPlayerResponse.
FetchForPlayerBlocking(Timeout timeout)
Synchronously loads all stats data for the currently signed-in player, directly returning the FetchForPlayerResponse.
FetchForPlayerBlocking(DataSource data_source, Timeout timeout)
Synchronously loads all stats data for the currently signed-in player, directly returning the FetchForPlayerResponse.

Structs

gpg::StatsManager::FetchForPlayerResponse

Holds all PlayerStats data, along with a response status.

Public types

FetchForPlayerCallback

std::function< void(const FetchForPlayerResponse &)> FetchForPlayerCallback

Defines a callback type that receives a FetchForPlayerResponse.

This callback type is provided to the FetchForPlayer(*) functions below.

Public functions

FetchForPlayer

void FetchForPlayer(
  FetchForPlayerCallback callback
)

Asynchronously loads all stats data for the currently signed-in player.

Calls the provided FetchForPlayerCallback on operation completion. Not specifying data_source makes this function call equivalent to calling FetchForPlayer(DataSource data_source, FetchForPlayerCallback callback), with data_source specified as CACHE_OR_NETWORK.

FetchForPlayer

void FetchForPlayer(
  DataSource data_source,
  FetchForPlayerCallback callback
)

Asynchronously loads all stats data for the currently signed-in player.

Calls the provided FetchForPlayerCallback on operation completion. Specify data_source as CACHE_OR_NETWORK or NETWORK_ONLY.

FetchForPlayerBlocking

FetchForPlayerResponse FetchForPlayerBlocking()

Synchronously loads all stats data for the currently signed-in player, directly returning the FetchForPlayerResponse.

Not specifying data_source or timeout makes this function call equivalent to calling FetchForPlayerResponse FetchForPlayerBlocking(DataSource data_source, Timeout timeout), with data_source specified as CACHE_OR_NETWORK, and timeout specified as 10 years.

FetchForPlayerBlocking

FetchForPlayerResponse FetchForPlayerBlocking(
  DataSource data_source
)

Synchronously loads all stats data for the currently signed-in player, directly returning the FetchForPlayerResponse.

Specify data_source as CACHE_OR_NETWORK or NETWORK_ONLY. Not specifying timeout makes this function call equivalent to calling FetchForPlayerResponse FetchForPlayerBlocking(DataSource data_source, Timeout timeout), with your specified data_source value, and timeout specified as 10 years.

FetchForPlayerBlocking

FetchForPlayerResponse FetchForPlayerBlocking(
  Timeout timeout
)

Synchronously loads all stats data for the currently signed-in player, directly returning the FetchForPlayerResponse.

Specify timeout as an arbitrary number of milliseconds. Not specifying data_source makes this function call equivalent to calling FetchForPlayerResponse FetchForPlayerBlocking(DataSource data_source, Timeout timeout), with data_source specified as CACHE_OR_NETWORK, and timeout containing your specified value.

FetchForPlayerBlocking

FetchForPlayerResponse FetchForPlayerBlocking(
  DataSource data_source,
  Timeout timeout
)

Synchronously loads all stats data for the currently signed-in player, directly returning the FetchForPlayerResponse.

Specify data_source as CACHE_OR_NETWORK or NETWORK_ONLY. Specify timeout as an arbitrary number of milliseconds.