You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Please note that file comments had no purpose in nearly all cases and just added visual clutter. The two files that had meaningful file comments had their comments moved into the corresponding classes. There are still hundreds of file comments left in other files that will be removed over time. Also cleaned up some random stuff along the way: - relative paths to public headers within the same module are no longer necessary (automatically discovered by UBT now) - header guards are deprecated, use #pragma once instead (all compilers support it now) - space between multiple template brackets is no longer required (all compilers support >> now) - NULL to nullptr, OVERRIDE to override - spelling errors, whitespace, line breaks [CL 2104067 by Max Preussner in Main branch]
74 lines
2.2 KiB
C++
74 lines
2.2 KiB
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
|
|
/**
|
|
* Delegate type for handling file requests from a network client.
|
|
*
|
|
* The first parameter is the name of the requested file.
|
|
* The second parameter will hold the list of unsolicited files to send back.
|
|
*/
|
|
DECLARE_DELEGATE_ThreeParams(FFileRequestDelegate, const FString&, const FString&, TArray<FString>&);
|
|
|
|
struct FShaderRecompileData
|
|
{
|
|
FString PlatformName;
|
|
/** The platform to compile shaders for, corresponds to EShaderPlatform, but a value of -1 indicates to compile for all target shader platforms. */
|
|
int32 ShaderPlatform;
|
|
TArray<FString>* ModifiedFiles;
|
|
TArray<uint8>* MeshMaterialMaps;
|
|
TArray<FString> MaterialsToLoad;
|
|
TArray<uint8> SerializedShaderResources;
|
|
|
|
FShaderRecompileData() :
|
|
ShaderPlatform(-1)
|
|
{}
|
|
|
|
FShaderRecompileData& operator=(const FShaderRecompileData& Other)
|
|
{
|
|
PlatformName = Other.PlatformName;
|
|
ShaderPlatform = Other.ShaderPlatform;
|
|
ModifiedFiles = Other.ModifiedFiles;
|
|
MeshMaterialMaps = Other.MeshMaterialMaps;
|
|
MaterialsToLoad = Other.MaterialsToLoad;
|
|
SerializedShaderResources = Other.SerializedShaderResources;
|
|
|
|
return *this;
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* Delegate type for handling shader recompilation requests from a network client.
|
|
*/
|
|
DECLARE_DELEGATE_OneParam(FRecompileShadersDelegate, const FShaderRecompileData&);
|
|
|
|
|
|
/**
|
|
* Interface for network file system modules.
|
|
*/
|
|
class INetworkFileSystemModule
|
|
: public IModuleInterface
|
|
{
|
|
public:
|
|
|
|
/**
|
|
* Creates a new network file server.
|
|
*
|
|
* @param InPort The port number to bind to (-1 = default port, 0 = any available port).
|
|
* @param Streaming Whether it should be a streaming server.
|
|
* @param InFileRequestDelegate An optional delegate to be invoked when a file is requested by a client.
|
|
* @param InRecompileShadersDelegate An optional delegate to be invoked when shaders need to be recompiled.
|
|
*
|
|
* @return The new file server, or nullptr if creation failed.
|
|
*/
|
|
virtual INetworkFileServer* CreateNetworkFileServer( int32 Port = -1, const FFileRequestDelegate* InFileRequestDelegate = nullptr, const FRecompileShadersDelegate* InRecompileShadersDelegate = nullptr ) const = 0;
|
|
|
|
public:
|
|
|
|
/**
|
|
* Virtual destructor.
|
|
*/
|
|
virtual ~INetworkFileSystemModule( ) { }
|
|
}; |