// Copyright Epic Games, Inc. All Rights Reserved. // This file is automatically generated. Changes to this file may be overwritten. namespace Epic.OnlineServices.Ecom { public sealed partial class Transaction : Handle { public Transaction() { } public Transaction(System.IntPtr innerHandle) : base(innerHandle) { } /// /// The most recent version of the Function. /// public const int TransactionCopyentitlementbyindexApiLatest = 1; /// /// The most recent version of the Function. /// public const int TransactionGetentitlementscountApiLatest = 1; /// /// Fetches an entitlement from a given index. /// /// /// structure containing the index being accessed /// the entitlement for the given index, if it exists and is valid, use when finished /// /// if the information is available and passed out in OutEntitlement /// if the entitlement information is stale and passed out in OutEntitlement /// if you pass a null pointer for the out parameter /// if the entitlement is not found /// public Result CopyEntitlementByIndex(ref TransactionCopyEntitlementByIndexOptions options, out Entitlement? outEntitlement) { TransactionCopyEntitlementByIndexOptionsInternal optionsInternal = new TransactionCopyEntitlementByIndexOptionsInternal(); optionsInternal.Set(ref options); var outEntitlementAddress = System.IntPtr.Zero; var funcResult = Bindings.EOS_Ecom_Transaction_CopyEntitlementByIndex(InnerHandle, ref optionsInternal, ref outEntitlementAddress); Helper.Dispose(ref optionsInternal); Helper.Get(outEntitlementAddress, out outEntitlement); if (outEntitlement != null) { Bindings.EOS_Ecom_Entitlement_Release(outEntitlementAddress); } return funcResult; } /// /// Fetch the number of entitlements that are part of this transaction. /// /// /// structure containing the Epic Account ID being accessed /// /// the number of entitlements found. /// public uint GetEntitlementsCount(ref TransactionGetEntitlementsCountOptions options) { TransactionGetEntitlementsCountOptionsInternal optionsInternal = new TransactionGetEntitlementsCountOptionsInternal(); optionsInternal.Set(ref options); var funcResult = Bindings.EOS_Ecom_Transaction_GetEntitlementsCount(InnerHandle, ref optionsInternal); Helper.Dispose(ref optionsInternal); return funcResult; } /// /// The Ecom Transaction Interface exposes getters for accessing information about a completed transaction. /// All Ecom Transaction Interface calls take a handle of type as the first parameter. /// An handle is originally returned as part of the struct. /// An handle can also be retrieved from an handle using . /// It is expected that after a transaction that is called. /// When is called any remaining transactions will also be released. /// /// /// /// public Result GetTransactionId(out Utf8String outBuffer) { int inOutBufferLength = EcomInterface.TransactionidMaximumLength + 1; System.IntPtr outBufferAddress = Helper.AddAllocation(inOutBufferLength); var funcResult = Bindings.EOS_Ecom_Transaction_GetTransactionId(InnerHandle, outBufferAddress, ref inOutBufferLength); Helper.Get(outBufferAddress, out outBuffer); Helper.Dispose(ref outBufferAddress); return funcResult; } /// /// Release the memory associated with an . Is is expected to be called after /// being received from a . /// /// /// /// /// A handle to a transaction. public void Release() { Bindings.EOS_Ecom_Transaction_Release(InnerHandle); } } }