Package host.anzo.eossdk.eos.sdk
Class EOS_Achievements_Interface
java.lang.Object
com.sun.jna.PointerType
host.anzo.eossdk.eos.sdk.EOS_Achievements_Interface
- All Implemented Interfaces:
com.sun.jna.NativeMapped
public class EOS_Achievements_Interface
extends com.sun.jna.PointerType
The following EOS_Achievements_* functions allow you to query existing achievement definitions that have been defined for your application.
You can also query achievement progress data for users.
In addition, you can also unlock one or more achievements directly.
You can also receive notifications when achievements are unlocked.
- Since:
- 8/19/2023
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddNotifyAchievementsUnlockedV2(EOS_Achievements_AddNotifyAchievementsUnlockedV2Options options, com.sun.jna.Pointer clientData, EOS_Achievements_OnAchievementsUnlockedCallbackV2 notificationFn) Register to receive achievement unlocked notifications.
Must call EOS_Achievements_RemoveNotifyAchievementsUnlocked to remove the notificationcopyAchievementDefinitionV2ByAchievementId(EOS_Achievements_CopyAchievementDefinitionV2ByAchievementIdOptions options) Fetches an achievement definition from a given achievement ID.copyAchievementDefinitionV2ByIndex(EOS_Achievements_CopyAchievementDefinitionV2ByIndexOptions options) Fetches an achievement definition from a given index.copyPlayerAchievementByAchievementId(EOS_Achievements_CopyPlayerAchievementByAchievementIdOptions options) Fetches a player achievement from a given achievement ID.Fetches a player achievement from a given index.intFetch the number of achievement definitions that are cached locally.intFetch the number of player achievements that are cached locally.voidqueryDefinitions(EOS_Achievements_QueryDefinitionsOptions options, com.sun.jna.Pointer clientData, EOS_Achievements_OnQueryDefinitionsCompleteCallback completionDelegate) Query for a list of definitions for all existing achievements, including localized text, icon IDs and whether an achievement is hidden.voidqueryPlayerAchievements(EOS_Achievements_QueryPlayerAchievementsOptions options, com.sun.jna.Pointer clientData, EOS_Achievements_OnQueryPlayerAchievementsCompleteCallback completionDelegate) Query for a list of achievements for a specific player, including progress towards completion for each achievement.
When the Social Overlay is enabled then this will be called automatically.voidUnregister from receiving achievement unlocked notifications.voidunlockAchievements(EOS_Achievements_UnlockAchievementsOptions options, com.sun.jna.Pointer clientData, EOS_Achievements_OnUnlockAchievementsCompleteCallback completionDelegate) Unlocks a number of achievements for a specific player.Methods inherited from class com.sun.jna.PointerType
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
-
Constructor Details
-
EOS_Achievements_Interface
public EOS_Achievements_Interface(com.sun.jna.Pointer address) -
EOS_Achievements_Interface
public EOS_Achievements_Interface()
-
-
Method Details
-
queryDefinitions
public void queryDefinitions(EOS_Achievements_QueryDefinitionsOptions options, com.sun.jna.Pointer clientData, EOS_Achievements_OnQueryDefinitionsCompleteCallback completionDelegate) Query for a list of definitions for all existing achievements, including localized text, icon IDs and whether an achievement is hidden.When the Social Overlay is enabled then this will be called automatically. The Social Overlay is enabled by default (see
EOS_Platform_Create_Flag.EOS_PF_DISABLE_SOCIAL_OVERLAY).- Parameters:
options- Structure containing information about the application whose achievement definitions we're retrieving.clientData- Arbitrary data that is passed back to you in the completionDelegatecompletionDelegate- This function is called when the query definitions operation completes.
-
getAchievementDefinitionCount
public int getAchievementDefinitionCount(EOS_Achievements_GetAchievementDefinitionCountOptions options) Fetch the number of achievement definitions that are cached locally.- Parameters:
options- The Options associated with retrieving the achievement definition count- Returns:
- Number of achievement definitions or 0 if there is an error
- See Also:
-
copyAchievementDefinitionV2ByIndex
public EOS_Achievements_DefinitionV2 copyAchievementDefinitionV2ByIndex(EOS_Achievements_CopyAchievementDefinitionV2ByIndexOptions options) throws EOSException Fetches an achievement definition from a given index.- Parameters:
options- Structure containing the index being accessed- Returns:
- The achievement definition for the given index, if it exists and is valid, use EOS_Achievements_Definition_Release when finished
- Throws:
EOSInvalidParametersException- if you pass a null pointer for the out parameterEOSNotFoundException- if the achievement definition is not foundEOSInvalidProductUserIDException- if any of the userid options are incorrectEOSException- See Also:
-
copyAchievementDefinitionV2ByAchievementId
public EOS_Achievements_DefinitionV2 copyAchievementDefinitionV2ByAchievementId(EOS_Achievements_CopyAchievementDefinitionV2ByAchievementIdOptions options) throws EOSException Fetches an achievement definition from a given achievement ID.- Parameters:
options- Structure containing the achievement ID being accessed- Returns:
- The achievement definition for the given achievement ID, if it exists and is valid, use EOS_Achievements_Definition_Release when finished
- Throws:
EOSInvalidParametersException- if you pass a null pointer for the out parameterEOSNotFoundException- if the achievement definition is not foundEOSInvalidProductUserIDException- if any of the userid options are incorrectEOSException- See Also:
-
queryPlayerAchievements
public void queryPlayerAchievements(EOS_Achievements_QueryPlayerAchievementsOptions options, com.sun.jna.Pointer clientData, EOS_Achievements_OnQueryPlayerAchievementsCompleteCallback completionDelegate) Query for a list of achievements for a specific player, including progress towards completion for each achievement.
When the Social Overlay is enabled then this will be called automatically. The Social Overlay is enabled by default (see EOS_Platform_Create_Flag#EOS_PF_DISABLE_SOCIAL_OVERLAY).- Parameters:
options- Structure containing information about the player whose achievements we're retrieving.clientData- Arbitrary data that is passed back to you in the completionDelegatecompletionDelegate- This function is called when the query player achievements operation completes.- See Also:
-
getPlayerAchievementCount
Fetch the number of player achievements that are cached locally.- Parameters:
options- The Options associated with retrieving the player achievement count- Returns:
- Number of player achievements or 0 if there is an error
- See Also:
-
copyPlayerAchievementByIndex
public EOS_Achievements_PlayerAchievement copyPlayerAchievementByIndex(EOS_Achievements_CopyPlayerAchievementByIndexOptions options) throws EOSException Fetches a player achievement from a given index.- Parameters:
options- Structure containing the Product User ID and index being accessed- Returns:
- The player achievement data for the given index, if it exists and is valid, use EOS_Achievements_PlayerAchievement_Release when finished
- Throws:
EOSInvalidParametersException- if you pass a null pointer for the out parameterEOSNotFoundException- if the player achievement is not foundEOSInvalidProductUserIDException- if you pass an invalid user IDEOSException- See Also:
-
copyPlayerAchievementByAchievementId
public EOS_Achievements_PlayerAchievement copyPlayerAchievementByAchievementId(EOS_Achievements_CopyPlayerAchievementByAchievementIdOptions options) throws EOSException Fetches a player achievement from a given achievement ID.- Parameters:
options- Structure containing the Product User ID and achievement ID being accessed- Returns:
- The player achievement data for the given achievement ID, if it exists and is valid, use EOS_Achievements_PlayerAchievement_Release when finished
- Throws:
EOSInvalidParametersException- if you pass a null pointer for the out parameterEOSNotFoundException- if the player achievement is not foundEOSInvalidProductUserIDException- if you pass an invalid user IDEOSException- See Also:
-
unlockAchievements
public void unlockAchievements(EOS_Achievements_UnlockAchievementsOptions options, com.sun.jna.Pointer clientData, EOS_Achievements_OnUnlockAchievementsCompleteCallback completionDelegate) Unlocks a number of achievements for a specific player.- Parameters:
options- Structure containing information about the achievements and the player whose achievements we're unlocking.clientData- Arbitrary data that is passed back to you in the completionDelegatecompletionDelegate- This function is called when the unlock achievements operation completes.
-
addNotifyAchievementsUnlockedV2
public EOS_NotificationId addNotifyAchievementsUnlockedV2(EOS_Achievements_AddNotifyAchievementsUnlockedV2Options options, com.sun.jna.Pointer clientData, EOS_Achievements_OnAchievementsUnlockedCallbackV2 notificationFn) Register to receive achievement unlocked notifications.
Must call EOS_Achievements_RemoveNotifyAchievementsUnlocked to remove the notification- Parameters:
options- Structure containing information about the achievement unlocked notificationclientData- Arbitrary data that is passed back to you in the completionDelegatenotificationFn- A callback that is fired when an achievement unlocked notification for a user has been received- Returns:
- handle representing the registered callback
- See Also:
-
removeNotifyAchievementsUnlocked
Unregister from receiving achievement unlocked notifications.- Parameters:
inId- Handle representing the registered callback- See Also:
-