Skip to main content

Config

Summary​

MembersDescriptions
class URH_ConfigSubsystemConfig Subsystem used for interfacing with configuration coming from the core servers.
struct FRH_ServerTimeCacheAn object that caches information about server time and differences.

class URH_ConfigSubsystem ​

class URH_ConfigSubsystem
: public URH_GameInstanceSubsystemPlugin

Config Subsystem used for interfacing with configuration coming from the core servers.

Summary​

MembersDescriptions
public FKVsUpdatedDelegate OnKVsUpdatedDelegate that can be listented to for whenever KVs get updated from polling.
public FAppSettingsUpdatedDelegate AppSettingsUpdatedDelegateDelegate that can be listented to for whenever App Settings get updated from polling.
public FSettingsUpdatedDelegate OnSettingsUpdatedDelegate that can be listented to for whenever Settings get updated from polling.
public virtual void Initialize()Initialize the subsystem.
public virtual void Deinitialize()Safely tears down the subsystem.
public virtual void FetchKVs(const FRH_GenericSuccessWithErrorBlock & Delegate)Requests the server for the latest KVs.
public void PollKVs(const FRH_PollCompleteFunc & Delegate)Pulses a FetchKVs call for the polling of KVs.
public inline const TMap< FString, FString > & GetKVs() constGets the map of all the Public KVs and their values.
public inline bool GetKV(const FString & Key,FString & Value) constGets the value of a specific Publc KV.
public inline bool GetAnyKV(const FString & Key,FString & Value) constGets the value of a specific KV (wrapper for if multiple KV sources are present).
public inline FDateTime GetKickBeforeHint() constTime for which any player logins older than should log out (staggered kick all players support).
public inline void FetchAppSettings(const FRH_GenericSuccessWithErrorBlock & Delegate)Requests the server for the latest App Settings.
public inline FORCEINLINE void FetchAppSettings(const FRH_GenericSuccessDelegate & Delegate)
public inline void PollAppSettings(const FRH_PollCompleteFunc & Delegate)Pulses a FetchAppSettings call for the polling of App Settings.
public inline const TMap< FString, FString > & GetAppSettings() constGets the map of all the App Settings and their values.
public inline bool GetAppSetting(const FString & Key,FString & Value) constGets the value of a specific App Setting.
public void TriggerHotfixProcessing()If hotfix settings are set, this starts the process of applying them to unreal assets.
public void StartKVsRefreshTimer()Starts the polling for KVs.
public void StopKVsRefreshTimer()Stops the polling for KVs.
public void RefreshServerTimeCache(const FRH_GenericSuccessWithErrorBlock & Delegate)Requests the server time cache to be updated.
public inline const FRH_ServerTimeCache&GetServerTimeCache() constGets the server time cache object.
public inline bool GetServerTime(FDateTime & Time) constGets the approximate server time, if we have received one.
public inline bool GetServerTimeDrift(FTimespan & Timespan) constGets the approximate server time, if we have received one.
public bool GetHotfixTestValue() constGets if the hotfix system is enabled.
protected TMap< FString, FString > KVsMap of KVs by Key.
protected FDateTime KickBeforeHintTime for which any player logins older than should log out (staggered kick all players support).
protected FString KVsETagETag of last GetKVs call response.
protected FRH_AutoPollerPtr KVsPollerPoller responsible for KVs.
protected FRH_ServerTimeCache ServerTimeCacheCache data for storing time information from the API.
protected virtual void InitPropertiesWithDefaultValues()Initializes the subsystem with defaults for its cached data.
protected virtual void OnFetchKVs(const GetKVsAPIType::Response & Resp)Handles the response to a FetchKVs call.
typedef GetKVsAPIType

Members​

public FKVsUpdatedDelegate OnKVsUpdated ​

Delegate that can be listented to for whenever KVs get updated from polling.

public FAppSettingsUpdatedDelegate AppSettingsUpdatedDelegate ​

Delegate that can be listented to for whenever App Settings get updated from polling.

public FSettingsUpdatedDelegate OnSettingsUpdated ​

Delegate that can be listented to for whenever Settings get updated from polling.

public virtual void Initialize() ​

Initialize the subsystem.

public virtual void Deinitialize() ​

Safely tears down the subsystem.

public virtual void FetchKVs(const FRH_GenericSuccessWithErrorBlock & Delegate) ​

Requests the server for the latest KVs.

Parameters​

  • Delegate Delegate to call when the request is complete.

public void PollKVs(const FRH_PollCompleteFunc & Delegate) ​

Pulses a FetchKVs call for the polling of KVs.

Parameters​

  • Delegate Delegate to call when the request is complete.

public inline const TMap< FString, FString > & GetKVs() const ​

Gets the map of all the Public KVs and their values.

Returns​

Map of all the Public KVs and their values

public inline bool GetKV(const FString & Key,FString & Value) const ​

Gets the value of a specific Publc KV.

Parameters​

  • Key Key of the KV to get the value of.

  • Value Value of the KV.

Returns​

if true, a Value was found for the Key.

public inline bool GetAnyKV(const FString & Key,FString & Value) const ​

Gets the value of a specific KV (wrapper for if multiple KV sources are present).

Parameters​

  • Key Key of the KV to get the value of.

  • Value Value of the KV.

Returns​

if true, a Value was found for the Key.

public inline FDateTime GetKickBeforeHint() const ​

Time for which any player logins older than should log out (staggered kick all players support).

public inline void FetchAppSettings(const FRH_GenericSuccessWithErrorBlock & Delegate) ​

Requests the server for the latest App Settings.

Parameters​

  • Delegate Delegate to call when the request is complete.

public inline FORCEINLINE void FetchAppSettings(const FRH_GenericSuccessDelegate & Delegate) ​

public inline void PollAppSettings(const FRH_PollCompleteFunc & Delegate) ​

Pulses a FetchAppSettings call for the polling of App Settings.

Parameters​

  • Delegate Delegate to call when the request is complete.

public inline const TMap< FString, FString > & GetAppSettings() const ​

Gets the map of all the App Settings and their values.

Returns​

Map of all the App Settings and their values

public inline bool GetAppSetting(const FString & Key,FString & Value) const ​

Gets the value of a specific App Setting.

Parameters​

  • Key Key of the App Setting to get the value of.

  • Value Value of the App Setting.

Returns​

if true, a Value was found for the Key.

public void TriggerHotfixProcessing() ​

If hotfix settings are set, this starts the process of applying them to unreal assets.

public void StartKVsRefreshTimer() ​

Starts the polling for KVs.

public void StopKVsRefreshTimer() ​

Stops the polling for KVs.

public void RefreshServerTimeCache(const FRH_GenericSuccessWithErrorBlock & Delegate) ​

Requests the server time cache to be updated.

public inline const FRH_ServerTimeCache&GetServerTimeCache() const ​

Gets the server time cache object.

public inline bool GetServerTime(FDateTime & Time) const ​

Gets the approximate server time, if we have received one.

Parameters​

  • Time The approximate server time.

Returns​

True if we have received a server time, false otherwise.

public inline bool GetServerTimeDrift(FTimespan & Timespan) const ​

Gets the approximate server time, if we have received one.

Parameters​

  • Timespan The approximate server time drift

Returns​

True if we have received a server time, false otherwise.

public bool GetHotfixTestValue() const ​

Gets if the hotfix system is enabled.

Returns​

Gets if enabled.

protected TMap< FString, FString > KVs ​

Map of KVs by Key.

protected FDateTime KickBeforeHint ​

Time for which any player logins older than should log out (staggered kick all players support).

protected FString KVsETag ​

ETag of last GetKVs call response.

protected FRH_AutoPollerPtr KVsPoller ​

Poller responsible for KVs.

protected FRH_ServerTimeCache ServerTimeCache ​

Cache data for storing time information from the API.

protected virtual void InitPropertiesWithDefaultValues() ​

Initializes the subsystem with defaults for its cached data.

protected virtual void OnFetchKVs(const GetKVsAPIType::Response & Resp) ​

Handles the response to a FetchKVs call.

Parameters​

  • Resp Response given for the call

  • Delegate Delegate passed in for original call to respond to when call completes.

typedef GetKVsAPIType ​

struct FRH_ServerTimeCache ​

An object that caches information about server time and differences.

Summary​

MembersDescriptions
public FDateTime LastReceivedServerDateTimeThe timestamp received during the most recent update from the server.
public FDateTime LastReceivedServerAtTimeThe time we received the most recent update from the server.
public inline FRH_ServerTimeCache()Constructor.
public inline bool GetServerTime(FDateTime & Time) constGets the approximate server time, if we have received one.
public inline bool GetServerTimeDrift(FTimespan & Timespan) constGets the difference between approximate server time and local time, if possible.
public inline bool ConvertLocalTimeToServerTime(const FDateTime & InLocalTime,FDateTime & OutServerTime) constConverts a timestamp from local time to server time by applying the drift.
public inline bool ConvertServerTimeToLocalTime(const FDateTime & InServerTime,FDateTime & OutLocalTime) constConverts a timestamp from server time to local time by applying the drift.
public inline void ImportAPITime(const RallyHereAPI::FResponse_GetUtcTime & Time)Imports data from the server response.

Members​

public FDateTime LastReceivedServerDateTime ​

The timestamp received during the most recent update from the server.

public FDateTime LastReceivedServerAtTime ​

The time we received the most recent update from the server.

public inline FRH_ServerTimeCache() ​

Constructor.

public inline bool GetServerTime(FDateTime & Time) const ​

Gets the approximate server time, if we have received one.

Parameters​

  • Time The approximate server time.

Returns​

True if we have received a server time, false otherwise.

public inline bool GetServerTimeDrift(FTimespan & Timespan) const ​

Gets the difference between approximate server time and local time, if possible.

Parameters​

  • Timespan The approximate server time drift

Returns​

True if the drift was calculated, false otherwise.

public inline bool ConvertLocalTimeToServerTime(const FDateTime & InLocalTime,FDateTime & OutServerTime) const ​

Converts a timestamp from local time to server time by applying the drift.

Parameters​

  • InLocalTime The local time to convert.

  • OutServerTime The server time equivalent of the input local time.

Returns​

True if the conversion was successful, false otherwise.

public inline bool ConvertServerTimeToLocalTime(const FDateTime & InServerTime,FDateTime & OutLocalTime) const ​

Converts a timestamp from server time to local time by applying the drift.

Parameters​

  • InServerTime The server time to convert.

  • OutLocalTime The local time equivalent of the input server time.

Returns​

True if the conversion was successful, false otherwise.

public inline void ImportAPITime(const RallyHereAPI::FResponse_GetUtcTime & Time) ​

Imports data from the server response.

Parameters​

  • Time the time data to import