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 |
|
---|---|
CaptureCapabilitiesCallback
|
typedefstd::function< void(GetCaptureCapabilitiesResponse const &)>
Defines a callback type that receives a GetCaptureCapabilitiesResponse. |
CaptureStateCallback
|
typedefstd::function< void(GetCaptureStateResponse const &)>
Defines a callback type that receives a GetCaptureStateResponse. |
CommitCallback
|
typedefstd::function< void(CommitResponse const &)>
Defines a callback type that receives an CommitResponse . |
ConnectionRequestCallback
|
typedefstd::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
|
typedefstd::function< void(FetchAllResponse const &)>
Defines a callback type that receives a FetchAllResponse . |
FetchAllCallback
|
typedefstd::function< void(FetchAllResponse const &)>
Defines a callback type that receives a FetchAllResponse . |
FetchAllCallback
|
typedefstd::function< void(FetchAllResponse const &)>
Defines a FetchAllResponse -type callback. |
FetchAllCallback
|
typedefstd::function< void(FetchAllResponse const &)>
Defines a callback type that receives a FetchAllResponse . |
FetchAllScoreSummariesCallback
|
typedefstd::function< void(FetchAllScoreSummariesResponse const &)>
Defines a FetchAllScoreSummariesResponse -type callback. |
FetchCallback
|
typedefstd::function< void(FetchResponse const &)>
Defines a callback type that receives a FetchResponse . |
FetchCallback
|
typedefstd::function< void(const FetchResponse &)>
Defines a callback type that receives a FetchResponse . |
FetchCallback
|
typedefstd::function< void(FetchResponse const &)>
Defines a callback type that receives a FetchResponse. |
FetchCallback
|
typedefstd::function< void(FetchResponse const &)>
Defines a callback type that receives a FetchResponse. |
FetchForPlayerCallback
|
typedefstd::function< void(FetchForPlayerResponse const &)>
Defines a callback type that receives a FetchForPlayerResponse. |
FetchListCallback
|
typedefstd::function< void(FetchListResponse const &)>
Defines a callback type that receives a FetchListResponse. |
FetchScorePageCallback
|
typedefstd::function< void(FetchScorePageResponse const &)>
Defines a ScorePageResponse -type callback. |
FetchScoreSummaryCallback
|
typedefstd::function< void(FetchScoreSummaryResponse const &)>
Defines a FetchScoreSummaryResponse -type callback. |
FetchSelfCallback
|
typedefstd::function< void(FetchSelfResponse const &)>
Defines a callback type that receives a FetchSelfResponse. |
FetchServerAuthCodeCallback
|
typedefstd::function< void(FetchServerAuthCodeResponse const &)>
Defines a callback type that receives a FetchServerAuthCodeResponse. |
FlushCallback
|
typedefstd::function< void(FlushStatus)>
Defines a callback type that receives the result (status) of a Flush operation. |
IsCaptureAvailableCallback
|
typedefstd::function< void(IsCaptureAvailableResponse const &)>
Defines a callback type that receives a IsCaptureAvailableResponse. |
OnAuthActionFinishedCallback
|
typedefstd::function< void(AuthOperation, AuthStatus)>
The type of authentication action finished callback that can be provided to the SDK. |
OnAuthActionStartedCallback
|
typedefstd::function< void(AuthOperation)>
The type of the authentication action started callback that can be provided to the SDK. |
OnInitializationFinishedCallback
|
typedefstd::function< void(InitializationStatus)>
A callback that the app invokes on initializing the API, or when initialization fails. |
OnLogCallback
|
typedefstd::function< void(LogLevel, std::string const &)>
The type of logging callback that can be provided to the SDK. |
OnLogCallback
|
typedefstd::function< void(LogLevel, std::string const &)>
The type of logging callback that can be provided to the SDK. |
OnMultiplayerInvitationEventCallback
|
typedefstd::function< void(MultiplayerEvent, std::string, MultiplayerInvitation)>
The type of the multiplayer invitation callback that can be provided to the SDK. |
OnTurnBasedMatchEventCallback
|
typedefstd::function< void(MultiplayerEvent event, std::string, TurnBasedMatch)>
The type of the turn based multiplayer event callback that can be provided to the SDK. |
OpenCallback
|
typedefstd::function< void(OpenResponse const &)>
Defines a callback type that receives an OpenResponse . |
ReadCallback
|
typedefstd::function< void(ReadResponse const &)>
Defines a callback type that receives a ReadResponse . |
ShowAllUICallback
|
typedefstd::function< void(UIStatus const &)>
Defines a callback type that receives a UIStatus . |
ShowAllUICallback
|
typedefstd::function< void(UIStatus const &)>
Defines a callback type that receives a UIStatus . |
ShowUICallback
|
typedefstd::function< void(UIStatus const &)>
Defines a callback type that receives a UIStatus . |
StartAdvertisingCallback
|
typedefstd::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
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.
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.
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.
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.
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.
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.