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.
967 lines
40 KiB
967 lines
40 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 = 4;
|
|
|
|
/// <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 = 50;
|
|
|
|
/// <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(ref CheckoutOptions options, object clientData, OnCheckoutCallback completionDelegate)
|
|
{
|
|
CheckoutOptionsInternal optionsInternal = new CheckoutOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnCheckoutCallbackInternal(OnCheckoutCallbackInternalImplementation);
|
|
Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_Ecom_Checkout(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Fetches the entitlement with the given ID.
|
|
/// <seealso cref="CopyEntitlementByNameAndIndex" />
|
|
/// <seealso cref="Release" />
|
|
/// </summary>
|
|
/// <param name="options">structure containing the Epic 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(ref CopyEntitlementByIdOptions options, out Entitlement? outEntitlement)
|
|
{
|
|
CopyEntitlementByIdOptionsInternal optionsInternal = new CopyEntitlementByIdOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outEntitlementAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Ecom_CopyEntitlementById(InnerHandle, ref optionsInternal, ref outEntitlementAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<EntitlementInternal, Entitlement>(outEntitlementAddress, out outEntitlement);
|
|
if (outEntitlement != null)
|
|
{
|
|
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 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(ref CopyEntitlementByIndexOptions options, out Entitlement? outEntitlement)
|
|
{
|
|
CopyEntitlementByIndexOptionsInternal optionsInternal = new CopyEntitlementByIndexOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outEntitlementAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Ecom_CopyEntitlementByIndex(InnerHandle, ref optionsInternal, ref outEntitlementAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<EntitlementInternal, Entitlement>(outEntitlementAddress, out outEntitlement);
|
|
if (outEntitlement != null)
|
|
{
|
|
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 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(ref CopyEntitlementByNameAndIndexOptions options, out Entitlement? outEntitlement)
|
|
{
|
|
CopyEntitlementByNameAndIndexOptionsInternal optionsInternal = new CopyEntitlementByNameAndIndexOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outEntitlementAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Ecom_CopyEntitlementByNameAndIndex(InnerHandle, ref optionsInternal, ref outEntitlementAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<EntitlementInternal, Entitlement>(outEntitlementAddress, out outEntitlement);
|
|
if (outEntitlement != null)
|
|
{
|
|
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(ref CopyItemByIdOptions options, out CatalogItem? outItem)
|
|
{
|
|
CopyItemByIdOptionsInternal optionsInternal = new CopyItemByIdOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outItemAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Ecom_CopyItemById(InnerHandle, ref optionsInternal, ref outItemAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<CatalogItemInternal, CatalogItem>(outItemAddress, out outItem);
|
|
if (outItem != null)
|
|
{
|
|
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(ref CopyItemImageInfoByIndexOptions options, out KeyImageInfo? outImageInfo)
|
|
{
|
|
CopyItemImageInfoByIndexOptionsInternal optionsInternal = new CopyItemImageInfoByIndexOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outImageInfoAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Ecom_CopyItemImageInfoByIndex(InnerHandle, ref optionsInternal, ref outImageInfoAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<KeyImageInfoInternal, KeyImageInfo>(outImageInfoAddress, out outImageInfo);
|
|
if (outImageInfo != null)
|
|
{
|
|
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(ref CopyItemReleaseByIndexOptions options, out CatalogRelease? outRelease)
|
|
{
|
|
CopyItemReleaseByIndexOptionsInternal optionsInternal = new CopyItemReleaseByIndexOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outReleaseAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Ecom_CopyItemReleaseByIndex(InnerHandle, ref optionsInternal, ref outReleaseAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<CatalogReleaseInternal, CatalogRelease>(outReleaseAddress, out outRelease);
|
|
if (outRelease != null)
|
|
{
|
|
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 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(ref CopyOfferByIdOptions options, out CatalogOffer? outOffer)
|
|
{
|
|
CopyOfferByIdOptionsInternal optionsInternal = new CopyOfferByIdOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outOfferAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Ecom_CopyOfferById(InnerHandle, ref optionsInternal, ref outOfferAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<CatalogOfferInternal, CatalogOffer>(outOfferAddress, out outOffer);
|
|
if (outOffer != null)
|
|
{
|
|
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 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(ref CopyOfferByIndexOptions options, out CatalogOffer? outOffer)
|
|
{
|
|
CopyOfferByIndexOptionsInternal optionsInternal = new CopyOfferByIndexOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outOfferAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Ecom_CopyOfferByIndex(InnerHandle, ref optionsInternal, ref outOfferAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<CatalogOfferInternal, CatalogOffer>(outOfferAddress, out outOffer);
|
|
if (outOffer != null)
|
|
{
|
|
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(ref CopyOfferImageInfoByIndexOptions options, out KeyImageInfo? outImageInfo)
|
|
{
|
|
CopyOfferImageInfoByIndexOptionsInternal optionsInternal = new CopyOfferImageInfoByIndexOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outImageInfoAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Ecom_CopyOfferImageInfoByIndex(InnerHandle, ref optionsInternal, ref outImageInfoAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<KeyImageInfoInternal, KeyImageInfo>(outImageInfoAddress, out outImageInfo);
|
|
if (outImageInfo != null)
|
|
{
|
|
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 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(ref CopyOfferItemByIndexOptions options, out CatalogItem? outItem)
|
|
{
|
|
CopyOfferItemByIndexOptionsInternal optionsInternal = new CopyOfferItemByIndexOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outItemAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Ecom_CopyOfferItemByIndex(InnerHandle, ref optionsInternal, ref outItemAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get<CatalogItemInternal, CatalogItem>(outItemAddress, out outItem);
|
|
if (outItem != null)
|
|
{
|
|
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 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(ref CopyTransactionByIdOptions options, out Transaction outTransaction)
|
|
{
|
|
CopyTransactionByIdOptionsInternal optionsInternal = new CopyTransactionByIdOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outTransactionAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Ecom_CopyTransactionById(InnerHandle, ref optionsInternal, ref outTransactionAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get(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 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(ref CopyTransactionByIndexOptions options, out Transaction outTransaction)
|
|
{
|
|
CopyTransactionByIndexOptionsInternal optionsInternal = new CopyTransactionByIndexOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var outTransactionAddress = System.IntPtr.Zero;
|
|
|
|
var funcResult = Bindings.EOS_Ecom_CopyTransactionByIndex(InnerHandle, ref optionsInternal, ref outTransactionAddress);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
Helper.Get(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 Account ID and name being accessed</param>
|
|
/// <returns>
|
|
/// the number of entitlements found.
|
|
/// </returns>
|
|
public uint GetEntitlementsByNameCount(ref GetEntitlementsByNameCountOptions options)
|
|
{
|
|
GetEntitlementsByNameCountOptionsInternal optionsInternal = new GetEntitlementsByNameCountOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var funcResult = Bindings.EOS_Ecom_GetEntitlementsByNameCount(InnerHandle, ref optionsInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
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 Account ID being accessed</param>
|
|
/// <returns>
|
|
/// the number of entitlements found.
|
|
/// </returns>
|
|
public uint GetEntitlementsCount(ref GetEntitlementsCountOptions options)
|
|
{
|
|
GetEntitlementsCountOptionsInternal optionsInternal = new GetEntitlementsCountOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var funcResult = Bindings.EOS_Ecom_GetEntitlementsCount(InnerHandle, ref optionsInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
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(ref GetItemImageInfoCountOptions options)
|
|
{
|
|
GetItemImageInfoCountOptionsInternal optionsInternal = new GetItemImageInfoCountOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var funcResult = Bindings.EOS_Ecom_GetItemImageInfoCount(InnerHandle, ref optionsInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
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(ref GetItemReleaseCountOptions options)
|
|
{
|
|
GetItemReleaseCountOptionsInternal optionsInternal = new GetItemReleaseCountOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var funcResult = Bindings.EOS_Ecom_GetItemReleaseCount(InnerHandle, ref optionsInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
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 Account ID being accessed</param>
|
|
/// <returns>
|
|
/// the number of offers found.
|
|
/// </returns>
|
|
public uint GetOfferCount(ref GetOfferCountOptions options)
|
|
{
|
|
GetOfferCountOptionsInternal optionsInternal = new GetOfferCountOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var funcResult = Bindings.EOS_Ecom_GetOfferCount(InnerHandle, ref optionsInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
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(ref GetOfferImageInfoCountOptions options)
|
|
{
|
|
GetOfferImageInfoCountOptionsInternal optionsInternal = new GetOfferImageInfoCountOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var funcResult = Bindings.EOS_Ecom_GetOfferImageInfoCount(InnerHandle, ref optionsInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
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(ref GetOfferItemCountOptions options)
|
|
{
|
|
GetOfferItemCountOptionsInternal optionsInternal = new GetOfferItemCountOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var funcResult = Bindings.EOS_Ecom_GetOfferItemCount(InnerHandle, ref optionsInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
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(ref GetTransactionCountOptions options)
|
|
{
|
|
GetTransactionCountOptionsInternal optionsInternal = new GetTransactionCountOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var funcResult = Bindings.EOS_Ecom_GetTransactionCount(InnerHandle, ref optionsInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
|
|
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(ref QueryEntitlementsOptions options, object clientData, OnQueryEntitlementsCallback completionDelegate)
|
|
{
|
|
QueryEntitlementsOptionsInternal optionsInternal = new QueryEntitlementsOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnQueryEntitlementsCallbackInternal(OnQueryEntitlementsCallbackInternalImplementation);
|
|
Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_Ecom_QueryEntitlements(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
}
|
|
|
|
/// <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(ref QueryOffersOptions options, object clientData, OnQueryOffersCallback completionDelegate)
|
|
{
|
|
QueryOffersOptionsInternal optionsInternal = new QueryOffersOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnQueryOffersCallbackInternal(OnQueryOffersCallbackInternalImplementation);
|
|
Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_Ecom_QueryOffers(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
}
|
|
|
|
/// <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(ref QueryOwnershipOptions options, object clientData, OnQueryOwnershipCallback completionDelegate)
|
|
{
|
|
QueryOwnershipOptionsInternal optionsInternal = new QueryOwnershipOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnQueryOwnershipCallbackInternal(OnQueryOwnershipCallbackInternalImplementation);
|
|
Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_Ecom_QueryOwnership(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
}
|
|
|
|
/// <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(ref QueryOwnershipTokenOptions options, object clientData, OnQueryOwnershipTokenCallback completionDelegate)
|
|
{
|
|
QueryOwnershipTokenOptionsInternal optionsInternal = new QueryOwnershipTokenOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnQueryOwnershipTokenCallbackInternal(OnQueryOwnershipTokenCallbackInternalImplementation);
|
|
Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_Ecom_QueryOwnershipToken(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
}
|
|
|
|
/// <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(ref RedeemEntitlementsOptions options, object clientData, OnRedeemEntitlementsCallback completionDelegate)
|
|
{
|
|
RedeemEntitlementsOptionsInternal optionsInternal = new RedeemEntitlementsOptionsInternal();
|
|
optionsInternal.Set(ref options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnRedeemEntitlementsCallbackInternal(OnRedeemEntitlementsCallbackInternalImplementation);
|
|
Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_Ecom_RedeemEntitlements(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.Dispose(ref optionsInternal);
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnCheckoutCallbackInternal))]
|
|
internal static void OnCheckoutCallbackInternalImplementation(ref CheckoutCallbackInfoInternal data)
|
|
{
|
|
OnCheckoutCallback callback;
|
|
CheckoutCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
|
|
{
|
|
callback(ref callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnQueryEntitlementsCallbackInternal))]
|
|
internal static void OnQueryEntitlementsCallbackInternalImplementation(ref QueryEntitlementsCallbackInfoInternal data)
|
|
{
|
|
OnQueryEntitlementsCallback callback;
|
|
QueryEntitlementsCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
|
|
{
|
|
callback(ref callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnQueryOffersCallbackInternal))]
|
|
internal static void OnQueryOffersCallbackInternalImplementation(ref QueryOffersCallbackInfoInternal data)
|
|
{
|
|
OnQueryOffersCallback callback;
|
|
QueryOffersCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
|
|
{
|
|
callback(ref callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnQueryOwnershipCallbackInternal))]
|
|
internal static void OnQueryOwnershipCallbackInternalImplementation(ref QueryOwnershipCallbackInfoInternal data)
|
|
{
|
|
OnQueryOwnershipCallback callback;
|
|
QueryOwnershipCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
|
|
{
|
|
callback(ref callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnQueryOwnershipTokenCallbackInternal))]
|
|
internal static void OnQueryOwnershipTokenCallbackInternalImplementation(ref QueryOwnershipTokenCallbackInfoInternal data)
|
|
{
|
|
OnQueryOwnershipTokenCallback callback;
|
|
QueryOwnershipTokenCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
|
|
{
|
|
callback(ref callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnRedeemEntitlementsCallbackInternal))]
|
|
internal static void OnRedeemEntitlementsCallbackInternalImplementation(ref RedeemEntitlementsCallbackInfoInternal data)
|
|
{
|
|
OnRedeemEntitlementsCallback callback;
|
|
RedeemEntitlementsCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
|
|
{
|
|
callback(ref callbackInfo);
|
|
}
|
|
}
|
|
}
|
|
}
|