Config
Summary
| Members | Descriptions |
|---|---|
class URH_ConfigSubsystem | Config Subsystem used for interfacing with configuration coming from the core servers. |
struct FRH_ServerTimeCache | An 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
| Members | Descriptions |
|---|---|
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. |
public void PollKVs(const FRH_PollCompleteFunc & Delegate) | Pulses a FetchKVs call for the polling of KVs. |
public inline const TMap< FString, FString > & GetKVs() const | Gets the 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. |
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). |
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. |
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() const | Gets the 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. |
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. |
public inline bool GetServerTimeDrift(FTimespan & Timespan) const | Gets the approximate server time, if we have received one. |
public bool GetHotfixTestValue() const | Gets if the hotfix system is 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. |
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
DelegateDelegate to call when the request is complete.
public void PollKVs(const FRH_PollCompleteFunc & Delegate)
Pulses a FetchKVs call for the polling of KVs.
Parameters
DelegateDelegate 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
-
KeyKey of the KV to get the value of. -
ValueValue 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
-
KeyKey of the KV to get the value of. -
ValueValue 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
DelegateDelegate 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
DelegateDelegate 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
-
KeyKey of the App Setting to get the value of. -
ValueValue 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
TimeThe 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
TimespanThe 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
-
RespResponse given for the call -
DelegateDelegate 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
| Members | Descriptions |
|---|---|
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. |
public inline bool GetServerTimeDrift(FTimespan & Timespan) const | Gets the difference between approximate server time and local time, if possible. |
public inline bool ConvertLocalTimeToServerTime(const FDateTime & InLocalTime,FDateTime & OutServerTime) const | Converts a timestamp from local time to server time by applying the drift. |
public inline bool ConvertServerTimeToLocalTime(const FDateTime & InServerTime,FDateTime & OutLocalTime) const | Converts 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
TimeThe 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
TimespanThe 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
-
InLocalTimeThe local time to convert. -
OutServerTimeThe 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
-
InServerTimeThe server time to convert. -
OutLocalTimeThe 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
Timethe time data to import