You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Fixed several standards-breaking uses of auto and lots of const-incorrect code. #rb paul.chipchase #jira UE-139606 #preflight 61f2b405f50f352300cc6bee #preflight 61f7f0ece55232619f85d472 #ROBOMERGE-AUTHOR: sebastian.nordgren #ROBOMERGE-SOURCE: CL 18789263 in //UE5/Release-5.0/... via CL 18789286 via CL 18789396 #ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545) [CL 18789852 by sebastian nordgren in ue5-main branch]
60 lines
2.1 KiB
C++
60 lines
2.1 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "IContentSource.h"
|
|
#include "IContentSourceProvider.h"
|
|
#include "IDirectoryWatcher.h"
|
|
|
|
/** A content source provider for available content upacks. */
|
|
class FFeaturePackContentSourceProvider : public IContentSourceProvider
|
|
{
|
|
public:
|
|
FFeaturePackContentSourceProvider();
|
|
virtual const TArray<TSharedRef<IContentSource>>& GetContentSources() const override;
|
|
virtual void SetContentSourcesChanged(FOnContentSourcesChanged OnContentSourcesChangedIn) override;
|
|
|
|
virtual ~FFeaturePackContentSourceProvider();
|
|
|
|
private:
|
|
/** Starts the directory watcher for the feature pack directory. */
|
|
void StartUpDirectoryWatcher();
|
|
|
|
/** Shuts down the directory watcher for the feature pack directory. */
|
|
void ShutDownDirectoryWatcher();
|
|
|
|
/** Delegate to handle whenever the feature pack directory changes on disk. */
|
|
void OnFeaturePackDirectoryChanged( const TArray<FFileChangeData>& FileChanges );
|
|
|
|
/** Rebuilds the feature pack array and calls the change notification delegate. */
|
|
void RefreshFeaturePacks();
|
|
|
|
/** The path on disk to the directory containing the feature packs. */
|
|
FString FeaturePackPath;
|
|
|
|
/** The path on disk to the directory containing the enterprise feature packs. */
|
|
FString EnterpriseFeaturePackPath;
|
|
|
|
/** The path on disk to the directory containing the templates folder. */
|
|
FString TemplatePath;
|
|
|
|
/** The path on disk to the directory containing the enterprise templates folder. */
|
|
FString EnterpriseTemplatePath;
|
|
|
|
/** The delegate which gets called when the feature pack directory changes. This reference
|
|
is kept so that it can be unregistered correctly. */
|
|
IDirectoryWatcher::FDirectoryChanged DirectoryChangedDelegate;
|
|
|
|
/** A delegate which gets called whenever the array of content sources changes. */
|
|
FOnContentSourcesChanged OnContentSourcesChanged;
|
|
|
|
/** An array of the available content sources. */
|
|
TArray<TSharedRef<IContentSource>> ContentSources;
|
|
|
|
/** An array of the available Enterprise content sources. */
|
|
TArray<TSharedRef<IContentSource>> EnterpiseContentSources;
|
|
|
|
FDelegateHandle DirectoryChangedDelegateHandle;
|
|
};
|