Entitlement
Summary
Members | Descriptions |
---|---|
class URH_EntitlementSubsystem | Subsystem for handling requesting and processing entitlements from the online subsystem. |
class FRH_EntitlementProcessor | Processor class used to make entitlment process calls. |
class URH_EntitlementSubsystem
class URH_EntitlementSubsystem
: public URH_LocalPlayerSubsystemPlugin
Subsystem for handling requesting and processing entitlements from the online subsystem.
Summary
Members | Descriptions |
---|---|
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 void SubmitEntitlementsForLoggedInOSS (FRH_ProcessEntitlementCompletedDelegate EntitlementProcessorCompleteDelegate,FRH_GetPlatformRegionDelegate PlatformRegionDelegate) | Start Async Task to Process Entitlements for the users connected OSS. |
public void SubmitEntitlementsForOSS (ERHAPI_Platform platform,FRH_ProcessEntitlementCompletedDelegate EntitlementProcessorCompleteDelegate,FRH_GetPlatformRegionDelegate PlatformRegionDelegate) | Start Async Task to Process Entitlements for a specific 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. |
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. |
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 void
SubmitEntitlementsForLoggedInOSS
(FRH_ProcessEntitlementCompletedDelegate EntitlementProcessorCompleteDelegate,FRH_GetPlatformRegionDelegate PlatformRegionDelegate)
Start Async Task to Process Entitlements for the users connected OSS.
Parameters
-
EntitlementProcessorCompleteDelegate
Delegate callback for when the entitlement process is complete. -
PlatformRegionDelegate
Delegate callback for getting the platform region.
public void
SubmitEntitlementsForOSS
(ERHAPI_Platform platform,FRH_ProcessEntitlementCompletedDelegate EntitlementProcessorCompleteDelegate,FRH_GetPlatformRegionDelegate PlatformRegionDelegate)
Start Async Task to Process Entitlements for a specific OSS.
Parameters
-
platform
The OSS to process entitlements for. -
EntitlementProcessorCompleteDelegate
Delegate callback for when the entitlement process is complete. -
PlatformRegionDelegate
Delegate callback for getting the platform region.
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.
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.
class FRH_EntitlementProcessor
class FRH_EntitlementProcessor
: public FRH_AsyncTaskHelper
Processor class used to make entitlment process calls.
Summary
Members | Descriptions |
---|---|
public inline FRH_EntitlementProcessor ( URH_EntitlementSubsystem * InEntitlementSubsystem,IOnlineSubsystem * InOSS,const IOnlinePurchasePtr & InPurchaseSubsystem,int32 InLocalUserNum,FUniqueNetIdWrapper InPlatformUserId,FTimerManager & InTimerManager,FRH_ProcessEntitlementCompletedDelegate InProcessorCompleteDelegate,FRH_GetPlatformRegionDelegate InGetPlatformRegionDelegate,std::optional< ERHAPI_Platform > InOverridePlatform) | Main Constructor for Entitlement Processor, used internally by the entitlement process calls. |
public inline virtual void Start () | Start the Entitlement processing. |
protected FAuthContextPtr AuthContext | Auth Context used by the entitlement subsystem. |
protected TWeakObjectPtr< URH_EntitlementSubsystem > EntitlementSubsystem | Pointer back to the entitlement subsystem that owns this processor. |
protected IOnlineSubsystem * OSS | Online Subsystem this processor is for. |
protected IOnlinePurchasePtr PurchaseSubsystem | Online Purchase Subsystem this processor is for. |
protected int32 LocalUserNum | Contorller Id of the user. |
protected FUniqueNetIdWrapper PlatformUserId | Platform User Id of the user. |
protected FTimerManager & TimerManager | The engines Timer Manager. |
protected FRH_ProcessEntitlementCompletedDelegate EntitlementProcessorCompleteDelegate | Delegate to fire when completed. |
protected FRH_GetPlatformRegionDelegate GetPlatformRegionDelegate | Delegate that fires when getting the platforms region. |
protected ERHAPI_Platform Platform | Platform the entitlements are for. |
protected bool IsOverride | If set, the platform is an override of the main connection platform. |
protected const FString TaskId | Unique Id for the process task. |
protected FRHAPI_PlatformEntitlementProcessResult ProcessEntitlementResult | Result of the entitlement process. |
protected int32 ReceiptsToValidateCount | Tracks how many reciepts are still needed to be validated. |
protected float fEntitlementCheckPollInterval | Polling interval for entitlments. |
protected FTimerHandle EntitlementCheckPollTimerHandle | Handler for the polling timer. |
protected FRH_AutoPollerPtr EntitlementsPoller | Auto poller for the entitlements. |
protected TArray< FPurchaseReceipt > Receipts | Array of reciepts from the online subsystem entitlment check. |
protected FHttpRequestPtr HttpRequest | Http Request for processing entitlements with the core. |
protected inline void QueryEntitlements () | Queries entitlements from the online subsystem. |
protected inline void QueryEntitlementsComplete (const FOnlineError & Result,IOnlineSubsystem * ProvidedOSS) | Response from the online subsystem query entitlements call. |
protected inline void ValidateEntitlementReceipts () | Validates the entitlement receipts if needed by the platform. |
protected inline void OnReceiptValidationComplete (const FOnlineError & Result,const FString & ValidationInfo) | Response from the online subsystem validate entitlements call. |
protected inline void ProcessPlatformInventory () | Processes the platform inventory and stores as cached responses. |
protected inline bool CheckIfWeNeedToPoll () | Returns if there are pending entitlement checks being processed in the online subsystem. |
protected inline void ProcessPlatformInventoryComplete (const RallyHereAPI::FResponse_ProcessPlatformEntitlementsByPlayerUuid & Resp) | Callback when the processing of platform inventory complets on the core. |
protected inline void PollEntitlements (const FRH_PollCompleteFunc & Delegate) | Polls for new entitlements. |
protected inline void PollEntitlementComplete (const RallyHereAPI::FResponse_RetrieveEntitlementsByPlayerUuid & Resp,FRH_PollCompleteFunc Delegate) | Handles the response to a Poll Entitlements call. |
protected inline void FinalizePurchase () | Finalizes a purchase from an online subsystem. |
protected inline void StartPoll () | Starts polling of entitlements. |
protected inline void StopPoll () | Stops polling of entitlements. |
protected inline virtual FString GetName () const | Gets the name of the entitlement processor. |
protected inline virtual void ExecuteCallback (bool bSuccess) const | Triggers the callback of the Entitlements Processor. |
protected inline ERHAPI_PlatformRegion GetRegionFromTitleSettings () | Gets the region for the platform. |
Members
public inline
FRH_EntitlementProcessor
(
URH_EntitlementSubsystem
* InEntitlementSubsystem,IOnlineSubsystem * InOSS,const IOnlinePurchasePtr & InPurchaseSubsystem,int32 InLocalUserNum,FUniqueNetIdWrapper InPlatformUserId,FTimerManager & InTimerManager,FRH_ProcessEntitlementCompletedDelegate InProcessorCompleteDelegate,FRH_GetPlatformRegionDelegate InGetPlatformRegionDelegate,std::optional< ERHAPI_Platform > InOverridePlatform)
Main Constructor for Entitlement Processor, used internally by the entitlement process calls.
public inline virtual void
Start
()
Start the Entitlement processing.
protected FAuthContextPtr
AuthContext
Auth Context used by the entitlement subsystem.
protected TWeakObjectPtr<
URH_EntitlementSubsystem
>
EntitlementSubsystem
Pointer back to the entitlement subsystem that owns this processor.
protected IOnlineSubsystem *
OSS
Online Subsystem this processor is for.
protected IOnlinePurchasePtr
PurchaseSubsystem
Online Purchase Subsystem this processor is for.
protected int32
LocalUserNum
Contorller Id of the user.
protected FUniqueNetIdWrapper
PlatformUserId
Platform User Id of the user.
protected FTimerManager &
TimerManager
The engines Timer Manager.
protected FRH_ProcessEntitlementCompletedDelegate
EntitlementProcessorCompleteDelegate
Delegate to fire when completed.
protected FRH_GetPlatformRegionDelegate
GetPlatformRegionDelegate
Delegate that fires when getting the platforms region.
protected ERHAPI_Platform
Platform
Platform the entitlements are for.
protected bool
IsOverride
If set, the platform is an override of the main connection platform.
protected const FString
TaskId
Unique Id for the process task.
protected
FRHAPI_PlatformEntitlementProcessResult
ProcessEntitlementResult
Result of the entitlement process.
protected int32
ReceiptsToValidateCount
Tracks how many reciepts are still needed to be validated.
protected float
fEntitlementCheckPollInterval
Polling interval for entitlments.
protected FTimerHandle
EntitlementCheckPollTimerHandle
Handler for the polling timer.
protected FRH_AutoPollerPtr
EntitlementsPoller
Auto poller for the entitlements.
protected TArray< FPurchaseReceipt >
Receipts
Array of reciepts from the online subsystem entitlment check.
protected FHttpRequestPtr
HttpRequest
Http Request for processing entitlements with the core.
protected inline void
QueryEntitlements
()
Queries entitlements from the online subsystem.
protected inline void
QueryEntitlementsComplete
(const FOnlineError & Result,IOnlineSubsystem * ProvidedOSS)
Response from the online subsystem query entitlements call.
Parameters
-
Result
The result of the query. -
ProvidedOSS
The OSS that provided the result.
protected inline void
ValidateEntitlementReceipts
()
Validates the entitlement receipts if needed by the platform.
protected inline void
OnReceiptValidationComplete
(const FOnlineError & Result,const FString & ValidationInfo)
Response from the online subsystem validate entitlements call.
Parameters
-
Result
The result of the query. -
ValidationInfo
The validation info of the receipt.
protected inline void
ProcessPlatformInventory
()
Processes the platform inventory and stores as cached responses.
protected inline bool
CheckIfWeNeedToPoll
()
Returns if there are pending entitlement checks being processed in the online subsystem.
protected inline void
ProcessPlatformInventoryComplete
(const RallyHereAPI::FResponse_ProcessPlatformEntitlementsByPlayerUuid & Resp)
Callback when the processing of platform inventory complets on the core.
Parameters
Resp
The repsonse from the core.
protected inline void
PollEntitlements
(const FRH_PollCompleteFunc & Delegate)
Polls for new entitlements.
Parameters
Delegate
Delegate to callback when poll completes.
protected inline void
PollEntitlementComplete
(const RallyHereAPI::FResponse_RetrieveEntitlementsByPlayerUuid & Resp,FRH_PollCompleteFunc Delegate)
Handles the response to a Poll Entitlements call.
Parameters
-
Resp
Response given for the call. -
Delegate
Delegate passed in for original call to respond to when call completes.
protected inline void
FinalizePurchase
()
Finalizes a purchase from an online subsystem.
protected inline void
StartPoll
()
Starts polling of entitlements.
protected inline void
StopPoll
()
Stops polling of entitlements.
protected inline virtual FString
GetName
() const
Gets the name of the entitlement processor.
protected inline virtual void
ExecuteCallback
(bool bSuccess) const
Triggers the callback of the Entitlements Processor.
Parameters
bSuccess
If true, the entitlement process was successful.
protected inline ERHAPI_PlatformRegion
GetRegionFromTitleSettings
()
Gets the region for the platform.