Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
IContentManagerFactory.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/screens/models/ContentFlags.h"
7#include "mc/client/gui/screens/models/ContentType.h"
8#include "mc/deps/core/file/PathBuffer.h"
9#include "mc/deps/core/resource/PackOrigin.h"
10#include "mc/deps/core/resource/PackType.h"
11#include "mc/deps/core/threading/Async.h"
12#include "mc/deps/core/utility/NonOwnerPointer.h"
13
14// auto generated forward declare list
15// clang-format off
16class AppPlatform;
20class Pack;
21class PackSource;
22struct ContentSource;
29namespace ContentManagerUtils { class ISourcesAsyncReloader; }
30namespace Core { class Path; }
31namespace Realms { class RealmsServicePackSource; }
32namespace Realms { struct Content; }
33namespace Realms { struct RealmId; }
34namespace mce { class UUID; }
35// clang-format on
36
38public:
39 // virtual functions
40 // NOLINTBEGIN
41 virtual ~IContentManagerFactory() = default;
42
43 virtual ::std::unique_ptr<::WorldContentSource> createWorldContentSource() const = 0;
44
45 virtual ::std::unique_ptr<::WorldTemplateSource> createWorldTemplateSource() const = 0;
46
47 virtual ::std::unique_ptr<::InvalidResourceSource>
48 createInvalidResourceSource(::InvalidPacksFilterGroup const& filter) const = 0;
49
50 virtual ::std::unique_ptr<::ContentSource> createWorldPackManagerContentSource(
51 ::std::string const& worldID,
52 ::Core::PathBuffer<::std::string> worldPath,
53 ::ContentFlags flags,
54 ::std::vector<::PackManagerContentSourceData>&& data,
55 ::std::weak_ptr<::CachedHostPackIdProvider> provider
56 ) const = 0;
57
58 virtual ::std::unique_ptr<::ContentSource> createRealmPackManagerContentSource(
59 int64 realmID,
60 ::ContentFlags flags,
61 ::std::vector<::PackManagerContentSourceData>&& data
62 ) const = 0;
63
64 virtual ::std::unique_ptr<::ContentSource> createRealmsWorldPackManagerContentSource(
65 ::Realms::RealmId realmId,
66 ::std::vector<::Realms::Content>&& serviceAppliedContent,
67 ::ContentFlags flags,
68 ::std::vector<::PackManagerContentSourceData>&& data
69 ) const = 0;
70
71 virtual ::std::unique_ptr<::ContentSource> createPackManagerContentSource(
72 ::ContentType type,
73 ::ContentFlags flags,
74 ::std::vector<::PackManagerContentSourceData>&& data
75 ) const = 0;
76
77 virtual ::PackSource* getInPackagePackSource(::PackType type) const = 0;
78
79 virtual ::PackSource* getDirectoryPackSource(::Core::Path const& path, ::PackType type) const = 0;
80
81 virtual ::PackSource&
82 createDirectoryPackSource(::Core::Path const& path, ::PackType type, ::PackOrigin origin) const = 0;
83
84 virtual ::PackSource&
85 createWorldTemplatePackSource(::mce::UUID const& id, ::PackType type, ::PackOrigin origin) const = 0;
86
87 virtual ::IContentCatalogPackSource& createContentCatalogPackSource(
88 ::std::weak_ptr<::ContentManagerUtils::ISourcesAsyncReloader>&& weakSourcesAsyncReloader,
89 bool enabled
90 ) const = 0;
91
92 virtual ::PackSource& createWorldHistoryPackSource(::Core::Path const& path, ::PackType type) const = 0;
93
94 virtual ::RealmsUnknownPackSources& getRealmsUnknownPackSources() const = 0;
95
96 virtual ::std::unique_ptr<::Realms::RealmsServicePackSource> createRealmsServicePackSource(
97 int64 realmId,
98 ::PackType packType,
99 ::std::vector<::gsl::not_null<::std::shared_ptr<::Pack>>>&& servicePackData
100 ) const = 0;
101
102 virtual ::std::unique_ptr<::CompositePackSource>
103 createCompositePackSource(::std::vector<::PackSource*> sources) const = 0;
104
105 virtual ::Bedrock::Threading::Async<void> refreshPacksAsync() const = 0;
106
107 virtual bool allowsResourcePackDevelopment() const = 0;
108
109 virtual ::Bedrock::NonOwnerPointer<::AppPlatform> getPlatform() const = 0;
110 // NOLINTEND
111};
Definition AppPlatform.h:79
Definition CachedHostPackIdProvider.h:5
Definition CompositePackSource.h:17
Definition ISourcesAsyncReloader.h:7
Definition Path.h:10
Definition IContentCatalogPackSource.h:5
Definition IContentManagerFactory.h:5
Definition PackSource.h:28
Definition Pack.h:28
Definition RealmsServicePackSource.h:18
Definition UUID.h:8
Definition ContentSource.h:5
Definition InvalidPacksFilterGroup.h:5
Definition InvalidResourceSource.h:5
Definition PackManagerContentSourceData.h:5
Definition RealmsUnknownPackSources.h:5
Definition Content.h:7
Definition RealmId.h:7
Definition WorldContentSource.h:5
Definition WorldTemplateSource.h:5