LeviLamina
Loading...
Searching...
No Matches
EditorExportProjectManagerService.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/editor/WorldType.h"
7#include "mc/deps/core/file/PathBuffer.h"
8#include "mc/deps/core/string/BasicStackString.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10#include "mc/deps/script_core/runtime/scripting/Result_deprecated.h"
11#include "mc/editor/ProjectExportStatus.h"
12#include "mc/editor/services/IEditorService.h"
13#include "mc/editor/services/export/ExportResult.h"
14#include "mc/server/editor/serviceproviders/EditorPlayerExportProjectServiceProvider.h"
15#include "mc/server/editor/serviceproviders/EditorServerExportProjectServiceProvider.h"
16#include "mc/world/level/FileArchiver.h"
17
18// auto generated forward declare list
19// clang-format off
20class FileArchiver;
21class Level;
22class LevelData;
23class WeakEntityRef;
24namespace Bedrock::PubSub { class Subscription; }
25namespace Core { class FilePathManager; }
26namespace Core { class Path; }
27namespace Editor { class GameOptions; }
28namespace Editor { class ServiceProviderCollection; }
29// clang-format on
30
31namespace Editor::Services {
32
33class EditorExportProjectManagerService : public ::Editor::Services::IEditorService,
36public:
37 // member variables
38 // NOLINTBEGIN
43 // NOLINTEND
44
45public:
46 // prevent constructor by default
47 EditorExportProjectManagerService& operator=(EditorExportProjectManagerService const&);
48 EditorExportProjectManagerService(EditorExportProjectManagerService const&);
49 EditorExportProjectManagerService();
50
51public:
52 // virtual functions
53 // NOLINTBEGIN
54 virtual ~EditorExportProjectManagerService() /*override*/ = default;
55
56 virtual ::Scripting::Result_deprecated<void> init() /*override*/;
57
58 virtual ::Scripting::Result_deprecated<void> quit() /*override*/;
59
60 virtual ::std::string_view getServiceName() const /*override*/;
61
62 virtual void beginExportProject(
63 ::WeakEntityRef playerRef,
64 ::Editor::GameOptions const& gameOptions,
65 ::Editor::WorldType const editorWorldType,
66 ::std::function<void(::Editor::ExportResult const&, ::std::string)> callback
67 ) /*override*/;
68
69 virtual bool canExportProject() /*override*/;
70
71 virtual ::Editor::ProjectExportStatus getExportStatus() /*override*/;
72
73 virtual ::Bedrock::PubSub::Subscription addExportBeginTask(
74 ::std::function<void(::FileArchiver::ExportType, ::std::string const&, ::Core::Path const&)> fn
75 ) /*override*/;
76
77 virtual ::Bedrock::PubSub::Subscription addExportCopyCompleteTask(
78 ::std::function<
79 void(::FileArchiver::ExportType, ::Core::PathBuffer<::Core::BasicStackString<char, 1024>> const&)> fn
80 ) /*override*/;
81
82 virtual ::Bedrock::PubSub::Subscription
83 addExportLevelDataMutationTask(::std::function<void(::FileArchiver::ExportType, ::LevelData&)> fn) /*override*/;
84
85 virtual ::Bedrock::PubSub::Subscription addExportPreFileRemovalTask(
86 ::std::function<
87 void(::FileArchiver::ExportType, ::Core::PathBuffer<::Core::BasicStackString<char, 1024>> const&)> fn
88 ) /*override*/;
89
90 virtual ::Bedrock::PubSub::Subscription
91 addExportLevelDataFinalizeTask(::std::function<void(::FileArchiver::ExportType, ::LevelData&)> fn) /*override*/;
92
93 virtual ::Bedrock::PubSub::Subscription addExportPrePackageTask(
94 ::std::function<
95 void(::FileArchiver::ExportType, ::Core::PathBuffer<::Core::BasicStackString<char, 1024>> const&)> fn
96 ) /*override*/;
97
98 virtual ::Bedrock::PubSub::Subscription
99 addExportCleanupTask(::std::function<void(::FileArchiver::ExportType)> fn) /*override*/;
100
101 virtual ::std::shared_ptr<::FileArchiver::InterventionPublishers> getInterventionPublisherTable() /*override*/;
102 // NOLINTEND
103
104public:
105 // member functions
106 // NOLINTBEGIN
109 ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager> fileManager,
110 ::Editor::ProjectExportStatus exportStatus
111 );
112
114 ::Level* level,
115 ::FileArchiver* fileArchiver,
116 ::std::function<void(::Editor::ExportResult const&, ::std::string)> callback
117 );
118
119 MCNAPI void _onExportError(
120 ::std::function<void(::Editor::ExportResult const&, ::std::string)> callback,
121 ::std::string message,
122 ::Editor::ExportResult result
123 );
124 // NOLINTEND
125
126public:
127 // static functions
128 // NOLINTBEGIN
129 MCNAPI static ::std::string _buildTimestampedFileName(::std::string const& levelId, ::std::string const& extension);
130 // NOLINTEND
131
132public:
133 // constructor thunks
134 // NOLINTBEGIN
135 MCNAPI void* $ctor(
137 ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager> fileManager,
138 ::Editor::ProjectExportStatus exportStatus
139 );
140 // NOLINTEND
141
142public:
143 // virtual function thunks
144 // NOLINTBEGIN
145 MCNAPI ::Scripting::Result_deprecated<void> $init();
146
147 MCNAPI ::Scripting::Result_deprecated<void> $quit();
148
149 MCNAPI ::std::string_view $getServiceName() const;
150
152 ::WeakEntityRef playerRef,
153 ::Editor::GameOptions const& gameOptions,
154 ::Editor::WorldType const editorWorldType,
155 ::std::function<void(::Editor::ExportResult const&, ::std::string)> callback
156 );
157
158 MCNAPI bool $canExportProject();
159
160 MCNAPI ::Editor::ProjectExportStatus $getExportStatus();
161
162 MCNAPI ::Bedrock::PubSub::Subscription $addExportBeginTask(
163 ::std::function<void(::FileArchiver::ExportType, ::std::string const&, ::Core::Path const&)> fn
164 );
165
166 MCNAPI ::Bedrock::PubSub::Subscription $addExportCopyCompleteTask(
167 ::std::function<
168 void(::FileArchiver::ExportType, ::Core::PathBuffer<::Core::BasicStackString<char, 1024>> const&)> fn
169 );
170
171 MCNAPI ::Bedrock::PubSub::Subscription
172 $addExportLevelDataMutationTask(::std::function<void(::FileArchiver::ExportType, ::LevelData&)> fn);
173
174 MCNAPI ::Bedrock::PubSub::Subscription $addExportPreFileRemovalTask(
175 ::std::function<
176 void(::FileArchiver::ExportType, ::Core::PathBuffer<::Core::BasicStackString<char, 1024>> const&)> fn
177 );
178
179 MCNAPI ::Bedrock::PubSub::Subscription
180 $addExportLevelDataFinalizeTask(::std::function<void(::FileArchiver::ExportType, ::LevelData&)> fn);
181
182 MCNAPI ::Bedrock::PubSub::Subscription $addExportPrePackageTask(
183 ::std::function<
184 void(::FileArchiver::ExportType, ::Core::PathBuffer<::Core::BasicStackString<char, 1024>> const&)> fn
185 );
186
187 MCNAPI ::Bedrock::PubSub::Subscription $addExportCleanupTask(::std::function<void(::FileArchiver::ExportType)> fn);
188
189 MCNAPI ::std::shared_ptr<::FileArchiver::InterventionPublishers> $getInterventionPublisherTable();
190
191
192 // NOLINTEND
193};
194
195} // namespace Editor::Services
Definition Subscription.h:10
Definition BasicStackString.h:8
Definition FilePathManager.h:18
Definition PathBuffer.h:8
Definition Path.h:11
Definition GameOptions.h:22
Definition ServiceProviderCollection.h:7
MCAPI::Bedrock::PubSub::Subscription $addExportPrePackageTask(::std::function< void(::FileArchiver::ExportType, ::Core::PathBuffer<::Core::BasicStackString< char, 1024 > > const &)> fn)
MCAPI::Bedrock::PubSub::Subscription $addExportLevelDataMutationTask(::std::function< void(::FileArchiver::ExportType, ::LevelData &)> fn)
MCAPI EditorExportProjectManagerService(::Editor::ServiceProviderCollection &providers, ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager > fileManager, ::Editor::ProjectExportStatus exportStatus)
MCAPI ::Scripting::Result_deprecated< void > $init()
MCAPI void * $ctor(::Editor::ServiceProviderCollection &providers, ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager > fileManager, ::Editor::ProjectExportStatus exportStatus)
MCAPI void _onExportError(::std::function< void(::Editor::ExportResult const &, ::std::string)> callback, ::std::string message, ::Editor::ExportResult result)
MCAPI ::std::shared_ptr<::FileArchiver::InterventionPublishers > $getInterventionPublisherTable()
MCAPI::Bedrock::PubSub::Subscription $addExportCleanupTask(::std::function< void(::FileArchiver::ExportType)> fn)
MCAPI::Editor::ProjectExportStatus $getExportStatus()
MCAPI::Bedrock::PubSub::Subscription $addExportCopyCompleteTask(::std::function< void(::FileArchiver::ExportType, ::Core::PathBuffer<::Core::BasicStackString< char, 1024 > > const &)> fn)
static MCAPI ::std::string _buildTimestampedFileName(::std::string const &levelId, ::std::string const &extension)
MCAPI::Bedrock::PubSub::Subscription $addExportBeginTask(::std::function< void(::FileArchiver::ExportType, ::std::string const &, ::Core::Path const &)> fn)
MCAPI::std::string_view $getServiceName() const
MCAPI::Bedrock::PubSub::Subscription $addExportLevelDataFinalizeTask(::std::function< void(::FileArchiver::ExportType, ::LevelData &)> fn)
MCAPI ::Scripting::Result_deprecated< void > $quit()
MCAPI void _beginBackupExport(::Level *level, ::FileArchiver *fileArchiver, ::std::function< void(::Editor::ExportResult const &, ::std::string)> callback)
MCAPI::Bedrock::PubSub::Subscription $addExportPreFileRemovalTask(::std::function< void(::FileArchiver::ExportType, ::Core::PathBuffer<::Core::BasicStackString< char, 1024 > > const &)> fn)
MCAPI void $beginExportProject(::WeakEntityRef playerRef, ::Editor::GameOptions const &gameOptions, ::Editor::WorldType const editorWorldType, ::std::function< void(::Editor::ExportResult const &, ::std::string)> callback)
Definition EditorPlayerExportProjectServiceProvider.h:18
Definition EditorServerExportProjectServiceProvider.h:19
Definition IEditorService.h:11
Definition FileArchiver.h:35
Definition LevelData.h:55
Definition Level.h:254
Definition WeakEntityRef.h:14
Definition Alias.h:14