// 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) { } /// /// The most recent version of the API. /// public const int CopyplayersanctionbyindexApiLatest = 1; /// /// The most recent version of the API. /// public const int GetplayersanctioncountApiLatest = 1; /// /// The most recent version of the struct. /// public const int PlayersanctionApiLatest = 2; /// /// The most recent version of the API. /// public const int QueryactiveplayersanctionsApiLatest = 2; /// /// Copies an active player sanction. /// You must call QueryActivePlayerSanctions first to retrieve the data from the service backend. /// On success, must be called on OutSanction to free memory. /// /// /// /// Structure containing the input parameters /// The player sanction data for the given index, if it exists and is valid /// /// if the information is available and passed out in OutSanction /// if you pass a null pointer for the out parameter /// if the player achievement is not found /// 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(outSanctionAddress, out outSanction); if (outSanction != null) { Bindings.EOS_Sanctions_PlayerSanction_Release(outSanctionAddress); } return funcResult; } /// /// 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. /// /// /// /// Structure containing the input parameters /// /// Number of available sanctions for this player. /// 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; } /// /// Start an asynchronous query to retrieve any active sanctions for a specified user. /// Call and to retrieve the data. /// /// /// /// Structure containing the input parameters /// Arbitrary data that is passed back to you in the CompletionDelegate /// A callback that is fired when the async operation completes, either successfully or in error 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); } } } }