Files
UnrealEngineUWP/Engine/Source/Editor/AddContentDialog/Private/ContentSourceProviders/FeaturePack/FeaturePackContentSourceProvider.h
bruce nesbit df30071d7e Revised feature pack code.
Additional files can now be specified in feature pack manifest.
Feature packs can now be parsed/installed feature pack without the need for a .upack file
Removed feature packs for shared template resources
Moved shared template resource manifests into a FeaturePack folder and revised so they will work sans .upack
Removed shared feature packs from list of .upacks rocket builds.

[CL 2617901 by bruce nesbit in Main branch]
2015-07-13 05:47:36 -04:00

47 lines
1.7 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "DirectoryWatcherModule.h"
#pragma once
/** A content source provider for available content upacks. */
class FFeaturePackContentSourceProvider : public IContentSourceProvider
{
public:
FFeaturePackContentSourceProvider();
virtual const TArray<TSharedRef<IContentSource>> GetContentSources() 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 templates folder. */
FString TemplatePath;
/** 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;
FDelegateHandle DirectoryChangedDelegateHandle;
};