LeviLamina
Loading...
Searching...
No Matches
CrashManagerImpl.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/application/crash_manager/CrashManager.h"
7#include "mc/deps/core/file/PathBuffer.h"
8#include "mc/deps/core/threading/Async.h"
9
10// auto generated forward declare list
11// clang-format off
12class Scheduler;
13namespace Bedrock { class CrashFileProcessor; }
14namespace Bedrock { class CrashTelemetryProcessor; }
15namespace Bedrock { class SessionInfo; }
16namespace Bedrock { class WorkerPoolHandleInterface; }
17namespace Bedrock { struct CrashManagerConfig; }
18// clang-format on
19
20namespace Bedrock {
21
22class CrashManagerImpl : public ::Bedrock::CrashManager {
23public:
24 // CrashManagerImpl inner types declare
25 // clang-format off
26 struct CrashProcessorInfo;
27 struct CrashedSessionInfo;
28 // clang-format on
29
30 // CrashManagerImpl inner types define
31 struct CrashProcessorInfo {
32 public:
33 // member variables
34 // NOLINTBEGIN
37 // NOLINTEND
38
39 public:
40 // prevent constructor by default
41 CrashProcessorInfo& operator=(CrashProcessorInfo const&);
42 CrashProcessorInfo(CrashProcessorInfo const&);
43 CrashProcessorInfo();
44
45 public:
46 // member functions
47 // NOLINTBEGIN
48#ifdef LL_PLAT_C
49 MCNAPI ~CrashProcessorInfo();
50#endif
51 // NOLINTEND
52
53 public:
54 // destructor thunk
55 // NOLINTBEGIN
56#ifdef LL_PLAT_C
57 MCNAPI void $dtor();
58#endif
59 // NOLINTEND
60 };
61
62 struct CrashedSessionInfo {
63 public:
64 // member variables
65 // NOLINTBEGIN
69 // NOLINTEND
70
71 public:
72 // prevent constructor by default
73 CrashedSessionInfo& operator=(CrashedSessionInfo const&);
74 CrashedSessionInfo(CrashedSessionInfo const&);
75 CrashedSessionInfo();
76
77 public:
78 // member functions
79 // NOLINTBEGIN
80#ifdef LL_PLAT_C
81 MCNAPI ~CrashedSessionInfo();
82#endif
83 // NOLINTEND
84
85 public:
86 // destructor thunk
87 // NOLINTBEGIN
88#ifdef LL_PLAT_C
89 MCNAPI void $dtor();
90#endif
91 // NOLINTEND
92 };
93
94public:
95 // member variables
96 // NOLINTBEGIN
113 // NOLINTEND
114
115#ifdef LL_PLAT_S
116public:
117 // prevent constructor by default
118 CrashManagerImpl& operator=(CrashManagerImpl const&);
119 CrashManagerImpl(CrashManagerImpl const&);
120 CrashManagerImpl();
121
122#else // LL_PLAT_C
123public:
124 // prevent constructor by default
125 CrashManagerImpl& operator=(CrashManagerImpl const&);
126 CrashManagerImpl(CrashManagerImpl const&);
127
128#endif
129public:
130 // virtual functions
131 // NOLINTBEGIN
132#ifdef LL_PLAT_S
133 virtual ~CrashManagerImpl() /*override*/ = default;
134#else // LL_PLAT_C
135 virtual ~CrashManagerImpl() /*override*/;
136#endif
137
138#ifdef LL_PLAT_S
139 virtual void initialize(::Bedrock::CrashManagerConfig const&) /*override*/;
140#else // LL_PLAT_C
141 virtual void initialize(::Bedrock::CrashManagerConfig const& config) /*override*/;
142#endif
143
144#ifdef LL_PLAT_S
145 virtual void
146 setCrashProcessorForFileType(::std::string_view, ::std::shared_ptr<::Bedrock::CrashFileProcessor>) /*override*/;
147#else // LL_PLAT_C
148 virtual void setCrashProcessorForFileType(
149 ::std::string_view fileExtension,
150 ::std::shared_ptr<::Bedrock::CrashFileProcessor> processor
151 ) /*override*/;
152#endif
153
154#ifdef LL_PLAT_S
155 virtual void setCrashTelemetryProcessor(::gsl::not_null<::Bedrock::CrashTelemetryProcessor*>) /*override*/;
156#else // LL_PLAT_C
157 virtual void
158 setCrashTelemetryProcessor(::gsl::not_null<::Bedrock::CrashTelemetryProcessor*> processor) /*override*/;
159#endif
160
161#ifdef LL_PLAT_S
162 virtual void
163 processCrashes(::std::shared_ptr<::Bedrock::WorkerPoolHandleInterface>, ::Scheduler&, bool) /*override*/;
164#else // LL_PLAT_C
165 virtual void processCrashes(
166 ::std::shared_ptr<::Bedrock::WorkerPoolHandleInterface> workerPool,
167 ::Scheduler& scheduler,
168 bool isNetworkAvailable
169 ) /*override*/;
170#endif
171
172 virtual void notifyCrashed() /*override*/;
173
174#ifdef LL_PLAT_S
175 virtual void notifySystemError(uint, ::std::string const&) /*override*/;
176#else // LL_PLAT_C
177 virtual void notifySystemError(uint errorCode, ::std::string const& errorMessage) /*override*/;
178#endif
179
180#ifdef LL_PLAT_S
181 virtual void recordCrashedSession(::std::string_view, ::std::string_view, int64) /*override*/;
182#else // LL_PLAT_C
183 virtual void recordCrashedSession(
184 ::std::string_view sessionId,
185 ::std::string_view serializedSession,
186 int64 crashTime
187 ) /*override*/;
188#endif
189
190 virtual void stopProcessingCrashes() /*override*/;
191
192 virtual bool isCrashProcessingActive() const /*override*/;
193
194 virtual ::std::string const& getCrashDataRoot() const /*override*/;
195
196 virtual ::std::string const& getCrashedSessionFileSuffix() const /*override*/;
197 // NOLINTEND
198
199public:
200 // member functions
201 // NOLINTBEGIN
202#ifdef LL_PLAT_C
203 MCNAPI CrashManagerImpl();
204
205 MCNAPI void _doNetworkUnavailableCleanup();
206
207 MCNAPI ::std::shared_ptr<::Bedrock::SessionInfo> _findCrashedSessionInfo(::std::string_view sessionId) const;
208
209 MCNAPI void _finishSendingTelemetry();
210
211 MCNAPI void _notifyDoneWithSession(::std::string_view sessionId);
212
213 MCNAPI void _preProcessSessions();
214
215 MCNAPI void _processCrashesAsync(
216 ::std::vector<::Core::PathBuffer<::std::string>> const& paths,
218 ::std::shared_ptr<::gsl::final_action<::std::function<void()>>> doneTask
219 );
220
221 MCNAPI void _processCrashesSync(
222 ::std::vector<::Core::PathBuffer<::std::string>> const& paths,
224 ::std::shared_ptr<::gsl::final_action<::std::function<void()>>> doneTask
225 );
226
227 MCNAPI ::Bedrock::Threading::Async<bool>
228 _processOneCrash(::Core::PathBuffer<::std::string> const& filePath, ::Bedrock::CrashFileProcessor* processor);
229
230 MCNAPI void _queueTask(::std::string_view name, ::std::function<void()>&& task);
231
232 MCNAPI void _resetProcessingState();
233
234 MCNAPI void _scanCrashFiles();
235#endif
236 // NOLINTEND
237
238public:
239 // constructor thunks
240 // NOLINTBEGIN
241#ifdef LL_PLAT_C
242 MCNAPI void* $ctor();
243#endif
244 // NOLINTEND
245
246public:
247 // destructor thunk
248 // NOLINTBEGIN
249 MCNAPI void $dtor();
250 // NOLINTEND
251
252public:
253 // virtual function thunks
254 // NOLINTBEGIN
255#ifdef LL_PLAT_C
256 MCNAPI void $initialize(::Bedrock::CrashManagerConfig const& config);
257
258 MCNAPI void $setCrashProcessorForFileType(
259 ::std::string_view fileExtension,
260 ::std::shared_ptr<::Bedrock::CrashFileProcessor> processor
261 );
262
263 MCNAPI void $setCrashTelemetryProcessor(::gsl::not_null<::Bedrock::CrashTelemetryProcessor*> processor);
264
265 MCNAPI void $processCrashes(
266 ::std::shared_ptr<::Bedrock::WorkerPoolHandleInterface> workerPool,
267 ::Scheduler& scheduler,
268 bool isNetworkAvailable
269 );
270
271 MCNAPI void $notifyCrashed();
272
273 MCNAPI void $notifySystemError(uint errorCode, ::std::string const& errorMessage);
274
275 MCNAPI void
276 $recordCrashedSession(::std::string_view sessionId, ::std::string_view serializedSession, int64 crashTime);
277
278 MCNAPI void $stopProcessingCrashes();
279
280 MCNAPI bool $isCrashProcessingActive() const;
281
282 MCNAPI ::std::string const& $getCrashDataRoot() const;
283
284 MCNAPI ::std::string const& $getCrashedSessionFileSuffix() const;
285#endif
286
287
288 // NOLINTEND
289
290public:
291 // vftables
292 // NOLINTBEGIN
293 MCNAPI static void** $vftableForImplBase();
294
296 // NOLINTEND
297};
298
299} // namespace Bedrock
Definition CrashFileProcessor.h:18
static MCAPI void ** $vftableForEnableNonOwnerReferences()
static MCAPI void ** $vftableForImplBase()
Definition CrashManager.h:19
Definition CrashTelemetryProcessor.h:13
Definition SessionInfo.h:7
Definition WorkerPoolHandleInterface.h:15
Definition PathBuffer.h:8
Definition Scheduler.h:15
STL namespace.
Definition CrashManagerConfig.h:7
Definition CrashManagerImpl.h:31
Definition CrashManagerImpl.h:62
Definition Alias.h:14