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.

458 lines
21 KiB

// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Leaderboards
{
public sealed partial class LeaderboardsInterface : Handle
{
public LeaderboardsInterface()
{
}
public LeaderboardsInterface(System.IntPtr innerHandle) : base(innerHandle)
{
}
/// <summary>
/// The most recent version of the <see cref="CopyLeaderboardDefinitionByIndexOptions" /> struct.
/// </summary>
public const int CopyleaderboarddefinitionbyindexApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="CopyLeaderboardDefinitionByLeaderboardIdOptions" /> struct.
/// </summary>
public const int CopyleaderboarddefinitionbyleaderboardidApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="CopyLeaderboardRecordByIndexOptions" /> struct.
/// </summary>
public const int CopyleaderboardrecordbyindexApiLatest = 2;
/// <summary>
/// The most recent version of the <see cref="CopyLeaderboardRecordByUserIdOptions" /> struct.
/// </summary>
public const int CopyleaderboardrecordbyuseridApiLatest = 2;
/// <summary>
/// The most recent version of the <see cref="CopyLeaderboardUserScoreByIndexOptions" /> struct.
/// </summary>
public const int CopyleaderboarduserscorebyindexApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="CopyLeaderboardUserScoreByUserIdOptions" /> struct.
/// </summary>
public const int CopyleaderboarduserscorebyuseridApiLatest = 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="GetLeaderboardDefinitionCount" /> API.
/// </summary>
public const int GetleaderboarddefinitioncountApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="GetLeaderboardRecordCount" /> API.
/// </summary>
public const int GetleaderboardrecordcountApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="GetLeaderboardUserScoreCount" /> API.
/// </summary>
public const int GetleaderboarduserscorecountApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="LeaderboardRecord" /> struct.
/// </summary>
public const int LeaderboardrecordApiLatest = 2;
/// <summary>
/// The most recent version of the <see cref="LeaderboardUserScore" /> struct.
/// </summary>
public const int LeaderboarduserscoreApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="QueryLeaderboardDefinitions" /> struct.
/// </summary>
public const int QueryleaderboarddefinitionsApiLatest = 2;
/// <summary>
/// The most recent version of the <see cref="QueryLeaderboardRanks" /> struct.
/// </summary>
public const int QueryleaderboardranksApiLatest = 2;
/// <summary>
/// The most recent version of the <see cref="QueryLeaderboardUserScores" /> struct.
/// </summary>
public const int QueryleaderboarduserscoresApiLatest = 2;
/// <summary>
/// Timestamp value representing an undefined time for <see cref="LeaderboardsInterface" />.
/// </summary>
public const int TimeUndefined = -1;
/// <summary>
/// The most recent version of the <see cref="UserScoresQueryStatInfo" /> struct.
/// </summary>
public const int UserscoresquerystatinfoApiLatest = 1;
/// <summary>
/// Fetches a leaderboard definition from the cache using an index.
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">Structure containing the index being accessed.</param>
/// <param name="outLeaderboardDefinition">The leaderboard 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 OutLeaderboardDefinition
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the leaderboard is not found
/// </returns>
public Result CopyLeaderboardDefinitionByIndex(ref CopyLeaderboardDefinitionByIndexOptions options, out Definition? outLeaderboardDefinition)
{
CopyLeaderboardDefinitionByIndexOptionsInternal optionsInternal = new CopyLeaderboardDefinitionByIndexOptionsInternal();
optionsInternal.Set(ref options);
var outLeaderboardDefinitionAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Leaderboards_CopyLeaderboardDefinitionByIndex(InnerHandle, ref optionsInternal, ref outLeaderboardDefinitionAddress);
Helper.Dispose(ref optionsInternal);
Helper.Get<DefinitionInternal, Definition>(outLeaderboardDefinitionAddress, out outLeaderboardDefinition);
if (outLeaderboardDefinition != null)
{
Bindings.EOS_Leaderboards_Definition_Release(outLeaderboardDefinitionAddress);
}
return funcResult;
}
/// <summary>
/// Fetches a leaderboard definition from the cache using a leaderboard ID.
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">Structure containing the leaderboard ID being accessed.</param>
/// <param name="outLeaderboardDefinition">The leaderboard definition for the given leaderboard 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 OutLeaderboardDefinition
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the leaderboard data is not found
/// </returns>
public Result CopyLeaderboardDefinitionByLeaderboardId(ref CopyLeaderboardDefinitionByLeaderboardIdOptions options, out Definition? outLeaderboardDefinition)
{
CopyLeaderboardDefinitionByLeaderboardIdOptionsInternal optionsInternal = new CopyLeaderboardDefinitionByLeaderboardIdOptionsInternal();
optionsInternal.Set(ref options);
var outLeaderboardDefinitionAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Leaderboards_CopyLeaderboardDefinitionByLeaderboardId(InnerHandle, ref optionsInternal, ref outLeaderboardDefinitionAddress);
Helper.Dispose(ref optionsInternal);
Helper.Get<DefinitionInternal, Definition>(outLeaderboardDefinitionAddress, out outLeaderboardDefinition);
if (outLeaderboardDefinition != null)
{
Bindings.EOS_Leaderboards_Definition_Release(outLeaderboardDefinitionAddress);
}
return funcResult;
}
/// <summary>
/// Fetches a leaderboard record from a given index.
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">Structure containing the index being accessed.</param>
/// <param name="outLeaderboardRecord">The leaderboard record for the given index, if it exists and is valid, use <see cref="Release" /> when finished.</param>
/// <returns>
/// <see cref="Result.Success" /> if the leaderboard record is available and passed out in OutLeaderboardRecord
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the leaderboard is not found
/// </returns>
public Result CopyLeaderboardRecordByIndex(ref CopyLeaderboardRecordByIndexOptions options, out LeaderboardRecord? outLeaderboardRecord)
{
CopyLeaderboardRecordByIndexOptionsInternal optionsInternal = new CopyLeaderboardRecordByIndexOptionsInternal();
optionsInternal.Set(ref options);
var outLeaderboardRecordAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Leaderboards_CopyLeaderboardRecordByIndex(InnerHandle, ref optionsInternal, ref outLeaderboardRecordAddress);
Helper.Dispose(ref optionsInternal);
Helper.Get<LeaderboardRecordInternal, LeaderboardRecord>(outLeaderboardRecordAddress, out outLeaderboardRecord);
if (outLeaderboardRecord != null)
{
Bindings.EOS_Leaderboards_LeaderboardRecord_Release(outLeaderboardRecordAddress);
}
return funcResult;
}
/// <summary>
/// Fetches a leaderboard record from a given user ID.
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">Structure containing the user ID being accessed.</param>
/// <param name="outLeaderboardRecord">The leaderboard record for the given user ID, if it exists and is valid, use <see cref="Release" /> when finished.</param>
/// <returns>
/// <see cref="Result.Success" /> if the leaderboard record is available and passed out in OutLeaderboardRecord
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the leaderboard data is not found
/// </returns>
public Result CopyLeaderboardRecordByUserId(ref CopyLeaderboardRecordByUserIdOptions options, out LeaderboardRecord? outLeaderboardRecord)
{
CopyLeaderboardRecordByUserIdOptionsInternal optionsInternal = new CopyLeaderboardRecordByUserIdOptionsInternal();
optionsInternal.Set(ref options);
var outLeaderboardRecordAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Leaderboards_CopyLeaderboardRecordByUserId(InnerHandle, ref optionsInternal, ref outLeaderboardRecordAddress);
Helper.Dispose(ref optionsInternal);
Helper.Get<LeaderboardRecordInternal, LeaderboardRecord>(outLeaderboardRecordAddress, out outLeaderboardRecord);
if (outLeaderboardRecord != null)
{
Bindings.EOS_Leaderboards_LeaderboardRecord_Release(outLeaderboardRecordAddress);
}
return funcResult;
}
/// <summary>
/// Fetches leaderboard user score from a given index.
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">Structure containing the index being accessed.</param>
/// <param name="outLeaderboardUserScore">The leaderboard user score for the given index, if it exists and is valid, use <see cref="Release" /> when finished.</param>
/// <returns>
/// <see cref="Result.Success" /> if the leaderboard scores are available and passed out in OutLeaderboardUserScore
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the leaderboard user scores are not found
/// </returns>
public Result CopyLeaderboardUserScoreByIndex(ref CopyLeaderboardUserScoreByIndexOptions options, out LeaderboardUserScore? outLeaderboardUserScore)
{
CopyLeaderboardUserScoreByIndexOptionsInternal optionsInternal = new CopyLeaderboardUserScoreByIndexOptionsInternal();
optionsInternal.Set(ref options);
var outLeaderboardUserScoreAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Leaderboards_CopyLeaderboardUserScoreByIndex(InnerHandle, ref optionsInternal, ref outLeaderboardUserScoreAddress);
Helper.Dispose(ref optionsInternal);
Helper.Get<LeaderboardUserScoreInternal, LeaderboardUserScore>(outLeaderboardUserScoreAddress, out outLeaderboardUserScore);
if (outLeaderboardUserScore != null)
{
Bindings.EOS_Leaderboards_LeaderboardUserScore_Release(outLeaderboardUserScoreAddress);
}
return funcResult;
}
/// <summary>
/// Fetches leaderboard user score from a given user ID.
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">Structure containing the user ID being accessed.</param>
/// <param name="outLeaderboardUserScore">The leaderboard user score for the given user ID, if it exists and is valid, use <see cref="Release" /> when finished.</param>
/// <returns>
/// <see cref="Result.Success" /> if the leaderboard scores are available and passed out in OutLeaderboardUserScore
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the leaderboard user scores are not found
/// </returns>
public Result CopyLeaderboardUserScoreByUserId(ref CopyLeaderboardUserScoreByUserIdOptions options, out LeaderboardUserScore? outLeaderboardUserScore)
{
CopyLeaderboardUserScoreByUserIdOptionsInternal optionsInternal = new CopyLeaderboardUserScoreByUserIdOptionsInternal();
optionsInternal.Set(ref options);
var outLeaderboardUserScoreAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Leaderboards_CopyLeaderboardUserScoreByUserId(InnerHandle, ref optionsInternal, ref outLeaderboardUserScoreAddress);
Helper.Dispose(ref optionsInternal);
Helper.Get<LeaderboardUserScoreInternal, LeaderboardUserScore>(outLeaderboardUserScoreAddress, out outLeaderboardUserScore);
if (outLeaderboardUserScore != null)
{
Bindings.EOS_Leaderboards_LeaderboardUserScore_Release(outLeaderboardUserScoreAddress);
}
return funcResult;
}
/// <summary>
/// Fetch the number of leaderboards definitions that are cached locally.
/// <seealso cref="CopyLeaderboardDefinitionByIndex" />
/// <seealso cref="CopyLeaderboardDefinitionByLeaderboardId" />
/// </summary>
/// <param name="options">The Options associated with retrieving the leaderboard count.</param>
/// <returns>
/// Number of leaderboards or 0 if there is an error
/// </returns>
public uint GetLeaderboardDefinitionCount(ref GetLeaderboardDefinitionCountOptions options)
{
GetLeaderboardDefinitionCountOptionsInternal optionsInternal = new GetLeaderboardDefinitionCountOptionsInternal();
optionsInternal.Set(ref options);
var funcResult = Bindings.EOS_Leaderboards_GetLeaderboardDefinitionCount(InnerHandle, ref optionsInternal);
Helper.Dispose(ref optionsInternal);
return funcResult;
}
/// <summary>
/// Fetch the number of leaderboard records that are cached locally.
/// <seealso cref="CopyLeaderboardRecordByIndex" />
/// <seealso cref="CopyLeaderboardRecordByUserId" />
/// </summary>
/// <param name="options">The Options associated with retrieving the leaderboard record count.</param>
/// <returns>
/// Number of leaderboard records or 0 if there is an error
/// </returns>
public uint GetLeaderboardRecordCount(ref GetLeaderboardRecordCountOptions options)
{
GetLeaderboardRecordCountOptionsInternal optionsInternal = new GetLeaderboardRecordCountOptionsInternal();
optionsInternal.Set(ref options);
var funcResult = Bindings.EOS_Leaderboards_GetLeaderboardRecordCount(InnerHandle, ref optionsInternal);
Helper.Dispose(ref optionsInternal);
return funcResult;
}
/// <summary>
/// Fetch the number of leaderboard user scores that are cached locally.
/// <seealso cref="CopyLeaderboardUserScoreByIndex" />
/// <seealso cref="CopyLeaderboardUserScoreByUserId" />
/// </summary>
/// <param name="options">The Options associated with retrieving the leaderboard user scores count.</param>
/// <returns>
/// Number of leaderboard records or 0 if there is an error
/// </returns>
public uint GetLeaderboardUserScoreCount(ref GetLeaderboardUserScoreCountOptions options)
{
GetLeaderboardUserScoreCountOptionsInternal optionsInternal = new GetLeaderboardUserScoreCountOptionsInternal();
optionsInternal.Set(ref options);
var funcResult = Bindings.EOS_Leaderboards_GetLeaderboardUserScoreCount(InnerHandle, ref optionsInternal);
Helper.Dispose(ref optionsInternal);
return funcResult;
}
/// <summary>
/// Query for a list of existing leaderboards definitions including their attributes.
/// </summary>
/// <param name="options">Structure containing information about the application whose leaderboard 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 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 QueryLeaderboardDefinitions(ref QueryLeaderboardDefinitionsOptions options, object clientData, OnQueryLeaderboardDefinitionsCompleteCallback completionDelegate)
{
QueryLeaderboardDefinitionsOptionsInternal optionsInternal = new QueryLeaderboardDefinitionsOptionsInternal();
optionsInternal.Set(ref options);
var clientDataAddress = System.IntPtr.Zero;
var completionDelegateInternal = new OnQueryLeaderboardDefinitionsCompleteCallbackInternal(OnQueryLeaderboardDefinitionsCompleteCallbackInternalImplementation);
Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
Bindings.EOS_Leaderboards_QueryLeaderboardDefinitions(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
Helper.Dispose(ref optionsInternal);
}
/// <summary>
/// Retrieves top leaderboard records by rank in the leaderboard matching the given leaderboard ID.
/// </summary>
/// <param name="options">Structure containing information about the leaderboard records 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 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 QueryLeaderboardRanks(ref QueryLeaderboardRanksOptions options, object clientData, OnQueryLeaderboardRanksCompleteCallback completionDelegate)
{
QueryLeaderboardRanksOptionsInternal optionsInternal = new QueryLeaderboardRanksOptionsInternal();
optionsInternal.Set(ref options);
var clientDataAddress = System.IntPtr.Zero;
var completionDelegateInternal = new OnQueryLeaderboardRanksCompleteCallbackInternal(OnQueryLeaderboardRanksCompleteCallbackInternalImplementation);
Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
Bindings.EOS_Leaderboards_QueryLeaderboardRanks(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
Helper.Dispose(ref optionsInternal);
}
/// <summary>
/// Query for a list of scores for a given list of users.
/// </summary>
/// <param name="options">Structure containing information about the users whose scores 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 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 QueryLeaderboardUserScores(ref QueryLeaderboardUserScoresOptions options, object clientData, OnQueryLeaderboardUserScoresCompleteCallback completionDelegate)
{
QueryLeaderboardUserScoresOptionsInternal optionsInternal = new QueryLeaderboardUserScoresOptionsInternal();
optionsInternal.Set(ref options);
var clientDataAddress = System.IntPtr.Zero;
var completionDelegateInternal = new OnQueryLeaderboardUserScoresCompleteCallbackInternal(OnQueryLeaderboardUserScoresCompleteCallbackInternalImplementation);
Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
Bindings.EOS_Leaderboards_QueryLeaderboardUserScores(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
Helper.Dispose(ref optionsInternal);
}
[MonoPInvokeCallback(typeof(OnQueryLeaderboardDefinitionsCompleteCallbackInternal))]
internal static void OnQueryLeaderboardDefinitionsCompleteCallbackInternalImplementation(ref OnQueryLeaderboardDefinitionsCompleteCallbackInfoInternal data)
{
OnQueryLeaderboardDefinitionsCompleteCallback callback;
OnQueryLeaderboardDefinitionsCompleteCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
{
callback(ref callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnQueryLeaderboardRanksCompleteCallbackInternal))]
internal static void OnQueryLeaderboardRanksCompleteCallbackInternalImplementation(ref OnQueryLeaderboardRanksCompleteCallbackInfoInternal data)
{
OnQueryLeaderboardRanksCompleteCallback callback;
OnQueryLeaderboardRanksCompleteCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
{
callback(ref callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnQueryLeaderboardUserScoresCompleteCallbackInternal))]
internal static void OnQueryLeaderboardUserScoresCompleteCallbackInternalImplementation(ref OnQueryLeaderboardUserScoresCompleteCallbackInfoInternal data)
{
OnQueryLeaderboardUserScoresCompleteCallback callback;
OnQueryLeaderboardUserScoresCompleteCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
{
callback(ref callbackInfo);
}
}
}
}