回调
作为异步调用目标的 Functor。
摘要
包含用于作为访问器方法的参数提供的一次性回调的函数,以及在 GameServices 构建时配置的多用途回调。
所有回调均在一个专用回调线程上调用。该线程可能不同于“主线程”或“界面线程”的任何平台概念。用户回调应快速执行,因为回调线程停止可能会引起用户可见问题(例如,注销请求延迟完成)。
您不应在回调中调用阻塞 GPG API(例如 Leaderboards().FetchAllBlocking()),因为此类调用会导致死锁。
类型定义符 |
|
---|---|
CaptureCapabilitiesCallback
|
typedefstd::function< void(GetCaptureCapabilitiesResponse const &)>
定义用于接收 GetCaptureCapabilitiesResponse 的回调类型。 |
CaptureStateCallback
|
typedefstd::function< void(GetCaptureStateResponse const &)>
定义用于接收 GetCaptureStateResponse 的回调类型。 |
CommitCallback
|
typedefstd::function< void(CommitResponse const &)>
定义用于接收 CommitResponse 的回调类型。 |
ConnectionRequestCallback
|
typedefstd::function< void(int64_t client_id, ConnectionRequest const &request)>
定义一个回调类型,用于在远程端点尝试连接到应用自己的端点时接收 ConnectionRequest。 |
FetchAllCallback
|
typedefstd::function< void(FetchAllResponse const &)>
定义用于接收 FetchAllResponse 的回调类型。 |
FetchAllCallback
|
typedefstd::function< void(FetchAllResponse const &)>
定义用于接收 FetchAllResponse 的回调类型。 |
FetchAllCallback
|
typedefstd::function< void(FetchAllResponse const &)>
定义 FetchAllResponse 类型的回调。 |
FetchAllCallback
|
typedefstd::function< void(FetchAllResponse const &)>
定义用于接收 FetchAllResponse 的回调类型。 |
FetchAllScoreSummariesCallback
|
typedefstd::function< void(FetchAllScoreSummariesResponse const &)>
定义 FetchAllScoreSummariesResponse 类型的回调。 |
FetchCallback
|
typedefstd::function< void(FetchResponse const &)>
定义用于接收 FetchResponse 的回调类型。 |
FetchCallback
|
typedefstd::function< void(const FetchResponse &)>
定义用于接收 FetchResponse 的回调类型。 |
FetchCallback
|
typedefstd::function< void(FetchResponse const &)>
定义用于接收 FetchResponse 的回调类型。 |
FetchCallback
|
typedefstd::function< void(FetchResponse const &)>
定义用于接收 FetchResponse 的回调类型。 |
FetchForPlayerCallback
|
typedefstd::function< void(FetchForPlayerResponse const &)>
定义用于接收 FetchForPlayerResponse 的回调类型。 |
FetchListCallback
|
typedefstd::function< void(FetchListResponse const &)>
定义用于接收 FetchListResponse 的回调类型。 |
FetchScorePageCallback
|
typedefstd::function< void(FetchScorePageResponse const &)>
定义 ScorePageResponse 类型的回调。 |
FetchScoreSummaryCallback
|
typedefstd::function< void(FetchScoreSummaryResponse const &)>
定义 FetchScoreSummaryResponse 类型的回调。 |
FetchSelfCallback
|
typedefstd::function< void(FetchSelfResponse const &)>
定义用于接收 FetchSelfResponse 的回调类型。 |
FetchServerAuthCodeCallback
|
typedefstd::function< void(FetchServerAuthCodeResponse const &)>
定义用于接收 FetchServerAuthCodeResponse 的回调类型。 |
FlushCallback
|
typedefstd::function< void(FlushStatus)>
定义用于接收刷新操作结果(状态)的回调类型。 |
IsCaptureAvailableCallback
|
typedefstd::function< void(IsCaptureAvailableResponse const &)>
定义用于接收 IsCaptureAvailableResponse 的回调类型。 |
OnAuthActionFinishedCallback
|
typedefstd::function< void(AuthOperation, AuthStatus)>
可提供给 SDK 的身份验证操作完成回调的类型。 |
OnAuthActionStartedCallback
|
typedefstd::function< void(AuthOperation)>
可提供给 SDK 的身份验证操作启动回调的类型。 |
OnInitializationFinishedCallback
|
typedefstd::function< void(InitializationStatus)>
应用在初始化 API 时或初始化失败时调用的回调。 |
OnLogCallback
|
typedefstd::function< void(LogLevel, std::string const &)>
可向 SDK 提供的日志记录回调类型。 |
OnLogCallback
|
typedefstd::function< void(LogLevel, std::string const &)>
可向 SDK 提供的日志记录回调类型。 |
OnMultiplayerInvitationEventCallback
|
typedefstd::function< void(MultiplayerEvent, std::string, MultiplayerInvitation)>
可向 SDK 提供的多人游戏邀请回调的类型。 |
OnTurnBasedMatchEventCallback
|
typedefstd::function< void(MultiplayerEvent event, std::string, TurnBasedMatch)>
可提供给 SDK 的基于回合的多人游戏事件回调的类型。 |
OpenCallback
|
typedefstd::function< void(OpenResponse const &)>
定义用于接收 OpenResponse 的回调类型。 |
ReadCallback
|
typedefstd::function< void(ReadResponse const &)>
定义用于接收 ReadResponse 的回调类型。 |
ShowAllUICallback
|
typedefstd::function< void(UIStatus const &)>
定义用于接收 UIStatus 的回调类型。 |
ShowAllUICallback
|
typedefstd::function< void(UIStatus const &)>
定义用于接收 UIStatus 的回调类型。 |
ShowUICallback
|
typedefstd::function< void(UIStatus const &)>
定义用于接收 UIStatus 的回调类型。 |
StartAdvertisingCallback
|
typedefstd::function< void(int64_t client_id, StartAdvertisingResult const &result)>
定义一种回调类型,用于在本地端点广告尝试完成时接收 StartAdvertisingResult;其 success 字段指示广告是否已成功启动。 |
类型定义符
CaptureCapabilitiesCallback
std::function< void(GetCaptureCapabilitiesResponse const &)> CaptureCapabilitiesCallback
定义用于接收 GetCaptureCapabilitiesResponse 的回调类型。
此回调类型会提供给以下 GetCaptureCapabilities(*)
函数。
CaptureStateCallback
std::function< void(GetCaptureStateResponse const &)> CaptureStateCallback
定义用于接收 GetCaptureStateResponse 的回调类型。
此回调类型会提供给以下 GetCaptureState(*)
函数。
CommitCallback
std::function< void(CommitResponse const &)> CommitCallback
定义用于接收 CommitResponse
的回调类型。
此回调类型会提供给下面的 Commit(*)
和 ResolveConflict(*)
函数。
ConnectionRequestCallback
std::function< void(int64_t client_id, ConnectionRequest const &request)> ConnectionRequestCallback
定义一个回调类型,用于在远程端点尝试连接到应用自己的端点时接收 ConnectionRequest。
client_id
是收到此请求的 NearbyConnections
实例的 ID。request
包含连接请求的详细信息。
FetchAllCallback
std::function< void(FetchAllResponse const &)> FetchAllCallback
定义用于接收 FetchAllResponse
的回调类型。
此回调类型会提供给以下 FetchAll(*)
函数。
FetchAllCallback
std::function< void(FetchAllResponse const &)> FetchAllCallback
定义用于接收 FetchAllResponse
的回调类型。
此回调类型会提供给以下 FetchAll(*)
函数。
FetchAllCallback
std::function< void(FetchAllResponse const &)> FetchAllCallback
定义 FetchAllResponse
类型的回调。
FetchAllCallback
std::function< void(FetchAllResponse const &)> FetchAllCallback
定义用于接收 FetchAllResponse
的回调类型。
此回调类型会提供给以下 FetchAll(*)
函数。
FetchAllScoreSummariesCallback
std::function< void(FetchAllScoreSummariesResponse const &)> FetchAllScoreSummariesCallback
定义 FetchAllScoreSummariesResponse
类型的回调。
FetchCallback
std::function< void(FetchResponse const &)> FetchCallback
定义用于接收 FetchResponse
的回调类型。
此回调类型会提供给以下 Fetch(*)
函数。
FetchCallback
std::function< void(const FetchResponse &)> FetchCallback
定义用于接收 FetchResponse
的回调类型。
此回调类型会提供给以下 Fetch(*)
函数。
FetchCallback
std::function< void(FetchResponse const &)> FetchCallback
定义用于接收 FetchResponse 的回调类型。
此回调类型会提供给以下 Fetch(*)
函数。
FetchCallback
std::function< void(FetchResponse const &)> FetchCallback
定义用于接收 FetchResponse 的回调类型。
此回调类型会提供给以下 Fetch(*)
函数。
FetchForPlayerCallback
std::function< void(FetchForPlayerResponse const &)> FetchForPlayerCallback
定义用于接收 FetchForPlayerResponse 的回调类型。
此回调类型会提供给以下 FetchForPlayer(*)
函数。
FetchListCallback
std::function< void(FetchListResponse const &)> FetchListCallback
定义用于接收 FetchListResponse 的回调类型。
此回调类型会提供给以下 Fetch(*)
函数。
FetchScorePageCallback
std::function< void(FetchScorePageResponse const &)> FetchScorePageCallback
定义 ScorePageResponse
类型的回调。
FetchScoreSummaryCallback
std::function< void(FetchScoreSummaryResponse const &)> FetchScoreSummaryCallback
定义 FetchScoreSummaryResponse
类型的回调。
FetchSelfCallback
std::function< void(FetchSelfResponse const &)> FetchSelfCallback
定义用于接收 FetchSelfResponse 的回调类型。
此回调类型会提供给以下 FetchSelf(*)
函数。
FetchServerAuthCodeCallback
std::function< void(FetchServerAuthCodeResponse const &)> FetchServerAuthCodeCallback
定义用于接收 FetchServerAuthCodeResponse 的回调类型。
此回调类型会提供给下面的 FetchServerAuthCode
函数。
IsCaptureAvailableCallback
std::function< void(IsCaptureAvailableResponse const &)> IsCaptureAvailableCallback
定义用于接收 IsCaptureAvailableResponse 的回调类型。
此回调类型会提供给以下 IsCaptureAvailable(*)
函数。
OnAuthActionFinishedCallback
std::function< void(AuthOperation, AuthStatus)> OnAuthActionFinishedCallback
可提供给 SDK 的身份验证操作完成回调的类型。
OnAuthActionStartedCallback
std::function< void(AuthOperation)> OnAuthActionStartedCallback
可提供给 SDK 的身份验证操作启动回调的类型。
OnInitializationFinishedCallback
std::function< void(InitializationStatus)> OnInitializationFinishedCallback
应用在初始化 API 时或初始化失败时调用的回调。
OnLogCallback
std::function< void(LogLevel, std::string const &)> OnLogCallback
可向 SDK 提供的日志记录回调类型。
OnLogCallback
std::function< void(LogLevel, std::string const &)> OnLogCallback
可向 SDK 提供的日志记录回调类型。
OnMultiplayerInvitationEventCallback
std::function< void(MultiplayerEvent, std::string, MultiplayerInvitation)> OnMultiplayerInvitationEventCallback
可向 SDK 提供的多人游戏邀请回调的类型。
对于更新型事件,Valid() 仅针对 MultiplayerInvitation 返回 true。
OnTurnBasedMatchEventCallback
std::function< void(MultiplayerEvent event, std::string, TurnBasedMatch)> OnTurnBasedMatchEventCallback
可提供给 SDK 的基于回合的多人游戏事件回调的类型。
对于更新型事件,Valid() 仅针对 TurnBasedMatch 参数返回 true。
OpenCallback
std::function< void(OpenResponse const &)> OpenCallback
定义用于接收 OpenResponse
的回调类型。
此回调类型会提供给以下 Open(*)
函数。
ReadCallback
std::function< void(ReadResponse const &)> ReadCallback
定义用于接收 ReadResponse
的回调类型。
此回调类型会提供给以下 Read(*)
函数。
ShowAllUICallback
std::function< void(UIStatus const &)> ShowAllUICallback
定义用于接收 UIStatus
的回调类型。
此回调类型会提供给下面的 ShowAllUI*
函数。
ShowAllUICallback
std::function< void(UIStatus const &)> ShowAllUICallback
定义用于接收 UIStatus
的回调类型。
此回调类型会提供给下面的 ShowAllUI*
函数。
ShowUICallback
std::function< void(UIStatus const &)> ShowUICallback
定义用于接收 UIStatus
的回调类型。
此回调类型会提供给下面的 ShowUI*
函数。
StartAdvertisingCallback
std::function< void(int64_t client_id, StartAdvertisingResult const &result)> StartAdvertisingCallback
定义一种回调类型,用于在本地端点广告尝试完成时接收 StartAdvertisingResult;其 success 字段指示广告是否已成功启动。
client_id
是尝试开始投放广告的 NearbyConnections
实例的 ID。result
包含该广告的结果。