// 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)
{
}
///
/// The most recent version of the struct.
///
public const int CopyleaderboarddefinitionbyindexApiLatest = 1;
///
/// The most recent version of the struct.
///
public const int CopyleaderboarddefinitionbyleaderboardidApiLatest = 1;
///
/// The most recent version of the struct.
///
public const int CopyleaderboardrecordbyindexApiLatest = 2;
///
/// The most recent version of the struct.
///
public const int CopyleaderboardrecordbyuseridApiLatest = 2;
///
/// The most recent version of the struct.
///
public const int CopyleaderboarduserscorebyindexApiLatest = 1;
///
/// The most recent version of the struct.
///
public const int CopyleaderboarduserscorebyuseridApiLatest = 1;
///
/// The most recent version of the struct.
///
public const int DefinitionApiLatest = 1;
///
/// The most recent version of the API.
///
public const int GetleaderboarddefinitioncountApiLatest = 1;
///
/// The most recent version of the API.
///
public const int GetleaderboardrecordcountApiLatest = 1;
///
/// The most recent version of the API.
///
public const int GetleaderboarduserscorecountApiLatest = 1;
///
/// The most recent version of the struct.
///
public const int LeaderboardrecordApiLatest = 2;
///
/// The most recent version of the struct.
///
public const int LeaderboarduserscoreApiLatest = 1;
///
/// The most recent version of the struct.
///
public const int QueryleaderboarddefinitionsApiLatest = 2;
///
/// The most recent version of the struct.
///
public const int QueryleaderboardranksApiLatest = 2;
///
/// The most recent version of the struct.
///
public const int QueryleaderboarduserscoresApiLatest = 2;
///
/// Timestamp value representing an undefined time for .
///
public const int TimeUndefined = -1;
///
/// The most recent version of the struct.
///
public const int UserscoresquerystatinfoApiLatest = 1;
///
/// Fetches a leaderboard definition from the cache using an index.
///
///
/// Structure containing the index being accessed.
/// The leaderboard data for the given index, if it exists and is valid, use when finished.
///
/// if the information is available and passed out in OutLeaderboardDefinition
/// if you pass a null pointer for the out parameter
/// if the leaderboard is not found
///
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(outLeaderboardDefinitionAddress, out outLeaderboardDefinition);
if (outLeaderboardDefinition != null)
{
Bindings.EOS_Leaderboards_Definition_Release(outLeaderboardDefinitionAddress);
}
return funcResult;
}
///
/// Fetches a leaderboard definition from the cache using a leaderboard ID.
///
///
/// Structure containing the leaderboard ID being accessed.
/// The leaderboard definition for the given leaderboard ID, if it exists and is valid, use when finished.
///
/// if the information is available and passed out in OutLeaderboardDefinition
/// if you pass a null pointer for the out parameter
/// if the leaderboard data is not found
///
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(outLeaderboardDefinitionAddress, out outLeaderboardDefinition);
if (outLeaderboardDefinition != null)
{
Bindings.EOS_Leaderboards_Definition_Release(outLeaderboardDefinitionAddress);
}
return funcResult;
}
///
/// Fetches a leaderboard record from a given index.
///
///
/// Structure containing the index being accessed.
/// The leaderboard record for the given index, if it exists and is valid, use when finished.
///
/// if the leaderboard record is available and passed out in OutLeaderboardRecord
/// if you pass a null pointer for the out parameter
/// if the leaderboard is not found
///
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(outLeaderboardRecordAddress, out outLeaderboardRecord);
if (outLeaderboardRecord != null)
{
Bindings.EOS_Leaderboards_LeaderboardRecord_Release(outLeaderboardRecordAddress);
}
return funcResult;
}
///
/// Fetches a leaderboard record from a given user ID.
///
///
/// Structure containing the user ID being accessed.
/// The leaderboard record for the given user ID, if it exists and is valid, use when finished.
///
/// if the leaderboard record is available and passed out in OutLeaderboardRecord
/// if you pass a null pointer for the out parameter
/// if the leaderboard data is not found
///
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(outLeaderboardRecordAddress, out outLeaderboardRecord);
if (outLeaderboardRecord != null)
{
Bindings.EOS_Leaderboards_LeaderboardRecord_Release(outLeaderboardRecordAddress);
}
return funcResult;
}
///
/// Fetches leaderboard user score from a given index.
///
///
/// Structure containing the index being accessed.
/// The leaderboard user score for the given index, if it exists and is valid, use when finished.
///
/// if the leaderboard scores are available and passed out in OutLeaderboardUserScore
/// if you pass a null pointer for the out parameter
/// if the leaderboard user scores are not found
///
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(outLeaderboardUserScoreAddress, out outLeaderboardUserScore);
if (outLeaderboardUserScore != null)
{
Bindings.EOS_Leaderboards_LeaderboardUserScore_Release(outLeaderboardUserScoreAddress);
}
return funcResult;
}
///
/// Fetches leaderboard user score from a given user ID.
///
///
/// Structure containing the user ID being accessed.
/// The leaderboard user score for the given user ID, if it exists and is valid, use when finished.
///
/// if the leaderboard scores are available and passed out in OutLeaderboardUserScore
/// if you pass a null pointer for the out parameter
/// if the leaderboard user scores are not found
///
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(outLeaderboardUserScoreAddress, out outLeaderboardUserScore);
if (outLeaderboardUserScore != null)
{
Bindings.EOS_Leaderboards_LeaderboardUserScore_Release(outLeaderboardUserScoreAddress);
}
return funcResult;
}
///
/// Fetch the number of leaderboards definitions that are cached locally.
///
///
///
/// The Options associated with retrieving the leaderboard count.
///
/// Number of leaderboards or 0 if there is an error
///
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;
}
///
/// Fetch the number of leaderboard records that are cached locally.
///
///
///
/// The Options associated with retrieving the leaderboard record count.
///
/// Number of leaderboard records or 0 if there is an error
///
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;
}
///
/// Fetch the number of leaderboard user scores that are cached locally.
///
///
///
/// The Options associated with retrieving the leaderboard user scores count.
///
/// Number of leaderboard records or 0 if there is an error
///
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;
}
///
/// Query for a list of existing leaderboards definitions including their attributes.
///
/// Structure containing information about the application whose leaderboard definitions we're retrieving.
/// Arbitrary data that is passed back to you in the CompletionDelegate.
/// This function is called when the query operation completes.
///
/// if the operation completes successfully
/// if any of the options are incorrect
///
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);
}
///
/// Retrieves top leaderboard records by rank in the leaderboard matching the given leaderboard ID.
///
/// Structure containing information about the leaderboard records we're retrieving.
/// Arbitrary data that is passed back to you in the CompletionDelegate.
/// This function is called when the query operation completes.
///
/// if the operation completes successfully
/// if any of the options are incorrect
///
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);
}
///
/// Query for a list of scores for a given list of users.
///
/// Structure containing information about the users whose scores we're retrieving.
/// Arbitrary data that is passed back to you in the CompletionDelegate.
/// This function is called when the query operation completes.
///
/// if the operation completes successfully
/// if any of the options are incorrect
///
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);
}
}
}
}