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/islands/AppIsland.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10
11// auto generated forward declare list
12// clang-format off
13class AllowListFile;
14class FileArchiver;
17class LevelSettings;
18class Minecraft;
19class PermissionsFile;
21class TestConfig;
22namespace Automation { class AutomationClient; }
23namespace Bedrock { class ActivationArguments; }
24namespace Core { class FilePathManager; }
25// clang-format on
26
28public:
29 // DedicatedServer inner types define
30 enum class StartResult : int {
31 Success = 0,
32 PortOccupied = 1,
33 InvalidSettings = 2,
34 MissingDependency = 3,
35 RuntimeError = 4,
36 };
37
38public:
39 // member variables
40 // NOLINTBEGIN
67 // NOLINTEND
68
69public:
70 // prevent constructor by default
71 DedicatedServer& operator=(DedicatedServer const&);
73
74public:
75 // virtual functions
76 // NOLINTBEGIN
77 // vIndex: 0
78 virtual ~DedicatedServer() /*override*/;
79
80 // vIndex: 5
81 virtual bool stop() /*override*/;
82
83 // vIndex: 8
84 virtual ::Bedrock::NotNullNonOwnerPtr<::FileArchiver> getFileArchiver() const /*override*/;
85
86 // vIndex: 1
87 virtual ::Bedrock::NotNullNonOwnerPtr<::Minecraft> getPrimaryMinecraft() /*override*/;
88
89 // vIndex: 2
90 virtual ::Bedrock::NotNullNonOwnerPtr<::Automation::AutomationClient> getAutomationClient() const /*override*/;
91
92 // vIndex: 3
93 virtual bool isEduMode() const /*override*/;
94
95 // vIndex: 4
96 virtual bool isDedicatedServer() const /*override*/;
97
98 // vIndex: 5
99 virtual void onNetworkMaxPlayersChanged(uint newMaxPlayerCount) /*override*/;
100
101 // vIndex: 6
102 virtual ::IGameModuleShared& getGameModuleShared() /*override*/;
103
104 // vIndex: 7
105 virtual void requestServerShutdown(::std::string const&) /*override*/;
106
107 // vIndex: 9
108 virtual bool requestInGamePause(::SubClientId const&, bool) /*override*/;
109 // NOLINTEND
110
111public:
112 // member functions
113 // NOLINTBEGIN
114 MCAPI DedicatedServer();
115
116 MCAPI void initializeAppConfigs();
117
118 MCAPI void initializeCodeBuilder();
119
120 MCAPI void initializeHttp(::PropertiesSettings const& properties);
121
122 MCAPI void initializeImguiProfiler();
123
124 MCAPI void initializeLogging(::TestConfig& testConfig);
125
126 MCAPI void initializeServices(
127 ::Bedrock::NotNullNonOwnerPtr<::IMinecraftEventing> minecraftEventing,
128 ::PropertiesSettings& properties
129 );
130
131 MCAPI ::DedicatedServer::StartResult runDedicatedServerLoop(
132 ::Core::FilePathManager& filePathManager,
133 ::PropertiesSettings& properties,
134 ::LevelSettings& settings,
135 ::AllowListFile& userAllowList,
136 ::std::unique_ptr<::PermissionsFile>& permissionsFile,
138 ::TestConfig& testConfig
139 );
140
141 MCAPI void shutdownServices();
142
143 MCAPI ::DedicatedServer::StartResult
144 start(::std::string const& sessionID, ::Bedrock::ActivationArguments const& args);
145 // NOLINTEND
146
147public:
148 // constructor thunks
149 // NOLINTBEGIN
150 MCAPI void* $ctor();
151 // NOLINTEND
152
153public:
154 // destructor thunk
155 // NOLINTBEGIN
156 MCAPI void $dtor();
157 // NOLINTEND
158
159public:
160 // virtual function thunks
161 // NOLINTBEGIN
162 MCAPI bool $stop();
163
164 MCAPI ::Bedrock::NotNullNonOwnerPtr<::FileArchiver> $getFileArchiver() const;
165
166 MCAPI ::Bedrock::NotNullNonOwnerPtr<::Minecraft> $getPrimaryMinecraft();
167
168 MCAPI ::Bedrock::NotNullNonOwnerPtr<::Automation::AutomationClient> $getAutomationClient() const;
169
170 MCAPI bool $isEduMode() const;
171
172 MCFOLD bool $isDedicatedServer() const;
173
174 MCFOLD void $onNetworkMaxPlayersChanged(uint newMaxPlayerCount);
175
176 MCFOLD ::IGameModuleShared& $getGameModuleShared();
177
178 MCAPI void $requestServerShutdown(::std::string const&);
179
180 MCFOLD bool $requestInGamePause(::SubClientId const&, bool);
181 // NOLINTEND
182
183public:
184 // vftables
185 // NOLINTBEGIN
186 MCNAPI static void** $vftableForAppIsland();
187
188 MCNAPI static void** $vftableForIMinecraftApp();
189 // NOLINTEND
190};
Definition AllowListFile.h:13
Definition ActivationArguments.h:7
Definition AppIsland.h:15
Definition FilePathManager.h:18
Definition DedicatedServer.h:27
static MCAPI void ** $vftableForIMinecraftApp()
static MCAPI void ** $vftableForAppIsland()
Definition FileArchiver.h:32
Definition IGameModuleShared.h:12
Definition IMinecraftApp.h:17
Definition IMinecraftEventing.h:144
Definition LevelSettings.h:37
Definition Minecraft.h:54
Definition PermissionsFile.h:17
Definition PropertiesSettings.h:27
Definition TestConfig.h:5
Definition Alias.h:14