Callbacks

Functors that are the target of asynchronous calls.

Summary

Includes functors for one-shot callbacks supplied as arguments to accessor methods, as well as multi-use callbacks configured at GameServices build time.

All callbacks are invoked on a dedicated callback thread. This thread is potentially distinct from any platform concept of a "main thread" or "UI thread". User callbacks should execute quickly, as a stalled callback thread can cause user-visible issues (for example, delayed completion of a sign-out request).

You should not invoke blocking GPG APIs such as Leaderboards().FetchAllBlocking() within a callback, as such calls will cause deadlocks.

Typedefs

AcceptCallback typedef
std::function< void(AcceptResponse const &)>
Defines a callback that can be used to receive an AcceptResponse.
CaptureCapabilitiesCallback typedef
std::function< void(GetCaptureCapabilitiesResponse const &)>
Defines a callback type that receives a GetCaptureCapabilitiesResponse.
CaptureStateCallback typedef
std::function< void(GetCaptureStateResponse const &)>
Defines a callback type that receives a GetCaptureStateResponse.
ClaimMilestoneCallback typedef
std::function< void(ClaimMilestoneResponse const &)>
Defines a callback which can be used to receive a ClaimMilestoneResponse.
CommitCallback typedef
std::function< void(CommitResponse const &)>
Defines a callback type that receives an CommitResponse.
ConnectionRequestCallback typedef
std::function< void(int64_t client_id, ConnectionRequest const &request)>
Defines a callback type that receives a ConnectionRequest when a remote endpoint attempts to connect to the app's own endpoint.
FetchAllCallback typedef
std::function< void(FetchAllResponse const &)>
Defines a callback type that receives a FetchAllResponse.
FetchAllCallback typedef
std::function< void(FetchAllResponse const &)>
Defines a callback type that receives a FetchAllResponse.
FetchAllCallback typedef
std::function< void(FetchAllResponse const &)>
Defines a FetchAllResponse-type callback.
FetchAllCallback typedef
std::function< void(FetchAllResponse const &)>
Defines a callback type that receives a FetchAllResponse.
FetchAllScoreSummariesCallback typedef
std::function< void(FetchAllScoreSummariesResponse const &)>
Defines a FetchAllScoreSummariesResponse-type callback.
FetchCallback typedef
std::function< void(FetchResponse const &)>
Defines a callback type that receives a FetchResponse.
FetchCallback typedef
std::function< void(const FetchResponse &)>
Defines a callback type that receives a FetchResponse.
FetchCallback typedef
std::function< void(FetchResponse const &)>
Defines a callback type that receives a FetchResponse.
FetchCallback typedef
std::function< void(FetchResponse const &)>
Defines a callback type that receives a FetchResponse.
FetchCallback typedef
std::function< void(FetchResponse const &)>
Defines a callback type that receives a FetchResponse.
FetchForPlayerCallback typedef
std::function< void(FetchForPlayerResponse const &)>
Defines a callback type that receives a FetchForPlayerResponse.
FetchListCallback typedef
std::function< void(FetchListResponse const &)>
Defines a callback type that receives a FetchListResponse.
FetchListCallback typedef
std::function< void(FetchListResponse const &)>
Defines a callback type that receives a FetchListResponse.
FetchScorePageCallback typedef
std::function< void(FetchScorePageResponse const &)>
Defines a ScorePageResponse-type callback.
FetchScoreSummaryCallback typedef
std::function< void(FetchScoreSummaryResponse const &)>
Defines a FetchScoreSummaryResponse-type callback.
FetchSelfCallback typedef
std::function< void(FetchSelfResponse const &)>
Defines a callback type that receives a FetchSelfResponse.
FetchServerAuthCodeCallback typedef
std::function< void(FetchServerAuthCodeResponse const &)>
Defines a callback type that receives a FetchServerAuthCodeResponse.
FlushCallback typedef
std::function< void(FlushStatus)>
Defines a callback type that receives the result (status) of a Flush operation.
IsCaptureAvailableCallback typedef
std::function< void(IsCaptureAvailableResponse const &)>
Defines a callback type that receives a IsCaptureAvailableResponse.
OnAuthActionFinishedCallback typedef
std::function< void(AuthOperation, AuthStatus)>
The type of authentication action finished callback that can be provided to the SDK.
OnAuthActionStartedCallback typedef
std::function< void(AuthOperation)>
The type of the authentication action started callback that can be provided to the SDK.
OnInitializationFinishedCallback typedef
std::function< void(InitializationStatus)>
A callback that the app invokes on initializing the API, or when initialization fails.
OnLogCallback typedef
std::function< void(LogLevel, std::string const &)>
The type of logging callback that can be provided to the SDK.
OnLogCallback typedef
std::function< void(LogLevel, std::string const &)>
The type of logging callback that can be provided to the SDK.
OnMultiplayerInvitationEventCallback typedef
std::function< void(MultiplayerEvent, std::string, MultiplayerInvitation)>
The type of the multiplayer invitation callback that can be provided to the SDK.
OnQuestCompletedCallback typedef
std::function< void(Quest quest)>
The type of the quest completed callback that can be provided to the SDK.
OnTurnBasedMatchEventCallback typedef
std::function< void(MultiplayerEvent event, std::string, TurnBasedMatch)>
The type of the turn based multiplayer event callback that can be provided to the SDK.
OpenCallback typedef
std::function< void(OpenResponse const &)>
Defines a callback type that receives an OpenResponse.
QuestUICallback typedef
std::function< void(QuestUIResponse const &)>
Defines a callback type that receives a QuestUIResponse.
ReadCallback typedef
std::function< void(ReadResponse const &)>
Defines a callback type that receives a ReadResponse.
ShowAllUICallback typedef
std::function< void(UIStatus const &)>
Defines a callback type that receives a UIStatus.
ShowAllUICallback typedef
std::function< void(UIStatus const &)>
Defines a callback type that receives a UIStatus.
ShowUICallback typedef
std::function< void(UIStatus const &)>
Defines a callback type that receives a UIStatus.
StartAdvertisingCallback typedef
std::function< void(int64_t client_id, StartAdvertisingResult const &result)>
Defines a callback type that receives a StartAdvertisingResult when a local endpoint advertising attempt is complete; its success field indicates whether advertising started successfully.

Typedefs

AcceptCallback

std::function< void(AcceptResponse const &)> AcceptCallback

Defines a callback that can be used to receive an AcceptResponse.

Used by the Accept* functions.

CaptureCapabilitiesCallback

std::function< void(GetCaptureCapabilitiesResponse const &)> CaptureCapabilitiesCallback

Defines a callback type that receives a GetCaptureCapabilitiesResponse.

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

CaptureStateCallback

std::function< void(GetCaptureStateResponse const &)> CaptureStateCallback

Defines a callback type that receives a GetCaptureStateResponse.

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

ClaimMilestoneCallback

std::function< void(ClaimMilestoneResponse const &)> ClaimMilestoneCallback

Defines a callback which can be used to receive a ClaimMilestoneResponse.

Used by the ClaimMilestone* functions.

CommitCallback

std::function< void(CommitResponse const &)> CommitCallback

Defines a callback type that receives an CommitResponse.

This callback type is provided to the Commit(*) and ResolveConflict(*) functions below.

ConnectionRequestCallback

std::function< void(int64_t client_id, ConnectionRequest const &request)> ConnectionRequestCallback

Defines a callback type that receives a ConnectionRequest when a remote endpoint attempts to connect to the app's own endpoint.

client_id is the ID of the NearbyConnections instance that received this request. request contains the details of the connection request.

FetchAllCallback

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

Defines a callback type that receives a FetchAllResponse.

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

FetchAllCallback

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

Defines a callback type that receives a FetchAllResponse.

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

FetchAllCallback

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

Defines a FetchAllResponse-type callback.

FetchAllCallback

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

Defines a callback type that receives a FetchAllResponse.

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

FetchAllScoreSummariesCallback

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

Defines a FetchAllScoreSummariesResponse-type callback.

FetchCallback

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

Defines a callback type that receives a FetchResponse.

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

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.

FetchCallback

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

Defines a callback type that receives a FetchResponse.

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

FetchCallback

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

Defines a callback type that receives a FetchResponse.

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

FetchCallback

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

Defines a callback type that receives a FetchResponse.

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

FetchForPlayerCallback

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

Defines a callback type that receives a FetchForPlayerResponse.

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

FetchListCallback

std::function< void(FetchListResponse const &)> FetchListCallback

Defines a callback type that receives a FetchListResponse.

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

FetchListCallback

std::function< void(FetchListResponse const &)> FetchListCallback

Defines a callback type that receives a FetchListResponse.

This callback type is provided to the FetchList* functions below.

FetchScorePageCallback

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

Defines a ScorePageResponse-type callback.

FetchScoreSummaryCallback

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

Defines a FetchScoreSummaryResponse-type callback.

FetchSelfCallback

std::function< void(FetchSelfResponse const &)> FetchSelfCallback

Defines a callback type that receives a FetchSelfResponse.

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

FetchServerAuthCodeCallback

std::function< void(FetchServerAuthCodeResponse const &)> FetchServerAuthCodeCallback

Defines a callback type that receives a FetchServerAuthCodeResponse.

This callback type is provided to the FetchServerAuthCode function below.

FlushCallback

std::function< void(FlushStatus)> FlushCallback

Defines a callback type that receives the result (status) of a Flush operation.

Used in Flush().

IsCaptureAvailableCallback

std::function< void(IsCaptureAvailableResponse const &)> IsCaptureAvailableCallback

Defines a callback type that receives a IsCaptureAvailableResponse.

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

OnAuthActionFinishedCallback

std::function< void(AuthOperation, AuthStatus)> OnAuthActionFinishedCallback

The type of authentication action finished callback that can be provided to the SDK.

OnAuthActionStartedCallback

std::function< void(AuthOperation)> OnAuthActionStartedCallback

The type of the authentication action started callback that can be provided to the SDK.

OnInitializationFinishedCallback

std::function< void(InitializationStatus)> OnInitializationFinishedCallback

A callback that the app invokes on initializing the API, or when initialization fails.

OnLogCallback

std::function< void(LogLevel, std::string const &)> OnLogCallback

The type of logging callback that can be provided to the SDK.

OnLogCallback

std::function< void(LogLevel, std::string const &)> OnLogCallback

The type of logging callback that can be provided to the SDK.

OnMultiplayerInvitationEventCallback

std::function< void(MultiplayerEvent, std::string, MultiplayerInvitation)> OnMultiplayerInvitationEventCallback

The type of the multiplayer invitation callback that can be provided to the SDK.

Valid() only returns true for the MultiplayerInvitation on UPDATED events.

OnQuestCompletedCallback

std::function< void(Quest quest)> OnQuestCompletedCallback

The type of the quest completed callback that can be provided to the SDK.

Provides the completed quest.

OnTurnBasedMatchEventCallback

std::function< void(MultiplayerEvent event, std::string, TurnBasedMatch)> OnTurnBasedMatchEventCallback

The type of the turn based multiplayer event callback that can be provided to the SDK.

Valid() only returns true for the TurnBasedMatch parameter on UPDATED events.

OpenCallback

std::function< void(OpenResponse const &)> OpenCallback

Defines a callback type that receives an OpenResponse.

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

QuestUICallback

std::function< void(QuestUIResponse const &)> QuestUICallback

Defines a callback type that receives a QuestUIResponse.

This callback type is provided to the ShowAllUI* and ShowUI* functions below.

ReadCallback

std::function< void(ReadResponse const &)> ReadCallback

Defines a callback type that receives a ReadResponse.

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

ShowAllUICallback

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

Defines a callback type that receives a UIStatus.

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

ShowAllUICallback

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

Defines a callback type that receives a UIStatus.

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

ShowUICallback

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

Defines a callback type that receives a UIStatus.

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

StartAdvertisingCallback

std::function< void(int64_t client_id, StartAdvertisingResult const &result)> StartAdvertisingCallback

Defines a callback type that receives a StartAdvertisingResult when a local endpoint advertising attempt is complete; its success field indicates whether advertising started successfully.

client_id is the ID of the NearbyConnections instance that tried to start advertising. result contains the results of that advertisement.

Send feedback about...

Play Games Services for C++
Play Games Services for C++