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 virtual void initialize(::Bedrock::CrashManagerConfig const& config) /*override*/;
139
140 virtual void setCrashProcessorForFileType(
141 ::std::string_view fileExtension,
142 ::std::shared_ptr<::Bedrock::CrashFileProcessor> processor
143 ) /*override*/;
144
145 virtual void
146 setCrashTelemetryProcessor(::gsl::not_null<::Bedrock::CrashTelemetryProcessor*> processor) /*override*/;
147
148 virtual void processCrashes(
149 ::std::shared_ptr<::Bedrock::WorkerPoolHandleInterface> workerPool,
150 ::Scheduler& scheduler,
151 bool isNetworkAvailable
152 ) /*override*/;
153
154 virtual void notifyCrashed() /*override*/;
155
156 virtual void notifySystemError(uint errorCode, ::std::string const& errorMessage) /*override*/;
157
158 virtual void recordCrashedSession(
159 ::std::string_view sessionId,
160 ::std::string_view serializedSession,
161 int64 crashTime
162 ) /*override*/;
163
164 virtual void stopProcessingCrashes() /*override*/;
165
166 virtual bool isCrashProcessingActive() const /*override*/;
167
168 virtual ::std::string const& getCrashDataRoot() const /*override*/;
169
170 virtual ::std::string const& getCrashedSessionFileSuffix() const /*override*/;
171 // NOLINTEND
172
173public:
174 // member functions
175 // NOLINTBEGIN
176#ifdef LL_PLAT_C
177 MCNAPI CrashManagerImpl();
178
179 MCNAPI void _doNetworkUnavailableCleanup();
180
181 MCNAPI ::std::shared_ptr<::Bedrock::SessionInfo> _findCrashedSessionInfo(::std::string_view sessionId) const;
182
183 MCNAPI void _finishSendingTelemetry();
184
185 MCNAPI void _notifyDoneWithSession(::std::string_view sessionId);
186
187 MCNAPI void _preProcessSessions();
188
189 MCNAPI void _processCrashesAsync(
190 ::std::vector<::Core::PathBuffer<::std::string>> const& paths,
192 ::std::shared_ptr<::gsl::final_action<::std::function<void()>>> doneTask
193 );
194
195 MCNAPI void _processCrashesSync(
196 ::std::vector<::Core::PathBuffer<::std::string>> const& paths,
198 ::std::shared_ptr<::gsl::final_action<::std::function<void()>>> doneTask
199 );
200
201 MCNAPI ::Bedrock::Threading::Async<bool>
202 _processOneCrash(::Core::PathBuffer<::std::string> const& filePath, ::Bedrock::CrashFileProcessor* processor);
203
204 MCNAPI void _queueTask(::std::string_view name, ::std::function<void()>&& task);
205
206 MCNAPI void _resetProcessingState();
207
208 MCNAPI void _scanCrashFiles();
209#endif
210 // NOLINTEND
211
212public:
213 // constructor thunks
214 // NOLINTBEGIN
215#ifdef LL_PLAT_C
216 MCNAPI void* $ctor();
217#endif
218 // NOLINTEND
219
220public:
221 // destructor thunk
222 // NOLINTBEGIN
223 MCNAPI void $dtor();
224 // NOLINTEND
225
226public:
227 // virtual function thunks
228 // NOLINTBEGIN
229#ifdef LL_PLAT_C
230 MCNAPI void $initialize(::Bedrock::CrashManagerConfig const& config);
231
232 MCNAPI void $setCrashProcessorForFileType(
233 ::std::string_view fileExtension,
234 ::std::shared_ptr<::Bedrock::CrashFileProcessor> processor
235 );
236
237 MCNAPI void $setCrashTelemetryProcessor(::gsl::not_null<::Bedrock::CrashTelemetryProcessor*> processor);
238
239 MCNAPI void $processCrashes(
240 ::std::shared_ptr<::Bedrock::WorkerPoolHandleInterface> workerPool,
241 ::Scheduler& scheduler,
242 bool isNetworkAvailable
243 );
244
245 MCNAPI void $notifyCrashed();
246
247 MCNAPI void $notifySystemError(uint errorCode, ::std::string const& errorMessage);
248
249 MCNAPI void
250 $recordCrashedSession(::std::string_view sessionId, ::std::string_view serializedSession, int64 crashTime);
251
252 MCNAPI void $stopProcessingCrashes();
253
254 MCNAPI bool $isCrashProcessingActive() const;
255
256 MCNAPI ::std::string const& $getCrashDataRoot() const;
257
258 MCNAPI ::std::string const& $getCrashedSessionFileSuffix() const;
259#endif
260
261
262 // NOLINTEND
263
264public:
265 // vftables
266 // NOLINTBEGIN
267 MCNAPI static void** $vftableForImplBase();
268
270 // NOLINTEND
271};
272
273} // 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:14
STL namespace.
Definition CrashManagerConfig.h:7
Definition CrashManagerImpl.h:31
Definition CrashManagerImpl.h:62
Definition Alias.h:14