// 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(CopyPlayerSanctionByIndexOptions options, out PlayerSanction outSanction) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var outSanctionAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_Sanctions_CopyPlayerSanctionByIndex(InnerHandle, optionsAddress, ref outSanctionAddress); Helper.TryMarshalDispose(ref optionsAddress); if (Helper.TryMarshalGet(outSanctionAddress, out outSanction)) { 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(GetPlayerSanctionCountOptions options) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var funcResult = Bindings.EOS_Sanctions_GetPlayerSanctionCount(InnerHandle, optionsAddress); Helper.TryMarshalDispose(ref optionsAddress); 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(QueryActivePlayerSanctionsOptions options, object clientData, OnQueryActivePlayerSanctionsCallback completionDelegate) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnQueryActivePlayerSanctionsCallbackInternal(OnQueryActivePlayerSanctionsCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); Bindings.EOS_Sanctions_QueryActivePlayerSanctions(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); } [MonoPInvokeCallback(typeof(OnQueryActivePlayerSanctionsCallbackInternal))] internal static void OnQueryActivePlayerSanctionsCallbackInternalImplementation(System.IntPtr data) { OnQueryActivePlayerSanctionsCallback callback; QueryActivePlayerSanctionsCallbackInfo callbackInfo; if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo)) { callback(callbackInfo); } } } }