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