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.

957 lines
41 KiB

// 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 EcomInterface : Handle
{
public EcomInterface()
{
}
public EcomInterface(System.IntPtr innerHandle) : base(innerHandle)
{
}
/// <summary>
/// The most recent version of the <see cref="CatalogItem" /> struct.
/// </summary>
public const int CatalogitemApiLatest = 1;
/// <summary>
/// Timestamp value representing an undefined EntitlementEndTimestamp for <see cref="CatalogItem" />
/// </summary>
public const int CatalogitemEntitlementendtimestampUndefined = -1;
/// <summary>
/// The most recent version of the <see cref="CatalogOffer" /> struct.
/// </summary>
public const int CatalogofferApiLatest = 3;
/// <summary>
/// Timestamp value representing an undefined ExpirationTimestamp for <see cref="CatalogOffer" />
/// </summary>
public const int CatalogofferExpirationtimestampUndefined = -1;
/// <summary>
/// The most recent version of the <see cref="CatalogRelease" /> struct.
/// </summary>
public const int CatalogreleaseApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="Checkout" /> API.
/// </summary>
public const int CheckoutApiLatest = 1;
/// <summary>
/// The maximum number of entries in a single checkout.
/// </summary>
public const int CheckoutMaxEntries = 10;
/// <summary>
/// The most recent version of the <see cref="CheckoutEntry" /> struct.
/// </summary>
public const int CheckoutentryApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="CopyEntitlementById" /> API.
/// </summary>
public const int CopyentitlementbyidApiLatest = 2;
/// <summary>
/// The most recent version of the <see cref="CopyEntitlementByIndex" /> API.
/// </summary>
public const int CopyentitlementbyindexApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="CopyEntitlementByNameAndIndex" /> API.
/// </summary>
public const int CopyentitlementbynameandindexApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="CopyItemById" /> API.
/// </summary>
public const int CopyitembyidApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="CopyItemImageInfoByIndex" /> API.
/// </summary>
public const int CopyitemimageinfobyindexApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="CopyItemReleaseByIndex" /> API.
/// </summary>
public const int CopyitemreleasebyindexApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="CopyOfferById" /> API.
/// </summary>
public const int CopyofferbyidApiLatest = 2;
/// <summary>
/// The most recent version of the <see cref="CopyOfferByIndex" /> API.
/// </summary>
public const int CopyofferbyindexApiLatest = 2;
/// <summary>
/// The most recent version of the <see cref="CopyOfferImageInfoByIndex" /> API.
/// </summary>
public const int CopyofferimageinfobyindexApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="CopyOfferItemByIndex" /> API.
/// </summary>
public const int CopyofferitembyindexApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="CopyTransactionById" /> Function.
/// </summary>
public const int CopytransactionbyidApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="CopyTransactionByIndex" /> Function.
/// </summary>
public const int CopytransactionbyindexApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="Entitlement" /> struct.
/// </summary>
public const int EntitlementApiLatest = 2;
/// <summary>
/// Timestamp value representing an undefined EndTimestamp for <see cref="Entitlement" />
/// </summary>
public const int EntitlementEndtimestampUndefined = -1;
/// <summary>
/// The most recent version of the <see cref="GetEntitlementsByNameCount" /> API.
/// </summary>
public const int GetentitlementsbynamecountApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="GetEntitlementsCount" /> API.
/// </summary>
public const int GetentitlementscountApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="GetItemImageInfoCount" /> API.
/// </summary>
public const int GetitemimageinfocountApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="GetItemReleaseCount" /> API.
/// </summary>
public const int GetitemreleasecountApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="GetOfferCount" /> API.
/// </summary>
public const int GetoffercountApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="GetOfferImageInfoCount" /> API.
/// </summary>
public const int GetofferimageinfocountApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="GetOfferItemCount" /> API.
/// </summary>
public const int GetofferitemcountApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="GetTransactionCount" /> Function.
/// </summary>
public const int GettransactioncountApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="ItemOwnership" /> struct.
/// </summary>
public const int ItemownershipApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="KeyImageInfo" /> struct.
/// </summary>
public const int KeyimageinfoApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="QueryEntitlements" /> API.
/// </summary>
public const int QueryentitlementsApiLatest = 2;
/// <summary>
/// The maximum number of entitlements that may be queried in a single pass
/// </summary>
public const int QueryentitlementsMaxEntitlementIds = 32;
/// <summary>
/// The most recent version of the <see cref="QueryOffers" /> API.
/// </summary>
public const int QueryoffersApiLatest = 1;
/// <summary>
/// The most recent version of the <see cref="QueryOwnership" /> API.
/// </summary>
public const int QueryownershipApiLatest = 2;
/// <summary>
/// The maximum number of catalog items that may be queried in a single pass
/// </summary>
public const int QueryownershipMaxCatalogIds = 32;
/// <summary>
/// The most recent version of the <see cref="QueryOwnershipToken" /> API.
/// </summary>
public const int QueryownershiptokenApiLatest = 2;
/// <summary>
/// The maximum number of catalog items that may be queried in a single pass
/// </summary>
public const int QueryownershiptokenMaxCatalogitemIds = 32;
/// <summary>
/// The most recent version of the <see cref="RedeemEntitlements" /> API.
/// </summary>
public const int RedeementitlementsApiLatest = 1;
/// <summary>
/// The maximum number of entitlement IDs that may be redeemed in a single pass
/// </summary>
public const int RedeementitlementsMaxIds = 32;
/// <summary>
/// The maximum length of a transaction ID.
/// </summary>
public const int TransactionidMaximumLength = 64;
/// <summary>
/// Initiates the purchase flow for a set of offers. The callback is triggered after the purchase flow.
/// On success, the set of entitlements that were unlocked will be cached.
/// On success, a Transaction ID will be returned. The Transaction ID can be used to obtain an
/// <see cref="Transaction" /> handle. The handle can then be used to retrieve the entitlements rewarded by the purchase.
/// <seealso cref="Transaction.Release" />
/// </summary>
/// <param name="options">structure containing filter criteria</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 Checkout(CheckoutOptions options, object clientData, OnCheckoutCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CheckoutOptionsInternal, CheckoutOptions>(ref optionsAddress, options);
var clientDataAddress = System.IntPtr.Zero;
var completionDelegateInternal = new OnCheckoutCallbackInternal(OnCheckoutCallbackInternalImplementation);
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
Bindings.EOS_Ecom_Checkout(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
Helper.TryMarshalDispose(ref optionsAddress);
}
/// <summary>
/// Fetches the entitlement with the given ID.
/// <seealso cref="CopyEntitlementByNameAndIndex" />
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">structure containing the Epic Online Services Account ID and entitlement ID being accessed</param>
/// <param name="outEntitlement">the entitlement for the given ID, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutEntitlement
/// <see cref="Result.EcomEntitlementStale" /> if the entitlement information is stale and passed out in OutEntitlement
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the entitlement is not found
/// </returns>
public Result CopyEntitlementById(CopyEntitlementByIdOptions options, out Entitlement outEntitlement)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyEntitlementByIdOptionsInternal, CopyEntitlementByIdOptions>(ref optionsAddress, options);
var outEntitlementAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Ecom_CopyEntitlementById(InnerHandle, optionsAddress, ref outEntitlementAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<EntitlementInternal, Entitlement>(outEntitlementAddress, out outEntitlement))
{
Bindings.EOS_Ecom_Entitlement_Release(outEntitlementAddress);
}
return funcResult;
}
/// <summary>
/// Fetches an entitlement from a given index.
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">structure containing the Epic Online Services Account ID and index being accessed</param>
/// <param name="outEntitlement">the entitlement for the given index, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutEntitlement
/// <see cref="Result.EcomEntitlementStale" /> if the entitlement information is stale and passed out in OutEntitlement
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the entitlement is not found
/// </returns>
public Result CopyEntitlementByIndex(CopyEntitlementByIndexOptions options, out Entitlement outEntitlement)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyEntitlementByIndexOptionsInternal, CopyEntitlementByIndexOptions>(ref optionsAddress, options);
var outEntitlementAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Ecom_CopyEntitlementByIndex(InnerHandle, optionsAddress, ref outEntitlementAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<EntitlementInternal, Entitlement>(outEntitlementAddress, out outEntitlement))
{
Bindings.EOS_Ecom_Entitlement_Release(outEntitlementAddress);
}
return funcResult;
}
/// <summary>
/// Fetches a single entitlement with a given Entitlement Name. The Index is used to access individual
/// entitlements among those with the same Entitlement Name. The Index can be a value from 0 to
/// one less than the result from <see cref="GetEntitlementsByNameCount" />.
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">structure containing the Epic Online Services Account ID, entitlement name, and index being accessed</param>
/// <param name="outEntitlement">the entitlement for the given name index pair, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutEntitlement
/// <see cref="Result.EcomEntitlementStale" /> if the entitlement information is stale and passed out in OutEntitlement
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the entitlement is not found
/// </returns>
public Result CopyEntitlementByNameAndIndex(CopyEntitlementByNameAndIndexOptions options, out Entitlement outEntitlement)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyEntitlementByNameAndIndexOptionsInternal, CopyEntitlementByNameAndIndexOptions>(ref optionsAddress, options);
var outEntitlementAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Ecom_CopyEntitlementByNameAndIndex(InnerHandle, optionsAddress, ref outEntitlementAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<EntitlementInternal, Entitlement>(outEntitlementAddress, out outEntitlement))
{
Bindings.EOS_Ecom_Entitlement_Release(outEntitlementAddress);
}
return funcResult;
}
/// <summary>
/// Fetches an item with a given ID.
/// <seealso cref="Release" />
/// <seealso cref="GetItemImageInfoCount" />
/// <seealso cref="GetItemReleaseCount" />
/// </summary>
/// <param name="options">structure containing the item ID being accessed</param>
/// <param name="outItem">the item for the given index, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutItem
/// <see cref="Result.EcomCatalogItemStale" /> if the item information is stale and passed out in OutItem
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the offer is not found
/// </returns>
public Result CopyItemById(CopyItemByIdOptions options, out CatalogItem outItem)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyItemByIdOptionsInternal, CopyItemByIdOptions>(ref optionsAddress, options);
var outItemAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Ecom_CopyItemById(InnerHandle, optionsAddress, ref outItemAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<CatalogItemInternal, CatalogItem>(outItemAddress, out outItem))
{
Bindings.EOS_Ecom_CatalogItem_Release(outItemAddress);
}
return funcResult;
}
/// <summary>
/// Fetches an image from a given index.
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">structure containing the item ID and index being accessed</param>
/// <param name="outImageInfo">the image for the given index, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutImageInfo
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.EcomCatalogItemStale" /> if the associated item information is stale
/// <see cref="Result.NotFound" /> if the image is not found
/// </returns>
public Result CopyItemImageInfoByIndex(CopyItemImageInfoByIndexOptions options, out KeyImageInfo outImageInfo)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyItemImageInfoByIndexOptionsInternal, CopyItemImageInfoByIndexOptions>(ref optionsAddress, options);
var outImageInfoAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Ecom_CopyItemImageInfoByIndex(InnerHandle, optionsAddress, ref outImageInfoAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<KeyImageInfoInternal, KeyImageInfo>(outImageInfoAddress, out outImageInfo))
{
Bindings.EOS_Ecom_KeyImageInfo_Release(outImageInfoAddress);
}
return funcResult;
}
/// <summary>
/// Fetches a release from a given index.
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">structure containing the item ID and index being accessed</param>
/// <param name="outRelease">the release for the given index, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutRelease
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.EcomCatalogItemStale" /> if the associated item information is stale
/// <see cref="Result.NotFound" /> if the release is not found
/// </returns>
public Result CopyItemReleaseByIndex(CopyItemReleaseByIndexOptions options, out CatalogRelease outRelease)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyItemReleaseByIndexOptionsInternal, CopyItemReleaseByIndexOptions>(ref optionsAddress, options);
var outReleaseAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Ecom_CopyItemReleaseByIndex(InnerHandle, optionsAddress, ref outReleaseAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<CatalogReleaseInternal, CatalogRelease>(outReleaseAddress, out outRelease))
{
Bindings.EOS_Ecom_CatalogRelease_Release(outReleaseAddress);
}
return funcResult;
}
/// <summary>
/// Fetches an offer with a given ID. The pricing and text are localized to the provided account.
/// <seealso cref="Release" />
/// <seealso cref="GetOfferItemCount" />
/// </summary>
/// <param name="options">structure containing the Epic Online Services Account ID and offer ID being accessed</param>
/// <param name="outOffer">the offer for the given index, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutOffer
/// <see cref="Result.EcomCatalogOfferStale" /> if the offer information is stale and passed out in OutOffer
/// <see cref="Result.EcomCatalogOfferPriceInvalid" /> if the offer information has an invalid price and passed out in OutOffer
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the offer is not found
/// </returns>
public Result CopyOfferById(CopyOfferByIdOptions options, out CatalogOffer outOffer)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyOfferByIdOptionsInternal, CopyOfferByIdOptions>(ref optionsAddress, options);
var outOfferAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Ecom_CopyOfferById(InnerHandle, optionsAddress, ref outOfferAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<CatalogOfferInternal, CatalogOffer>(outOfferAddress, out outOffer))
{
Bindings.EOS_Ecom_CatalogOffer_Release(outOfferAddress);
}
return funcResult;
}
/// <summary>
/// Fetches an offer from a given index. The pricing and text are localized to the provided account.
/// <seealso cref="Release" />
/// <seealso cref="GetOfferItemCount" />
/// </summary>
/// <param name="options">structure containing the Epic Online Services Account ID and index being accessed</param>
/// <param name="outOffer">the offer for the given index, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutOffer
/// <see cref="Result.EcomCatalogOfferStale" /> if the offer information is stale and passed out in OutOffer
/// <see cref="Result.EcomCatalogOfferPriceInvalid" /> if the offer information has an invalid price and passed out in OutOffer
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the offer is not found
/// </returns>
public Result CopyOfferByIndex(CopyOfferByIndexOptions options, out CatalogOffer outOffer)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyOfferByIndexOptionsInternal, CopyOfferByIndexOptions>(ref optionsAddress, options);
var outOfferAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Ecom_CopyOfferByIndex(InnerHandle, optionsAddress, ref outOfferAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<CatalogOfferInternal, CatalogOffer>(outOfferAddress, out outOffer))
{
Bindings.EOS_Ecom_CatalogOffer_Release(outOfferAddress);
}
return funcResult;
}
/// <summary>
/// Fetches an image from a given index.
/// <seealso cref="Release" />
/// </summary>
/// <param name="options">structure containing the offer ID and index being accessed</param>
/// <param name="outImageInfo">the image for the given index, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutImageInfo
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.EcomCatalogOfferStale" /> if the associated offer information is stale
/// <see cref="Result.NotFound" /> if the image is not found
/// </returns>
public Result CopyOfferImageInfoByIndex(CopyOfferImageInfoByIndexOptions options, out KeyImageInfo outImageInfo)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyOfferImageInfoByIndexOptionsInternal, CopyOfferImageInfoByIndexOptions>(ref optionsAddress, options);
var outImageInfoAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Ecom_CopyOfferImageInfoByIndex(InnerHandle, optionsAddress, ref outImageInfoAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<KeyImageInfoInternal, KeyImageInfo>(outImageInfoAddress, out outImageInfo))
{
Bindings.EOS_Ecom_KeyImageInfo_Release(outImageInfoAddress);
}
return funcResult;
}
/// <summary>
/// Fetches an item from a given index.
/// <seealso cref="Release" />
/// <seealso cref="GetItemImageInfoCount" />
/// <seealso cref="GetItemReleaseCount" />
/// </summary>
/// <param name="options">structure containing the Epic Online Services Account ID and index being accessed</param>
/// <param name="outItem">the item for the given index, if it exists and is valid, use <see cref="Release" /> when finished</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutItem
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.EcomCatalogItemStale" /> if the item information is stale
/// <see cref="Result.NotFound" /> if the item is not found
/// </returns>
public Result CopyOfferItemByIndex(CopyOfferItemByIndexOptions options, out CatalogItem outItem)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyOfferItemByIndexOptionsInternal, CopyOfferItemByIndexOptions>(ref optionsAddress, options);
var outItemAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Ecom_CopyOfferItemByIndex(InnerHandle, optionsAddress, ref outItemAddress);
Helper.TryMarshalDispose(ref optionsAddress);
if (Helper.TryMarshalGet<CatalogItemInternal, CatalogItem>(outItemAddress, out outItem))
{
Bindings.EOS_Ecom_CatalogItem_Release(outItemAddress);
}
return funcResult;
}
/// <summary>
/// Fetches the transaction handle at the given index.
/// <seealso cref="CheckoutCallbackInfo" />
/// <seealso cref="Transaction.Release" />
/// </summary>
/// <param name="options">structure containing the Epic Online Services Account ID and transaction ID being accessed</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutTransaction
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the transaction is not found
/// </returns>
public Result CopyTransactionById(CopyTransactionByIdOptions options, out Transaction outTransaction)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyTransactionByIdOptionsInternal, CopyTransactionByIdOptions>(ref optionsAddress, options);
var outTransactionAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Ecom_CopyTransactionById(InnerHandle, optionsAddress, ref outTransactionAddress);
Helper.TryMarshalDispose(ref optionsAddress);
Helper.TryMarshalGet(outTransactionAddress, out outTransaction);
return funcResult;
}
/// <summary>
/// Fetches the transaction handle at the given index.
/// <seealso cref="CheckoutCallbackInfo" />
/// <seealso cref="Transaction.Release" />
/// </summary>
/// <param name="options">structure containing the Epic Online Services Account ID and index being accessed</param>
/// <returns>
/// <see cref="Result.Success" /> if the information is available and passed out in OutTransaction
/// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
/// <see cref="Result.NotFound" /> if the transaction is not found
/// </returns>
public Result CopyTransactionByIndex(CopyTransactionByIndexOptions options, out Transaction outTransaction)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<CopyTransactionByIndexOptionsInternal, CopyTransactionByIndexOptions>(ref optionsAddress, options);
var outTransactionAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_Ecom_CopyTransactionByIndex(InnerHandle, optionsAddress, ref outTransactionAddress);
Helper.TryMarshalDispose(ref optionsAddress);
Helper.TryMarshalGet(outTransactionAddress, out outTransaction);
return funcResult;
}
/// <summary>
/// Fetch the number of entitlements with the given Entitlement Name that are cached for a given local user.
/// <seealso cref="CopyEntitlementByNameAndIndex" />
/// </summary>
/// <param name="options">structure containing the Epic Online Services Account ID and name being accessed</param>
/// <returns>
/// the number of entitlements found.
/// </returns>
public uint GetEntitlementsByNameCount(GetEntitlementsByNameCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<GetEntitlementsByNameCountOptionsInternal, GetEntitlementsByNameCountOptions>(ref optionsAddress, options);
var funcResult = Bindings.EOS_Ecom_GetEntitlementsByNameCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
/// <summary>
/// Fetch the number of entitlements that are cached for a given local user.
/// <seealso cref="CopyEntitlementByIndex" />
/// </summary>
/// <param name="options">structure containing the Epic Online Services Account ID being accessed</param>
/// <returns>
/// the number of entitlements found.
/// </returns>
public uint GetEntitlementsCount(GetEntitlementsCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<GetEntitlementsCountOptionsInternal, GetEntitlementsCountOptions>(ref optionsAddress, options);
var funcResult = Bindings.EOS_Ecom_GetEntitlementsCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
/// <summary>
/// Fetch the number of images that are associated with a given cached item for a local user.
/// </summary>
/// <returns>
/// the number of images found.
/// </returns>
public uint GetItemImageInfoCount(GetItemImageInfoCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<GetItemImageInfoCountOptionsInternal, GetItemImageInfoCountOptions>(ref optionsAddress, options);
var funcResult = Bindings.EOS_Ecom_GetItemImageInfoCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
/// <summary>
/// Fetch the number of releases that are associated with a given cached item for a local user.
/// </summary>
/// <returns>
/// the number of releases found.
/// </returns>
public uint GetItemReleaseCount(GetItemReleaseCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<GetItemReleaseCountOptionsInternal, GetItemReleaseCountOptions>(ref optionsAddress, options);
var funcResult = Bindings.EOS_Ecom_GetItemReleaseCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
/// <summary>
/// Fetch the number of offers that are cached for a given local user.
/// <seealso cref="CopyOfferByIndex" />
/// </summary>
/// <param name="options">structure containing the Epic Online Services Account ID being accessed</param>
/// <returns>
/// the number of offers found.
/// </returns>
public uint GetOfferCount(GetOfferCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<GetOfferCountOptionsInternal, GetOfferCountOptions>(ref optionsAddress, options);
var funcResult = Bindings.EOS_Ecom_GetOfferCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
/// <summary>
/// Fetch the number of images that are associated with a given cached offer for a local user.
/// </summary>
/// <returns>
/// the number of images found.
/// </returns>
public uint GetOfferImageInfoCount(GetOfferImageInfoCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<GetOfferImageInfoCountOptionsInternal, GetOfferImageInfoCountOptions>(ref optionsAddress, options);
var funcResult = Bindings.EOS_Ecom_GetOfferImageInfoCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
/// <summary>
/// Fetch the number of items that are associated with a given cached offer for a local user.
/// </summary>
/// <returns>
/// the number of items found.
/// </returns>
public uint GetOfferItemCount(GetOfferItemCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<GetOfferItemCountOptionsInternal, GetOfferItemCountOptions>(ref optionsAddress, options);
var funcResult = Bindings.EOS_Ecom_GetOfferItemCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
/// <summary>
/// Fetch the number of transactions that are cached for a given local user.
/// <seealso cref="CheckoutCallbackInfo" />
/// <seealso cref="CopyTransactionByIndex" />
/// </summary>
/// <returns>
/// the number of transactions found.
/// </returns>
public uint GetTransactionCount(GetTransactionCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<GetTransactionCountOptionsInternal, GetTransactionCountOptions>(ref optionsAddress, options);
var funcResult = Bindings.EOS_Ecom_GetTransactionCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
/// <summary>
/// Query the entitlement information defined with Epic Online Services.
/// A set of entitlement names can be provided to filter the set of entitlements associated with the account.
/// This data will be cached for a limited time and retrieved again from the backend when necessary.
/// Use <see cref="CopyEntitlementByIndex" />, <see cref="CopyEntitlementByNameAndIndex" />, and <see cref="CopyEntitlementById" /> to get the entitlement details.
/// Use <see cref="GetEntitlementsByNameCount" /> to retrieve the number of entitlements with a specific entitlement name.
/// </summary>
/// <param name="options">structure containing the account and entitlement names to retrieve</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 QueryEntitlements(QueryEntitlementsOptions options, object clientData, OnQueryEntitlementsCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<QueryEntitlementsOptionsInternal, QueryEntitlementsOptions>(ref optionsAddress, options);
var clientDataAddress = System.IntPtr.Zero;
var completionDelegateInternal = new OnQueryEntitlementsCallbackInternal(OnQueryEntitlementsCallbackInternalImplementation);
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
Bindings.EOS_Ecom_QueryEntitlements(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
Helper.TryMarshalDispose(ref optionsAddress);
}
/// <summary>
/// Query for a list of catalog offers defined with Epic Online Services.
/// This data will be cached for a limited time and retrieved again from the backend when necessary.
/// </summary>
/// <param name="options">structure containing filter criteria</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 QueryOffers(QueryOffersOptions options, object clientData, OnQueryOffersCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<QueryOffersOptionsInternal, QueryOffersOptions>(ref optionsAddress, options);
var clientDataAddress = System.IntPtr.Zero;
var completionDelegateInternal = new OnQueryOffersCallbackInternal(OnQueryOffersCallbackInternalImplementation);
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
Bindings.EOS_Ecom_QueryOffers(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
Helper.TryMarshalDispose(ref optionsAddress);
}
/// <summary>
/// Query the ownership status for a given list of catalog item IDs defined with Epic Online Services.
/// This data will be cached for a limited time and retrieved again from the backend when necessary
/// </summary>
/// <param name="options">structure containing the account and catalog item IDs to retrieve</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 QueryOwnership(QueryOwnershipOptions options, object clientData, OnQueryOwnershipCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<QueryOwnershipOptionsInternal, QueryOwnershipOptions>(ref optionsAddress, options);
var clientDataAddress = System.IntPtr.Zero;
var completionDelegateInternal = new OnQueryOwnershipCallbackInternal(OnQueryOwnershipCallbackInternalImplementation);
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
Bindings.EOS_Ecom_QueryOwnership(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
Helper.TryMarshalDispose(ref optionsAddress);
}
/// <summary>
/// Query the ownership status for a given list of catalog item IDs defined with Epic Online Services.
/// The data is return via the callback in the form of a signed JWT that should be verified by an external backend server using a public key for authenticity.
/// </summary>
/// <param name="options">structure containing the account and catalog item IDs to retrieve in token form</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 QueryOwnershipToken(QueryOwnershipTokenOptions options, object clientData, OnQueryOwnershipTokenCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<QueryOwnershipTokenOptionsInternal, QueryOwnershipTokenOptions>(ref optionsAddress, options);
var clientDataAddress = System.IntPtr.Zero;
var completionDelegateInternal = new OnQueryOwnershipTokenCallbackInternal(OnQueryOwnershipTokenCallbackInternalImplementation);
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
Bindings.EOS_Ecom_QueryOwnershipToken(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
Helper.TryMarshalDispose(ref optionsAddress);
}
/// <summary>
/// Requests that the provided entitlement be marked redeemed. This will cause that entitlement
/// to no longer be returned from QueryEntitlements unless the include redeemed request flag is set true.
/// </summary>
/// <param name="options">structure containing entitlement to redeem</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 RedeemEntitlements(RedeemEntitlementsOptions options, object clientData, OnRedeemEntitlementsCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet<RedeemEntitlementsOptionsInternal, RedeemEntitlementsOptions>(ref optionsAddress, options);
var clientDataAddress = System.IntPtr.Zero;
var completionDelegateInternal = new OnRedeemEntitlementsCallbackInternal(OnRedeemEntitlementsCallbackInternalImplementation);
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
Bindings.EOS_Ecom_RedeemEntitlements(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
Helper.TryMarshalDispose(ref optionsAddress);
}
[MonoPInvokeCallback(typeof(OnCheckoutCallbackInternal))]
internal static void OnCheckoutCallbackInternalImplementation(System.IntPtr data)
{
OnCheckoutCallback callback;
CheckoutCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback<OnCheckoutCallback, CheckoutCallbackInfoInternal, CheckoutCallbackInfo>(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnQueryEntitlementsCallbackInternal))]
internal static void OnQueryEntitlementsCallbackInternalImplementation(System.IntPtr data)
{
OnQueryEntitlementsCallback callback;
QueryEntitlementsCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback<OnQueryEntitlementsCallback, QueryEntitlementsCallbackInfoInternal, QueryEntitlementsCallbackInfo>(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnQueryOffersCallbackInternal))]
internal static void OnQueryOffersCallbackInternalImplementation(System.IntPtr data)
{
OnQueryOffersCallback callback;
QueryOffersCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback<OnQueryOffersCallback, QueryOffersCallbackInfoInternal, QueryOffersCallbackInfo>(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnQueryOwnershipCallbackInternal))]
internal static void OnQueryOwnershipCallbackInternalImplementation(System.IntPtr data)
{
OnQueryOwnershipCallback callback;
QueryOwnershipCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback<OnQueryOwnershipCallback, QueryOwnershipCallbackInfoInternal, QueryOwnershipCallbackInfo>(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnQueryOwnershipTokenCallbackInternal))]
internal static void OnQueryOwnershipTokenCallbackInternalImplementation(System.IntPtr data)
{
OnQueryOwnershipTokenCallback callback;
QueryOwnershipTokenCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback<OnQueryOwnershipTokenCallback, QueryOwnershipTokenCallbackInfoInternal, QueryOwnershipTokenCallbackInfo>(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnRedeemEntitlementsCallbackInternal))]
internal static void OnRedeemEntitlementsCallbackInternalImplementation(System.IntPtr data)
{
OnRedeemEntitlementsCallback callback;
RedeemEntitlementsCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback<OnRedeemEntitlementsCallback, RedeemEntitlementsCallbackInfoInternal, RedeemEntitlementsCallbackInfo>(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
}
}