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; }
17// clang-format on
18
19namespace Bedrock {
20
21class CrashManagerImpl : public ::Bedrock::CrashManager {
22public:
23 // CrashManagerImpl inner types declare
24 // clang-format off
25 struct CrashProcessorInfo;
26 struct CrashedSessionInfo;
27 // clang-format on
28
29 // CrashManagerImpl inner types define
30 struct CrashProcessorInfo {
31 public:
32 // member variables
33 // NOLINTBEGIN
36 // NOLINTEND
37
38 public:
39 // prevent constructor by default
40 CrashProcessorInfo& operator=(CrashProcessorInfo const&);
41 CrashProcessorInfo(CrashProcessorInfo const&);
42 CrashProcessorInfo();
43
44 public:
45 // member functions
46 // NOLINTBEGIN
47
48 // NOLINTEND
49
50 public:
51 // destructor thunk
52 // NOLINTBEGIN
53 MCNAPI_C void $dtor();
54 // NOLINTEND
55 };
56
57 struct CrashedSessionInfo {
58 public:
59 // member variables
60 // NOLINTBEGIN
64 // NOLINTEND
65
66 public:
67 // prevent constructor by default
68 CrashedSessionInfo& operator=(CrashedSessionInfo const&);
69 CrashedSessionInfo(CrashedSessionInfo const&);
70 CrashedSessionInfo();
71
72 public:
73 // member functions
74 // NOLINTBEGIN
75
76 // NOLINTEND
77
78 public:
79 // destructor thunk
80 // NOLINTBEGIN
81 MCNAPI_C void $dtor();
82 // NOLINTEND
83 };
84
85public:
86 // member variables
87 // NOLINTBEGIN
102 // NOLINTEND
103
104public:
105 // prevent constructor by default
106 CrashManagerImpl& operator=(CrashManagerImpl const&);
107 CrashManagerImpl(CrashManagerImpl const&);
108 CrashManagerImpl();
109
110public:
111 // virtual functions
112 // NOLINTBEGIN
113#ifdef LL_PLAT_S
114 virtual ~CrashManagerImpl() /*override*/ = default;
115#else // LL_PLAT_C
116 virtual ~CrashManagerImpl() /*override*/;
117#endif
118
119 virtual void initialize(::std::string_view crashDirectoryName) /*override*/;
120
121 virtual void setCrashProcessorForFileType(
122 ::std::string_view fileExtension,
123 ::std::shared_ptr<::Bedrock::CrashFileProcessor> processor
124 ) /*override*/;
125
126 virtual void
127 setCrashTelemetryProcessor(::gsl::not_null<::Bedrock::CrashTelemetryProcessor*> processor) /*override*/;
128
129 virtual void processCrashes(
130 ::std::shared_ptr<::Bedrock::WorkerPoolHandleInterface> workerPool,
131 ::Scheduler& scheduler,
132 bool isNetworkAvailable
133 ) /*override*/;
134
135 virtual void notifyCrashed() /*override*/;
136
137 virtual void notifySystemError(uint errorCode, ::std::string const& errorMessage) /*override*/;
138
139 virtual void recordCrashedSession(
140 ::std::string_view sessionId,
141 ::std::string_view serializedSession,
142 int64 crashTime
143 ) /*override*/;
144
145 virtual void stopProcessingCrashes() /*override*/;
146
147 virtual bool isCrashProcessingActive() const /*override*/;
148
149 virtual ::std::string const& getCrashDataRoot() const /*override*/;
150
151 virtual ::std::string const& getCrashedSessionFileSuffix() const /*override*/;
152 // NOLINTEND
153
154public:
155 // member functions
156 // NOLINTBEGIN
157 MCNAPI_C void _doNetworkUnavailableCleanup();
158
159 MCNAPI_C ::std::shared_ptr<::Bedrock::SessionInfo> _findCrashedSessionInfo(::std::string_view sessionId) const;
160
161 MCNAPI_C void _finishSendingTelemetry();
162
163 MCNAPI_C void _notifyDoneWithSession(::std::string_view sessionId);
164
165 MCNAPI_C void _preProcessSessions();
166
167 MCNAPI_C void _processCrashesAsync(
168 ::std::vector<::Core::PathBuffer<::std::string>> const& paths,
169 ::Bedrock::CrashFileProcessor* processor,
170 ::std::shared_ptr<::gsl::final_action<::std::function<void()>>> doneTask
171 );
172
173 MCNAPI_C void _processCrashesSync(
174 ::std::vector<::Core::PathBuffer<::std::string>> const& paths,
175 ::Bedrock::CrashFileProcessor* processor,
176 ::std::shared_ptr<::gsl::final_action<::std::function<void()>>> doneTask
177 );
178
179 MCNAPI_C ::Bedrock::Threading::Async<bool>
180 _processOneCrash(::Core::PathBuffer<::std::string> const& filePath, ::Bedrock::CrashFileProcessor* processor);
181
182 MCNAPI_C void _queueTask(::std::string_view name, ::std::function<void()>&& task);
183
184 MCNAPI_C void _resetProcessingState();
185
186 MCNAPI_C void _scanCrashFiles();
187 // NOLINTEND
188
189public:
190 // constructor thunks
191 // NOLINTBEGIN
192 MCNAPI_C void* $ctor();
193 // NOLINTEND
194
195public:
196 // destructor thunk
197 // NOLINTBEGIN
198 MCNAPI void $dtor();
199 // NOLINTEND
200
201public:
202 // virtual function thunks
203 // NOLINTBEGIN
204#ifdef LL_PLAT_C
205 MCNAPI void $initialize(::std::string_view crashDirectoryName);
206
207 MCNAPI void $setCrashProcessorForFileType(
208 ::std::string_view fileExtension,
209 ::std::shared_ptr<::Bedrock::CrashFileProcessor> processor
210 );
211
212 MCNAPI void $setCrashTelemetryProcessor(::gsl::not_null<::Bedrock::CrashTelemetryProcessor*> processor);
213
214 MCNAPI void $processCrashes(
215 ::std::shared_ptr<::Bedrock::WorkerPoolHandleInterface> workerPool,
216 ::Scheduler& scheduler,
217 bool isNetworkAvailable
218 );
219
220 MCNAPI void $notifyCrashed();
221
222 MCNAPI void $notifySystemError(uint errorCode, ::std::string const& errorMessage);
223
224 MCNAPI void
225 $recordCrashedSession(::std::string_view sessionId, ::std::string_view serializedSession, int64 crashTime);
226
227 MCNAPI void $stopProcessingCrashes();
228
229 MCNAPI bool $isCrashProcessingActive() const;
230
231 MCNAPI ::std::string const& $getCrashDataRoot() const;
232
233 MCNAPI ::std::string const& $getCrashedSessionFileSuffix() const;
234#endif
235
236
237 // NOLINTEND
238
239public:
240 // vftables
241 // NOLINTBEGIN
242 MCNAPI static void** $vftableForImplBase();
243
245 // NOLINTEND
246};
247
248} // namespace Bedrock
Definition CrashFileProcessor.h:18
static MCAPI void ** $vftableForEnableNonOwnerReferences()
static MCAPI void ** $vftableForImplBase()
Definition CrashManager.h:18
Definition CrashTelemetryProcessor.h:13
Definition SessionInfo.h:7
Definition WorkerPoolHandleInterface.h:15
Definition Scheduler.h:14
STL namespace.
Definition CrashManagerImpl.h:30
Definition CrashManagerImpl.h:57
Definition Alias.h:14