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
65 // NOLINTEND
66
67public:
68 // prevent constructor by default
69 DedicatedServer& operator=(DedicatedServer const&);
71
72public:
73 // virtual functions
74 // NOLINTBEGIN
75 // vIndex: 0
76 virtual ~DedicatedServer() /*override*/;
77
78 // vIndex: 5
79 virtual bool stop() /*override*/;
80
81 // vIndex: 8
82 virtual ::Bedrock::NotNullNonOwnerPtr<::FileArchiver> getFileArchiver() const /*override*/;
83
84 // vIndex: 1
85 virtual ::Bedrock::NotNullNonOwnerPtr<::Minecraft> getPrimaryMinecraft() /*override*/;
86
87 // vIndex: 2
88 virtual ::Bedrock::NotNullNonOwnerPtr<::Automation::AutomationClient> getAutomationClient() const /*override*/;
89
90 // vIndex: 3
91 virtual bool isEduMode() const /*override*/;
92
93 // vIndex: 4
94 virtual bool isDedicatedServer() const /*override*/;
95
96 // vIndex: 5
97 virtual void onNetworkMaxPlayersChanged(uint newMaxPlayerCount) /*override*/;
98
99 // vIndex: 6
100 virtual ::IGameModuleShared& getGameModuleShared() /*override*/;
101
102 // vIndex: 7
103 virtual void requestServerShutdown(::std::string const&) /*override*/;
104
105 // vIndex: 9
106 virtual bool requestInGamePause(::SubClientId const&, bool) /*override*/;
107 // NOLINTEND
108
109public:
110 // member functions
111 // NOLINTBEGIN
112 MCAPI DedicatedServer();
113
114 MCAPI void initializeAppConfigs();
115
116 MCAPI void initializeCodeBuilder();
117
118 MCAPI void initializeHttp(::PropertiesSettings const& properties);
119
120 MCAPI void initializeImguiProfiler();
121
122 MCAPI void initializeLogging(::TestConfig& testConfig);
123
124 MCAPI void initializeServices(
125 ::Bedrock::NotNullNonOwnerPtr<::IMinecraftEventing> minecraftEventing,
126 ::PropertiesSettings& properties
127 );
128
129 MCAPI ::DedicatedServer::StartResult runDedicatedServerLoop(
130 ::Core::FilePathManager& filePathManager,
131 ::PropertiesSettings& properties,
132 ::LevelSettings& settings,
133 ::AllowListFile& userAllowList,
134 ::std::unique_ptr<::PermissionsFile>& permissionsFile,
136 ::TestConfig& testConfig
137 );
138
139 MCAPI void shutdownServices();
140
141 MCAPI ::DedicatedServer::StartResult
142 start(::std::string const& sessionID, ::Bedrock::ActivationArguments const& args);
143 // NOLINTEND
144
145public:
146 // constructor thunks
147 // NOLINTBEGIN
148 MCAPI void* $ctor();
149 // NOLINTEND
150
151public:
152 // destructor thunk
153 // NOLINTBEGIN
154 MCAPI void $dtor();
155 // NOLINTEND
156
157public:
158 // virtual function thunks
159 // NOLINTBEGIN
160 MCAPI bool $stop();
161
162 MCAPI ::Bedrock::NotNullNonOwnerPtr<::FileArchiver> $getFileArchiver() const;
163
164 MCAPI ::Bedrock::NotNullNonOwnerPtr<::Minecraft> $getPrimaryMinecraft();
165
166 MCAPI ::Bedrock::NotNullNonOwnerPtr<::Automation::AutomationClient> $getAutomationClient() const;
167
168 MCAPI bool $isEduMode() const;
169
170 MCFOLD bool $isDedicatedServer() const;
171
172 MCFOLD void $onNetworkMaxPlayersChanged(uint newMaxPlayerCount);
173
174 MCFOLD ::IGameModuleShared& $getGameModuleShared();
175
176 MCAPI void $requestServerShutdown(::std::string const&);
177
178 MCFOLD bool $requestInGamePause(::SubClientId const&, bool);
179 // NOLINTEND
180
181public:
182 // vftables
183 // NOLINTBEGIN
184 MCNAPI static void** $vftableForAppIsland();
185
186 MCNAPI static void** $vftableForIMinecraftApp();
187 // NOLINTEND
188};
Definition AllowListFile.h:13
Definition ActivationArguments.h:7
Definition AppIsland.h:15
Definition FilePathManager.h:12
Definition DedicatedServer.h:27
static MCAPI void ** $vftableForIMinecraftApp()
static MCAPI void ** $vftableForAppIsland()
Definition FileArchiver.h:27
Definition IGameModuleShared.h:12
Definition IMinecraftApp.h:17
Definition IMinecraftEventing.h:145
Definition LevelSettings.h:37
Definition Minecraft.h:55
Definition PermissionsFile.h:17
Definition PropertiesSettings.h:27
Definition TestConfig.h:5
Definition Alias.h:14