LeviLamina
Loading...
Searching...
No Matches
CrashFileProcessor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/file/PathBuffer.h"
7#include "mc/deps/core/threading/Async.h"
8
9// auto generated forward declare list
10// clang-format off
11class Scheduler;
12namespace Bedrock { class SessionInfo; }
13namespace Bedrock { class WorkerPoolHandleInterface; }
14// clang-format on
15
16namespace Bedrock {
17
19public:
20 // CrashFileProcessor inner types declare
21 // clang-format off
22 class CrashHandler;
23 // clang-format on
24
25 // CrashFileProcessor inner types define
26 enum class ProcessMode : int {
27 Synchronous = 0,
28 Asynchronous = 1,
29 };
30
32 public:
33 // CrashHandler inner types declare
34 // clang-format off
35 struct StatusUpdate;
36 // clang-format on
37
38 // CrashHandler inner types define
39 struct StatusUpdate {
40 public:
41 // member variables
42 // NOLINTBEGIN
46 // NOLINTEND
47
48 public:
49 // prevent constructor by default
50 StatusUpdate& operator=(StatusUpdate const&);
51 StatusUpdate(StatusUpdate const&);
52 StatusUpdate();
53 };
54
55 public:
56 // virtual functions
57 // NOLINTBEGIN
58 virtual ~CrashHandler() = default;
59
60 virtual ::std::shared_ptr<::Bedrock::SessionInfo>
61 findCrashedSessionInfo(::std::string_view sessionId) const = 0;
62
63 virtual void
64 notifyCrashUploadStatus(::Bedrock::CrashFileProcessor::CrashHandler::StatusUpdate const& status) = 0;
65
66 virtual void notifyDoneWithSession(::std::string_view sessionId) = 0;
67 // NOLINTEND
68
69 public:
70 // virtual function thunks
71 // NOLINTBEGIN
72
73 // NOLINTEND
74 };
75
76public:
77 // virtual functions
78 // NOLINTBEGIN
79 virtual ~CrashFileProcessor() = default;
80
81 virtual bool getSessionIDFromFile(::std::string&, ::Core::PathBuffer<::std::string> const&) const = 0;
82
83 virtual ::Bedrock::CrashFileProcessor::ProcessMode
84 beginCrashProcessing(uint64, ::std::shared_ptr<::Bedrock::WorkerPoolHandleInterface>, ::Scheduler&) = 0;
85
86 virtual ::Bedrock::Threading::Async<bool> processCrash(
87 ::gsl::not_null<::std::shared_ptr<::Bedrock::CrashFileProcessor::CrashHandler>> const&,
89 ) = 0;
90
91 virtual void doneCrashProcessing() = 0;
92 // NOLINTEND
93
94public:
95 // virtual function thunks
96 // NOLINTBEGIN
97
98 // NOLINTEND
99};
100
101} // namespace Bedrock
Definition CrashFileProcessor.h:31
Definition CrashFileProcessor.h:18
Definition SessionInfo.h:7
Definition WorkerPoolHandleInterface.h:15
Definition PathBuffer.h:8
Definition Scheduler.h:14
Definition Alias.h:14