GOG GALAXY SDK Documentation
IStats Class Referenceabstract

The interface for managing statistics, achievements and leaderboards. More...

#include <IStats.h>

Public Member Functions

virtual void RequestUserStatsAndAchievements (GalaxyID userID=GalaxyID(), IUserStatsAndAchievementsRetrieveListener *const listener=NULL)=0
 Performs a request for statistics and achievements of a specified user. More...
 
virtual int32_t GetStatInt (const char *name, GalaxyID userID=GalaxyID())=0
 Reads integer value of a statistic of a specified user. More...
 
virtual float GetStatFloat (const char *name, GalaxyID userID=GalaxyID())=0
 Reads floating point value of a statistic of a specified user. More...
 
virtual void SetStatInt (const char *name, int32_t value)=0
 Updates a statistic with an integer value. More...
 
virtual void SetStatFloat (const char *name, float value)=0
 Updates a statistic with a floating point value. More...
 
virtual void UpdateAvgRateStat (const char *name, float countThisSession, double sessionLength)=0
 Updates an average-rate statistic with a delta. More...
 
virtual void GetAchievement (const char *name, bool &unlocked, uint32_t &unlockTime, GalaxyID userID=GalaxyID())=0
 Reads the state of an achievement of a specified user. More...
 
virtual void SetAchievement (const char *name)=0
 Unlocks an achievement. More...
 
virtual void ClearAchievement (const char *name)=0
 Clears an achievement. More...
 
virtual void StoreStatsAndAchievements (IStatsAndAchievementsStoreListener *const listener=NULL)=0
 Persists all changes in statistics and achievements. More...
 
virtual void ResetStatsAndAchievements (IStatsAndAchievementsStoreListener *const listener=NULL)=0
 Resets all statistics and achievements. More...
 
virtual const char * GetAchievementDisplayName (const char *name)=0
 Returns display name of a specified achievement. More...
 
virtual void GetAchievementDisplayNameCopy (const char *name, char *buffer, uint32_t bufferLength)=0
 Copies display name of a specified achievement. More...
 
virtual const char * GetAchievementDescription (const char *name)=0
 Returns description of a specified achievement. More...
 
virtual void GetAchievementDescriptionCopy (const char *name, char *buffer, uint32_t bufferLength)=0
 Copies description of a specified achievement. More...
 
virtual bool IsAchievementVisible (const char *name)=0
 Returns visibility status of a specified achievement. More...
 
virtual bool IsAchievementVisibleWhileLocked (const char *name)=0
 Returns visibility status of a specified achievement before unlocking. More...
 
virtual void RequestLeaderboards (ILeaderboardsRetrieveListener *const listener=NULL)=0
 Performs a request for definitions of leaderboards. More...
 
virtual const char * GetLeaderboardDisplayName (const char *name)=0
 Returns display name of a specified leaderboard. More...
 
virtual void GetLeaderboardDisplayNameCopy (const char *name, char *buffer, uint32_t bufferLength)=0
 Copies display name of a specified leaderboard. More...
 
virtual LeaderboardSortMethod GetLeaderboardSortMethod (const char *name)=0
 Returns sort method of a specified leaderboard. More...
 
virtual LeaderboardDisplayType GetLeaderboardDisplayType (const char *name)=0
 Returns display type of a specified leaderboard. More...
 
virtual void RequestLeaderboardEntriesGlobal (const char *name, uint32_t rangeStart, uint32_t rangeEnd, ILeaderboardEntriesRetrieveListener *const listener=NULL)=0
 Performs a request for entries of a specified leaderboard in a global scope, i.e. More...
 
virtual void RequestLeaderboardEntriesAroundUser (const char *name, uint32_t countBefore, uint32_t countAfter, GalaxyID userID=GalaxyID(), ILeaderboardEntriesRetrieveListener *const listener=NULL)=0
 Performs a request for entries of a specified leaderboard for and near the specified user. More...
 
virtual void RequestLeaderboardEntriesForUsers (const char *name, GalaxyID *userArray, uint32_t userArraySize, ILeaderboardEntriesRetrieveListener *const listener=NULL)=0
 Performs a request for entries of a specified leaderboard for specified users. More...
 
virtual void GetRequestedLeaderboardEntry (uint32_t index, uint32_t &rank, int32_t &score, GalaxyID &userID)=0
 Returns data from the currently processed request for leaderboard entries. More...
 
virtual void GetRequestedLeaderboardEntryWithDetails (uint32_t index, uint32_t &rank, int32_t &score, void *details, uint32_t detailsSize, uint32_t &outDetailsSize, GalaxyID &userID)=0
 Returns data with details from the currently processed request for leaderboard entries. More...
 
virtual void SetLeaderboardScore (const char *name, int32_t score, bool forceUpdate=false, ILeaderboardScoreUpdateListener *const listener=NULL)=0
 Updates entry for own user in a specified leaderboard. More...
 
virtual void SetLeaderboardScoreWithDetails (const char *name, int32_t score, const void *details, uint32_t detailsSize, bool forceUpdate=false, ILeaderboardScoreUpdateListener *const listener=NULL)=0
 Updates entry with details for own user in a specified leaderboard. More...
 
virtual uint32_t GetLeaderboardEntryCount (const char *name)=0
 Returns the leaderboard entry count for requested leaderboard. More...
 
virtual void FindLeaderboard (const char *name, ILeaderboardRetrieveListener *const listener=NULL)=0
 Performs a request for definition of a specified leaderboard. More...
 
virtual void FindOrCreateLeaderboard (const char *name, const char *displayName, const LeaderboardSortMethod &sortMethod, const LeaderboardDisplayType &displayType, ILeaderboardRetrieveListener *const listener=NULL)=0
 Performs a request for definition of a specified leaderboard, creating it if there is no such leaderboard yet. More...
 
virtual void RequestUserTimePlayed (GalaxyID userID=GalaxyID(), IUserTimePlayedRetrieveListener *const listener=NULL)=0
 Performs a request for user time played. More...
 
virtual uint32_t GetUserTimePlayed (GalaxyID userID=GalaxyID())=0
 Reads the number of seconds played by a specified user. More...
 

Detailed Description

The interface for managing statistics, achievements and leaderboards.

Member Function Documentation

◆ ClearAchievement()

virtual void ClearAchievement ( const char *  name)
pure virtual

Clears an achievement.

Remarks
In order to make this and other changes persistent, call StoreStatsAndAchievements().
Precondition
Retrieve the achievements first by calling RequestUserStatsAndAchievements().
Parameters
[in]nameThe code name of the achievement.

◆ FindLeaderboard()

virtual void FindLeaderboard ( const char *  name,
ILeaderboardRetrieveListener *const  listener = NULL 
)
pure virtual

Performs a request for definition of a specified leaderboard.

This call is asynchronous. Responses come to the ILeaderboardRetrieveListener.

Parameters
[in]nameThe name of the leaderboard.
[in]listenerThe listener for specific operation.

◆ FindOrCreateLeaderboard()

virtual void FindOrCreateLeaderboard ( const char *  name,
const char *  displayName,
const LeaderboardSortMethod sortMethod,
const LeaderboardDisplayType displayType,
ILeaderboardRetrieveListener *const  listener = NULL 
)
pure virtual

Performs a request for definition of a specified leaderboard, creating it if there is no such leaderboard yet.

This call is asynchronous. Responses come to the ILeaderboardRetrieveListener.

Remarks
If the leaderboard of the specified name is found, this call ends with success no matter if the definition of the leaderboard matches the parameters specified in the call to this method.
Parameters
[in]nameThe name of the leaderboard.
[in]displayNameThe display name of the leaderboard.
[in]sortMethodThe sort method of the leaderboard.
[in]displayTypeThe display method of the leaderboard.
[in]listenerThe listener for specific operation.

◆ GetAchievement()

virtual void GetAchievement ( const char *  name,
bool &  unlocked,
uint32_t &  unlockTime,
GalaxyID  userID = GalaxyID() 
)
pure virtual

Reads the state of an achievement of a specified user.

Precondition
Retrieve the achievements first by calling RequestUserStatsAndAchievements().
Parameters
[in]nameThe code name of the achievement.
[in,out]unlockedIndicates if the achievement has been unlocked.
[out]unlockTimeThe time at which the achievement was unlocked.
[in]userIDThe ID of the user. It can be omitted when requesting for own data.

◆ GetAchievementDescription()

virtual const char* GetAchievementDescription ( const char *  name)
pure virtual

Returns description of a specified achievement.

Remarks
This call is not thread-safe as opposed to GetAchievementDescriptionCopy().
Precondition
Retrieve the achievements first by calling RequestUserStatsAndAchievements().
Parameters
[in]nameThe name of the achievement.
Returns
Description of the specified achievement.

◆ GetAchievementDescriptionCopy()

virtual void GetAchievementDescriptionCopy ( const char *  name,
char *  buffer,
uint32_t  bufferLength 
)
pure virtual

Copies description of a specified achievement.

Precondition
Retrieve the achievements first by calling RequestUserStatsAndAchievements().
Parameters
[in]nameThe name of the achievement.
[in,out]bufferThe output buffer.
[in]bufferLengthThe size of the output buffer.

◆ GetAchievementDisplayName()

virtual const char* GetAchievementDisplayName ( const char *  name)
pure virtual

Returns display name of a specified achievement.

Remarks
This call is not thread-safe as opposed to GetAchievementDisplayNameCopy().
Precondition
Retrieve the achievements first by calling RequestUserStatsAndAchievements().
Parameters
[in]nameThe name of the achievement.
Returns
Display name of the specified achievement.

◆ GetAchievementDisplayNameCopy()

virtual void GetAchievementDisplayNameCopy ( const char *  name,
char *  buffer,
uint32_t  bufferLength 
)
pure virtual

Copies display name of a specified achievement.

Precondition
Retrieve the achievements first by calling RequestUserStatsAndAchievements().
Parameters
[in]nameThe name of the achievement.
[in,out]bufferThe output buffer.
[in]bufferLengthThe size of the output buffer.

◆ GetLeaderboardDisplayName()

virtual const char* GetLeaderboardDisplayName ( const char *  name)
pure virtual

Returns display name of a specified leaderboard.

Remarks
This call is not thread-safe as opposed to GetLeaderboardDisplayNameCopy().
Precondition
Retrieve definition of this particular leaderboard first by calling either FindLeaderboard() or FindOrCreateLeaderboard(), or definitions of all existing leaderboards by calling RequestLeaderboards().
Parameters
[in]nameThe name of the leaderboard.
Returns
Display name of the leaderboard.

◆ GetLeaderboardDisplayNameCopy()

virtual void GetLeaderboardDisplayNameCopy ( const char *  name,
char *  buffer,
uint32_t  bufferLength 
)
pure virtual

Copies display name of a specified leaderboard.

Precondition
Retrieve definition of this particular leaderboard first by calling either FindLeaderboard() or FindOrCreateLeaderboard(), or definitions of all existing leaderboards by calling RequestLeaderboards().
Parameters
[in]nameThe name of the leaderboard.
[in,out]bufferThe output buffer.
[in]bufferLengthThe size of the output buffer.

◆ GetLeaderboardDisplayType()

virtual LeaderboardDisplayType GetLeaderboardDisplayType ( const char *  name)
pure virtual

Returns display type of a specified leaderboard.

Precondition
Retrieve definition of this particular leaderboard first by calling either FindLeaderboard() or FindOrCreateLeaderboard(), or definitions of all existing leaderboards by calling RequestLeaderboards().
Parameters
[in]nameThe name of the leaderboard.
Returns
Display type of the leaderboard.

◆ GetLeaderboardEntryCount()

virtual uint32_t GetLeaderboardEntryCount ( const char *  name)
pure virtual

Returns the leaderboard entry count for requested leaderboard.

Precondition
In order to retrieve leaderboard entry count, first you need to call RequestLeaderboardEntriesGlobal(), RequestLeaderboardEntriesAroundUser(), or RequestLeaderboardEntriesForUsers().
Parameters
[in]nameThe name of the leaderboard.
Returns
The leaderboard entry count.

◆ GetLeaderboardSortMethod()

virtual LeaderboardSortMethod GetLeaderboardSortMethod ( const char *  name)
pure virtual

Returns sort method of a specified leaderboard.

Precondition
Retrieve definition of this particular leaderboard first by calling either FindLeaderboard() or FindOrCreateLeaderboard(), or definitions of all existing leaderboards by calling RequestLeaderboards().
Parameters
[in]nameThe name of the leaderboard.
Returns
Sort method of the leaderboard.

◆ GetRequestedLeaderboardEntry()

virtual void GetRequestedLeaderboardEntry ( uint32_t  index,
uint32_t &  rank,
int32_t &  score,
GalaxyID userID 
)
pure virtual

Returns data from the currently processed request for leaderboard entries.

Use this call to iterate over last retrieved leaderboard entries, indexed from 0.

Remarks
This method can be used only inside of ILeaderboardEntriesRetrieveListener::OnLeaderboardEntriesRetrieveSuccess().
Precondition
In order to retrieve lobbies and get their count, first you need to call RequestLeaderboardEntriesGlobal(), RequestLeaderboardEntriesAroundUser(), or RequestLeaderboardEntriesForUsers().
Parameters
[in]indexIndex as an integer in the range of [0, number of entries fetched).
[out]rankUser's rank in the leaderboard.
[out]scoreUser's score in the leaderboard.
[out]userIDThe ID of the user.

◆ GetRequestedLeaderboardEntryWithDetails()

virtual void GetRequestedLeaderboardEntryWithDetails ( uint32_t  index,
uint32_t &  rank,
int32_t &  score,
void *  details,
uint32_t  detailsSize,
uint32_t &  outDetailsSize,
GalaxyID userID 
)
pure virtual

Returns data with details from the currently processed request for leaderboard entries.

Use this call to iterate over last retrieved leaderboard entries, indexed from 0.

If the buffer that is supposed to take the details data is too small, the details will be truncated to its size.

Precondition
In order to retrieve lobbies and get their count, first you need to call RequestLeaderboardEntriesGlobal(), RequestLeaderboardEntriesAroundUser(), or RequestLeaderboardEntriesForUsers().
Remarks
This method can be used only inside of ILeaderboardEntriesRetrieveListener::OnLeaderboardEntriesRetrieveSuccess().
Parameters
[in]indexIndex as an integer in the range of [0, number of entries fetched).
[out]rankUser's rank in the leaderboard.
[out]scoreUser's score in the leaderboard.
[in,out]detailsAn extra, outgoing game-defined information regarding how the user got that score.
[in]detailsSizeThe size of passed buffer of the extra game-defined information.
[out]outDetailsSizeThe size of the extra game-defined information.
[out]userIDThe ID of the user.

◆ GetStatFloat()

virtual float GetStatFloat ( const char *  name,
GalaxyID  userID = GalaxyID() 
)
pure virtual

Reads floating point value of a statistic of a specified user.

Precondition
Retrieve the statistics first by calling RequestUserStatsAndAchievements().
Parameters
[in]nameThe code name of the statistic.
[in]userIDThe ID of the user. It can be omitted when requesting for own data.
Returns
The value of the statistic.

◆ GetStatInt()

virtual int32_t GetStatInt ( const char *  name,
GalaxyID  userID = GalaxyID() 
)
pure virtual

Reads integer value of a statistic of a specified user.

Precondition
Retrieve the statistics first by calling RequestUserStatsAndAchievements().
Parameters
[in]nameThe code name of the statistic.
[in]userIDThe ID of the user. It can be omitted when requesting for own data.
Returns
The value of the statistic.

◆ GetUserTimePlayed()

virtual uint32_t GetUserTimePlayed ( GalaxyID  userID = GalaxyID())
pure virtual

Reads the number of seconds played by a specified user.

Precondition
Retrieve the statistics first by calling RequestUserTimePlayed().
Parameters
[in]userIDThe ID of the user. It can be omitted when requesting for own data.
Returns
The number of seconds played by the specified user.

◆ IsAchievementVisible()

virtual bool IsAchievementVisible ( const char *  name)
pure virtual

Returns visibility status of a specified achievement.

Precondition
Retrieve the achievements first by calling RequestUserStatsAndAchievements().
Parameters
[in]nameThe name of the achievement.
Returns
If the achievement is visible.

◆ IsAchievementVisibleWhileLocked()

virtual bool IsAchievementVisibleWhileLocked ( const char *  name)
pure virtual

Returns visibility status of a specified achievement before unlocking.

Precondition
Retrieve the achievements first by calling RequestUserStatsAndAchievements().
Parameters
[in]nameThe name of the achievement.
Returns
If the achievement is visible before unlocking.

◆ RequestLeaderboardEntriesAroundUser()

virtual void RequestLeaderboardEntriesAroundUser ( const char *  name,
uint32_t  countBefore,
uint32_t  countAfter,
GalaxyID  userID = GalaxyID(),
ILeaderboardEntriesRetrieveListener *const  listener = NULL 
)
pure virtual

Performs a request for entries of a specified leaderboard for and near the specified user.

The specified numbers of entries before and after the specified user are treated as hints. If the requested range would go beyond the set of all leaderboard entries, it is shifted so that it fits in the set of all leaderboard entries and preserves its size if possible.

This call is asynchronous. Responses come to the ILeaderboardEntriesRetrieveListener.

Remarks
This call will end with failure in case there is no entry for the specified user in the specified leaderboard.
Precondition
Retrieve definition of this particular leaderboard first by calling either FindLeaderboard() or FindOrCreateLeaderboard(), or definitions of all existing leaderboards by calling RequestLeaderboards().
Parameters
[in]nameThe name of the leaderboard.
[in]countBeforeThe number of entries placed before the user's entry to retrieve (hint).
[in]countAfterThe number of entries placed after the user's entry to retrieve (hint).
[in]userIDThe ID of the user. It can be omitted when requesting for own data.
[in]listenerThe listener for specific operation.

◆ RequestLeaderboardEntriesForUsers()

virtual void RequestLeaderboardEntriesForUsers ( const char *  name,
GalaxyID userArray,
uint32_t  userArraySize,
ILeaderboardEntriesRetrieveListener *const  listener = NULL 
)
pure virtual

Performs a request for entries of a specified leaderboard for specified users.

This call is asynchronous. Responses come to the ILeaderboardEntriesRetrieveListener.

Precondition
Retrieve definition of this particular leaderboard first by calling either FindLeaderboard() or FindOrCreateLeaderboard(), or definitions of all existing leaderboards by calling RequestLeaderboards().
Parameters
[in]nameThe name of the leaderboard.
[in]userArrayAn array with the list of IDs of the users in scope.
[in]userArraySizeThe size of the array, i.e. the number of users in the specified list.
[in]listenerThe listener for specific operation.

◆ RequestLeaderboardEntriesGlobal()

virtual void RequestLeaderboardEntriesGlobal ( const char *  name,
uint32_t  rangeStart,
uint32_t  rangeEnd,
ILeaderboardEntriesRetrieveListener *const  listener = NULL 
)
pure virtual

Performs a request for entries of a specified leaderboard in a global scope, i.e.

without any specific users in the scope of interest.

The entries are indexed by integers in the range of [0, number of entries).

This call is asynchronous. Responses come to the ILeaderboardEntriesRetrieveListener.

Precondition
Retrieve definition of this particular leaderboard first by calling either FindLeaderboard() or FindOrCreateLeaderboard(), or definitions of all existing leaderboards by calling RequestLeaderboards().
Parameters
[in]nameThe name of the leaderboard.
[in]rangeStartThe index position of the entry to start with.
[in]rangeEndThe index position of the entry to finish with.
[in]listenerThe listener for specific operation.

◆ RequestLeaderboards()

virtual void RequestLeaderboards ( ILeaderboardsRetrieveListener *const  listener = NULL)
pure virtual

Performs a request for definitions of leaderboards.

This call is asynchronous. Responses come to the ILeaderboardsRetrieveListener.

Parameters
[in]listenerThe listener for specific operation.

◆ RequestUserStatsAndAchievements()

virtual void RequestUserStatsAndAchievements ( GalaxyID  userID = GalaxyID(),
IUserStatsAndAchievementsRetrieveListener *const  listener = NULL 
)
pure virtual

Performs a request for statistics and achievements of a specified user.

This call is asynchronous. Responses come to the IUserStatsAndAchievementsRetrieveListener (for all GlobalUserStatsAndAchievementsRetrieveListener-derived and optional listener passed as argument).

Parameters
[in]userIDThe ID of the user. It can be omitted when requesting for own data.
[in]listenerThe listener for specific operation.

◆ RequestUserTimePlayed()

virtual void RequestUserTimePlayed ( GalaxyID  userID = GalaxyID(),
IUserTimePlayedRetrieveListener *const  listener = NULL 
)
pure virtual

Performs a request for user time played.

This call is asynchronous. Responses come to the IUserTimePlayedRetrieveListener.

Parameters
[in]userIDThe ID of the user. It can be omitted when requesting for own data.
[in]listenerThe listener for specific operation.

◆ ResetStatsAndAchievements()

virtual void ResetStatsAndAchievements ( IStatsAndAchievementsStoreListener *const  listener = NULL)
pure virtual

Resets all statistics and achievements.

This is the same as setting statistics and achievements to their initial values and calling StoreStatsAndAchievements().

This call is asynchronous. Responses come to the IStatsAndAchievementsStoreListener (for all GlobalStatsAndAchievementsStoreListener-derived and optional listener passed as argument).

Parameters
[in]listenerThe listener for specific operation.

◆ SetAchievement()

virtual void SetAchievement ( const char *  name)
pure virtual

Unlocks an achievement.

The achievement is marked as unlocked at the time at which this message was called.

Remarks
In order to make this and other changes persistent, call StoreStatsAndAchievements().
Precondition
Retrieve the achievements first by calling RequestUserStatsAndAchievements().
Parameters
[in]nameThe code name of the achievement.

◆ SetLeaderboardScore()

virtual void SetLeaderboardScore ( const char *  name,
int32_t  score,
bool  forceUpdate = false,
ILeaderboardScoreUpdateListener *const  listener = NULL 
)
pure virtual

Updates entry for own user in a specified leaderboard.

This call is asynchronous. Responses come to the ILeaderboardScoreUpdateListener.

Precondition
Retrieve definition of this particular leaderboard first by calling either FindLeaderboard() or FindOrCreateLeaderboard(), or definitions of all existing leaderboards by calling RequestLeaderboards().
For this call to work while the user is logged off, the definition of the leaderboard must have been retrieved at least once while the user was logged on.
Parameters
[in]nameThe name of the leaderboard.
[in]scoreThe score to set.
[in]forceUpdateIf the update should be performed in case the score is worse than the previous score.
[in]listenerThe listener for specific operation.

◆ SetLeaderboardScoreWithDetails()

virtual void SetLeaderboardScoreWithDetails ( const char *  name,
int32_t  score,
const void *  details,
uint32_t  detailsSize,
bool  forceUpdate = false,
ILeaderboardScoreUpdateListener *const  listener = NULL 
)
pure virtual

Updates entry with details for own user in a specified leaderboard.

This call is asynchronous. Responses come to the ILeaderboardScoreUpdateListener.

Precondition
Retrieve definition of this particular leaderboard first by calling either FindLeaderboard() or FindOrCreateLeaderboard(), or definitions of all existing leaderboards by calling RequestLeaderboards().
For this call to work while the user is logged off, the definition of the leaderboard must have been retrieved at least once while the user was logged on.
Parameters
[in]nameThe name of the leaderboard.
[in]scoreThe score to set.
[in]detailsAn extra game-defined information regarding how the user got that score with the limit of 3071 bytes.
[in]detailsSizeThe size of buffer of the extra game-defined information.
[in]forceUpdateIf the update should be performed in case the score is worse than the previous score.
[in]listenerThe listener for specific operation.

◆ SetStatFloat()

virtual void SetStatFloat ( const char *  name,
float  value 
)
pure virtual

Updates a statistic with a floating point value.

Remarks
In order to make this and other changes persistent, call StoreStatsAndAchievements().
Precondition
Retrieve the statistics first by calling RequestUserStatsAndAchievements().
Parameters
[in]nameThe code name of the statistic.
[in]valueThe value of the statistic to set.

◆ SetStatInt()

virtual void SetStatInt ( const char *  name,
int32_t  value 
)
pure virtual

Updates a statistic with an integer value.

Remarks
In order to make this and other changes persistent, call StoreStatsAndAchievements().
Precondition
Retrieve the statistics first by calling RequestUserStatsAndAchievements().
Parameters
[in]nameThe code name of the statistic.
[in]valueThe value of the statistic to set.

◆ StoreStatsAndAchievements()

virtual void StoreStatsAndAchievements ( IStatsAndAchievementsStoreListener *const  listener = NULL)
pure virtual

Persists all changes in statistics and achievements.

This call is asynchronous. Responses come to the IStatsAndAchievementsStoreListener (for all GlobalStatsAndAchievementsStoreListener-derived and optional listener passed as argument).

Remarks
Notifications about storing changes that result in unlocking achievements come to the IAchievementChangeListener.
Parameters
[in]listenerThe listener for specific operation.

◆ UpdateAvgRateStat()

virtual void UpdateAvgRateStat ( const char *  name,
float  countThisSession,
double  sessionLength 
)
pure virtual

Updates an average-rate statistic with a delta.

Remarks
In order to make this and other changes persistent, call StoreStatsAndAchievements().
Precondition
Retrieve the statistics first by calling RequestUserStatsAndAchievements().
Parameters
[in]nameThe code name of the statistic.
[in]countThisSessionThe delta of the count.
[in]sessionLengthThe delta of the session.