// 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 = 50; /// /// 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(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); } /// /// 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(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(outEntitlementAddress, out outEntitlement); if (outEntitlement != null) { 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(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(outEntitlementAddress, out outEntitlement); if (outEntitlement != null) { 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(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(outEntitlementAddress, out outEntitlement); if (outEntitlement != null) { 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(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(outItemAddress, out outItem); if (outItem != null) { 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(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(outImageInfoAddress, out outImageInfo); if (outImageInfo != null) { 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(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(outReleaseAddress, out outRelease); if (outRelease != null) { 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(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(outOfferAddress, out outOffer); if (outOffer != null) { 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(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(outOfferAddress, out outOffer); if (outOffer != null) { 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(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(outImageInfoAddress, out outImageInfo); if (outImageInfo != null) { 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(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(outItemAddress, out outItem); if (outItem != null) { 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(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; } /// /// 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(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; } /// /// 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(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; } /// /// 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(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; } /// /// 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(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; } /// /// 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(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; } /// /// 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(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; } /// /// 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(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; } /// /// 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(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; } /// /// Fetch the number of transactions that are cached for a given local user. /// /// /// /// /// the number of transactions found. /// 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; } /// /// 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(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); } /// /// 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(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); } /// /// 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(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); } /// /// 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(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); } /// /// 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(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); } } } }