3#include <FileservePlugin/FileservePluginDLL.h>
5#include <Core/Interfaces/RemoteToolingInterface.h>
6#include <Foundation/Communication/RemoteInterface.h>
7#include <Foundation/Configuration/Singleton.h>
8#include <Foundation/Types/UniquePtr.h>
9#include <Foundation/Types/Uuid.h>
11namespace plDataDirectory
62 plResult SaveCurrentConnectionInfoToDisk()
const;
92 static bool s_bEnableFileserve;
94 struct FileCacheStatus
96 plInt64 m_TimeStamp = 0;
97 plUInt64 m_FileHash = 0;
106 bool m_bMounted =
false;
111 void DeleteFile(plUInt16 uiDataDir,
plStringView sFile);
113 void UnmountDataDirectory(plUInt16 uiDataDir);
120 static void WriteMetaFile(
plStringBuilder sCachedMetaFile, plInt64 iFileTimeStamp, plUInt64 uiFileHash);
122 plResult DownloadFile(plUInt16 uiDataDirID,
const char* szFile,
bool bForceThisDataDir,
plStringBuilder* out_pFullPath);
123 void DetermineCacheStatus(plUInt16 uiDataDirID,
const char* szFile, FileCacheStatus& out_Status)
const;
125 void InvalidateFileCache(plUInt16 uiDataDirID,
plStringView sFile, plUInt64 uiHash);
127 plResult TryConnectWithFileserver(
const char* szAddress,
plTime timeout)
const;
128 void FillFileStatusCache(
const char* szFile);
129 void ShutdownConnection();
133 mutable plString m_sServerConnectionAddress;
135 plString m_sFileserveCacheMetaFolder;
136 bool m_bDownloading =
false;
137 bool m_bFailedToConnect =
false;
138 bool m_bWaitingForUploadFinished =
false;
139 plUuid m_CurFileRequestGuid;
A data directory type to handle access to files that are served from a network host.
Definition FileserveDataDir.h:31
Definition DynamicArray.h:81
Singleton that represents the client side part of a fileserve connection.
Definition FileserveClient.h:29
static void DisabledFileserveClient()
Allows to disable the file serving functionality. Should be called before mounting data directories.
Definition FileserveClient.h:67
const char * GetServerConnectionAddress()
Returns the address through which the Fileserve client tried to connect with the server last.
Definition FileserveClient.h:70
plRemoteInterface * GetRemoteInterface() override
plRemoteToolingInterface
Definition FileserveClient.h:39
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Provides a simple mechanism for mutual exclusion to prevent multiple threads from accessing a shared ...
Definition Mutex.h:13
Definition RemoteInterface.h:60
Encapsulates all the data that is transmitted when sending or receiving a message with plRemoteInterf...
Definition RemoteMessage.h:11
plStringBuilder is a class that is meant for creating and modifying strings.
Definition StringBuilder.h:35
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition UniquePtr.h:10
This data type is the abstraction for 128-bit Uuid (also known as GUID) instances.
Definition Uuid.h:11
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12
PL_ALWAYS_INLINE static constexpr plTime MakeFromSeconds(double fSeconds)
Creates an instance of plTime that was initialized from seconds.
Definition Time.h:30