5#include "Containers/Array.h"
6#include "Containers/Map.h"
7#include "Containers/UnrealString.h"
9#include "HAL/CriticalSection.h"
10#include "Misc/DateTime.h"
11#include "Stats/Stats.h"
12#include "Stats/Stats2.h"
15template<
typename TTask>
class FAsyncTask;
18
19
53
54
73 RETURN_QUICK_DECLARE_CYCLE_STAT(FRemoteConfigAsyncWorker, STATGROUP_ThreadPoolAsyncTasks);
99
100
106 Filename = InFileName;
107 Contents = *InContents;
116
117
157
158
182 bool Read(
const TCHAR* GeneratedIniFile,
const TCHAR* DefaultIniFile);
bool IsUsingLocalIniFile(const TCHAR *FilenameToLoad, const TCHAR *IniFileName)
FDateTime GetIniTimeStamp(const TCHAR *FilenameToLoad, const TCHAR *IniFileName)
void ProcessIniContents(const TCHAR *FilenameToLoad, const TCHAR *IniFileName, FConfigFile *Config, bool bDoEmptyConfig, bool bDoCombine)
void MakeLocalCopy(const TCHAR *Filename)
FWindowsCriticalSection FCriticalSection
FRemoteConfigAsyncCachedWriteTask(const TCHAR *InFileName, FString *InContents)
bool FindCachedWriteTask(const TCHAR *InFilename, bool bCompareContents, const TCHAR *InContents)
TArray< FRemoteConfigAsyncCachedWriteTask > CachedWriteTasks
FCriticalSection SynchronizationObject
bool AreAllTasksFinished(bool bDoRemoval)
bool GetReadData(const TCHAR *InFilename, FRemoteConfigAsyncIOInfo &OutIOInfo)
bool StartTask(const TCHAR *InFilename, const TCHAR *RemotePath, FRemoteConfigAsyncIOInfo &InIOInfo, FString *InContents, bool bInIsRead)
static FRemoteConfigAsyncTaskManager * Get()
bool IsFinished(const TCHAR *InFilename)
TMap< FString, FAsyncTask< FRemoteConfigAsyncWorker > * > PendingTasks
FRemoteConfigAsyncIOInfo IOInfo
FORCEINLINE TStatId GetStatId() const
FRemoteConfigAsyncIOInfo & GetIOInfo()
bool IsReadSuccess() const
FRemoteConfigAsyncWorker(const TCHAR *InFilename, FRemoteConfigAsyncIOInfo &InIOInfo, FString *InContents, bool bInIsRead)
static FString ReplaceIniSpecialCharWithChar(const FString &Str)
TMap< FString, FRemoteConfigAsyncIOInfo > ConfigBuffers
bool Read(const TCHAR *GeneratedIniFile, const TCHAR *DefaultIniFile)
bool IsFinished(const TCHAR *InFilename)
bool Write(const TCHAR *Filename, FString &Contents)
bool IsRemoteFile(const TCHAR *Filename)
FRemoteConfigAsyncIOInfo * FindConfig(const TCHAR *Filename)
static FString ReplaceIniCharWithSpecialChar(const FString &Str)
void FinishRead(const TCHAR *Filename)
TArray< FString > CachedFileNames
bool ShouldReadRemoteFile(const TCHAR *Filename)
static FRemoteConfig * Get()
FString GenerateRemotePath(const TCHAR *Filename)
FRemoteConfigAsyncIOInfo(const TCHAR *InDefaultIniFile)
FRemoteConfigAsyncIOInfo()
FRemoteConfigAsyncIOInfo & operator=(const FRemoteConfigAsyncIOInfo &Other)
TCHAR DefaultIniFile[1024]