UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
InstallBundleSourceInterface.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
7
9class IAnalyticsProviderET;
11
13
17
21
23
24DECLARE_DELEGATE_FourParams(FInstallBundleRequestStartedDelegate, const FName& /*BundleName*/, const FString& /*ManifestName*/, const FString& /*ManifestPath*/, const FString& /*ManifestVersion*/);
26
28
29class IInstallBundleSource : public TSharedFromThis<IInstallBundleSource>
30{
31public:
33
34 // Returns a unique id for this source
36
37 // Returns the how this source should be weighted when combined with other sources
38 virtual float GetSourceWeight() const { return 1.0f; }
39
40 // Returns a value in the [0.1, 1.0] range that allows bundles using this source to age out of the LRU cache more slowly
41 virtual double GetSourceCacheAgeScalar() const { return 1.0; }
42
43 // Called once by bundle manager after constructing the bundle source
44 // Any non-fallback errors returned will cause bundle manager to fail to initialize
47 TSharedPtr<IAnalyticsProviderET> AnalyticsProvider,
49 // Bundle manager will not call AsyncInit again until the bundle source calls back that it is complete
50 // It will be retried indefinitely until init is successful.
51 virtual void AsyncInit(FInstallBundleSourceInitDelegate Callback) = 0;
52
53 // Currently only called after AsyncInit initialization.
54 // Provides information about bundles this source knows about back to bundle manager.
56
57 // Sets callbacks to Install Bundle Manager for dynamically discovered bundles
58 // UpdateCallback - Call to add or update bundle info from this source. Must be called when there are no requests for the bundle.
59 // LostRelevanceCallback - Allows bundle manager to clean up bundles if they are no longer relevant to any source
62
64
65 // Whether this source has been initialized or not
67
68 // Returns content version in a "<BuildVersion>-<Platform>" format
69 virtual FString GetContentVersion() const = 0;
70
71 // Finds all dependencies for InBundleName, including InBundleName
72 // SkippedUnknownBundles contains any unknown bundles that may have been found
74
75 // Gets the state of content on disk
76 // BundleNames contains all dependencies and has been deduped
78
79 // Allows this bundle source to reject bundle requests early, rather than failing them.
80 // This means that client code does not have to wait on these bundles.
81 // This may be called anytime after Init, even during AsyncInit
83
94
95 // Updates content on disk if necessary
96 // BundleContexts contains all dependencies and has been deduped
98
106
107 // Notify bundle source that a bundle has been released
108 // If EInstallBundleReleaseRequestFlags::RemoveFilesIfPossible is set, the source should remove content from disk if present
109 // The source should set bContentWasRemoved to indicate to bundle manager that the bundle content was uninstalled
110 // BundleContexts contains all dependencies and has been deduped
111 // Bundle manager will not schedule removes at the same time as updates for the same bundle
118
119 // Returns true if content is scheduled to be removed the next time the source is initialized
120 // BundleNames contains all dependencies and has been deduped
122 // Call to cancel the removal of any content scheduled for removal the next time the source is initialized
123 // Returns true if all bundles were canceled
125 // Returns the bundle names of any content that is currently removal the next time the source is initialized
127
128 // Cancel the install for the specified bundles
131
132 // User Pause/Resume bundles.
135
136 // UpdateContentRequestFlags - Allow some flags to be updated for in flight requests
137 // Currently only CheckForCellularDataUsage is supported
141
142 // Derived classes should implement this if their content install will take a significant amount of time
144
145 // Override to return information about a bundle installer
146 virtual TArray<FBuildInstallerStat>& GetBundleUpdateStats(FName BundleName) { return EmptyStats; }
147
148 virtual void CheckForContentPatch(FInstallBundleSourceContentPatchResultDelegate Callback) { Callback.Execute(AsShared(), false); }
149
150 // Called by bundle manager to pass through command line options to simulate errors
151 virtual void SetErrorSimulationCommands(const FString& CommandLine) {}
152
153#if !UE_BUILD_SHIPPING
155#endif
156
157 virtual bool SupportsReportingDelegate() const { return false; }
159
160 virtual bool SupportsBundleRequestEventDelegates() const { return false; }
163
164private:
166};
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_DELEGATE_TwoParams(DelegateName, Param1Type, Param2Type)
Definition DelegateCombinations.h:57
#define DECLARE_DELEGATE_OneParam(DelegateName, Param1Type)
Definition DelegateCombinations.h:48
#define DECLARE_DELEGATE_RetVal_TwoParams(ReturnValueType, DelegateName, Param1Type, Param2Type)
Definition DelegateCombinations.h:63
#define DECLARE_DELEGATE_FourParams(DelegateName, Param1Type, Param2Type, Param3Type, Param4Type)
Definition DelegateCombinations.h:75
EInstallBundleReleaseRequestFlags
Definition InstallBundleTypes.h:270
EInstallBundleSourceBundleSkipReason
Definition InstallBundleTypes.h:458
EInstallBundleManagerInitState
Definition InstallBundleTypes.h:79
EInstallBundleGetContentStateFlags
Definition InstallBundleTypes.h:200
EInstallBundleRequestFlags
Definition InstallBundleTypes.h:244
EInstallBundleSourceUpdateBundleInfoResult
Definition InstallBundleTypes.h:371
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
Definition InstallBundleTypes.h:47
Definition NameTypes.h:617
Definition InstallBundleSourceInterface.h:30
virtual TArray< FName > GetRequestedRemoveContentOnNextInit() const
Definition InstallBundleSourceInterface.h:126
virtual void SetErrorSimulationCommands(const FString &CommandLine)
Definition InstallBundleSourceInterface.h:151
virtual bool RequestRemoveContentOnNextInit(TArrayView< const FName > RemoveNames)
Definition InstallBundleSourceInterface.h:121
virtual bool SupportsBundleRequestEventDelegates() const
Definition InstallBundleSourceInterface.h:160
virtual FString GetContentVersion() const =0
virtual void SetReportingDelegate(FInstallBundleReportingDelegate Delegate)
Definition InstallBundleSourceInterface.h:158
virtual float GetSourceWeight() const
Definition InstallBundleSourceInterface.h:38
virtual void SetBundleRequestStartedDelegate(FInstallBundleRequestStartedDelegate Delegate)
Definition InstallBundleSourceInterface.h:161
virtual double GetSourceCacheAgeScalar() const
Definition InstallBundleSourceInterface.h:41
virtual void GetDebugText(TArray< FString > &Output)
Definition InstallBundleSourceInterface.h:154
virtual FInstallBundleSourceType GetSourceType() const =0
virtual void UpdateContentRequestFlags(TArrayView< const FName > BundleNames, EInstallBundleRequestFlags AddFlags, EInstallBundleRequestFlags RemoveFlags)
Definition InstallBundleSourceInterface.h:139
virtual void AsyncInit_SetUpdateBundleInfoCallback(FInstallBundleSourceUpdateBundleInfoDelegate UpdateCallback, FInstallBundleLostRelevanceForSourceDelegate LostRelevanceCallback)
Definition InstallBundleSourceInterface.h:60
virtual EInstallBundleRequestFlags GetModifyableContentRequestFlags() const
Definition InstallBundleSourceInterface.h:138
virtual void RequestReleaseContent(FRequestReleaseContentBundleContext BundleContext)
Definition InstallBundleSourceInterface.h:112
virtual TOptional< FInstallBundleSourceProgress > GetBundleProgress(FName BundleName) const
Definition InstallBundleSourceInterface.h:143
virtual void SetBundleRequestCompletedDelegate(FInstallBundleRequestCompletedDelegate Delegate)
Definition InstallBundleSourceInterface.h:162
virtual bool CancelRequestRemoveContentOnNextInit(TArrayView< const FName > BundleNames)
Definition InstallBundleSourceInterface.h:124
virtual void GetContentState(TArrayView< const FName > BundleNames, EInstallBundleGetContentStateFlags Flags, FInstallBundleGetContentStateDelegate Callback)=0
virtual void SetCellularPreference(int32 Value)
Definition InstallBundleSourceInterface.h:140
virtual EInstallBundleManagerInitState GetInitState() const =0
virtual void AsyncInit_QueryBundleInfo(FInstallBundleSourceQueryBundleInfoDelegate OnCompleteCallback)=0
virtual void AsyncInit(FInstallBundleSourceInitDelegate Callback)=0
virtual void CancelBundles(TArrayView< const FName > BundleNames)
Definition InstallBundleSourceInterface.h:129
virtual FInstallBundleSourceInitInfo Init(TSharedRef< InstallBundleUtil::FContentRequestStatsMap > InRequestStats, TSharedPtr< IAnalyticsProviderET > AnalyticsProvider, TSharedPtr< InstallBundleUtil::PersistentStats::FPersistentStatContainerBase > PersistentStatsContainer)=0
virtual void CancelBundles(TArrayView< const FName > BundleNames, TArray< FName > &OutAdditionalBunldlesToCancel)
Definition InstallBundleSourceInterface.h:130
virtual void UserResumeBundles(TArrayView< const FName > BundleNames)
Definition InstallBundleSourceInterface.h:134
virtual void OnBundleInfoPruned(FName InBundleName)
Definition InstallBundleSourceInterface.h:63
virtual TSet< FName > GetBundleDependencies(FName InBundleName, TSet< FName > *SkippedUnknownBundles=nullptr) const =0
virtual bool SupportsReportingDelegate() const
Definition InstallBundleSourceInterface.h:157
virtual void CheckForContentPatch(FInstallBundleSourceContentPatchResultDelegate Callback)
Definition InstallBundleSourceInterface.h:148
virtual void UserPauseBundles(TArrayView< const FName > BundleNames)
Definition InstallBundleSourceInterface.h:133
virtual void RequestUpdateContent(FRequestUpdateContentBundleContext BundleContext)=0
virtual ~IInstallBundleSource()
Definition InstallBundleSourceInterface.h:32
virtual EInstallBundleSourceBundleSkipReason GetBundleSkipReason(FName BundleName) const
Definition InstallBundleSourceInterface.h:82
virtual TArray< FBuildInstallerStat > & GetBundleUpdateStats(FName BundleName)
Definition InstallBundleSourceInterface.h:146
Definition ArrayView.h:139
Definition Array.h:670
Definition SharedPointer.h:1640
TSharedRef< IInstallBundleSource, Mode > AsShared()
Definition SharedPointer.h:1650
Definition SharedPointer.h:692
Definition SharedPointer.h:153
Type
Definition LogVerbosity.h:17
@ NoLogging
Definition LogVerbosity.h:19
Definition InstallBundleTypes.h:504
Definition InstallBundleManagerReporting.h:10
Definition InstallBundleTypes.h:334
Definition InstallBundleTypes.h:366
Definition InstallBundleTypes.h:328
Definition InstallBundleTypes.h:449
Definition InstallBundleTypes.h:418
FName BundleName
Definition InstallBundleTypes.h:419
Definition InstallBundleTypes.h:353
Definition InstallBundleTypes.h:387
Definition InstallBundleSourceInterface.h:100
EInstallBundleReleaseRequestFlags Flags
Definition InstallBundleSourceInterface.h:102
ELogVerbosity::Type LogVerbosityOverride
Definition InstallBundleSourceInterface.h:103
FName BundleName
Definition InstallBundleSourceInterface.h:101
FInstallBundleRemovedDelegate CompleteCallback
Definition InstallBundleSourceInterface.h:104
Definition InstallBundleSourceInterface.h:85
ELogVerbosity::Type LogVerbosityOverride
Definition InstallBundleSourceInterface.h:88
void * StatsCookie
Definition InstallBundleSourceInterface.h:92
TSharedPtr< InstallBundleUtil::FContentRequestSharedContext > RequestSharedContext
Definition InstallBundleSourceInterface.h:91
FInstallBundleCompleteDelegate CompleteCallback
Definition InstallBundleSourceInterface.h:90
FInstallBundlePausedDelegate PausedCallback
Definition InstallBundleSourceInterface.h:89
EInstallBundleRequestFlags Flags
Definition InstallBundleSourceInterface.h:87
FName BundleName
Definition InstallBundleSourceInterface.h:86
Definition Optional.h:131