Skip to main content

Entitlement

Summary​

MembersDescriptions
class URH_EntitlementSubsystemSubsystem for handling requesting and processing entitlements from the online subsystem.

class URH_EntitlementSubsystem ​

class URH_EntitlementSubsystem
: public URH_LocalPlayerSubsystemPlugin

Subsystem for handling requesting and processing entitlements from the online subsystem.

Summary​

MembersDescriptions
public virtual void Initialize()Initialize the subsystem.
public virtual void Deinitialize()Safely tears down the subsystem.
public virtual void OnUserChanged(const FGuid & OldPlayerUuid,class URH_PlayerInfo * OldLocalPlayerInfo)Notification that the user changed for the owning local player subsystem.
public void HandleNotification(const FRHAPI_Notification & Notification,const FString & APIName,const TArray< FString > & APIParams)Handle a notification from the inventory API.
public virtual void SubmitEntitlementsForLoggedInOSS(const FRH_ProcessEntitlementCompletedDelegate & EntitlementProcessorCompleteDelegate,TOptional< ERHAPI_PlatformRegion > Region)Start Async Task to Process Entitlements for the users connected OSS.
public void SubmitEntitlementsForPlatform(ERHAPI_Platform Platform,const FRH_ProcessEntitlementCompletedDelegate & EntitlementProcessorCompleteDelegate,TOptional< ERHAPI_PlatformRegion > Region)Start Async Task to Process Entitlements for a specific platform (non-OSS based)
public void QueryStoreOffersById(const TArray< FString > & OfferIds,const FRH_GenericSuccessBlock & Delegate)Queries the OSS to get the store offers for the given offer ids.
public void OnQueryStoreOffersById(bool bSuccess,const TArray< FUniqueOfferId > & Offers,const FString & Error,const FRH_GenericSuccessBlock Delegate)Response from OSS for Store Offer By Id Query.
public void GetCachedStoreOffers(TArray< FOnlineStoreOfferRef > & OutOffers)Helper function to get the cached store offers from the OSS.
public TMap< FString, FRHAPI_PlatformEntitlementProcessResult> *GetEntitlementResults()Gets the map of all processed entitlement results.
public void SetEntitlementOSSName(const FName & InEntitlementOSSName)Sets the entitlement OSS Name.
public FName GetEntitlementOSSName()Gets the set entitlement OSS Name.
public IOnlineStoreV2Ptr GetStoreSubsystem() constHelper to the store subsystem subsystem.
protected TMap< FString, FRHAPI_PlatformEntitlementProcessResult>EntitlementProcessResultMapMap of results from Entitlement Process calls.
protected FName EntitlementOSSNameOnline Subsystem to use for entitlements. If not provided, will use the default OSS.
protected FTimerManager & GetTimerManager()Helper to get the engines Timer Manager.
protected URH_LocalPlayerSubsystem*GetRH_LocalPlayerSubsystem() constHelper to the local player subsystem.
protected IOnlineSubsystem * GetOSS() constHelper to the online subsystem.
protected IOnlinePurchasePtr GetPurchaseSubsystem() constHelper to the online purchase subsystem.

Members​

public virtual void Initialize() ​

Initialize the subsystem.

public virtual void Deinitialize() ​

Safely tears down the subsystem.

public virtual void OnUserChanged(const FGuid & OldPlayerUuid,class URH_PlayerInfo * OldLocalPlayerInfo) ​

Notification that the user changed for the owning local player subsystem.

public void HandleNotification(const FRHAPI_Notification & Notification,const FString & APIName,const TArray< FString > & APIParams) ​

Handle a notification from the inventory API.

Parameters​

  • Notification The notification to handle

  • APIName The name of the API that sent the notification

  • APIParams The parameters for the API that sent the notification

public virtual void SubmitEntitlementsForLoggedInOSS(const FRH_ProcessEntitlementCompletedDelegate & EntitlementProcessorCompleteDelegate,TOptional< ERHAPI_PlatformRegion > Region) ​

Start Async Task to Process Entitlements for the users connected OSS.

Parameters​

  • EntitlementProcessorCompleteDelegate Delegate callback for when the entitlement process is complete.

  • Region The platform region to use for entitlements.

public void SubmitEntitlementsForPlatform(ERHAPI_Platform Platform,const FRH_ProcessEntitlementCompletedDelegate & EntitlementProcessorCompleteDelegate,TOptional< ERHAPI_PlatformRegion > Region) ​

Start Async Task to Process Entitlements for a specific platform (non-OSS based)

Parameters​

  • Platform The platform to process entitlements for.

  • EntitlementProcessorCompleteDelegate Delegate callback for when the entitlement process is complete.

  • Region The platform region to use for entitlements.

public void QueryStoreOffersById(const TArray< FString > & OfferIds,const FRH_GenericSuccessBlock & Delegate) ​

Queries the OSS to get the store offers for the given offer ids.

Parameters​

  • OfferIds List of SKUs to request offers for.

  • Delegate callback for getting offers.

public void OnQueryStoreOffersById(bool bSuccess,const TArray< FUniqueOfferId > & Offers,const FString & Error,const FRH_GenericSuccessBlock Delegate) ​

Response from OSS for Store Offer By Id Query.

Parameters​

  • bSuccess If the call to the OSS was successful.

  • Offers Offers returned by the OSS.

  • Error The error if the call was not successful.

  • Delegate callback for getting offers.

public void GetCachedStoreOffers(TArray< FOnlineStoreOfferRef > & OutOffers) ​

Helper function to get the cached store offers from the OSS.

Parameters​

  • OutOffers The offers cached in the store OSS.

public TMap< FString, FRHAPI_PlatformEntitlementProcessResult> *GetEntitlementResults() ​

Gets the map of all processed entitlement results.

public void SetEntitlementOSSName(const FName & InEntitlementOSSName) ​

Sets the entitlement OSS Name.

Parameters​

  • InEntitlementOSSName The OSS name to use for entitlements.

public FName GetEntitlementOSSName() ​

Gets the set entitlement OSS Name.

public IOnlineStoreV2Ptr GetStoreSubsystem() const ​

Helper to the store subsystem subsystem.

protected TMap< FString, FRHAPI_PlatformEntitlementProcessResult>EntitlementProcessResultMap ​

Map of results from Entitlement Process calls.

protected FName EntitlementOSSName ​

Online Subsystem to use for entitlements. If not provided, will use the default OSS.

protected FTimerManager & GetTimerManager() ​

Helper to get the engines Timer Manager.

protected URH_LocalPlayerSubsystem*GetRH_LocalPlayerSubsystem() const ​

Helper to the local player subsystem.

protected IOnlineSubsystem * GetOSS() const ​

Helper to the online subsystem.

protected IOnlinePurchasePtr GetPurchaseSubsystem() const ​

Helper to the online purchase subsystem.