// 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)
{
}
///
/// The most recent version of the struct.
///
public const int CatalogitemApiLatest = 1;
///
/// Timestamp value representing an undefined EntitlementEndTimestamp for
///
public const int CatalogitemEntitlementendtimestampUndefined = -1;
///
/// The most recent version of the struct.
///
public const int CatalogofferApiLatest = 4;
///
/// Timestamp value representing an undefined ExpirationTimestamp for
///
public const int CatalogofferExpirationtimestampUndefined = -1;
///
/// The most recent version of the struct.
///
public const int CatalogreleaseApiLatest = 1;
///
/// The most recent version of the API.
///
public const int CheckoutApiLatest = 1;
///
/// The maximum number of entries in a single checkout.
///
public const int CheckoutMaxEntries = 10;
///
/// The most recent version of the struct.
///
public const int CheckoutentryApiLatest = 1;
///
/// The most recent version of the API.
///
public const int CopyentitlementbyidApiLatest = 2;
///
/// The most recent version of the API.
///
public const int CopyentitlementbyindexApiLatest = 1;
///
/// The most recent version of the API.
///
public const int CopyentitlementbynameandindexApiLatest = 1;
///
/// The most recent version of the API.
///
public const int CopyitembyidApiLatest = 1;
///
/// The most recent version of the API.
///
public const int CopyitemimageinfobyindexApiLatest = 1;
///
/// The most recent version of the API.
///
public const int CopyitemreleasebyindexApiLatest = 1;
///
/// The most recent version of the API.
///
public const int CopyofferbyidApiLatest = 2;
///
/// The most recent version of the API.
///
public const int CopyofferbyindexApiLatest = 2;
///
/// The most recent version of the API.
///
public const int CopyofferimageinfobyindexApiLatest = 1;
///
/// The most recent version of the API.
///
public const int CopyofferitembyindexApiLatest = 1;
///
/// The most recent version of the Function.
///
public const int CopytransactionbyidApiLatest = 1;
///
/// The most recent version of the Function.
///
public const int CopytransactionbyindexApiLatest = 1;
///
/// The most recent version of the struct.
///
public const int EntitlementApiLatest = 2;
///
/// Timestamp value representing an undefined EndTimestamp for
///
public const int EntitlementEndtimestampUndefined = -1;
///
/// The most recent version of the API.
///
public const int GetentitlementsbynamecountApiLatest = 1;
///
/// The most recent version of the API.
///
public const int GetentitlementscountApiLatest = 1;
///
/// The most recent version of the API.
///
public const int GetitemimageinfocountApiLatest = 1;
///
/// The most recent version of the API.
///
public const int GetitemreleasecountApiLatest = 1;
///
/// The most recent version of the API.
///
public const int GetoffercountApiLatest = 1;
///
/// The most recent version of the API.
///
public const int GetofferimageinfocountApiLatest = 1;
///
/// The most recent version of the API.
///
public const int GetofferitemcountApiLatest = 1;
///
/// The most recent version of the Function.
///
public const int GettransactioncountApiLatest = 1;
///
/// The most recent version of the struct.
///
public const int ItemownershipApiLatest = 1;
///
/// The most recent version of the struct.
///
public const int KeyimageinfoApiLatest = 1;
///
/// The most recent version of the API.
///
public const int QueryentitlementsApiLatest = 2;
///
/// The maximum number of entitlements that may be queried in a single pass
///
public const int QueryentitlementsMaxEntitlementIds = 32;
///
/// The most recent version of the API.
///
public const int QueryoffersApiLatest = 1;
///
/// The most recent version of the API.
///
public const int QueryownershipApiLatest = 2;
///
/// The maximum number of catalog items that may be queried in a single pass
///
public const int QueryownershipMaxCatalogIds = 32;
///
/// The most recent version of the API.
///
public const int QueryownershiptokenApiLatest = 2;
///
/// The maximum number of catalog items that may be queried in a single pass
///
public const int QueryownershiptokenMaxCatalogitemIds = 32;
///
/// The most recent version of the API.
///
public const int RedeementitlementsApiLatest = 1;
///
/// The maximum number of entitlement IDs that may be redeemed in a single pass
///
public const int RedeementitlementsMaxIds = 32;
///
/// The maximum length of a transaction ID.
///
public const int TransactionidMaximumLength = 64;
///
/// 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
/// handle. The handle can then be used to retrieve the entitlements rewarded by the purchase.
///
///
/// structure containing filter criteria
/// 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 Checkout(CheckoutOptions options, object clientData, OnCheckoutCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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);
}
///
/// Fetches the entitlement with the given ID.
///
///
///
/// structure containing the Epic Account ID and entitlement ID being accessed
/// the entitlement for the given ID, 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 CopyEntitlementById(CopyEntitlementByIdOptions options, out Entitlement outEntitlement)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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(outEntitlementAddress, out outEntitlement))
{
Bindings.EOS_Ecom_Entitlement_Release(outEntitlementAddress);
}
return funcResult;
}
///
/// Fetches an entitlement from a given index.
///
///
/// structure containing the Epic Account ID and 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(CopyEntitlementByIndexOptions options, out Entitlement outEntitlement)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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(outEntitlementAddress, out outEntitlement))
{
Bindings.EOS_Ecom_Entitlement_Release(outEntitlementAddress);
}
return funcResult;
}
///
/// 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 .
///
///
/// structure containing the Epic Account ID, entitlement name, and index being accessed
/// the entitlement for the given name index pair, 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 CopyEntitlementByNameAndIndex(CopyEntitlementByNameAndIndexOptions options, out Entitlement outEntitlement)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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(outEntitlementAddress, out outEntitlement))
{
Bindings.EOS_Ecom_Entitlement_Release(outEntitlementAddress);
}
return funcResult;
}
///
/// Fetches an item with a given ID.
///
///
///
///
/// structure containing the item ID being accessed
/// the item for the given index, if it exists and is valid, use when finished
///
/// if the information is available and passed out in OutItem
/// if the item information is stale and passed out in OutItem
/// if you pass a null pointer for the out parameter
/// if the offer is not found
///
public Result CopyItemById(CopyItemByIdOptions options, out CatalogItem outItem)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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(outItemAddress, out outItem))
{
Bindings.EOS_Ecom_CatalogItem_Release(outItemAddress);
}
return funcResult;
}
///
/// Fetches an image from a given index.
///
///
/// structure containing the item ID and index being accessed
/// the image for the given index, if it exists and is valid, use when finished
///
/// if the information is available and passed out in OutImageInfo
/// if you pass a null pointer for the out parameter
/// if the associated item information is stale
/// if the image is not found
///
public Result CopyItemImageInfoByIndex(CopyItemImageInfoByIndexOptions options, out KeyImageInfo outImageInfo)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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(outImageInfoAddress, out outImageInfo))
{
Bindings.EOS_Ecom_KeyImageInfo_Release(outImageInfoAddress);
}
return funcResult;
}
///
/// Fetches a release from a given index.
///
///
/// structure containing the item ID and index being accessed
/// the release for the given index, if it exists and is valid, use when finished
///
/// if the information is available and passed out in OutRelease
/// if you pass a null pointer for the out parameter
/// if the associated item information is stale
/// if the release is not found
///
public Result CopyItemReleaseByIndex(CopyItemReleaseByIndexOptions options, out CatalogRelease outRelease)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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(outReleaseAddress, out outRelease))
{
Bindings.EOS_Ecom_CatalogRelease_Release(outReleaseAddress);
}
return funcResult;
}
///
/// Fetches an offer with a given ID. The pricing and text are localized to the provided account.
///
///
///
/// structure containing the Epic Account ID and offer ID being accessed
/// the offer for the given index, if it exists and is valid, use when finished
///
/// if the information is available and passed out in OutOffer
/// if the offer information is stale and passed out in OutOffer
/// if the offer information has an invalid price and passed out in OutOffer
/// if you pass a null pointer for the out parameter
/// if the offer is not found
///
public Result CopyOfferById(CopyOfferByIdOptions options, out CatalogOffer outOffer)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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(outOfferAddress, out outOffer))
{
Bindings.EOS_Ecom_CatalogOffer_Release(outOfferAddress);
}
return funcResult;
}
///
/// Fetches an offer from a given index. The pricing and text are localized to the provided account.
///
///
///
/// structure containing the Epic Account ID and index being accessed
/// the offer for the given index, if it exists and is valid, use when finished
///
/// if the information is available and passed out in OutOffer
/// if the offer information is stale and passed out in OutOffer
/// if the offer information has an invalid price and passed out in OutOffer
/// if you pass a null pointer for the out parameter
/// if the offer is not found
///
public Result CopyOfferByIndex(CopyOfferByIndexOptions options, out CatalogOffer outOffer)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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(outOfferAddress, out outOffer))
{
Bindings.EOS_Ecom_CatalogOffer_Release(outOfferAddress);
}
return funcResult;
}
///
/// Fetches an image from a given index.
///
///
/// structure containing the offer ID and index being accessed
/// the image for the given index, if it exists and is valid, use when finished
///
/// if the information is available and passed out in OutImageInfo
/// if you pass a null pointer for the out parameter
/// if the associated offer information is stale
/// if the image is not found
///
public Result CopyOfferImageInfoByIndex(CopyOfferImageInfoByIndexOptions options, out KeyImageInfo outImageInfo)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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(outImageInfoAddress, out outImageInfo))
{
Bindings.EOS_Ecom_KeyImageInfo_Release(outImageInfoAddress);
}
return funcResult;
}
///
/// Fetches an item from a given index.
///
///
///
///
/// structure containing the Epic Account ID and index being accessed
/// the item for the given index, if it exists and is valid, use when finished
///
/// if the information is available and passed out in OutItem
/// if you pass a null pointer for the out parameter
/// if the item information is stale
/// if the item is not found
///
public Result CopyOfferItemByIndex(CopyOfferItemByIndexOptions options, out CatalogItem outItem)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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(outItemAddress, out outItem))
{
Bindings.EOS_Ecom_CatalogItem_Release(outItemAddress);
}
return funcResult;
}
///
/// Fetches the transaction handle at the given index.
///
///
///
/// structure containing the Epic Account ID and transaction ID being accessed
///
/// if the information is available and passed out in OutTransaction
/// if you pass a null pointer for the out parameter
/// if the transaction is not found
///
public Result CopyTransactionById(CopyTransactionByIdOptions options, out Transaction outTransaction)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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;
}
///
/// Fetches the transaction handle at the given index.
///
///
///
/// structure containing the Epic Account ID and index being accessed
///
/// if the information is available and passed out in OutTransaction
/// if you pass a null pointer for the out parameter
/// if the transaction is not found
///
public Result CopyTransactionByIndex(CopyTransactionByIndexOptions options, out Transaction outTransaction)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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;
}
///
/// Fetch the number of entitlements with the given Entitlement Name that are cached for a given local user.
///
///
/// structure containing the Epic Account ID and name being accessed
///
/// the number of entitlements found.
///
public uint GetEntitlementsByNameCount(GetEntitlementsByNameCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_Ecom_GetEntitlementsByNameCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// Fetch the number of entitlements that are cached for a given local user.
///
///
/// structure containing the Epic Account ID being accessed
///
/// the number of entitlements found.
///
public uint GetEntitlementsCount(GetEntitlementsCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_Ecom_GetEntitlementsCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// Fetch the number of images that are associated with a given cached item for a local user.
///
///
/// the number of images found.
///
public uint GetItemImageInfoCount(GetItemImageInfoCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_Ecom_GetItemImageInfoCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// Fetch the number of releases that are associated with a given cached item for a local user.
///
///
/// the number of releases found.
///
public uint GetItemReleaseCount(GetItemReleaseCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_Ecom_GetItemReleaseCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// Fetch the number of offers that are cached for a given local user.
///
///
/// structure containing the Epic Account ID being accessed
///
/// the number of offers found.
///
public uint GetOfferCount(GetOfferCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_Ecom_GetOfferCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// Fetch the number of images that are associated with a given cached offer for a local user.
///
///
/// the number of images found.
///
public uint GetOfferImageInfoCount(GetOfferImageInfoCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_Ecom_GetOfferImageInfoCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// Fetch the number of items that are associated with a given cached offer for a local user.
///
///
/// the number of items found.
///
public uint GetOfferItemCount(GetOfferItemCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_Ecom_GetOfferItemCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// Fetch the number of transactions that are cached for a given local user.
///
///
///
///
/// the number of transactions found.
///
public uint GetTransactionCount(GetTransactionCountOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_Ecom_GetTransactionCount(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// 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 , , and to get the entitlement details.
/// Use to retrieve the number of entitlements with a specific entitlement name.
///
/// structure containing the account and entitlement names to retrieve
/// 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 QueryEntitlements(QueryEntitlementsOptions options, object clientData, OnQueryEntitlementsCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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);
}
///
/// 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.
///
/// structure containing filter criteria
/// 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 QueryOffers(QueryOffersOptions options, object clientData, OnQueryOffersCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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);
}
///
/// 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
///
/// structure containing the account and catalog item IDs to retrieve
/// 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 QueryOwnership(QueryOwnershipOptions options, object clientData, OnQueryOwnershipCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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);
}
///
/// 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.
///
/// structure containing the account and catalog item IDs to retrieve in token form
/// 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 QueryOwnershipToken(QueryOwnershipTokenOptions options, object clientData, OnQueryOwnershipTokenCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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);
}
///
/// 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.
///
/// structure containing entitlement to redeem
/// 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 RedeemEntitlements(RedeemEntitlementsOptions options, object clientData, OnRedeemEntitlementsCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnQueryEntitlementsCallbackInternal))]
internal static void OnQueryEntitlementsCallbackInternalImplementation(System.IntPtr data)
{
OnQueryEntitlementsCallback callback;
QueryEntitlementsCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnQueryOffersCallbackInternal))]
internal static void OnQueryOffersCallbackInternalImplementation(System.IntPtr data)
{
OnQueryOffersCallback callback;
QueryOffersCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnQueryOwnershipCallbackInternal))]
internal static void OnQueryOwnershipCallbackInternalImplementation(System.IntPtr data)
{
OnQueryOwnershipCallback callback;
QueryOwnershipCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnQueryOwnershipTokenCallbackInternal))]
internal static void OnQueryOwnershipTokenCallbackInternalImplementation(System.IntPtr data)
{
OnQueryOwnershipTokenCallback callback;
QueryOwnershipTokenCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnRedeemEntitlementsCallbackInternal))]
internal static void OnRedeemEntitlementsCallbackInternalImplementation(System.IntPtr data)
{
OnRedeemEntitlementsCallback callback;
RedeemEntitlementsCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
}
}