The IGameCenterControl interface. More...
#include "murl_i_game_center_control.h"
Authentication | |
enum | AuthenticationStatus { STATUS_AUTHENTICATION_IDLE , STATUS_AUTHENTICATING , STATUS_AUTHENTICATED , STATUS_AUTHENTICATION_FAILED , STATUS_AUTHENTICATION_IMPOSSIBLE } |
Enumeration of the authentication status. More... | |
virtual AuthenticationStatus | GetAuthenticationStatus () const =0 |
Get the game-center authentication status. More... | |
virtual Bool | AuthenticateLocalPlayer ()=0 |
Start authenticating the local user to the game-center. More... | |
virtual const IGameCenterPlayer & | GetLocalPlayer () const =0 |
Get the game-center local user. More... | |
virtual Bool | IsLocalPlayerUnderage () const =0 |
Check if the game-center local user is underage. More... | |
virtual Bool | IsAuthenticationIdle () const =0 |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATION_IDLE. More... | |
virtual Bool | IsAuthenticating () const =0 |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATING. More... | |
virtual Bool | IsAuthenticated () const =0 |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATED. More... | |
virtual Bool | IsAuthenticationFailed () const =0 |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATION_FAILED. More... | |
virtual Bool | IsAuthenticationImpossible () const =0 |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATION_IMPOSSIBLE. More... | |
Friends | |
enum | LoadFriendsStatus { STATUS_LOAD_FRIENDS_IDLE , STATUS_LOAD_FRIENDS_LOADING } |
Enumeration of the load friends status. More... | |
virtual LoadFriendsStatus | GetLoadFriendsStatus () const =0 |
Get the game-center load friends status. More... | |
virtual Bool | LoadFriends ()=0 |
Load all game-center friends player entries. More... | |
virtual Bool | LoadFriends (const StringArray &friendIds)=0 |
Load specified game-center friends player entries. More... | |
virtual const GameCenterPlayerEntries & | GetFriends () const =0 |
Get an array of friends player entries. More... | |
virtual Bool | IsLoadFriendsIdle () const =0 |
Check if the game-center load load friends status is IGameCenterControl::STATUS_LOAD_FRIENDS_IDLE. More... | |
virtual Bool | IsLoadFriendsLoading () const =0 |
Check if the game-center load load friends status is IGameCenterControl::STATUS_LOAD_FRIENDS_LOADING. More... | |
Leaderboard | |
enum | LeaderboardStatus { STATUS_LEADERBOARD_IDLE , STATUS_LEADERBOARD_SHOWING , STATUS_LEADERBOARD_REPORTING , STATUS_LEADERBOARD_LOADING } |
Enumeration of the leaderboard status. More... | |
virtual LeaderboardStatus | GetLeaderboardStatus () const =0 |
Get the game-center leaderboard status. More... | |
virtual Bool | ShowLeaderboard (const String &category)=0 |
Show the game-center leaderboard overlay. More... | |
virtual Bool | ReportLeaderboard (const String &category, UInt64 score)=0 |
Report a score to the game-center leaderboard. More... | |
virtual Bool | LoadLeaderboard (const String &category, UInt32 startRank, UInt32 numberOfRanks)=0 |
Load the game-center leaderboard entries. More... | |
virtual const GameCenterLeaderboardEntries & | GetLeaderboard () const =0 |
Get an array of leaderboard entries. More... | |
virtual Bool | IsLeaderboardIdle () const =0 |
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_IDLE. More... | |
virtual Bool | IsLeaderboardShowing () const =0 |
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_SHOWING. More... | |
virtual Bool | IsLeaderboardReporting () const =0 |
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_REPORTING. More... | |
virtual Bool | IsLeaderboardLoading () const =0 |
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_LOADING. More... | |
Achievements | |
enum | AchievementStatus { STATUS_ACHIEVEMENT_IDLE , STATUS_ACHIEVEMENT_SHOWING , STATUS_ACHIEVEMENT_REPORTING , STATUS_ACHIEVEMENT_RESETTING , STATUS_ACHIEVEMENT_LOADING } |
Enumeration of the achievement status. More... | |
virtual AchievementStatus | GetAchievementStatus () const =0 |
Get the game-center achievement status. More... | |
virtual Bool | ShowAchievements ()=0 |
Show the game-center achievements overlay. More... | |
virtual Bool | ReportAchievement (const String &identifier, Double percentComplete, Bool showsCompletionBanner=true)=0 |
Report a game-center achievement. More... | |
virtual Bool | ResetAchievements ()=0 |
Reset all game-center achievements. More... | |
virtual Bool | LoadAchievements ()=0 |
Load the game-center achievement entries. More... | |
virtual const GameCenterAchievementEntries & | GetAchievements () const =0 |
Get an array of achievement entries. More... | |
virtual Bool | IsAchievementIdle () const =0 |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_IDLE. More... | |
virtual Bool | IsAchievementShowing () const =0 |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_SHOWING. More... | |
virtual Bool | IsAchievementReporting () const =0 |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_REPOTRING. More... | |
virtual Bool | IsAchievementResetting () const =0 |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_RESETTING. More... | |
virtual Bool | IsAchievementLoading () const =0 |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_LOADING. More... | |
Errors | |
enum | Error { ERROR_NONE , ERROR_UNKNOWN , ERROR_CANCELLED , ERROR_COMMUNICATIONS_FAILURE , ERROR_USER_DENIED , ERROR_INVALID_CREDENTIALS , ERROR_NOT_AUTHENTICATED , ERROR_AUTHENTICATION_IN_PROGRESS , ERROR_INVALID_PLAYER , ERROR_SCORE_NOT_SET , ERROR_PARENTAL_CONTROLS_BLOCKED , ERROR_PLAYER_STATUS_EXCEEDS_MAXIMUM_LENGTH , ERROR_PLAYER_STATUS_INVALID , ERROR_MATCH_REQUEST_INVALID , ERROR_UNDERAGE , ERROR_GAME_UNRECOGNIZED , ERROR_NOT_SUPPORTED , ERROR_INVALID_PARAMETER } |
Enumeration of error status. More... | |
virtual Error | GetError () const =0 |
Get the game-center error status. More... | |
virtual Bool | ClearLastError ()=0 |
Clear the last error status. More... | |
Additional Inherited Members | |
Public Member Functions inherited from Murl::IControlable | |
virtual const String & | GetName () const =0 |
Get the controlable's name. More... | |
virtual void | FrameUpdate ()=0 |
Is executed in the platform thread context each frame tick. | |
virtual void | LogicUpdate ()=0 |
Is executed in the logic thread context each logic tick. | |
virtual void | ConfigChanged (const IAppConfiguration *appConfig)=0 |
Notification of changed configuration. More... | |
Detailed Description
The IGameCenterControl interface.
The game center is currently supported on iOS/OSX/tvOS only.
Member Enumeration Documentation
◆ AuthenticationStatus
Enumeration of the authentication status.
Use GetAuthenticationStatus() to get the current status.
◆ LoadFriendsStatus
Enumeration of the load friends status.
Use GetLoadFriendsStatus() to get the current status.
Enumerator | |
---|---|
STATUS_LOAD_FRIENDS_IDLE | Loading friends is idle. |
STATUS_LOAD_FRIENDS_LOADING | Loading friends is in progress. |
◆ LeaderboardStatus
Enumeration of the leaderboard status.
Use GetLeaderboardStatus() to get the current status.
◆ AchievementStatus
Enumeration of the achievement status.
Use GetAchievementStatus() to get the current status.
◆ Error
Enumeration of error status.
Use GetError() to get the current status.
Member Function Documentation
◆ GetAuthenticationStatus()
|
pure virtual |
Get the game-center authentication status.
Authentication operation works asynchronously, the application can check the current status to operate correctly.
- Returns
- The game-center authentication status.
◆ AuthenticateLocalPlayer()
|
pure virtual |
Start authenticating the local user to the game-center.
When starting the authentication, the authentication status changes to IGameCenterControl::STATUS_AUTHENTICATING immediately. When the authentication is finished the authentication status changes to IGameCenterControl::STATUS_AUTHENTICATED.
- Returns
- true if successful.
◆ GetLocalPlayer()
|
pure virtual |
Get the game-center local user.
The local user is available when AuthenticateLocalPlayer() is finished.
- Returns
- The game-center local user.
◆ IsLocalPlayerUnderage()
|
pure virtual |
Check if the game-center local user is underage.
The local user underage is available when AuthenticateLocalPlayer() is finished.
- Returns
- true if the game-center local user is underage.
◆ IsAuthenticationIdle()
|
pure virtual |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATION_IDLE.
- Returns
- true if the status is IGameCenterControl::STATUS_AUTHENTICATION_IDLE.
◆ IsAuthenticating()
|
pure virtual |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATING.
- Returns
- true if the status is IGameCenterControl::STATUS_AUTHENTICATING.
◆ IsAuthenticated()
|
pure virtual |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATED.
- Returns
- true if the status is IGameCenterControl::STATUS_AUTHENTICATED.
◆ IsAuthenticationFailed()
|
pure virtual |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATION_FAILED.
- Returns
- true if the status is IGameCenterControl::STATUS_AUTHENTICATION_FAILED.
◆ IsAuthenticationImpossible()
|
pure virtual |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATION_IMPOSSIBLE.
- Returns
- true if the status is IGameCenterControl::STATUS_AUTHENTICATION_IMPOSSIBLE.
◆ GetLoadFriendsStatus()
|
pure virtual |
Get the game-center load friends status.
Load friends operation works asynchronously, the application can check the current status to operate correctly.
- Returns
- The game-center load friends status.
◆ LoadFriends() [1/2]
|
pure virtual |
Load all game-center friends player entries.
When start loading, the load friends status changes to IGameCenterControl::STATUS_LOAD_FRIENDS_LOADING immediately. When the friends loading is finished the friends status changes to IGameCenterControl::STATUS_LOAD_FRIENDS_IDLE. The friends player entries can be accessed by GetFriends().
- Returns
- true if successful.
◆ LoadFriends() [2/2]
|
pure virtual |
Load specified game-center friends player entries.
When start loading, the load friends status changes to IGameCenterControl::STATUS_LOAD_FRIENDS_LOADING immediately. When the friends loading is finished the friends status changes to IGameCenterControl::STATUS_LOAD_FRIENDS_IDLE. The friends player entries can be accessed by GetFriends().
- Parameters
-
friendIds A string array containing the player identifiers to load.
- Returns
- true if successful.
◆ GetFriends()
|
pure virtual |
Get an array of friends player entries.
The friends player entries are available when LoadFriends() is finished.
- Returns
- The array of friends player entries.
◆ IsLoadFriendsIdle()
|
pure virtual |
Check if the game-center load load friends status is IGameCenterControl::STATUS_LOAD_FRIENDS_IDLE.
- Returns
- true if the status is IGameCenterControl::STATUS_LOAD_FRIENDS_IDLE.
◆ IsLoadFriendsLoading()
|
pure virtual |
Check if the game-center load load friends status is IGameCenterControl::STATUS_LOAD_FRIENDS_LOADING.
- Returns
- true if the status is IGameCenterControl::STATUS_LOAD_FRIENDS_LOADING.
◆ GetLeaderboardStatus()
|
pure virtual |
Get the game-center leaderboard status.
Leaderboard operation works asynchronously, the application can check the current status to operate correctly.
- Returns
- The game-center leaderboard status.
◆ ShowLeaderboard()
Show the game-center leaderboard overlay.
When showing the leaderboard overlay, the leaderboard status changes to IGameCenterControl::STATUS_LEADERBOARD_SHOWING immediately. When the leaderboard overlay is closed the leaderboard status changes to IGameCenterControl::STATUS_LEADERBOARD_IDLE.
- Parameters
-
category The name of the leaderboard category to show or an empty string to show the default leaderboard.
- Returns
- true if successful.
◆ ReportLeaderboard()
|
pure virtual |
Report a score to the game-center leaderboard.
When start reporting, the leaderboard status changes to IGameCenterControl::STATUS_LEADERBOARD_REPORTING immediately. When the leaderboard reporting is finished the leaderboard status changes to IGameCenterControl::STATUS_LEADERBOARD_IDLE.
- Parameters
-
category The name of the leaderboard category. score The score to report.
- Returns
- true if successful.
◆ LoadLeaderboard()
|
pure virtual |
Load the game-center leaderboard entries.
When start loading, the leaderboard status changes to IGameCenterControl::STATUS_LEADERBOARD_LOADING immediately. When the leaderboard loading is finished the leaderboard status changes to IGameCenterControl::STATUS_LEADERBOARD_IDLE. The leaderboard entries can be accessed by GetLeaderboard() and GetLeaderboardCategory().
- Parameters
-
category The name of the leaderboard category. startRank The first rank to load. numberOfRanks The number of ranks to load.
- Returns
- true if successful.
◆ GetLeaderboard()
|
pure virtual |
Get an array of leaderboard entries.
The leaderboard entries are available when LoadLeaderboard() is finished.
- Returns
- The array of leaderboard entries.
◆ IsLeaderboardIdle()
|
pure virtual |
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_IDLE.
- Returns
- true if the status is IGameCenterControl::STATUS_LEADERBOARD_IDLE.
◆ IsLeaderboardShowing()
|
pure virtual |
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_SHOWING.
- Returns
- true if the status is IGameCenterControl::STATUS_LEADERBOARD_SHOWING.
◆ IsLeaderboardReporting()
|
pure virtual |
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_REPORTING.
- Returns
- true if the status is IGameCenterControl::STATUS_LEADERBOARD_REPORTING.
◆ IsLeaderboardLoading()
|
pure virtual |
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_LOADING.
- Returns
- true if the status is IGameCenterControl::STATUS_LEADERBOARD_LOADING.
◆ GetAchievementStatus()
|
pure virtual |
Get the game-center achievement status.
Achievement operation works asynchronously, the application can check the current status to operate correctly.
- Returns
- The game-center achievement status.
◆ ShowAchievements()
|
pure virtual |
Show the game-center achievements overlay.
When showing the achievements overlay, the achievement status changes to IGameCenterControl::STATUS_ACHIEVEMENT_SHOWING immediately. When the achievements overlay is closed the achievement status changes to IGameCenterControl::STATUS_ACHIEVEMENT_IDLE.
- Returns
- true if successful.
◆ ReportAchievement()
|
pure virtual |
Report a game-center achievement.
When start reporting, the achievement status changes to IGameCenterControl::STATUS_ACHIEVEMENT_REPORTING immediately. When the achievement reporting is finished the achievement status changes to IGameCenterControl::STATUS_ACHIEVEMENT_IDLE.
- Parameters
-
identifier The achievement identifier. percentComplete The percentage of achievement complete, report 0 to unhide achievement. showsCompletionBanner If true, a banner will be momentarily displayed after reporting a completed achievement.
- Returns
- true if successful.
◆ ResetAchievements()
|
pure virtual |
Reset all game-center achievements.
When start resetting, the achievement status changes to IGameCenterControl::STATUS_ACHIEVEMENT_RESETTING immediately. When the achievement resetting is finished the achievement status changes to IGameCenterControl::STATUS_ACHIEVEMENT_IDLE.
- Returns
- true if successful.
◆ LoadAchievements()
|
pure virtual |
Load the game-center achievement entries.
When start loading, the achievement status changes to IGameCenterControl::STATUS_ACHIEVEMENT_LOADING immediately. When the achievement loading is finished the achievement status changes to IGameCenterControl::STATUS_ACHIEVEMENT_IDLE. The achievement entries can be accessed by GetAchievements().
- Returns
- true if successful.
◆ GetAchievements()
|
pure virtual |
Get an array of achievement entries.
The achievements entries are available when LoadAchievements() is finished.
- Returns
- The array of achievement entries.
◆ IsAchievementIdle()
|
pure virtual |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_IDLE.
- Returns
- true if the status is IGameCenterControl::STATUS_ACHIEVEMENT_IDLE.
◆ IsAchievementShowing()
|
pure virtual |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_SHOWING.
- Returns
- true if the status is IGameCenterControl::STATUS_ACHIEVEMENT_SHOWING.
◆ IsAchievementReporting()
|
pure virtual |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_REPOTRING.
- Returns
- true if the status is IGameCenterControl::STATUS_ACHIEVEMENT_REPOTRING.
◆ IsAchievementResetting()
|
pure virtual |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_RESETTING.
- Returns
- true if the status is IGameCenterControl::STATUS_ACHIEVEMENT_RESETTING.
◆ IsAchievementLoading()
|
pure virtual |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_LOADING.
- Returns
- true if the status is IGameCenterControl::STATUS_ACHIEVEMENT_LOADING.
◆ GetError()
|
pure virtual |
Get the game-center error status.
- Returns
- The game-center error status.
◆ ClearLastError()
|
pure virtual |
Clear the last error status.
Set the error status to IGameCenterControl::ERROR_NONE.
- Returns
- true if successful.
The documentation for this interface was generated from the following file:
- murl_i_game_center_control.h