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.
127 lines
5.3 KiB
127 lines
5.3 KiB
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
// This file is automatically generated. Changes to this file may be overwritten.
|
|
|
|
namespace Epic.OnlineServices.Sanctions
|
|
{
|
|
public sealed partial class SanctionsInterface : Handle
|
|
{
|
|
public SanctionsInterface()
|
|
{
|
|
}
|
|
|
|
public SanctionsInterface(System.IntPtr innerHandle) : base(innerHandle)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="CopyPlayerSanctionByIndex" /> API.
|
|
/// </summary>
|
|
public const int CopyplayersanctionbyindexApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="GetPlayerSanctionCount" /> API.
|
|
/// </summary>
|
|
public const int GetplayersanctioncountApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="PlayerSanction" /> struct.
|
|
/// </summary>
|
|
public const int PlayersanctionApiLatest = 2;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="QueryActivePlayerSanctions" /> API.
|
|
/// </summary>
|
|
public const int QueryactiveplayersanctionsApiLatest = 2;
|
|
|
|
/// <summary>
|
|
/// Copies an active player sanction.
|
|
/// You must call QueryActivePlayerSanctions first to retrieve the data from the service backend.
|
|
/// On success, <see cref="Release" /> must be called on OutSanction to free memory.
|
|
/// <seealso cref="QueryActivePlayerSanctions" />
|
|
/// <seealso cref="Release" />
|
|
/// </summary>
|
|
/// <param name="options">Structure containing the input parameters</param>
|
|
/// <param name="outSanction">The player sanction data for the given index, if it exists and is valid</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the information is available and passed out in OutSanction
|
|
/// <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
|
|
/// </returns>
|
|
public Result CopyPlayerSanctionByIndex(ref CopyPlayerSanctionByIndexOptions options, out PlayerSanction? outSanction)
|
|
{
|
|
CopyPlayerSanctionByIndexOptionsInternal optionsInternal = new CopyPlayerSanctionByIndexOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outSanctionAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Sanctions_CopyPlayerSanctionByIndex(InnerHandle, ref optionsInternal, ref outSanctionAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<PlayerSanctionInternal, PlayerSanction>(outSanctionAddress, out outSanction);
|
|
if (outSanction != null)
|
|
{
|
|
Bindings.EOS_Sanctions_PlayerSanction_Release(outSanctionAddress);
|
|
}
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Fetch the number of player sanctions that have been retrieved for a given player.
|
|
/// You must call QueryActivePlayerSanctions first to retrieve the data from the service backend.
|
|
/// <seealso cref="QueryActivePlayerSanctions" />
|
|
/// <seealso cref="CopyPlayerSanctionByIndex" />
|
|
/// </summary>
|
|
/// <param name="options">Structure containing the input parameters</param>
|
|
/// <returns>
|
|
/// Number of available sanctions for this player.
|
|
/// </returns>
|
|
public uint GetPlayerSanctionCount(ref GetPlayerSanctionCountOptions options)
|
|
{
|
|
GetPlayerSanctionCountOptionsInternal optionsInternal = new GetPlayerSanctionCountOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var funcResult = Bindings.EOS_Sanctions_GetPlayerSanctionCount(InnerHandle, ref optionsInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Start an asynchronous query to retrieve any active sanctions for a specified user.
|
|
/// Call <see cref="GetPlayerSanctionCount" /> and <see cref="CopyPlayerSanctionByIndex" /> to retrieve the data.
|
|
/// <seealso cref="GetPlayerSanctionCount" />
|
|
/// <seealso cref="CopyPlayerSanctionByIndex" />
|
|
/// </summary>
|
|
/// <param name="options">Structure containing the input parameters</param>
|
|
/// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
|
|
/// <param name="completionDelegate">A callback that is fired when the async operation completes, either successfully or in error</param>
|
|
public void QueryActivePlayerSanctions(ref QueryActivePlayerSanctionsOptions options, object clientData, OnQueryActivePlayerSanctionsCallback completionDelegate)
|
|
{
|
|
QueryActivePlayerSanctionsOptionsInternal optionsInternal = new QueryActivePlayerSanctionsOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnQueryActivePlayerSanctionsCallbackInternal(OnQueryActivePlayerSanctionsCallbackInternalImplementation);
|
|
Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_Sanctions_QueryActivePlayerSanctions(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnQueryActivePlayerSanctionsCallbackInternal))]
|
|
internal static void OnQueryActivePlayerSanctionsCallbackInternalImplementation(ref QueryActivePlayerSanctionsCallbackInfoInternal data)
|
|
{
|
|
OnQueryActivePlayerSanctionsCallback callback;
|
|
QueryActivePlayerSanctionsCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
|
|
{
|
|
callback(ref callbackInfo);
|
|
}
|
|
}
|
|
}
|
|
}
|