Package host.anzo.eossdk.eos.sdk
Class EOS_Ecom_Interface
java.lang.Object
com.sun.jna.PointerType
host.anzo.eossdk.eos.sdk.EOS_Ecom_Interface
- All Implemented Interfaces:
com.sun.jna.NativeMapped
public class EOS_Ecom_Interface
extends com.sun.jna.PointerType
The Ecom Interface exposes all catalog, purchasing, and ownership entitlement features available with the Epic Games store
All Ecom Interface calls take a handle of type EOS_Ecom as the first parameter.
This handle can be retrieved from an EOS_HPlatform handle by using the EOS_Platform_GetEcomInterface function.
At this time, this feature is only available for products that are part of the Epic Games store.
At this time, this feature is only available for products that are part of the Epic Games store.
- Since:
- 8/20/2023
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckout(EOS_Ecom_CheckoutOptions options, com.sun.jna.Pointer clientData, EOS_Ecom_OnCheckoutCallback completionDelegate) Initiates the purchase flow for a set of offers.Fetches the entitlement with the given ID.Fetches an entitlement from a given index.Fetches a single entitlement with a given Entitlement Name.copyItemById(EOS_Ecom_CopyItemByIdOptions options) Fetches an item with a given ID.Fetches an image from a given index.Fetches a release from a given index.copyLastRedeemedEntitlementByIndex(EOS_Ecom_CopyLastRedeemedEntitlementByIndexOptions options, ByteBuffer outRedeemedEntitlementId, IntBuffer InOutRedeemedEntitlementIdLength) Fetches a redeemed entitlement id from a given index.Fetches an offer with a given ID.Fetches an offer from a given index.Fetches an image from a given index.Fetches an item from a given index.Fetches the transaction handle at the given index.Fetches the transaction handle at the given index.intFetch the number of entitlements with the given Entitlement Name that are cached for a given local user.intFetch the number of entitlements that are cached for a given local user.intFetch the number of images that are associated with a given cached item for a local user.intFetch the number of releases that are associated with a given cached item for a local user.intFetch the number of entitlements that were redeemed during the last EOS_Ecom_RedeemEntitlements call.intFetch the number of offers that are cached for a given local user.intFetch the number of images that are associated with a given cached offer for a local user.intFetch the number of items that are associated with a given cached offer for a local user.intFetch the number of transactions that are cached for a given local user.voidqueryEntitlements(EOS_Ecom_QueryEntitlementsOptions options, com.sun.jna.Pointer clientData, EOS_Ecom_OnQueryEntitlementsCallback completionDelegate) Query the entitlement information defined with Epic Online Services.voidqueryEntitlementToken(EOS_Ecom_QueryEntitlementTokenOptions options, com.sun.jna.Pointer clientData, EOS_Ecom_OnQueryEntitlementTokenCallback completionDelegate) Query the entitlement verification status defined with Epic Online Services.voidqueryOffers(EOS_Ecom_QueryOffersOptions options, com.sun.jna.Pointer clientData, EOS_Ecom_OnQueryOffersCallback completionDelegate) Query for a list of catalog offers defined with Epic Online Services.voidqueryOwnership(EOS_Ecom_QueryOwnershipOptions options, com.sun.jna.Pointer clientData, EOS_Ecom_OnQueryOwnershipCallback completionDelegate) Query the ownership status for a given list of catalog item IDs defined with Epic Online Services.voidqueryOwnershipBySandboxIds(EOS_Ecom_QueryOwnershipBySandboxIdsOptions options, com.sun.jna.Pointer clientData, EOS_Ecom_OnQueryOwnershipBySandboxIdsCallback completionDelegate) Query the ownership status of all catalog item IDs under the given list of Sandbox IDs defined with Epic Online Services.voidqueryOwnershipToken(EOS_Ecom_QueryOwnershipTokenOptions options, com.sun.jna.Pointer clientData, EOS_Ecom_OnQueryOwnershipTokenCallback completionDelegate) Query the ownership status for a given list of catalog item IDs defined with Epic Online Services.voidredeemEntitlements(EOS_Ecom_RedeemEntitlementsOptions options, com.sun.jna.Pointer clientData, EOS_Ecom_OnRedeemEntitlementsCallback completionDelegate) Requests that the provided entitlement be marked redeemed.Methods inherited from class com.sun.jna.PointerType
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
-
Constructor Details
-
EOS_Ecom_Interface
public EOS_Ecom_Interface(com.sun.jna.Pointer address) -
EOS_Ecom_Interface
public EOS_Ecom_Interface()
-
-
Method Details
-
queryOwnership
public void queryOwnership(EOS_Ecom_QueryOwnershipOptions options, com.sun.jna.Pointer clientData, EOS_Ecom_OnQueryOwnershipCallback completionDelegate) 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 Depending on the number of catalog item ids passed, the SDK splits the query into smaller batch requests to the backend and aggregates the result.
Note: If one of the request batches fails, no data is cached and the entire query is marked as failed.- Parameters:
options- structure containing the account and catalog item IDs to retrieveclientData- arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate- a callback that is fired when the async operation completes, either successfully or in error
-
queryOwnershipBySandboxIds
public void queryOwnershipBySandboxIds(EOS_Ecom_QueryOwnershipBySandboxIdsOptions options, com.sun.jna.Pointer clientData, EOS_Ecom_OnQueryOwnershipBySandboxIdsCallback completionDelegate) Query the ownership status of all catalog item IDs under the given list of Sandbox IDs defined with Epic Online Services. This data will be cached for a limited time and retrieved again from the backend when necessary.- Parameters:
options- structure containing the account and Sandbox IDs to retrieve.clientData- arbitrary data that is passed back to you in the CompletionDelegate.completionDelegate- a callback that is fired when the async operation completes, either successfully or in error.
-
queryOwnershipToken
public void queryOwnershipToken(EOS_Ecom_QueryOwnershipTokenOptions options, com.sun.jna.Pointer clientData, EOS_Ecom_OnQueryOwnershipTokenCallback completionDelegate) 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.- Parameters:
options- structure containing the account and catalog item IDs to retrieve in token formclientData- arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate- a callback that is fired when the async operation completes, either successfully or in error
-
queryEntitlements
public void queryEntitlements(EOS_Ecom_QueryEntitlementsOptions options, com.sun.jna.Pointer clientData, EOS_Ecom_OnQueryEntitlementsCallback completionDelegate) 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. Depending on the number of entitlements passed, the SDK splits the query into smaller batch requests to the backend and aggregates the result. Note: If one of the request batches fails, no data is cached and the entire query is marked as failed. Use EOS_Ecom_CopyEntitlementByIndex, EOS_Ecom_CopyEntitlementByNameAndIndex, and EOS_Ecom_CopyEntitlementById to get the entitlement details. Use EOS_Ecom_GetEntitlementsByNameCount to retrieve the number of entitlements with a specific entitlement name.- Parameters:
options- structure containing the account and entitlement names to retrieveclientData- arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate- a callback that is fired when the async operation completes, either successfully or in error
-
queryEntitlementToken
public void queryEntitlementToken(EOS_Ecom_QueryEntitlementTokenOptions options, com.sun.jna.Pointer clientData, EOS_Ecom_OnQueryEntitlementTokenCallback completionDelegate) Query the entitlement verification status defined with Epic Online Services. An optional set of entitlement names can be provided to filter the set of entitlements associated with the account. 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.- Parameters:
options- structure containing the account and catalog item IDs to retrieve in token formclientData- arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate- a callback that is fired when the async operation completes, either successfully or in error
-
queryOffers
public void queryOffers(EOS_Ecom_QueryOffersOptions options, com.sun.jna.Pointer clientData, EOS_Ecom_OnQueryOffersCallback completionDelegate) 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.- Parameters:
options- structure containing filter criteriaclientData- arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate- a callback that is fired when the async operation completes, either successfully or in error
-
checkout
public void checkout(EOS_Ecom_CheckoutOptions options, com.sun.jna.Pointer clientData, EOS_Ecom_OnCheckoutCallback completionDelegate) 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 EOS_Ecom_Transaction handle. The handle can then be used to retrieve the entitlements rewarded by the purchase.- Parameters:
options- structure containing filter criteriaclientData- arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate- a callback that is fired when the async operation completes, either successfully or in error- See Also:
-
redeemEntitlements
public void redeemEntitlements(EOS_Ecom_RedeemEntitlementsOptions options, com.sun.jna.Pointer clientData, EOS_Ecom_OnRedeemEntitlementsCallback completionDelegate) 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.- Parameters:
options- structure containing entitlement to redeemclientData- arbitrary data that is passed back to you in the CompletionDelegatecompletionDelegate- a callback that is fired when the async operation completes, either successfully or in error
-
getLastRedeemedEntitlementsCount
public int getLastRedeemedEntitlementsCount(EOS_Ecom_GetLastRedeemedEntitlementsCountOptions options) Fetch the number of entitlements that were redeemed during the last EOS_Ecom_RedeemEntitlements call.- Parameters:
options- structure containing the Epic Account ID- Returns:
- the number of the redeemed entitlements.
- See Also:
-
copyLastRedeemedEntitlementByIndex
public EOS_EResult copyLastRedeemedEntitlementByIndex(EOS_Ecom_CopyLastRedeemedEntitlementByIndexOptions options, ByteBuffer outRedeemedEntitlementId, IntBuffer InOutRedeemedEntitlementIdLength) Fetches a redeemed entitlement id from a given index. Only entitlements that were redeemed during the last EOS_Ecom_RedeemEntitlements call can be copied.- Parameters:
options- structure containing the Epic Account ID and index being accessedoutRedeemedEntitlementId- The ID of the redeemed entitlement. Must be long enough to hold a string of EOS_ECOM_ENTITLEMENTID_MAX_LENGTH.InOutRedeemedEntitlementIdLength- The size of the OutRedeemedEntitlementId in characters. The input buffer should include enough space to be null-terminated. When the function returns, this parameter will be filled with the length of the string copied into OutRedeemedEntitlementId.- Returns:
EOS_EResult.EOS_Successif the information is available and passed out in OutRedeemedEntitlementId
EOS_EResult.EOS_InvalidParametersif you pass a null pointer for the out parameter
EOS_EResult.EOS_NotFoundif the entitlement id is not found- See Also:
-
getEntitlementsCount
Fetch the number of entitlements that are cached for a given local user.- Parameters:
options- structure containing the Epic Account ID being accessed- Returns:
- the number of entitlements found.
- See Also:
-
getEntitlementsByNameCount
Fetch the number of entitlements with the given Entitlement Name that are cached for a given local user.- Parameters:
options- structure containing the Epic Account ID and name being accessed- Returns:
- the number of entitlements found.
- See Also:
-
copyEntitlementByIndex
public EOS_Ecom_Entitlement copyEntitlementByIndex(EOS_Ecom_CopyEntitlementByIndexOptions options) throws EOSException Fetches an entitlement from a given index.- Parameters:
options- structure containing the Epic Account ID and index being accessed- Returns:
- the entitlement for the given index, if it exists and is valid, use
EOS_Ecom_Entitlement.release()when finished - Throws:
EOSEcomEntitlementStaleException- if the entitlement information is stale and passed out in OutEntitlementEOSInvalidParametersException- if you pass a null pointer for the out parameterEOSNotFoundException- if the entitlement is not foundEOSException- See Also:
-
copyEntitlementByNameAndIndex
public EOS_Ecom_Entitlement copyEntitlementByNameAndIndex(EOS_Ecom_CopyEntitlementByNameAndIndexOptions options) throws EOSException 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 EOS_Ecom_GetEntitlementsByNameCount.- Parameters:
options- structure containing the Epic Account ID, entitlement name, and index being accessed- Returns:
- the entitlement for the given name index pair, if it exists and is valid, use
EOS_Ecom_Entitlement.release()when finished - Throws:
EOSEcomEntitlementStaleException- if the entitlement information is stale and passed out in OutEntitlementEOSInvalidParametersException- if you pass a null pointer for the out parameterEOSNotFoundException- if the entitlement is not foundEOSException- See Also:
-
copyEntitlementById
public EOS_Ecom_Entitlement copyEntitlementById(EOS_Ecom_CopyEntitlementByIdOptions options) throws EOSException Fetches the entitlement with the given ID.- Parameters:
options- structure containing the Epic Account ID and entitlement ID being accessed- Returns:
- the entitlement for the given ID, if it exists and is valid, use
EOS_Ecom_Entitlement.release()when finished - Throws:
EOSEcomEntitlementStaleException- if the entitlement information is stale and passed out in OutEntitlementEOSInvalidParametersException- if you pass a null pointer for the out parameterEOSNotFoundException- if the entitlement is not foundEOSException- See Also:
-
getOfferCount
Fetch the number of offers that are cached for a given local user.- Parameters:
options- structure containing the Epic Account ID being accessed- Returns:
- the number of offers found.
- See Also:
-
copyOfferByIndex
public EOS_Ecom_CatalogOffer copyOfferByIndex(EOS_Ecom_CopyOfferByIndexOptions options) throws EOSException Fetches an offer from a given index. The pricing and text are localized to the provided account.- Parameters:
options- structure containing the Epic Account ID and index being accessed- Returns:
- the offer for the given index, if it exists and is valid, use EOS_Ecom_CatalogOffer_Release when finished
- Throws:
EOSEcomCatalogOfferStaleException- if the offer information is stale and passed out in OutOfferEOSEcomCatalogOfferPriceInvalidException- if the offer information has an invalid price and passed out in OutOfferEOSInvalidParametersException- if you pass a null pointer for the out parameterEOSNotFoundException- if the offer is not foundEOSException- See Also:
-
copyOfferById
public EOS_Ecom_CatalogOffer copyOfferById(EOS_Ecom_CopyOfferByIdOptions options) throws EOSException Fetches an offer with a given ID. The pricing and text are localized to the provided account.- Parameters:
options- structure containing the Epic Account ID and offer ID being accessed- Returns:
- the offer for the given index, if it exists and is valid, use
EOS_Ecom_CatalogOffer.release()when finished - Throws:
EOSEcomCatalogOfferStaleException- if the offer information is stale and passed out in OutOfferEOSEcomCatalogOfferPriceInvalidException- if the offer information has an invalid price and passed out in OutOfferEOSInvalidParametersException- if you pass a null pointer for the out parameterEOSNotFoundException- if the offer is not foundEOSException- See Also:
-
getOfferItemCount
Fetch the number of items that are associated with a given cached offer for a local user.- Returns:
- the number of items found.
-
copyOfferItemByIndex
public EOS_Ecom_CatalogItem copyOfferItemByIndex(EOS_Ecom_CopyOfferItemByIndexOptions options) throws EOSException Fetches an item from a given index.- Parameters:
options- structure containing the Epic Account ID and index being accessed- Returns:
- the item for the given index, if it exists and is valid, use EOS_Ecom_CatalogItem_Release when finished
- Throws:
EOSInvalidParametersException- if you pass a null pointer for the out parameterEOSEcomCatalogItemStaleException- if the item information is staleEOSNotFoundException- if the item is not foundEOSException- See Also:
-
copyItemById
Fetches an item with a given ID.- Parameters:
options- structure containing the item ID being accessed- Returns:
- the item for the given index, if it exists and is valid, use EOS_Ecom_CatalogItem_Release when finished
- Throws:
EOSEcomCatalogItemStaleException- if the item information is stale and passed out in OutItemEOSInvalidParametersException- if you pass a null pointer for the out parameterEOSNotFoundException- if the offer is not foundEOSException- See Also:
-
getOfferImageInfoCount
Fetch the number of images that are associated with a given cached offer for a local user.- Returns:
- the number of images found.
-
copyOfferImageInfoByIndex
public EOS_Ecom_KeyImageInfo copyOfferImageInfoByIndex(EOS_Ecom_CopyOfferImageInfoByIndexOptions options) throws EOSException Fetches an image from a given index.- Parameters:
options- structure containing the offer ID and index being accessed- Returns:
- the image for the given index, if it exists and is valid, use EOS_Ecom_KeyImageInfo_Release when finished
- Throws:
EOSInvalidParametersException- if you pass a null pointer for the out parameterEOSEcomCatalogOfferStaleException- if the associated offer information is staleEOSNotFoundException- if the image is not foundEOSException- See Also:
-
getItemImageInfoCount
Fetch the number of images that are associated with a given cached item for a local user.- Returns:
- the number of images found.
-
copyItemImageInfoByIndex
public EOS_Ecom_KeyImageInfo copyItemImageInfoByIndex(EOS_Ecom_CopyItemImageInfoByIndexOptions options) throws EOSException Fetches an image from a given index.- Parameters:
options- structure containing the item ID and index being accessed- Returns:
- the image for the given index, if it exists and is valid, use
EOS_Ecom_KeyImageInfo.release()when finished - Throws:
EOSInvalidParametersException- if you pass a null pointer for the out parameterEOSEcomCatalogItemStaleException- if the associated item information is staleEOSNotFoundException- if the image is not foundEOSException- See Also:
-
getItemReleaseCount
Fetch the number of releases that are associated with a given cached item for a local user.- Returns:
- the number of releases found.
-
copyItemReleaseByIndex
public EOS_Ecom_CatalogRelease copyItemReleaseByIndex(EOS_Ecom_CopyItemReleaseByIndexOptions options) throws EOSException Fetches a release from a given index.- Parameters:
options- structure containing the item ID and index being accessed- Returns:
- the release for the given index, if it exists and is valid, use
EOS_Ecom_CatalogRelease.release()when finished - Throws:
EOSInvalidParametersException- if you pass a null pointer for the out parameterEOSEcomCatalogItemStaleException- if the associated item information is staleEOSNotFoundException- if the release is not foundEOSException- See Also:
-
getTransactionCount
Fetch the number of transactions that are cached for a given local user.- Returns:
- the number of transactions found.
- See Also:
-
copyTransactionByIndex
public EOS_Ecom_Transaction copyTransactionByIndex(EOS_Ecom_CopyTransactionByIndexOptions options) throws EOSException Fetches the transaction handle at the given index.- Parameters:
options- structure containing the Epic Account ID and index being accessed- Throws:
EOSInvalidParametersException- if you pass a null pointer for the out parameterEOSNotFoundException- if the transaction is not foundEOSException- See Also:
-
copyTransactionById
public EOS_Ecom_Transaction copyTransactionById(EOS_Ecom_CopyTransactionByIdOptions options) throws EOSException Fetches the transaction handle at the given index.- Parameters:
options- structure containing the Epic Account ID and transaction ID being accessed- Throws:
EOSInvalidParametersException- if you pass a null pointer for the out parameterEOSNotFoundException- if the transaction is not foundEOSException- See Also:
-