gpg::LeaderboardManager

#include <leaderboard_manager.h>

Gets and sets various leaderboard-related data.

Summary

Public types

FetchAllCallback typedef
std::function< void(const FetchAllResponse &)>
Defines a FetchAllResponse-type callback.
FetchAllScoreSummariesCallback typedef
std::function< void(const FetchAllScoreSummariesResponse &)>
Defines a FetchAllScoreSummariesResponse-type callback.
FetchCallback typedef
std::function< void(const FetchResponse &)>
Defines a callback type that receives a FetchResponse.
FetchScorePageCallback typedef
std::function< void(const FetchScorePageResponse &)>
Defines a ScorePageResponse-type callback.
FetchScoreSummaryCallback typedef
std::function< void(const FetchScoreSummaryResponse &)>
Defines a FetchScoreSummaryResponse-type callback.
ShowAllUICallback typedef
std::function< void(const UIStatus &)>
Defines a callback type that receives a UIStatus.
ShowUICallback typedef
std::function< void(const UIStatus &)>
Defines a callback type that receives a UIStatus.

Public functions

Fetch(const std::string & leaderboard_id, FetchCallback callback)
void
Asynchronously loads leaderboard data for the currently signed-in player.
Fetch(DataSource data_source, const std::string & leaderboard_id, FetchCallback callback)
void
Asynchronously loads leaderboard data for the currently signed-in player.
FetchAll(FetchAllCallback callback)
void
Asynchronously loads data for all leaderboards for the currently signed-in player.
FetchAll(DataSource data_source, FetchAllCallback callback)
void
Asynchronously loads data for all leaderboards for the currently signed-in player.
FetchAllBlocking()
Synchronously loads data for all leaderboards for the currently signed-in player, directly returning the FetchAllResponse.
FetchAllBlocking(DataSource data_source)
Synchronously loads data for all leaderboards for the currently signed-in player, directly returning the FetchAllResponse.
FetchAllBlocking(Timeout timeout)
Synchronously loads data for all leaderboards for the currently signed-in player, directly returning the FetchAllResponse.
FetchAllBlocking(DataSource data_source, Timeout timeout)
Synchronously loads data for all leaderboards for the currently signed-in player, directly returning the FetchAllResponse.
FetchAllScoreSummaries(const std::string & leaderboard_id, FetchAllScoreSummariesCallback callback)
void
Asynchronously fetches all score summaries for a specific leaderboard.
FetchAllScoreSummaries(DataSource data_source, const std::string & leaderboard_id, FetchAllScoreSummariesCallback callback)
void
Asynchronously fetches all score summaries for a specific leaderboard.
FetchAllScoreSummariesBlocking(const std::string & leaderboard_id)
Synchronously fetches all score summaries for a specific leaderboard, directly returning the FetchAllScoreSummariesResponse.
FetchAllScoreSummariesBlocking(DataSource data_source, const std::string & leaderboard_id)
Synchronously fetches all score summaries for a specific leaderboard, directly returning the FetchAllScoreSummariesResponse.
FetchAllScoreSummariesBlocking(Timeout timeout, const std::string & leaderboard_id)
Synchronously fetches all score summaries for a specific leaderboard, directly returning the FetchAllScoreSummariesResponse.
FetchAllScoreSummariesBlocking(DataSource data_source, Timeout timeout, const std::string & leaderboard_id)
Synchronously fetches all score summaries for a specific leaderboard, directly returning the FetchAllScoreSummariesResponse.
FetchBlocking(const std::string & leaderboard_id)
Synchronously loads leaderboard data for the currently signed-in player, directly returning the FetchResponse.
FetchBlocking(DataSource data_source, const std::string & leaderboard_id)
Synchronously loads leaderboard data for the currently signed-in player, directly returning the FetchResponse.
FetchBlocking(Timeout timeout, const std::string & leaderboard_id)
Synchronously loads leaderboard data for the currently signed-in player, directly returning the FetchResponse.
FetchBlocking(DataSource data_source, Timeout timeout, const std::string & leaderboard_id)
Synchronously loads leaderboard data for the currently signed-in player.
FetchScorePage(const ScorePage::ScorePageToken & token, FetchScorePageCallback callback)
void
Asynchronously returns data for a score page identified by score-page token.
FetchScorePage(DataSource data_source, const ScorePage::ScorePageToken & token, FetchScorePageCallback callback)
void
Asynchronously returns data for a score page identified by score-page token.
FetchScorePage(const ScorePage::ScorePageToken & token, uint32_t max_results, FetchScorePageCallback callback)
void
Asynchronously returns data for a score page identified by score-page token.
FetchScorePage(DataSource data_source, const ScorePage::ScorePageToken & token, uint32_t max_results, FetchScorePageCallback callback)
void
Asynchronously returns data for a score page identified by score-page token.
FetchScorePageBlocking(const ScorePage::ScorePageToken & token)
Synchronously returns data for a score page identified by score-page token, directly returning the FetchScorePageResponse.
FetchScorePageBlocking(DataSource data_source, const ScorePage::ScorePageToken & token)
Synchronously returns data for a score page identified by score-page token, directly returning the FetchScorePageResponse.
FetchScorePageBlocking(Timeout timeout, const ScorePage::ScorePageToken & token)
Synchronously returns data for a score page identified by score-page token, directly returning the FetchScorePageResponse.
FetchScorePageBlocking(const ScorePage::ScorePageToken & token, uint32_t max_results)
Synchronously returns data for a score page identified by score-page token, directly returning the FetchScorePageResponse.
FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken & token)
Synchronously returns data for a score page identified by score-page token, directly returning the FetchScorePageResponse.
FetchScorePageBlocking(DataSource data_source, const ScorePage::ScorePageToken & token, uint32_t max_results)
Synchronously returns data for a score page identified by score-page token, directly returning the FetchScorePageResponse.
FetchScorePageBlocking(Timeout timeout, const ScorePage::ScorePageToken & token, uint32_t max_results)
Synchronously returns data for a score page identified by score-page token, directly returning the FetchScorePageResponse.
FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken & token, uint32_t max_results)
Synchronously returns data for a score page identified by score-page token, directly returning the FetchScorePageResponse.
FetchScoreSummary(const std::string & leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection collection, FetchScoreSummaryCallback callback)
void
Asynchronously fetches all data for a specific leaderboard score summary, which comprises a given leaderboard's collection and time span.
FetchScoreSummary(DataSource data_source, const std::string & leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection collection, FetchScoreSummaryCallback callback)
void
Asynchronously fetches all data for a specific leaderboard score summary, which comprises a given leaderboard's collection and time span.
FetchScoreSummaryBlocking(const std::string & leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection collection)
Synchronously fetches all data for a specific leaderboard score summary, directly returning the FetchScoreSummaryResponse.
FetchScoreSummaryBlocking(DataSource data_source, const std::string & leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection collection)
Synchronously fetches all data for a specific leaderboard score summary, directly returning the FetchScoreSummaryResponse.
FetchScoreSummaryBlocking(Timeout timeout, const std::string & leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection collection)
Synchronously fetches all data for a specific leaderboard score summary, directly returning the FetchScoreSummaryResponse.
FetchScoreSummaryBlocking(DataSource data_source, Timeout timeout, const std::string & leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection collection)
Synchronously fetches all data for a specific leaderboard score summary, directly returning the FetchScoreSummaryResponse.
ScorePageToken(const std::string & leaderboard_id, LeaderboardStart start, LeaderboardTimeSpan time_span, LeaderboardCollection collection) const
Gets a score page token for a specific leaderboard, starting by score or player, and covering a specific time span and collection.
ShowAllUI(ShowAllUICallback callback)
void
Presents to the user a UI that displays information about all leaderboards.
ShowAllUI()
void
Deprecated. Prefer ShowAllUI(ShowAllUICallback callback). Presents a UI to the user that displays information about all leaderboards. The UI is shown asynchronously on all platforms.
ShowAllUIBlocking()
Presents to the user a UI that displays information about all leaderboards.
ShowAllUIBlocking(Timeout timeout)
Presents to the user a UI that displays information about all leaderboards.
ShowUI(const std::string & leaderboard_id, ShowUICallback callback)
void
Presents to the user a UI that displays information about a specific leaderboard.
ShowUI(const std::string & leaderboard_id, LeaderboardTimeSpan time_span, ShowUICallback callback)
void
Presents to the user a UI that displays information about a specific leaderboard.
ShowUI(const std::string & leaderboard_id)
void
Deprecated. Prefer ShowUI(ShowUICallback callback). Presents a UI to the user that displays information about a specific leaderboard. The UI is shown asynchronously on all platforms.
ShowUIBlocking(const std::string & leaderboard_id)
Presents to the user a UI that displays information about a specific leaderboard.
ShowUIBlocking(const std::string & leaderboard_id, LeaderboardTimeSpan time_span)
Presents to the user a UI that displays information about a specific leaderboard.
ShowUIBlocking(Timeout timeout, const std::string & leaderboard_id)
Presents to the user a UI that displays information about a specific leaderboard.
ShowUIBlocking(Timeout timeout, const std::string & leaderboard_id, LeaderboardTimeSpan time_span)
Presents to the user a UI that displays information about a specific leaderboard.
SubmitScore(const std::string & leaderboard_id, uint64_t score)
void
Submit a score to the leaderboard for the currently signed-in player.
SubmitScore(const std::string & leaderboard_id, uint64_t score, const std::string & metadata)
void
Submit, for the currently signed-in player, a score to the leaderboard associated with a specific id and metadata (such as something the player did to earn the score).

Structs

gpg::LeaderboardManager::FetchAllResponse

Contains data and response statuses for all leaderboards.

gpg::LeaderboardManager::FetchAllScoreSummariesResponse

Contains all data and response statuses for all leaderboard score summaries.

gpg::LeaderboardManager::FetchResponse

Holds data for a leaderboard, along with a response status.

gpg::LeaderboardManager::FetchScorePageResponse

Returns response status and data from the accessed score page.

gpg::LeaderboardManager::FetchScoreSummaryResponse

Data and response status for a specified leaderboard score summary.

Public types

FetchAllCallback

std::function< void(const FetchAllResponse &)> FetchAllCallback

Defines a FetchAllResponse-type callback.

FetchAllScoreSummariesCallback

std::function< void(const FetchAllScoreSummariesResponse &)> FetchAllScoreSummariesCallback

Defines a FetchAllScoreSummariesResponse-type callback.

FetchCallback

std::function< void(const FetchResponse &)> FetchCallback

Defines a callback type that receives a FetchResponse.

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

FetchScorePageCallback

std::function< void(const FetchScorePageResponse &)> FetchScorePageCallback

Defines a ScorePageResponse-type callback.

FetchScoreSummaryCallback

std::function< void(const FetchScoreSummaryResponse &)> FetchScoreSummaryCallback

Defines a FetchScoreSummaryResponse-type callback.

ShowAllUICallback

std::function< void(const UIStatus &)> ShowAllUICallback

Defines a callback type that receives a UIStatus.

This callback type is provided to the ShowAllUI* function below.

ShowUICallback

std::function< void(const UIStatus &)> ShowUICallback

Defines a callback type that receives a UIStatus.

This callback type is provided to the ShowUI* function below.

Public functions

Fetch

void Fetch(
  const std::string & leaderboard_id,
  FetchCallback callback
)

Asynchronously loads leaderboard data for the currently signed-in player.

Calls the provided FetchCallback on operation completion. Not specifying data_source makes this function call equivalent to calling Fetch(DataSource data_source, const std::string& leaderboard_id, FetchCallback callback), with DataSource specified as CACHE_OR_NETWORK.

Fetch

void Fetch(
  DataSource data_source,
  const std::string & leaderboard_id,
  FetchCallback callback
)

Asynchronously loads leaderboard data for the currently signed-in player.

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

FetchAll

void FetchAll(
  FetchAllCallback callback
)

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

Not specifying data_source makes this function call equivalent to calling FetchAll(DataSource data_source, FetchAllCallback callback), with data_source specified as CACHE_OR_NETWORK.

FetchAll

void FetchAll(
  DataSource data_source,
  FetchAllCallback callback
)

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

Specify data_source as CACHE_OR_NETWORK or NETWORK_ONLY.

FetchAllBlocking

FetchAllResponse FetchAllBlocking()

Synchronously loads data for all leaderboards for the currently signed-in player, directly returning the FetchAllResponse.

Specifying neither data_source nor timeout makes this function call equivalent to calling FetchAllResponse FetchAllBlocking (DataSource data_source, Timeout timeout), with data_source specified as CACHE_OR_NETWORK, and timeout specified as 10 years.

FetchAllBlocking

FetchAllResponse FetchAllBlocking(
  DataSource data_source
)

Synchronously loads data for all leaderboards for the currently signed-in player, directly returning the FetchAllResponse.

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

FetchAllBlocking

FetchAllResponse FetchAllBlocking(
  Timeout timeout
)

Synchronously loads data for all leaderboards for the currently signed-in player, directly returning the FetchAllResponse.

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

FetchAllBlocking

FetchAllResponse FetchAllBlocking(
  DataSource data_source,
  Timeout timeout
)

Synchronously loads data for all leaderboards for the currently signed-in player, directly returning the FetchAllResponse.

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

FetchAllScoreSummaries

void FetchAllScoreSummaries(
  const std::string & leaderboard_id,
  FetchAllScoreSummariesCallback callback
)

Asynchronously fetches all score summaries for a specific leaderboard.

Not specifying data_source makes this function call equivalent to FetchAllScoreSummaries(DataSource data_source, const std::string& leaderboard_id, FetchAllScoreSummariesCallback callback), with data_source specified as CACHE_OR_NETWORK.

FetchAllScoreSummaries

void FetchAllScoreSummaries(
  DataSource data_source,
  const std::string & leaderboard_id,
  FetchAllScoreSummariesCallback callback
)

Asynchronously fetches all score summaries for a specific leaderboard.

Specify data_source as CACHE_OR_NETWORK or NETWORK_ONLY.

FetchAllScoreSummariesBlocking

FetchAllScoreSummariesResponse FetchAllScoreSummariesBlocking(
  const std::string & leaderboard_id
)

Synchronously fetches all score summaries for a specific leaderboard, directly returning the FetchAllScoreSummariesResponse.

Not specifying data_source and timeout makes this function call equivalent to FetchAllScoreSummariesResponse FetchAllScoreSummariesBlocking( DataSource data_source, const std::string& leaderboard_id), with data_source specified as CACHE_OR_NETWORK, and timeout specified as 10 years.

FetchAllScoreSummariesBlocking

FetchAllScoreSummariesResponse FetchAllScoreSummariesBlocking(
  DataSource data_source,
  const std::string & leaderboard_id
)

Synchronously fetches all score summaries for a specific leaderboard, directly returning the FetchAllScoreSummariesResponse.

Specify data_source as CACHE_OR_NETWORK or NETWORK_ONLY. Not specifying timeout makes this function call equivalent to FetchAllScoreSummariesResponse FetchAllScoreSummariesBlocking(DataSource data_source, const std::string& leaderboard_id), with your specified data_source value, and timeout specified as 10 years.

FetchAllScoreSummariesBlocking

FetchAllScoreSummariesResponse FetchAllScoreSummariesBlocking(
  Timeout timeout,
  const std::string & leaderboard_id
)

Synchronously fetches all score summaries for a specific leaderboard, directly returning the FetchAllScoreSummariesResponse.

Specify timeout in milliseconds. Not specifying data_source makes this function call equivalent to FetchAllScoreSummariesResponse FetchAllScoreSummariesBlocking(DataSource data_source, std::string const &leaderboard_id), with data_source specified as CACHE_OR_NETWORK, and timeout containing the value you specified for it.

FetchAllScoreSummariesBlocking

FetchAllScoreSummariesResponse FetchAllScoreSummariesBlocking(
  DataSource data_source,
  Timeout timeout,
  const std::string & leaderboard_id
)

Synchronously fetches all score summaries for a specific leaderboard, directly returning the FetchAllScoreSummariesResponse.

Specify data_source as CACHE_OR_NETWORK or NETWORK_ONLY. Specify timeout in milliseconds.

FetchBlocking

FetchResponse FetchBlocking(
  const std::string & leaderboard_id
)

Synchronously loads leaderboard data for the currently signed-in player, directly returning the FetchResponse.

Specifying neither data_source nor timeout makes this function call equivalent to calling FetchResponse FetchBlocking(DataSource data_source, Timeout timeout), with data_source specified as CACHE_OR_NETWORK, and timeout specified as 10 years.

FetchBlocking

FetchResponse FetchBlocking(
  DataSource data_source,
  const std::string & leaderboard_id
)

Synchronously loads leaderboard data for the currently signed-in player, directly returning the FetchResponse.

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

FetchBlocking

FetchResponse FetchBlocking(
  Timeout timeout,
  const std::string & leaderboard_id
)

Synchronously loads leaderboard data for the currently signed-in player, directly returning the FetchResponse.

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

FetchBlocking

FetchResponse FetchBlocking(
  DataSource data_source,
  Timeout timeout,
  const std::string & leaderboard_id
)

Synchronously loads leaderboard data for the currently signed-in player.

directly returning the FetchResponse. Specify data_source as CACHE_OR_NETWORK or NETWORK_ONLY. Specify timeout as an arbitrary number of milliseconds.

FetchScorePage

void FetchScorePage(
  const ScorePage::ScorePageToken & token,
  FetchScorePageCallback callback
)

Asynchronously returns data for a score page identified by score-page token.

Specifying neither data_source nor max_results makes this function call equivalent to FetchScorePage(DataSource data_source, const ScorePage::ScorePageToken& token, uint32_t max_results, FetchScorePageCallback callback), with data_source specified as CACHE_OR_NETWORK, and max_results specified as 20.

FetchScorePage

void FetchScorePage(
  DataSource data_source,
  const ScorePage::ScorePageToken & token,
  FetchScorePageCallback callback
)

Asynchronously returns data for a score page identified by score-page token.

Specify data_source as CACHE_OR_NETWORK or NETWORK_ONLY. Not specifying max_results makes this function call equivalent to FetchScorePage(DataSource data_source, const ScorePage::ScorePageToken& token, uint32_t max_results, FetchScorePageCallback callback), with your specified value for data_source, and max_results specified as 20.

FetchScorePage

void FetchScorePage(
  const ScorePage::ScorePageToken & token,
  uint32_t max_results,
  FetchScorePageCallback callback
)

Asynchronously returns data for a score page identified by score-page token.

max_results specifies the maximum number of scores to include on the resulting score page, which may be no larger than 25. Not specifying data_source makes this function call equivalent to FetchScorePage(DataSource data_source, const ScorePage::ScorePageToken& token, uint32_t max_results, FetchScorePageCallback callback), with data_source specified as CACHE_OR_NETWORK, and max_results containing your specified value.

FetchScorePage

void FetchScorePage(
  DataSource data_source,
  const ScorePage::ScorePageToken & token,
  uint32_t max_results,
  FetchScorePageCallback callback
)

Asynchronously returns data for a score page identified by score-page token.

Specify data_source as CACHE_OR_NETWORK or NETWORK_ONLY. max_results specifies the maximum number of scores to include on the resulting score page, which may be be no larger than 25.

FetchScorePageBlocking

FetchScorePageResponse FetchScorePageBlocking(
  const ScorePage::ScorePageToken & token
)

Synchronously returns data for a score page identified by score-page token, directly returning the FetchScorePageResponse.

Specifying neither data_source, timeout, nor max_results makes this function call equivalent to calling FetchScorePageResponse FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken& token, uint32_t max_results), with data_source specified as CACHE_OR_NETWORK, timeout specified as 10 years, and max_results specified as 20.

FetchScorePageBlocking

FetchScorePageResponse FetchScorePageBlocking(
  DataSource data_source,
  const ScorePage::ScorePageToken & token
)

Synchronously returns data for a score page identified by score-page token, directly returning the FetchScorePageResponse.

Specifying neither timeout nor max_results makes this function call equivalent to calling FetchScorePageResponse FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken& token, uint32_t max_results), with your specified data_source value, timeout specified as 10 years, and max_results specified as 20.

FetchScorePageBlocking

FetchScorePageResponse FetchScorePageBlocking(
  Timeout timeout,
  const ScorePage::ScorePageToken & token
)

Synchronously returns data for a score page identified by score-page token, directly returning the FetchScorePageResponse.

Specify timeout in milliseconds. Specifying neither data_source nor max_results makes this function call equivalent to calling FetchScorePageResponse FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken& token, uint32_t max_results), with data_source specified as CACHE_OR_NETWORK, timeout containing your specified value, and max_results specified as 20.

FetchScorePageBlocking

FetchScorePageResponse FetchScorePageBlocking(
  const ScorePage::ScorePageToken & token,
  uint32_t max_results
)

Synchronously returns data for a score page identified by score-page token, directly returning the FetchScorePageResponse.

Specify a value up to 25 for max_results. Specifying neither data_source nor timeout makes this function call equivalent to calling FetchScorePageResponse FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken& token, uint32_t max_results), with data_source specified as CACHE_OR_NETWORK, timeout specified as 10 years, and max_results containing your specified value.

FetchScorePageBlocking

FetchScorePageResponse FetchScorePageBlocking(
  DataSource data_source,
  Timeout timeout,
  const ScorePage::ScorePageToken & token
)

Synchronously returns data for a score page identified by score-page token, directly returning the FetchScorePageResponse.

Specify data_source as CACHE_OR_NETWORK or NETWORK_ONLY. Specify timeout in milliseconds. Not specifying max_value makes this function call equivalent to calling FetchScorePageResponse FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken& token, uint32_t max_results), with data_source and timeout containing your specified values, and max_results specified as 20.

FetchScorePageBlocking

FetchScorePageResponse FetchScorePageBlocking(
  DataSource data_source,
  const ScorePage::ScorePageToken & token,
  uint32_t max_results
)

Synchronously returns data for a score page identified by score-page token, directly returning the FetchScorePageResponse.

Specify data_source as CACHE_OR_NETWORK or NETWORK_ONLY, and max_results as a value up to 25. Not specifying timeout makes this function call equivalent to calling FetchScorePageResponse FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken& token, uint32_t max_results), with data_source and max_results containing your specified values, and timeout specified as 10 years.

FetchScorePageBlocking

FetchScorePageResponse FetchScorePageBlocking(
  Timeout timeout,
  const ScorePage::ScorePageToken & token,
  uint32_t max_results
)

Synchronously returns data for a score page identified by score-page token, directly returning the FetchScorePageResponse.

Specify timeout in milliseconds, and max_results as a value up to 25. Not specifying data_source makes this function call equivalent to calling FetchScorePageResponse FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken& token, uint32_t max_results), with timeout and max_results containing your specified values, and data_source specified as CACHE_OR_NETWORK.

FetchScorePageBlocking

FetchScorePageResponse FetchScorePageBlocking(
  DataSource data_source,
  Timeout timeout,
  const ScorePage::ScorePageToken & token,
  uint32_t max_results
)

Synchronously returns data for a score page identified by score-page token, directly returning the FetchScorePageResponse.

Specify DataSource as CACHE_OR_NETWORK or NETWORK_ONLY. Specify Timeout as an arbitrary number of milliseconds. Specify max_results as a value up to 25.

FetchScoreSummary

void FetchScoreSummary(
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span,
  LeaderboardCollection collection,
  FetchScoreSummaryCallback callback
)

Asynchronously fetches all data for a specific leaderboard score summary, which comprises a given leaderboard's collection and time span.

Specify DAILY, WEEKLY, or ALL_TIME for time span. Specify PUBLIC or SOCIAL for collection. Not specifying data_source makes this function call equivalent to FetchScoreSummary(DataSource data_source, const std::string& leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection collection, FetchScoreSummaryCallback callback), with data_source specified as CACHE_OR_NETWORK, and collection and time_span containing your specified values.

FetchScoreSummary

void FetchScoreSummary(
  DataSource data_source,
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span,
  LeaderboardCollection collection,
  FetchScoreSummaryCallback callback
)

Asynchronously fetches all data for a specific leaderboard score summary, which comprises a given leaderboard's collection and time span.

Specify CACHE_OR_NETWORK or NETWORK_ONLY for data_source. Specify DAILY, WEEKLY, or ALL_TIME for time_span. Specify PUBLIC or SOCIAL for collection.

FetchScoreSummaryBlocking

FetchScoreSummaryResponse FetchScoreSummaryBlocking(
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span,
  LeaderboardCollection collection
)

Synchronously fetches all data for a specific leaderboard score summary, directly returning the FetchScoreSummaryResponse.

Specify DAILY, WEEKLY, or ALL_TIME for time span. Specify PUBLIC or SOCIAL for collection. Specifying neither data_source and timeout makes this function equivalent to calling FetchScoreSummaryResponse FetchScoreSummaryBlocking(DataSource data_source, Timeout timeout, const std::string& leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection collection), with data_source specified as CACHE_OR_NETWORK, timeout specified as 10 years, and your specified values for time_span and collection.

FetchScoreSummaryBlocking

FetchScoreSummaryResponse FetchScoreSummaryBlocking(
  DataSource data_source,
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span,
  LeaderboardCollection collection
)

Synchronously fetches all data for a specific leaderboard score summary, directly returning the FetchScoreSummaryResponse.

Specify data_source as CACHE_OR_NETWORK or NETWORK_ONLY. Specify DAILY, WEEKLY, or ALL_TIME for time span. Specify PUBLIC or SOCIAL for collection. Not specifying timeout makes this function equivalent to calling FetchScoreSummaryResponse FetchScoreSummaryBlocking(DataSource data_source, Timeout timeout, const std::string& leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection collection), with your specified data_source value, timeout specified as 10 years, and your specified values for time_span and collection.

FetchScoreSummaryBlocking

FetchScoreSummaryResponse FetchScoreSummaryBlocking(
  Timeout timeout,
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span,
  LeaderboardCollection collection
)

Synchronously fetches all data for a specific leaderboard score summary, directly returning the FetchScoreSummaryResponse.

Specify timeout in milliseconds. Specify DAILY, WEEKLY, or ALL_TIME for time span. Specify PUBLIC or SOCIAL for collection. Not specifying data_source makes this function equivalent to calling FetchScoreSummaryResponse FetchScoreSummaryBlocking(DataSource data_source, Timeout timeout, const std::string& leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection collection), with timeout specified as 10 years, and your specified values for data_source, time_span, and collection.

FetchScoreSummaryBlocking

FetchScoreSummaryResponse FetchScoreSummaryBlocking(
  DataSource data_source,
  Timeout timeout,
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span,
  LeaderboardCollection collection
)

Synchronously fetches all data for a specific leaderboard score summary, directly returning the FetchScoreSummaryResponse.

Specify data_source as CACHE_OR_NETWORK or NETWORK_ONLY. Specify timeout in milliseconds. Specify DAILY, WEEKLY, or ALL_TIME for time span. Specify PUBLIC or SOCIAL for collection.

ScorePageToken

ScorePage::ScorePageToken ScorePageToken(
  const std::string & leaderboard_id,
  LeaderboardStart start,
  LeaderboardTimeSpan time_span,
  LeaderboardCollection collection
) const 

Gets a score page token for a specific leaderboard, starting by score or player, and covering a specific time span and collection.

ScorePageToken is used in various Leaderboard functions that allow paging through pages of scores. Tokens created by this function will always start at the beginning of the requested range.

ShowAllUI

void ShowAllUI(
  ShowAllUICallback callback
)

Presents to the user a UI that displays information about all leaderboards.

It asynchronously calls ShowAllUICallback.

ShowAllUI

void ShowAllUI()

Deprecated. Prefer ShowAllUI(ShowAllUICallback callback). Presents a UI to the user that displays information about all leaderboards. The UI is shown asynchronously on all platforms.

ShowAllUIBlocking

UIStatus ShowAllUIBlocking()

Presents to the user a UI that displays information about all leaderboards.

It synchronously returns a UIStatus. Not specifying timeout makes this function call equivalent to calling ShowAllUIBlocking(Timeout timeout) with timeout specified as 10 years.

ShowAllUIBlocking

UIStatus ShowAllUIBlocking(
  Timeout timeout
)

Presents to the user a UI that displays information about all leaderboards.

It synchronously returns a UIStatus. Specify timeout as an arbitrary number of milliseconds.

ShowUI

void ShowUI(
  const std::string & leaderboard_id,
  ShowUICallback callback
)

Presents to the user a UI that displays information about a specific leaderboard.

It asynchronously calls ShowUICallback.

ShowUI

void ShowUI(
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span,
  ShowUICallback callback
)

Presents to the user a UI that displays information about a specific leaderboard.

It asynchronously calls ShowUICallback, and will initially select the passed-in LeaderboardTimeSpan.

ShowUI

void ShowUI(
  const std::string & leaderboard_id
)

Deprecated. Prefer ShowUI(ShowUICallback callback). Presents a UI to the user that displays information about a specific leaderboard. The UI is shown asynchronously on all platforms.

ShowUIBlocking

UIStatus ShowUIBlocking(
  const std::string & leaderboard_id
)

Presents to the user a UI that displays information about a specific leaderboard.

It synchronously returns a UIStatus. Not specifying timeout makes this function call equivalent to calling ShowUIBlocking(const string& leaderboard_id, Timeout timeout) with timeout specified as 10 years.

ShowUIBlocking

UIStatus ShowUIBlocking(
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span
)

Presents to the user a UI that displays information about a specific leaderboard.

It synchronously returns a UIStatus. Not specifying timeout makes this function call equivalent to calling ShowUIBlocking(const string& leaderboard_id, Timeout timeout) with timeout specified as 10 years. The UI will initially select the passed-in LeaderboardTimeSpan.

ShowUIBlocking

UIStatus ShowUIBlocking(
  Timeout timeout,
  const std::string & leaderboard_id
)

Presents to the user a UI that displays information about a specific leaderboard.

It synchronously returns a UIStatus. Specify timeout as an arbitrary number of milliseconds.

ShowUIBlocking

UIStatus ShowUIBlocking(
  Timeout timeout,
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span
)

Presents to the user a UI that displays information about a specific leaderboard.

It synchronously returns a UIStatus. Specify timeout as an arbitrary number of milliseconds. The UI will initially select the passed-in LeaderboardTimeSpan.

SubmitScore

void SubmitScore(
  const std::string & leaderboard_id,
  uint64_t score
)

Submit a score to the leaderboard for the currently signed-in player.

The score is ignored if it is worse (as defined by the leaderboard configuration) than a previously submitted score for the same player.

SubmitScore

void SubmitScore(
  const std::string & leaderboard_id,
  uint64_t score,
  const std::string & metadata
)

Submit, for the currently signed-in player, a score to the leaderboard associated with a specific id and metadata (such as something the player did to earn the score).

The score is ignored if it is worse (as defined in the leaderboard configuration) than a previously submitted score for the same player.

傳送您對下列選項的寶貴意見...

這個網頁
Play Games Services for C++
Play Games Services for C++