Files
UnrealEngineUWP/Engine/Source/Runtime/NetworkFileSystem/Private/NetworkFileServerConnection.h
Ben Marsh 6c32244d56 Copying //UE4/Release-Staging-4.11 to //UE4/Main (Source: //UE4/Release-Staging-4.11 @ 2941426, //UE4/Release-4.11 @ 2927265)
==========================
MAJOR FEATURES + CHANGES
==========================

Change 2910079 on 2016/03/15 by Taizyd.Korambayil

	#jira UE-28293 Reworded some Sentences

Change 2910157 on 2016/03/15 by Taizyd.Korambayil

	#jira UE-28240 Rebuilt Lighting for Sanctuary

Change 2910317 on 2016/03/15 by Ben.Marsh

	Fix crash trying to print out a message explaining that you need to install the Visual Studio 2015 toolchain, if the Visual Studio 2015 toolchain is not installed!

Change 2910425 on 2016/03/15 by Ori.Cohen

	Fix crash and incorrect behavior when setting physical material on a welded body.

	#JIRA UE-28399
	#rb Marc.Audy

Change 2910525 on 2016/03/15 by Ori.Cohen

	Fix player capsule not spawning at the right place due to float precision issues.

	#JIRA UE-28438
	#rb Zak.Middleton

Change 2910595 on 2016/03/15 by Chris.Babcock

	Fixed issue with missing event location paired with IE_Pressed if IE_DoubleClick generated
	#jira UE-28051
	#ue4
	#codereview Marc.Audy

Change 2911442 on 2016/03/16 by Andrew.Rodham

	Sequencer: Fixed frame grabbers where hardware mapped surfaces to memory of a different stride

	#jira UE-28434

Change 2911596 on 2016/03/16 by andrew.porter

	Test content for blueprint vertex painting
	#jira UE-24473

Change 2911860 on 2016/03/16 by Jamie.Dale

	Allowed SViewport to (once again) be able to use non-pre-multiplied alpha blending

	SViewport now has an PreMultipliedAlpha argument (default true), which can control whether to use pre-multiplied alpha when blending is enabled (blending is disabled by default). Note: This is a change in behavior from 4.10, as non-pre-multiplied alpha blending used to be the default, but pre-multiplied alpha blending better supports the pipeline used through Slate.

	This change also cleans up the use of bool parameters in the FSlateDrawElement::MakeX functions to control the render behavior, instead favoring use of advanced ESlateDrawEffect flags.

	API Breaking Changes
	  - FSlateDrawElement::MakeGradient no longer takes a bInGammaCorrect bool, instead pass ESlateDrawEffect::NoGamma as part of InDrawEffects to disable gamma correction.
	  - FSlateDrawElement::MakeViewport no longer takes a bInGammaCorrect bool, instead pass ESlateDrawEffect::NoGamma as part of InDrawEffects to disable gamma correction.
	  - FSlateDrawElement::MakeViewport no longer takes a bInAllowBlending bool, instead pass ESlateDrawEffect::NoBlending as part of InDrawEffects to disable blending.

	#jira UE-26797

Change 2912345 on 2016/03/16 by Olaf.Piesche

	Removing the check that causes UE-28441, duplicating beam type data module from highest LOD in Cascade causes crash. The beam data module is the only one that explicitly checks to make sure it's always shared across LOD levels; there's no obvious reasons why duplicating beam data modules shouldn't be possible.

	#codereview simon.tovey
	#jira UE-28441

Change 2912526 on 2016/03/16 by Steve.Robb

	Fix uninitialized variables.

	#codereview robert.manuszewski
	#jira UE-28391

Change 2913114 on 2016/03/17 by Steve.Robb

	Fixed some private properties which caused UHT errors.

	#codereview robert.manuszewski
	#jira UE-28059

Change 2913295 on 2016/03/17 by Richard.TalbotWatkin

	Replicated from Dev-Editor CL 2913224

	Disallow assets from being deleted if PIE is active. This prevents various troubles which can occur when PIE is referencing asset objects.
	#jira UE-12387 - [CrashReport] Crash when deleting assets needed for template
	#RB Nick.Darnell, Frank.Fella

Change 2913310 on 2016/03/17 by Nick.Shin

	merging from //UE4/Dev-Platform to //UE4/Release-4.11

	--- original commit CL: #2913300 message ---
	corrected VS 2015 websocket lib to look at the right offset

	it is currently a high risk change to just update the libwebsocket wholesale for  release-4.11.

	this change is the most minimum invasive change with a lot of deep analysis (details will be put in jira: # UEPLAT-1221).

	this fix will also be pushed up to release-4.11

	#jira UE-22166 - HTML5 Cook on the fly will launch and then close browser
	#jira UE-22513 - HTTP Network File System crashes randomly.
	#jira UE-28003 - Fail to QuickLaunch HTML5 through UnrealFrontEnd

Change 2913593 on 2016/03/17 by Mark.Satterthwaite

	For non-debug builds silence the warning about no deth/stencil when shader writes to depth in MetalRHI - the RHI implementation will create a temporary D/S buffer to cope but really this needs to be properly addressed elsewhere.
	#jira UE-28491

Change 2913655 on 2016/03/17 by Taizyd.Korambayil

	#jira UE-28492 Rebuilt Lighting For the Samples Listed

Change 2914025 on 2016/03/17 by Olaf.Piesche

	Make sure ST primitives are added to NST draw list if in shader complexity mode

	#codereview simon.tovey
	#jira UE-28471

Change 2914027 on 2016/03/17 by Nick.Shin

[CL 2941462 by Ben Marsh in Main branch]
2016-04-12 17:04:39 -04:00

194 lines
5.4 KiB
C++

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#pragma once
/**
* This class processes all incoming messages from the client.
*/
class FNetworkFileServerClientConnection
{
public:
/**
* Creates and initializes a new instance.
*
* @param InSocket - The client socket to use.
* @param InFileRequestDelegate - A delegate to be invoked when the client requests a file.
*/
FNetworkFileServerClientConnection(const FFileRequestDelegate& InFileRequestDelegate,
const FRecompileShadersDelegate& InRecompileShadersDelegate, const TArray<ITargetPlatform*>& InActiveTargetPlatforms );
/**
* Destructor.
*/
virtual ~FNetworkFileServerClientConnection( );
public:
/**
* Processes the given payload.
*
* @param Ar An archive containing the payload data.
* @param Out An archive that will contain the processed data.
*/
bool ProcessPayload(FArchive& Ar);
/**
* Gets the client connection's description.
*
* @return Description string.
*/
FString GetDescription() const;
protected:
/**
* Convert the given filename from the client to the server version of it
* NOTE: Potentially modifies the input FString!!!!
*
* @param FilenameToConvert Upon input, the client version of the filename. After the call, the server version
*/
void ConvertClientFilenameToServerFilename(FString& FilenameToConvert);
/**
* Convert the given filename from the server to the client version of it
* NOTE: Potentially modifies the input FString!!!!
*
* @param FilenameToConvert Upon input, the server version of the filename. After the call, the client version
*/
void ConvertServerFilenameToClientFilename(FString& FilenameToConvert);
/** Opens a file for reading or writing. */
void ProcessOpenFile(FArchive& In, FArchive& Out, bool bIsWriting);
/** Reads from file. */
void ProcessReadFile(FArchive& In, FArchive& Out);
/** Writes to file. */
void ProcessWriteFile(FArchive& In, FArchive& Out);
/** Seeks in file. */
void ProcessSeekFile(FArchive& In, FArchive& Out);
/** Closes file handle and removes it from the open handles list. */
void ProcessCloseFile(FArchive& In, FArchive& Out);
/** Gets info on the specified file. */
void ProcessGetFileInfo(FArchive& In, FArchive& Out);
/** Moves file. */
void ProcessMoveFile(FArchive& In, FArchive& Out);
/** Deletes file. */
void ProcessDeleteFile(FArchive& In, FArchive& Out);
/** Copies file. */
void ProcessCopyFile(FArchive& In, FArchive& Out);
/** Sets file timestamp. */
void ProcessSetTimeStamp(FArchive& In, FArchive& Out);
/** Sets read only flag. */
void ProcessSetReadOnly(FArchive& In, FArchive& Out);
/** Creates directory. */
void ProcessCreateDirectory(FArchive& In, FArchive& Out);
/** Deletes directory. */
void ProcessDeleteDirectory(FArchive& In, FArchive& Out);
/** Deletes directory recursively. */
void ProcessDeleteDirectoryRecursively(FArchive& In, FArchive& Out);
/** ConvertToAbsolutePathForExternalAppForRead. */
void ProcessToAbsolutePathForRead(FArchive& In, FArchive& Out);
/** ConvertToAbsolutePathForExternalAppForWrite. */
void ProcessToAbsolutePathForWrite(FArchive& In, FArchive& Out);
/** Reposts local files. */
void ProcessReportLocalFiles(FArchive& In, FArchive& Out);
/** Walk over a set of directories, and get all files (recursively) in them, along with their timestamps. */
bool ProcessGetFileList(FArchive& In, FArchive& Out);
/** Heartbeat. */
void ProcessHeartbeat(FArchive& In, FArchive& Out);
/**
* Finds open file handle by its ID.
*
* @param HandleId
* @return Pointer to the file handle, NULL if the specified handle id doesn't exist.
*/
FORCEINLINE IFileHandle* FindOpenFile( uint64 HandleId )
{
IFileHandle** OpenFile = OpenFiles.Find(HandleId);
return OpenFile ? *OpenFile : NULL;
}
bool PackageFile( FString& Filename, FArchive& Out);
/**
* Processes a RecompileShaders message.
*
* @param In -
* @param Out -
*/
void ProcessRecompileShaders( FArchive& In, FArchive& Out );
/**
* Processes a heartbeat message.
*
* @param In -
* @param Out -
*/
void ProcessSyncFile( FArchive& In, FArchive& Out );
virtual bool SendPayload( TArray<uint8> &Out ) = 0;
private:
// Hold the name of the currently connected platform.
FString ConnectedPlatformName;
// Hold the engine directory from the connected platform.
FString ConnectedEngineDir;
// Hold the game directory from the connected platform.
FString ConnectedGameDir;
// Holds the last assigned handle id (0 = invalid).
uint64 LastHandleId;
// Holds the list of files found by the directory watcher.
TArray<FString> ModifiedFiles;
// Holds a critical section to protect the ModifiedFiles array.
FCriticalSection ModifiedFilesSection;
// Holds all currently open file handles.
TMap<uint64, IFileHandle*> OpenFiles;
// Holds the file interface for local (to the server) files - all file ops MUST go through here, NOT IFileManager.
FSandboxPlatformFile* Sandbox;
// Holds the list of unsolicited files to send in separate packets.
TArray<FString> UnsolictedFiles;
// Holds the list of directories being watched.
TArray<FString> WatchedDirectories;
// Holds a delegate to be invoked on every sync request.
FFileRequestDelegate FileRequestDelegate;
// Holds a delegate to be invoked when a client requests a shader recompile.
FRecompileShadersDelegate RecompileShadersDelegate;
// cached copy of the active target platforms (if any)
const TArray<ITargetPlatform*>& ActiveTargetPlatforms;
};