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> findCrashedSessionInfo(::std::string_view) const = 0;
61
62 virtual void notifyCrashUploadStatus(::Bedrock::CrashFileProcessor::CrashHandler::StatusUpdate const&) = 0;
63
64 virtual void notifyDoneWithSession(::std::string_view) = 0;
65 // NOLINTEND
66
67 public:
68 // virtual function thunks
69 // NOLINTBEGIN
70
71 // NOLINTEND
72 };
73
74public:
75 // virtual functions
76 // NOLINTBEGIN
77 virtual ~CrashFileProcessor() = default;
78
79 virtual bool getSessionIDFromFile(::std::string&, ::Core::PathBuffer<::std::string> const&) const = 0;
80
81 virtual ::Bedrock::CrashFileProcessor::ProcessMode
82 beginCrashProcessing(uint64, ::std::shared_ptr<::Bedrock::WorkerPoolHandleInterface>, ::Scheduler&) = 0;
83
84 virtual ::Bedrock::Threading::Async<bool> processCrash(
85 ::gsl::not_null<::std::shared_ptr<::Bedrock::CrashFileProcessor::CrashHandler>> const&,
87 ) = 0;
88
89 virtual void doneCrashProcessing() = 0;
90 // NOLINTEND
91
92public:
93 // virtual function thunks
94 // NOLINTBEGIN
95
96 // NOLINTEND
97};
98
99} // 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