You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
674 lines
30 KiB
674 lines
30 KiB
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
// This file is automatically generated. Changes to this file may be overwritten.
|
|
|
|
namespace Epic.OnlineServices.Achievements
|
|
{
|
|
public sealed partial class AchievementsInterface : Handle
|
|
{
|
|
public AchievementsInterface()
|
|
{
|
|
}
|
|
|
|
public AchievementsInterface(System.IntPtr innerHandle) : base(innerHandle)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Timestamp value representing an undefined UnlockTime for <see cref="PlayerAchievement" /> and <see cref="UnlockedAchievement" />
|
|
/// </summary>
|
|
public const int AchievementUnlocktimeUndefined = -1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="AddNotifyAchievementsUnlocked" /> API.
|
|
/// </summary>
|
|
public const int AddnotifyachievementsunlockedApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="AddNotifyAchievementsUnlockedV2" /> API.
|
|
/// </summary>
|
|
public const int Addnotifyachievementsunlockedv2ApiLatest = 2;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="CopyAchievementDefinitionV2ByAchievementIdOptions" /> struct.
|
|
/// </summary>
|
|
public const int Copyachievementdefinitionv2ByachievementidApiLatest = 2;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="CopyAchievementDefinitionByIndexOptions" /> struct.
|
|
/// </summary>
|
|
public const int Copyachievementdefinitionv2ByindexApiLatest = 2;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="CopyAchievementDefinitionByAchievementIdOptions" /> struct.
|
|
/// </summary>
|
|
public const int CopydefinitionbyachievementidApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="CopyAchievementDefinitionByIndexOptions" /> struct.
|
|
/// </summary>
|
|
public const int CopydefinitionbyindexApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// DEPRECATED! Use <see cref="Copyachievementdefinitionv2ByachievementidApiLatest" /> instead.
|
|
/// </summary>
|
|
public const int Copydefinitionv2ByachievementidApiLatest = Copyachievementdefinitionv2ByachievementidApiLatest;
|
|
|
|
/// <summary>
|
|
/// DEPRECATED! Use <see cref="Copyachievementdefinitionv2ByindexApiLatest" /> instead.
|
|
/// </summary>
|
|
public const int Copydefinitionv2ByindexApiLatest = Copyachievementdefinitionv2ByindexApiLatest;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="CopyPlayerAchievementByAchievementIdOptions" /> struct.
|
|
/// </summary>
|
|
public const int CopyplayerachievementbyachievementidApiLatest = 2;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="CopyPlayerAchievementByIndexOptions" /> struct.
|
|
/// </summary>
|
|
public const int CopyplayerachievementbyindexApiLatest = 2;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="CopyUnlockedAchievementByAchievementIdOptions" /> struct.
|
|
/// </summary>
|
|
public const int CopyunlockedachievementbyachievementidApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="CopyUnlockedAchievementByIndexOptions" /> struct.
|
|
/// </summary>
|
|
public const int CopyunlockedachievementbyindexApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="Definition" /> struct.
|
|
/// </summary>
|
|
public const int DefinitionApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="DefinitionV2" /> struct.
|
|
/// </summary>
|
|
public const int Definitionv2ApiLatest = 2;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="GetAchievementDefinitionCount" /> API.
|
|
/// </summary>
|
|
public const int GetachievementdefinitioncountApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="GetPlayerAchievementCount" /> API.
|
|
/// </summary>
|
|
public const int GetplayerachievementcountApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="GetUnlockedAchievementCount" /> API.
|
|
/// </summary>
|
|
public const int GetunlockedachievementcountApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="PlayerAchievement" /> struct.
|
|
/// </summary>
|
|
public const int PlayerachievementApiLatest = 2;
|
|
|
|
public const int PlayerstatinfoApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="QueryDefinitions" /> struct.
|
|
/// </summary>
|
|
public const int QuerydefinitionsApiLatest = 3;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="QueryPlayerAchievements" /> struct.
|
|
/// </summary>
|
|
public const int QueryplayerachievementsApiLatest = 2;
|
|
|
|
/// <summary>
|
|
/// DEPRECATED! Use <see cref="StatthresholdsApiLatest" /> instead.
|
|
/// </summary>
|
|
public const int StatthresholdApiLatest = StatthresholdsApiLatest;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="StatThresholds" /> struct.
|
|
/// </summary>
|
|
public const int StatthresholdsApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="UnlockAchievements" /> struct.
|
|
/// </summary>
|
|
public const int UnlockachievementsApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="UnlockedAchievement" /> struct.
|
|
/// </summary>
|
|
public const int UnlockedachievementApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// DEPRECATED! Use <see cref="AddNotifyAchievementsUnlockedV2" /> instead.
|
|
///
|
|
/// Register to receive achievement unlocked notifications.
|
|
/// must call EOS_Achievements_RemoveNotifyAchievementsUnlocked to remove the notification
|
|
/// <seealso cref="RemoveNotifyAchievementsUnlocked" />
|
|
/// </summary>
|
|
/// <param name="options">Structure containing information about the achievement unlocked notification</param>
|
|
/// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
|
|
/// <param name="notificationFn">A callback that is fired when an achievement unlocked notification for a user has been received</param>
|
|
/// <returns>
|
|
/// handle representing the registered callback
|
|
/// </returns>
|
|
public ulong AddNotifyAchievementsUnlocked(ref AddNotifyAchievementsUnlockedOptions options, object clientData, OnAchievementsUnlockedCallback notificationFn)
|
|
{
|
|
AddNotifyAchievementsUnlockedOptionsInternal optionsInternal = new AddNotifyAchievementsUnlockedOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var notificationFnInternal = new OnAchievementsUnlockedCallbackInternal(OnAchievementsUnlockedCallbackInternalImplementation);
|
|
Helper.AddCallback(out clientDataAddress, clientData, notificationFn, notificationFnInternal);
|
|
|
|
var funcResult = Bindings.EOS_Achievements_AddNotifyAchievementsUnlocked(InnerHandle, ref optionsInternal, clientDataAddress, notificationFnInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.AssignNotificationIdToCallback(clientDataAddress, funcResult);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Register to receive achievement unlocked notifications.
|
|
/// must call EOS_Achievements_RemoveNotifyAchievementsUnlocked to remove the notification
|
|
/// <seealso cref="RemoveNotifyAchievementsUnlocked" />
|
|
/// </summary>
|
|
/// <param name="options">Structure containing information about the achievement unlocked notification</param>
|
|
/// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
|
|
/// <param name="notificationFn">A callback that is fired when an achievement unlocked notification for a user has been received</param>
|
|
/// <returns>
|
|
/// handle representing the registered callback
|
|
/// </returns>
|
|
public ulong AddNotifyAchievementsUnlockedV2(ref AddNotifyAchievementsUnlockedV2Options options, object clientData, OnAchievementsUnlockedCallbackV2 notificationFn)
|
|
{
|
|
AddNotifyAchievementsUnlockedV2OptionsInternal optionsInternal = new AddNotifyAchievementsUnlockedV2OptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var notificationFnInternal = new OnAchievementsUnlockedCallbackV2Internal(OnAchievementsUnlockedCallbackV2InternalImplementation);
|
|
Helper.AddCallback(out clientDataAddress, clientData, notificationFn, notificationFnInternal);
|
|
|
|
var funcResult = Bindings.EOS_Achievements_AddNotifyAchievementsUnlockedV2(InnerHandle, ref optionsInternal, clientDataAddress, notificationFnInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.AssignNotificationIdToCallback(clientDataAddress, funcResult);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// DEPRECATED! Use <see cref="CopyAchievementDefinitionV2ByAchievementId" /> instead.
|
|
///
|
|
/// Fetches an achievement definition from a given achievement ID.
|
|
/// <seealso cref="Release" />
|
|
/// <seealso cref="CopyAchievementDefinitionV2ByAchievementId" />
|
|
/// </summary>
|
|
/// <param name="options">Structure containing the achievement ID being accessed</param>
|
|
/// <param name="outDefinition">The achievement definition for the given achievement ID, if it exists and is valid, use <see cref="Release" /> when finished</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the information is available and passed out in OutDefinition
|
|
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
|
|
/// <see cref="Result.NotFound" /> if the achievement definition is not found
|
|
/// </returns>
|
|
public Result CopyAchievementDefinitionByAchievementId(ref CopyAchievementDefinitionByAchievementIdOptions options, out Definition? outDefinition)
|
|
{
|
|
CopyAchievementDefinitionByAchievementIdOptionsInternal optionsInternal = new CopyAchievementDefinitionByAchievementIdOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outDefinitionAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Achievements_CopyAchievementDefinitionByAchievementId(InnerHandle, ref optionsInternal, ref outDefinitionAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<DefinitionInternal, Definition>(outDefinitionAddress, out outDefinition);
|
|
if (outDefinition != null)
|
|
{
|
|
Bindings.EOS_Achievements_Definition_Release(outDefinitionAddress);
|
|
}
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// DEPRECATED! Use <see cref="CopyAchievementDefinitionV2ByIndex" /> instead.
|
|
///
|
|
/// Fetches an achievement definition from a given index.
|
|
/// <seealso cref="CopyAchievementDefinitionV2ByIndex" />
|
|
/// <seealso cref="Release" />
|
|
/// </summary>
|
|
/// <param name="options">Structure containing the index being accessed</param>
|
|
/// <param name="outDefinition">The achievement definition for the given index, if it exists and is valid, use <see cref="Release" /> when finished</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the information is available and passed out in OutDefinition
|
|
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
|
|
/// <see cref="Result.NotFound" /> if the achievement definition is not found
|
|
/// </returns>
|
|
public Result CopyAchievementDefinitionByIndex(ref CopyAchievementDefinitionByIndexOptions options, out Definition? outDefinition)
|
|
{
|
|
CopyAchievementDefinitionByIndexOptionsInternal optionsInternal = new CopyAchievementDefinitionByIndexOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outDefinitionAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Achievements_CopyAchievementDefinitionByIndex(InnerHandle, ref optionsInternal, ref outDefinitionAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<DefinitionInternal, Definition>(outDefinitionAddress, out outDefinition);
|
|
if (outDefinition != null)
|
|
{
|
|
Bindings.EOS_Achievements_Definition_Release(outDefinitionAddress);
|
|
}
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Fetches an achievement definition from a given achievement ID.
|
|
/// <seealso cref="Release" />
|
|
/// </summary>
|
|
/// <param name="options">Structure containing the achievement ID being accessed</param>
|
|
/// <param name="outDefinition">The achievement definition for the given achievement ID, if it exists and is valid, use <see cref="Release" /> when finished</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the information is available and passed out in OutDefinition
|
|
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
|
|
/// <see cref="Result.NotFound" /> if the achievement definition is not found
|
|
/// <see cref="Result.InvalidProductUserID" /> if any of the userid options are incorrect
|
|
/// </returns>
|
|
public Result CopyAchievementDefinitionV2ByAchievementId(ref CopyAchievementDefinitionV2ByAchievementIdOptions options, out DefinitionV2? outDefinition)
|
|
{
|
|
CopyAchievementDefinitionV2ByAchievementIdOptionsInternal optionsInternal = new CopyAchievementDefinitionV2ByAchievementIdOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outDefinitionAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Achievements_CopyAchievementDefinitionV2ByAchievementId(InnerHandle, ref optionsInternal, ref outDefinitionAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<DefinitionV2Internal, DefinitionV2>(outDefinitionAddress, out outDefinition);
|
|
if (outDefinition != null)
|
|
{
|
|
Bindings.EOS_Achievements_DefinitionV2_Release(outDefinitionAddress);
|
|
}
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Fetches an achievement definition from a given index.
|
|
/// <seealso cref="Release" />
|
|
/// </summary>
|
|
/// <param name="options">Structure containing the index being accessed</param>
|
|
/// <param name="outDefinition">The achievement definition for the given index, if it exists and is valid, use <see cref="Release" /> when finished</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the information is available and passed out in OutDefinition
|
|
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
|
|
/// <see cref="Result.NotFound" /> if the achievement definition is not found
|
|
/// <see cref="Result.InvalidProductUserID" /> if any of the userid options are incorrect
|
|
/// </returns>
|
|
public Result CopyAchievementDefinitionV2ByIndex(ref CopyAchievementDefinitionV2ByIndexOptions options, out DefinitionV2? outDefinition)
|
|
{
|
|
CopyAchievementDefinitionV2ByIndexOptionsInternal optionsInternal = new CopyAchievementDefinitionV2ByIndexOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outDefinitionAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Achievements_CopyAchievementDefinitionV2ByIndex(InnerHandle, ref optionsInternal, ref outDefinitionAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<DefinitionV2Internal, DefinitionV2>(outDefinitionAddress, out outDefinition);
|
|
if (outDefinition != null)
|
|
{
|
|
Bindings.EOS_Achievements_DefinitionV2_Release(outDefinitionAddress);
|
|
}
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Fetches a player achievement from a given achievement ID.
|
|
/// <seealso cref="Release" />
|
|
/// </summary>
|
|
/// <param name="options">Structure containing the Product User ID and achievement ID being accessed</param>
|
|
/// <param name="outAchievement">The player achievement data for the given achievement ID, if it exists and is valid, use <see cref="Release" /> when finished</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the information is available and passed out in OutAchievement
|
|
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
|
|
/// <see cref="Result.NotFound" /> if the player achievement is not found
|
|
/// <see cref="Result.InvalidProductUserID" /> if you pass an invalid user ID
|
|
/// </returns>
|
|
public Result CopyPlayerAchievementByAchievementId(ref CopyPlayerAchievementByAchievementIdOptions options, out PlayerAchievement? outAchievement)
|
|
{
|
|
CopyPlayerAchievementByAchievementIdOptionsInternal optionsInternal = new CopyPlayerAchievementByAchievementIdOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outAchievementAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Achievements_CopyPlayerAchievementByAchievementId(InnerHandle, ref optionsInternal, ref outAchievementAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<PlayerAchievementInternal, PlayerAchievement>(outAchievementAddress, out outAchievement);
|
|
if (outAchievement != null)
|
|
{
|
|
Bindings.EOS_Achievements_PlayerAchievement_Release(outAchievementAddress);
|
|
}
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Fetches a player achievement from a given index.
|
|
/// <seealso cref="Release" />
|
|
/// </summary>
|
|
/// <param name="options">Structure containing the Product User ID and index being accessed</param>
|
|
/// <param name="outAchievement">The player achievement data for the given index, if it exists and is valid, use <see cref="Release" /> when finished</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the information is available and passed out in OutAchievement
|
|
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
|
|
/// <see cref="Result.NotFound" /> if the player achievement is not found
|
|
/// <see cref="Result.InvalidProductUserID" /> if you pass an invalid user ID
|
|
/// </returns>
|
|
public Result CopyPlayerAchievementByIndex(ref CopyPlayerAchievementByIndexOptions options, out PlayerAchievement? outAchievement)
|
|
{
|
|
CopyPlayerAchievementByIndexOptionsInternal optionsInternal = new CopyPlayerAchievementByIndexOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outAchievementAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Achievements_CopyPlayerAchievementByIndex(InnerHandle, ref optionsInternal, ref outAchievementAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<PlayerAchievementInternal, PlayerAchievement>(outAchievementAddress, out outAchievement);
|
|
if (outAchievement != null)
|
|
{
|
|
Bindings.EOS_Achievements_PlayerAchievement_Release(outAchievementAddress);
|
|
}
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// DEPRECATED! Use <see cref="CopyPlayerAchievementByAchievementId" /> instead.
|
|
///
|
|
/// Fetches an unlocked achievement from a given achievement ID.
|
|
/// <seealso cref="Release" />
|
|
/// </summary>
|
|
/// <param name="options">Structure containing the Product User ID and achievement ID being accessed</param>
|
|
/// <param name="outAchievement">The unlocked achievement data for the given achievement ID, if it exists and is valid, use <see cref="Release" /> when finished</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the information is available and passed out in OutAchievement
|
|
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
|
|
/// <see cref="Result.NotFound" /> if the unlocked achievement is not found
|
|
/// </returns>
|
|
public Result CopyUnlockedAchievementByAchievementId(ref CopyUnlockedAchievementByAchievementIdOptions options, out UnlockedAchievement? outAchievement)
|
|
{
|
|
CopyUnlockedAchievementByAchievementIdOptionsInternal optionsInternal = new CopyUnlockedAchievementByAchievementIdOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outAchievementAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Achievements_CopyUnlockedAchievementByAchievementId(InnerHandle, ref optionsInternal, ref outAchievementAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<UnlockedAchievementInternal, UnlockedAchievement>(outAchievementAddress, out outAchievement);
|
|
if (outAchievement != null)
|
|
{
|
|
Bindings.EOS_Achievements_UnlockedAchievement_Release(outAchievementAddress);
|
|
}
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// DEPRECATED! Use <see cref="CopyPlayerAchievementByAchievementId" /> instead.
|
|
///
|
|
/// Fetches an unlocked achievement from a given index.
|
|
/// <seealso cref="Release" />
|
|
/// </summary>
|
|
/// <param name="options">Structure containing the Product User ID and index being accessed</param>
|
|
/// <param name="outAchievement">The unlocked achievement data for the given index, if it exists and is valid, use <see cref="Release" /> when finished</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the information is available and passed out in OutAchievement
|
|
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
|
|
/// <see cref="Result.NotFound" /> if the unlocked achievement is not found
|
|
/// </returns>
|
|
public Result CopyUnlockedAchievementByIndex(ref CopyUnlockedAchievementByIndexOptions options, out UnlockedAchievement? outAchievement)
|
|
{
|
|
CopyUnlockedAchievementByIndexOptionsInternal optionsInternal = new CopyUnlockedAchievementByIndexOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outAchievementAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Achievements_CopyUnlockedAchievementByIndex(InnerHandle, ref optionsInternal, ref outAchievementAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<UnlockedAchievementInternal, UnlockedAchievement>(outAchievementAddress, out outAchievement);
|
|
if (outAchievement != null)
|
|
{
|
|
Bindings.EOS_Achievements_UnlockedAchievement_Release(outAchievementAddress);
|
|
}
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Fetch the number of achievement definitions that are cached locally.
|
|
/// <seealso cref="CopyAchievementDefinitionByIndex" />
|
|
/// </summary>
|
|
/// <param name="options">The Options associated with retrieving the achievement definition count</param>
|
|
/// <returns>
|
|
/// Number of achievement definitions or 0 if there is an error
|
|
/// </returns>
|
|
public uint GetAchievementDefinitionCount(ref GetAchievementDefinitionCountOptions options)
|
|
{
|
|
GetAchievementDefinitionCountOptionsInternal optionsInternal = new GetAchievementDefinitionCountOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var funcResult = Bindings.EOS_Achievements_GetAchievementDefinitionCount(InnerHandle, ref optionsInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Fetch the number of player achievements that are cached locally.
|
|
/// <seealso cref="CopyPlayerAchievementByIndex" />
|
|
/// </summary>
|
|
/// <param name="options">The Options associated with retrieving the player achievement count</param>
|
|
/// <returns>
|
|
/// Number of player achievements or 0 if there is an error
|
|
/// </returns>
|
|
public uint GetPlayerAchievementCount(ref GetPlayerAchievementCountOptions options)
|
|
{
|
|
GetPlayerAchievementCountOptionsInternal optionsInternal = new GetPlayerAchievementCountOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var funcResult = Bindings.EOS_Achievements_GetPlayerAchievementCount(InnerHandle, ref optionsInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// DEPRECATED! Use <see cref="GetPlayerAchievementCount" />, <see cref="CopyPlayerAchievementByIndex" /> and filter for unlocked instead.
|
|
///
|
|
/// Fetch the number of unlocked achievements that are cached locally.
|
|
/// <seealso cref="CopyUnlockedAchievementByIndex" />
|
|
/// </summary>
|
|
/// <param name="options">The Options associated with retrieving the unlocked achievement count</param>
|
|
/// <returns>
|
|
/// Number of unlocked achievements or 0 if there is an error
|
|
/// </returns>
|
|
public uint GetUnlockedAchievementCount(ref GetUnlockedAchievementCountOptions options)
|
|
{
|
|
GetUnlockedAchievementCountOptionsInternal optionsInternal = new GetUnlockedAchievementCountOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var funcResult = Bindings.EOS_Achievements_GetUnlockedAchievementCount(InnerHandle, ref optionsInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 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_PF_DISABLE_SOCIAL_OVERLAY).
|
|
/// </summary>
|
|
/// <param name="options">Structure containing information about the application whose achievement definitions we're retrieving.</param>
|
|
/// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
|
|
/// <param name="completionDelegate">This function is called when the query definitions operation completes.</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the operation completes successfully
|
|
/// <see cref="Result.InvalidParameters" /> if any of the options are incorrect
|
|
/// </returns>
|
|
public void QueryDefinitions(ref QueryDefinitionsOptions options, object clientData, OnQueryDefinitionsCompleteCallback completionDelegate)
|
|
{
|
|
QueryDefinitionsOptionsInternal optionsInternal = new QueryDefinitionsOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnQueryDefinitionsCompleteCallbackInternal(OnQueryDefinitionsCompleteCallbackInternalImplementation);
|
|
Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_Achievements_QueryDefinitions(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 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_PF_DISABLE_SOCIAL_OVERLAY).
|
|
/// </summary>
|
|
/// <param name="options">Structure containing information about the player whose achievements we're retrieving.</param>
|
|
/// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
|
|
/// <param name="completionDelegate">This function is called when the query player achievements operation completes.</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the operation completes successfully
|
|
/// <see cref="Result.InvalidProductUserID" /> if any of the userid options are incorrect
|
|
/// <see cref="Result.InvalidParameters" /> if any of the other options are incorrect
|
|
/// </returns>
|
|
public void QueryPlayerAchievements(ref QueryPlayerAchievementsOptions options, object clientData, OnQueryPlayerAchievementsCompleteCallback completionDelegate)
|
|
{
|
|
QueryPlayerAchievementsOptionsInternal optionsInternal = new QueryPlayerAchievementsOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnQueryPlayerAchievementsCompleteCallbackInternal(OnQueryPlayerAchievementsCompleteCallbackInternalImplementation);
|
|
Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_Achievements_QueryPlayerAchievements(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Unregister from receiving achievement unlocked notifications.
|
|
/// <seealso cref="AddNotifyAchievementsUnlocked" />
|
|
/// </summary>
|
|
/// <param name="inId">Handle representing the registered callback</param>
|
|
public void RemoveNotifyAchievementsUnlocked(ulong inId)
|
|
{
|
|
Bindings.EOS_Achievements_RemoveNotifyAchievementsUnlocked(InnerHandle, inId);
|
|
|
|
Helper.RemoveCallbackByNotificationId(inId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Unlocks a number of achievements for a specific player.
|
|
/// </summary>
|
|
/// <param name="options">Structure containing information about the achievements and the player whose achievements we're unlocking.</param>
|
|
/// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
|
|
/// <param name="completionDelegate">This function is called when the unlock achievements operation completes.</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the operation completes successfully
|
|
/// <see cref="Result.InvalidParameters" /> if any of the options are incorrect
|
|
/// </returns>
|
|
public void UnlockAchievements(ref UnlockAchievementsOptions options, object clientData, OnUnlockAchievementsCompleteCallback completionDelegate)
|
|
{
|
|
UnlockAchievementsOptionsInternal optionsInternal = new UnlockAchievementsOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnUnlockAchievementsCompleteCallbackInternal(OnUnlockAchievementsCompleteCallbackInternalImplementation);
|
|
Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_Achievements_UnlockAchievements(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnAchievementsUnlockedCallbackInternal))]
|
|
internal static void OnAchievementsUnlockedCallbackInternalImplementation(ref OnAchievementsUnlockedCallbackInfoInternal data)
|
|
{
|
|
OnAchievementsUnlockedCallback callback;
|
|
OnAchievementsUnlockedCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
|
|
{
|
|
callback(ref callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnAchievementsUnlockedCallbackV2Internal))]
|
|
internal static void OnAchievementsUnlockedCallbackV2InternalImplementation(ref OnAchievementsUnlockedCallbackV2InfoInternal data)
|
|
{
|
|
OnAchievementsUnlockedCallbackV2 callback;
|
|
OnAchievementsUnlockedCallbackV2Info callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
|
|
{
|
|
callback(ref callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnQueryDefinitionsCompleteCallbackInternal))]
|
|
internal static void OnQueryDefinitionsCompleteCallbackInternalImplementation(ref OnQueryDefinitionsCompleteCallbackInfoInternal data)
|
|
{
|
|
OnQueryDefinitionsCompleteCallback callback;
|
|
OnQueryDefinitionsCompleteCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
|
|
{
|
|
callback(ref callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnQueryPlayerAchievementsCompleteCallbackInternal))]
|
|
internal static void OnQueryPlayerAchievementsCompleteCallbackInternalImplementation(ref OnQueryPlayerAchievementsCompleteCallbackInfoInternal data)
|
|
{
|
|
OnQueryPlayerAchievementsCompleteCallback callback;
|
|
OnQueryPlayerAchievementsCompleteCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
|
|
{
|
|
callback(ref callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnUnlockAchievementsCompleteCallbackInternal))]
|
|
internal static void OnUnlockAchievementsCompleteCallbackInternalImplementation(ref OnUnlockAchievementsCompleteCallbackInfoInternal data)
|
|
{
|
|
OnUnlockAchievementsCompleteCallback callback;
|
|
OnUnlockAchievementsCompleteCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
|
|
{
|
|
callback(ref callbackInfo);
|
|
}
|
|
}
|
|
}
|
|
}
|