Class EOS_Stats_Interface

java.lang.Object
com.sun.jna.PointerType
host.anzo.eossdk.eos.sdk.EOS_Stats_Interface
All Implemented Interfaces:
com.sun.jna.NativeMapped

public class EOS_Stats_Interface extends com.sun.jna.PointerType
The Stats Interface manages user stats like number of items collected, fastest completion time for a level, number of wins/losses, number of times that a user has performed a certain action, and so on. You can use stats to determine when to unlock achievements and how to use rank users in leaderboards. All Stats Interface calls take a handle of type EOS_HStats as the first parameter. This handle can be retrieved from an EOS_HPlatform handle by using the EOS_Platform_GetStatsInterface function.
Since:
8/31/2023
See Also:
  • Constructor Details

    • EOS_Stats_Interface

      public EOS_Stats_Interface(com.sun.jna.Pointer address)
    • EOS_Stats_Interface

      public EOS_Stats_Interface()
  • Method Details

    • ingestStat

      public void ingestStat(EOS_Stats_IngestStatOptions options, com.sun.jna.Pointer clientData, EOS_Stats_OnIngestStatCompleteCallback completionDelegate)
      Ingest a stat by the amount specified in Options. When the operation is complete and the delegate is triggered the stat will be uploaded to the backend to be processed. The stat may not be updated immediately and an achievement using the stat may take a while to be unlocked once the stat has been uploaded.
      Parameters:
      options - Structure containing information about the stat we're ingesting.
      clientData - Arbitrary data that is passed back to you in the completionDelegate.
      completionDelegate - This function is called when the ingest stat operation completes.
    • queryStats

      public void queryStats(EOS_Stats_QueryStatsOptions options, com.sun.jna.Pointer clientData, EOS_Stats_OnQueryStatsCompleteCallback completionDelegate)
      Query for a list of stats for a specific player.
      Parameters:
      options - Structure containing information about the player whose stats we're retrieving.
      clientData - Arbitrary data that is passed back to you in the completionDelegate
      completionDelegate - This function is called when the query player stats operation completes.
    • getStatsCount

      public int getStatsCount(EOS_Stats_GetStatCountOptions options)
      Fetch the number of stats that are cached locally.
      Parameters:
      options - The Options associated with retrieving the stat count
      Returns:
      Number of stats or 0 if there is an error
      See Also:
    • copyStatByIndex

      public EOS_Stats_Stat copyStatByIndex(EOS_Stats_CopyStatByIndexOptions options) throws EOSException
      Fetches a stat from a given index. Use EOS_Stats_Stat_Release when finished with the data.
      Parameters:
      options - Structure containing the Product User ID and index being accessed
      Returns:
      The stat data for the given index, if it exists and is valid
      Throws:
      EOSInvalidParametersException - if you pass a null pointer for the out parameter
      EOSNotFoundException - if the stat is not found
      EOSException
      See Also:
    • copyStatByName

      public EOS_Stats_Stat copyStatByName(EOS_Stats_CopyStatByNameOptions options) throws EOSException
      Fetches a stat from cached stats by name. Use EOS_Stats_Stat_Release when finished with the data.
      Parameters:
      options - Structure containing the Product User ID and name being accessed
      Returns:
      The stat data for the given name, if it exists and is valid
      Throws:
      EOSInvalidParametersException - if you pass a null pointer for the out parameter
      EOSNotFoundException - if the stat is not found
      EOSException
      See Also: