You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Headers are updated to contain any missing #includes needed to compile and #includes are sorted. Nothing is removed. #ushell-cherrypick of 21065896 by bryan.sefcik #preflight 62d4b1a5a6141b6adfb0c892 #jira #ROBOMERGE-OWNER: Bryan.sefcik #ROBOMERGE-AUTHOR: bryan.sefcik #ROBOMERGE-SOURCE: CL 21150156 via CL 21151754 via CL 21154719 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824) #ROBOMERGE-CONFLICT from-shelf [CL 21181076 by Bryan sefcik in ue5-main branch]
71 lines
3.1 KiB
C++
71 lines
3.1 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "BuildPatchSettings.h"
|
|
#include "BuildPatchState.h"
|
|
#include "Containers/UnrealString.h"
|
|
#include "Delegates/Delegate.h"
|
|
#include "HAL/Platform.h"
|
|
#include "Interfaces/IBuildInstaller.h"
|
|
#include "Interfaces/IBuildManifest.h"
|
|
#include "Interfaces/IBuildPatchServicesModule.h"
|
|
#include "Internationalization/Text.h"
|
|
#include "Templates/SharedPointer.h"
|
|
|
|
class IBuildPatchServicesModule;
|
|
|
|
//This class is used to help manage a PreLoadScreen based on a BuildPatchServices install.
|
|
class PRELOADSCREEN_API FBuildPatchServicesPreLoadManagerBase : public TSharedFromThis<FBuildPatchServicesPreLoadManagerBase>
|
|
{
|
|
public:
|
|
FBuildPatchServicesPreLoadManagerBase();
|
|
virtual ~FBuildPatchServicesPreLoadManagerBase() {}
|
|
|
|
virtual void Init();
|
|
|
|
//Setup BPT with everything now loaded
|
|
virtual void StartBuildPatchServices(BuildPatchServices::FBuildInstallerConfiguration Settings);
|
|
|
|
//BPT finished
|
|
virtual void OnContentBuildInstallerComplete(const IBuildInstallerRef& Installer);
|
|
|
|
virtual bool IsDone() const;
|
|
|
|
virtual int64 GetDownloadSize() { return ContentBuildInstaller.IsValid() ? ContentBuildInstaller->GetTotalDownloadRequired() : 0; }
|
|
virtual int64 GetDownloadProgress() { return ContentBuildInstaller.IsValid() ? ContentBuildInstaller->GetTotalDownloaded() : 0; }
|
|
|
|
DECLARE_MULTICAST_DELEGATE_OneParam(FOnBuildPatchCompleted, bool );
|
|
FOnBuildPatchCompleted OnBuildPatchCompletedDelegate;
|
|
|
|
virtual void PauseBuildPatchInstall();
|
|
virtual void ResumeBuildPatchInstall();
|
|
virtual void CancelBuildPatchInstall();
|
|
|
|
float GetProgressPercent() const { return ContentBuildInstaller.IsValid() ? ContentBuildInstaller->GetUpdateProgress() : 0.0f; }
|
|
EBuildPatchDownloadHealth GetDownloadHealth() const { return ContentBuildInstaller.IsValid() ? ContentBuildInstaller->GetDownloadHealth() : EBuildPatchDownloadHealth::NUM_Values; }
|
|
const FText& GetStatusText() const;
|
|
BuildPatchServices::EBuildPatchState GetState() const { return ContentBuildInstaller.IsValid() ? ContentBuildInstaller->GetState() : BuildPatchServices::EBuildPatchState::Initializing; }
|
|
|
|
FText GetErrorMessageBody() const { return ContentBuildInstaller.IsValid() ? ContentBuildInstaller->GetErrorText() : FText(); }
|
|
EBuildPatchInstallError GetErrorType() const { return ContentBuildInstaller.IsValid() ? ContentBuildInstaller->GetErrorType() : EBuildPatchInstallError::NoError; }
|
|
FString GetErrorCode() const { return ContentBuildInstaller.IsValid() ? ContentBuildInstaller->GetErrorCode() : TEXT("U"); }
|
|
|
|
virtual bool IsActive()
|
|
{
|
|
return (ContentBuildInstaller.IsValid()
|
|
&& !ContentBuildInstaller->IsComplete()
|
|
&& !ContentBuildInstaller->HasError()
|
|
&& ContentBuildInstaller->GetState() > BuildPatchServices::EBuildPatchState::Resuming);
|
|
}
|
|
|
|
IBuildInstallerPtr GetInstaller() { return ContentBuildInstaller; }
|
|
|
|
protected:
|
|
bool bPatchingStarted;
|
|
bool bPatchingFinished;
|
|
|
|
IBuildPatchServicesModule* BuildPatchServicesModule;
|
|
IBuildInstallerPtr ContentBuildInstaller;
|
|
};
|