LeviLamina
Loading...
Searching...
No Matches
DedicatedServer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/IMinecraftApp.h"
7#include "mc/common/SubClientId.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9#include "mc/deps/core/utility/ScopeExit.h"
10#include "mc/deps/core/utility/ServiceRegistrationToken.h"
11#include "mc/deps/core/utility/UniqueOwnerPointer.h"
12#include "mc/network/PacketGroupDefinition.h"
13#include "mc/server/ServerExitCode.h"
14
15// auto generated forward declare list
16// clang-format off
17class AllowListFile;
18class AppConfigs;
19class CDNConfig;
21class EditorAllowList;
23class FileArchiver;
24class IEDUSystems;
26class LevelDbEnv;
27class LevelSettings;
28class Minecraft;
29class PermissionsFile;
36class TestConfig;
37struct ImguiProfiler;
39namespace Automation { class AutomationClient; }
40namespace Bedrock { class ActivationArguments; }
41namespace Bedrock::Http { class DispatcherInterface; }
42namespace Bedrock::Http { class DispatcherProcess; }
43namespace Bedrock::Services { class AuthHelper; }
44namespace Bedrock::Services { class DiscoveryHelper; }
45namespace CodeBuilder { class IManager; }
46namespace Core { class FilePathManager; }
47namespace Core { class FileSystem; }
48// clang-format on
49
50class DedicatedServer : public ::IMinecraftApp {
51public:
52 // member variables
53 // NOLINTBEGIN
54 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::Minecraft>> mMinecraft;
55 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::Core::FileSystem>> mFileSystem;
56 ::ll::TypedStorage<8, 16, ::Bedrock::UniqueOwnerPointer<::ServerInstanceEventCoordinator>>
57 mServerInstanceEventCoordinator;
58 ::ll::TypedStorage<1, 1, ::std::atomic<bool>> mWantsToQuit;
59 ::ll::TypedStorage<4, 4, ::std::atomic<::ServerExitCode>> mResult;
60 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ConsoleInputReader>> mConsoleInputReader;
61 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IGameModuleShared>> mGameModule;
62 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::AppConfigs>> mAppConfig;
63 ::ll::TypedStorage<8, 8, ::ServiceRegistrationToken<::AppConfigs>> mAppConfigServiceRegistrationToken;
64 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::Bedrock::Http::DispatcherProcess>> mHttpDispatcher;
65 ::ll::TypedStorage<8, 8, ::ServiceRegistrationToken<::Bedrock::Http::DispatcherInterface>>
66 mHttpDispatcherServiceRegistrationToken;
67 ::ll::TypedStorage<8, 32, ::std::string> mSessionID;
68 ::ll::TypedStorage<8, 32, ::std::string> mPackOptimizerConfigPath;
69 ::ll::TypedStorage<8, 64, ::Bedrock::ScopeExit> mOnDestructioncloseAndResetAllLogs;
70 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::LevelDbEnv>> mLevelDbEnv;
71 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CodeBuilder::IManager>> mCodeBuilder;
72 ::ll::TypedStorage<8, 8, ::ServiceRegistrationToken<::CodeBuilder::IManager>> mCodeBuilderRegistrationToken;
73 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ImguiProfiler>> mImguiProfiler;
74 ::ll::TypedStorage<8, 8, ::ServiceRegistrationToken<::ImguiProfiler>> mImguiProfilerRegistrationToken;
75 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ProfilingConfigManager>> mProfilingConfigManager;
76 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::FileArchiver>> mFileArchiver;
77 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::EditorBootstrapper>> mEditorBootstrapper;
78 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CDNConfig>> mCDNConfig;
79 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ServerTextSettings>> mServerTextSettings;
80 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::SignalingService>> mSignalingService;
81 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::SignalingServiceSignInJob>> mSignalingServiceSignInJob;
82 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::Bedrock::Services::DiscoveryHelper>> mDiscoveryServiceHelper;
83 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::Bedrock::Services::AuthHelper>> mAuthServiceHelper;
84 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IEDUSystems>> mEduSystems;
85 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ScriptDedicatedServerUtils>> mScriptDedicatedServerUtils;
86 // NOLINTEND
87
88public:
89 // virtual functions
90 // NOLINTBEGIN
91 virtual ~DedicatedServer() /*override*/;
92
93 virtual ::Bedrock::NotNullNonOwnerPtr<::FileArchiver> getFileArchiver() const /*override*/;
94
95 virtual ::Bedrock::NotNullNonOwnerPtr<::Minecraft> getPrimaryMinecraft() /*override*/;
96
97 virtual ::Bedrock::NotNullNonOwnerPtr<::Automation::AutomationClient> getAutomationClient() const /*override*/;
98
99 virtual bool isEduMode() const /*override*/;
100
101 virtual bool isDedicatedServer() const /*override*/;
102
103 virtual void onNetworkMaxPlayersChanged(uint newMaxPlayerCount) /*override*/;
104
105 virtual ::IGameModuleShared& getGameModuleShared() /*override*/;
106
107 virtual void requestServerShutdown() /*override*/;
108
109 virtual bool requestInGamePause(::SubClientId const&, bool) /*override*/;
110 // NOLINTEND
111
112public:
113 // member functions
114 // NOLINTBEGIN
115 MCAPI DedicatedServer();
116
117 MCAPI void _runPackOptimizerIfRequested();
118
119 MCAPI ::ServerExitCode runDedicatedServerLoop(
120 ::Core::FilePathManager& filePathManager,
121 ::PropertiesSettings const& properties,
122 ::LevelSettings& settings,
123 ::AllowListFile& userAllowList,
124 ::EditorAllowList& userEditorAllowList,
125 ::std::unique_ptr<::PermissionsFile>& permissionsFile,
126 ::std::optional<::PacketGroupDefinition::PacketGroupBuilder> packetGroupBuilder,
128 ::TestConfig& testConfig
129 );
130
131 MCAPI ::ServerExitCode start(::std::string const& sessionID, ::Bedrock::ActivationArguments const& args);
132
133 MCAPI bool stop();
134 // NOLINTEND
135
136public:
137 // constructor thunks
138 // NOLINTBEGIN
139 MCAPI void* $ctor();
140 // NOLINTEND
141
142public:
143 // destructor thunk
144 // NOLINTBEGIN
145 MCAPI void $dtor();
146 // NOLINTEND
147
148public:
149 // virtual function thunks
150 // NOLINTBEGIN
151 MCAPI ::Bedrock::NotNullNonOwnerPtr<::FileArchiver> $getFileArchiver() const;
152
153 MCAPI ::Bedrock::NotNullNonOwnerPtr<::Minecraft> $getPrimaryMinecraft();
154
155 MCAPI ::Bedrock::NotNullNonOwnerPtr<::Automation::AutomationClient> $getAutomationClient() const;
156
157 MCAPI bool $isEduMode() const;
158
159 MCFOLD bool $isDedicatedServer() const;
160
161 MCFOLD void $onNetworkMaxPlayersChanged(uint newMaxPlayerCount);
162
163 MCFOLD ::IGameModuleShared& $getGameModuleShared();
164
165 MCAPI void $requestServerShutdown();
166
167 MCFOLD bool $requestInGamePause(::SubClientId const&, bool);
168 // NOLINTEND
169};
Definition AllowListFile.h:13
Definition AppConfigs.h:25
Definition AutomationClient.h:26
Definition ActivationArguments.h:7
Definition DispatcherInterface.h:17
Definition DispatcherProcess.h:11
Definition CDNConfig.h:9
Definition IManager.h:17
Definition ConsoleInputReader.h:8
Definition FilePathManager.h:18
Definition FileSystem.h:28
Definition EditorAllowList.h:10
Definition EditorBootstrapper.h:15
Definition FileArchiver.h:35
Definition IEDUSystems.h:14
Definition IGameModuleShared.h:15
Definition IMinecraftApp.h:19
Definition LevelDbEnv.h:8
Definition LevelSettings.h:38
Definition Minecraft.h:59
Definition PermissionsFile.h:20
Definition ProfilingConfigManager.h:14
Definition ScriptDedicatedServerUtils.h:21
Definition ServerInstanceEventCoordinator.h:14
Definition ServerTextSettings.h:8
Definition SignalingServiceSignInJob.h:22
Definition SignalingService.h:37
Definition TestConfig.h:5
Definition ImguiProfiler.h:10
Definition PropertiesSettings.h:29