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 WorkerPoolHandleInterface; }
16namespace Bedrock { struct CrashManagerConfig; }
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
45 struct CrashedSessionInfo {
46 public:
47 // member variables
48 // NOLINTBEGIN
52 // NOLINTEND
53
54 public:
55 // prevent constructor by default
56 CrashedSessionInfo& operator=(CrashedSessionInfo const&);
57 CrashedSessionInfo(CrashedSessionInfo const&);
58 CrashedSessionInfo();
59 };
60
61public:
62 // member variables
63 // NOLINTBEGIN
80 // NOLINTEND
81
82public:
83 // prevent constructor by default
84 CrashManagerImpl& operator=(CrashManagerImpl const&);
85 CrashManagerImpl(CrashManagerImpl const&);
86 CrashManagerImpl();
87
88public:
89 // virtual functions
90 // NOLINTBEGIN
91 virtual ~CrashManagerImpl() /*override*/ = default;
92
93 virtual void initialize(::Bedrock::CrashManagerConfig const& config) /*override*/;
94
95 virtual void setCrashProcessorForFileType(
96 ::std::string_view fileExtension,
97 ::std::shared_ptr<::Bedrock::CrashFileProcessor> processor
98 ) /*override*/;
99
100 virtual void
101 setCrashTelemetryProcessor(::gsl::not_null<::Bedrock::CrashTelemetryProcessor*> processor) /*override*/;
102
103 virtual void processCrashes(
104 ::std::shared_ptr<::Bedrock::WorkerPoolHandleInterface> workerPool,
105 ::Scheduler& scheduler,
106 bool isNetworkAvailable
107 ) /*override*/;
108
109 virtual void notifyCrashed() /*override*/;
110
111 virtual void notifySystemError(uint errorCode, ::std::string const& errorMessage) /*override*/;
112
113 virtual void recordCrashedSession(
114 ::std::string_view sessionId,
115 ::std::string_view serializedSession,
116 int64 crashTime
117 ) /*override*/;
118
119 virtual void stopProcessingCrashes() /*override*/;
120
121 virtual bool isCrashProcessingActive() const /*override*/;
122
123 virtual ::std::string const& getCrashDataRoot() const /*override*/;
124
125 virtual ::std::string const& getCrashedSessionFileSuffix() const /*override*/;
126 // NOLINTEND
127
128public:
129 // member functions
130 // NOLINTBEGIN
131#ifdef LL_PLAT_C
132 MCNAPI ::Bedrock::Threading::Async<bool>
133 _processOneCrash(::Core::PathBuffer<::std::string> const& filePath, ::Bedrock::CrashFileProcessor* processor);
134
135 MCNAPI void _queueTask(::std::string_view name, ::std::function<void()>&& task);
136
137 MCNAPI void _resetProcessingState();
138
139 MCNAPI void _scanCrashFiles();
140#endif
141 // NOLINTEND
142
143public:
144 // virtual function thunks
145 // NOLINTBEGIN
146#ifdef LL_PLAT_C
147 MCNAPI void $initialize(::Bedrock::CrashManagerConfig const& config);
148
149 MCNAPI void $setCrashProcessorForFileType(
150 ::std::string_view fileExtension,
151 ::std::shared_ptr<::Bedrock::CrashFileProcessor> processor
152 );
153
154 MCNAPI void $setCrashTelemetryProcessor(::gsl::not_null<::Bedrock::CrashTelemetryProcessor*> processor);
155
156 MCNAPI void $processCrashes(
157 ::std::shared_ptr<::Bedrock::WorkerPoolHandleInterface> workerPool,
158 ::Scheduler& scheduler,
159 bool isNetworkAvailable
160 );
161
162 MCNAPI void $notifyCrashed();
163
164 MCNAPI void $notifySystemError(uint errorCode, ::std::string const& errorMessage);
165
166 MCNAPI void
167 $recordCrashedSession(::std::string_view sessionId, ::std::string_view serializedSession, int64 crashTime);
168
169 MCNAPI void $stopProcessingCrashes();
170
171 MCNAPI bool $isCrashProcessingActive() const;
172
173 MCNAPI ::std::string const& $getCrashDataRoot() const;
174
175 MCNAPI ::std::string const& $getCrashedSessionFileSuffix() const;
176#endif
177
178
179 // NOLINTEND
180};
181
182} // namespace Bedrock
Definition CrashFileProcessor.h:18
Definition CrashManager.h:19
Definition CrashTelemetryProcessor.h:13
Definition WorkerPoolHandleInterface.h:15
Definition PathBuffer.h:8
Definition Scheduler.h:14
STL namespace.
Definition CrashManagerConfig.h:7
Definition CrashManagerImpl.h:30
Definition CrashManagerImpl.h:45
Definition Alias.h:14