Murl::IGameCenterControl Interface Referenceabstract

The IGameCenterControl interface. More...

#include "murl_i_game_center_control.h"

Inheritance diagram for Murl::IGameCenterControl:

Authentication

Methods for authentication of the local player.

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 IGameCenterPlayerGetLocalPlayer () 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

Methods for loading 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 GameCenterPlayerEntriesGetFriends () 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

Methods for using the 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 GameCenterLeaderboardEntriesGetLeaderboard () 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

Methods for using achievments.

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 GameCenterAchievementEntriesGetAchievements () 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

Methods for error handling.

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 StringGetName () 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.

Enumerator
STATUS_AUTHENTICATION_IDLE 

The authentication is idle.

STATUS_AUTHENTICATING 

The authentication is in progress.

STATUS_AUTHENTICATED 

The authentication is succesful.

STATUS_AUTHENTICATION_FAILED 

The authentication failed.

STATUS_AUTHENTICATION_IMPOSSIBLE 

The authentication is not possible.

◆ 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.

Enumerator
STATUS_LEADERBOARD_IDLE 

The leaderboard is idle.

STATUS_LEADERBOARD_SHOWING 

The leaderboard overlay is showing.

STATUS_LEADERBOARD_REPORTING 

Reporting a leaderboard score is in progress.

STATUS_LEADERBOARD_LOADING 

Loading leaderboard scores is in progress.

◆ AchievementStatus

Enumeration of the achievement status.

Use GetAchievementStatus() to get the current status.

Enumerator
STATUS_ACHIEVEMENT_IDLE 

The achievement is idle.

STATUS_ACHIEVEMENT_SHOWING 

The achievements overlay is showing.

STATUS_ACHIEVEMENT_REPORTING 

Reporting achievements is in progress.

STATUS_ACHIEVEMENT_RESETTING 

Resetting all achievements is in progress.

STATUS_ACHIEVEMENT_LOADING 

Loading achievements is in progress.

◆ Error

Enumeration of error status.

Use GetError() to get the current status.

Enumerator
ERROR_NONE 

No error.

ERROR_UNKNOWN 

Unknown error.

ERROR_CANCELLED 

Action is cancelled.

ERROR_COMMUNICATIONS_FAILURE 

Communication failed.

ERROR_USER_DENIED 

User was denied.

ERROR_INVALID_CREDENTIALS 

Invalid credentials.

ERROR_NOT_AUTHENTICATED 

Not authenticated.

ERROR_AUTHENTICATION_IN_PROGRESS 

Authentication is in progress.

ERROR_INVALID_PLAYER 

Player identifier is invalid.

ERROR_SCORE_NOT_SET 

Score was not set.

ERROR_PARENTAL_CONTROLS_BLOCKED 

Parental control block.

ERROR_PLAYER_STATUS_EXCEEDS_MAXIMUM_LENGTH 

Player status exceeds maximum length.

ERROR_PLAYER_STATUS_INVALID 

Player status is invalid.

ERROR_MATCH_REQUEST_INVALID 

Match request is invalid.

ERROR_UNDERAGE 

Player is underage.

ERROR_GAME_UNRECOGNIZED 

Game is not recognized.

ERROR_NOT_SUPPORTED 

Not supported.

ERROR_INVALID_PARAMETER 

Invalid parameter.

Member Function Documentation

◆ GetAuthenticationStatus()

virtual AuthenticationStatus Murl::IGameCenterControl::GetAuthenticationStatus ( ) const
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()

virtual Bool Murl::IGameCenterControl::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()

virtual const IGameCenterPlayer& Murl::IGameCenterControl::GetLocalPlayer ( ) const
pure virtual

Get the game-center local user.

The local user is available when AuthenticateLocalPlayer() is finished.

Returns
The game-center local user.

◆ IsLocalPlayerUnderage()

virtual Bool Murl::IGameCenterControl::IsLocalPlayerUnderage ( ) const
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()

virtual Bool Murl::IGameCenterControl::IsAuthenticationIdle ( ) const
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()

virtual Bool Murl::IGameCenterControl::IsAuthenticating ( ) const
pure virtual

Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATING.

Returns
true if the status is IGameCenterControl::STATUS_AUTHENTICATING.

◆ IsAuthenticated()

virtual Bool Murl::IGameCenterControl::IsAuthenticated ( ) const
pure virtual

Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATED.

Returns
true if the status is IGameCenterControl::STATUS_AUTHENTICATED.

◆ IsAuthenticationFailed()

virtual Bool Murl::IGameCenterControl::IsAuthenticationFailed ( ) const
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()

virtual Bool Murl::IGameCenterControl::IsAuthenticationImpossible ( ) const
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()

virtual LoadFriendsStatus Murl::IGameCenterControl::GetLoadFriendsStatus ( ) const
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]

virtual Bool Murl::IGameCenterControl::LoadFriends ( )
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]

virtual Bool Murl::IGameCenterControl::LoadFriends ( const StringArray friendIds)
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
friendIdsA string array containing the player identifiers to load.
Returns
true if successful.

◆ GetFriends()

virtual const GameCenterPlayerEntries& Murl::IGameCenterControl::GetFriends ( ) const
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()

virtual Bool Murl::IGameCenterControl::IsLoadFriendsIdle ( ) const
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()

virtual Bool Murl::IGameCenterControl::IsLoadFriendsLoading ( ) const
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()

virtual LeaderboardStatus Murl::IGameCenterControl::GetLeaderboardStatus ( ) const
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()

virtual Bool Murl::IGameCenterControl::ShowLeaderboard ( const String category)
pure virtual

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
categoryThe name of the leaderboard category to show or an empty string to show the default leaderboard.
Returns
true if successful.

◆ ReportLeaderboard()

virtual Bool Murl::IGameCenterControl::ReportLeaderboard ( const String category,
UInt64  score 
)
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
categoryThe name of the leaderboard category.
scoreThe score to report.
Returns
true if successful.

◆ LoadLeaderboard()

virtual Bool Murl::IGameCenterControl::LoadLeaderboard ( const String category,
UInt32  startRank,
UInt32  numberOfRanks 
)
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
categoryThe name of the leaderboard category.
startRankThe first rank to load.
numberOfRanksThe number of ranks to load.
Returns
true if successful.

◆ GetLeaderboard()

virtual const GameCenterLeaderboardEntries& Murl::IGameCenterControl::GetLeaderboard ( ) const
pure virtual

Get an array of leaderboard entries.

The leaderboard entries are available when LoadLeaderboard() is finished.

Returns
The array of leaderboard entries.

◆ IsLeaderboardIdle()

virtual Bool Murl::IGameCenterControl::IsLeaderboardIdle ( ) const
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()

virtual Bool Murl::IGameCenterControl::IsLeaderboardShowing ( ) const
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()

virtual Bool Murl::IGameCenterControl::IsLeaderboardReporting ( ) const
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()

virtual Bool Murl::IGameCenterControl::IsLeaderboardLoading ( ) const
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()

virtual AchievementStatus Murl::IGameCenterControl::GetAchievementStatus ( ) const
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()

virtual Bool Murl::IGameCenterControl::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()

virtual Bool Murl::IGameCenterControl::ReportAchievement ( const String identifier,
Double  percentComplete,
Bool  showsCompletionBanner = true 
)
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
identifierThe achievement identifier.
percentCompleteThe percentage of achievement complete, report 0 to unhide achievement.
showsCompletionBannerIf true, a banner will be momentarily displayed after reporting a completed achievement.
Returns
true if successful.

◆ ResetAchievements()

virtual Bool Murl::IGameCenterControl::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()

virtual Bool Murl::IGameCenterControl::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()

virtual const GameCenterAchievementEntries& Murl::IGameCenterControl::GetAchievements ( ) const
pure virtual

Get an array of achievement entries.

The achievements entries are available when LoadAchievements() is finished.

Returns
The array of achievement entries.

◆ IsAchievementIdle()

virtual Bool Murl::IGameCenterControl::IsAchievementIdle ( ) const
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()

virtual Bool Murl::IGameCenterControl::IsAchievementShowing ( ) const
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()

virtual Bool Murl::IGameCenterControl::IsAchievementReporting ( ) const
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()

virtual Bool Murl::IGameCenterControl::IsAchievementResetting ( ) const
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()

virtual Bool Murl::IGameCenterControl::IsAchievementLoading ( ) const
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()

virtual Error Murl::IGameCenterControl::GetError ( ) const
pure virtual

Get the game-center error status.

Returns
The game-center error status.

◆ ClearLastError()

virtual Bool Murl::IGameCenterControl::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


Copyright © 2011-2018 Spraylight GmbH.