LeviLamina
Loading...
Searching...
No Matches
OSWriteThrottleTracker.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5namespace Core::WriteThrottledOS {
6
8public:
9 // OSWriteThrottleTracker inner types declare
10 // clang-format off
13 // clang-format on
14
15 // OSWriteThrottleTracker inner types define
16 struct WriteThrottleTierInfo {
17 public:
18 // member variables
19 // NOLINTBEGIN
22 // NOLINTEND
23
24 public:
25 // prevent constructor by default
26 WriteThrottleTierInfo& operator=(WriteThrottleTierInfo const&);
27 WriteThrottleTierInfo(WriteThrottleTierInfo const&);
28 WriteThrottleTierInfo();
29 };
30
31 struct OSWriteThrottleStats {
32 public:
33 // member variables
34 // NOLINTBEGIN
40 // NOLINTEND
41
42 public:
43 // prevent constructor by default
44 OSWriteThrottleStats& operator=(OSWriteThrottleStats const&);
45 OSWriteThrottleStats(OSWriteThrottleStats const&);
46 OSWriteThrottleStats();
47 };
48
49public:
50 // virtual functions
51 // NOLINTBEGIN
52 virtual ~OSWriteThrottleTracker() = default;
53
54 virtual bool isWriteThrottledOS() const;
55
56 virtual ::Core::WriteThrottledOS::OSWriteThrottleTracker::OSWriteThrottleStats
57 getCurrentWriteThrottleStats(::std::optional<uint64>) const;
58
59 virtual uint64 getEstimatedUnthrottledWriteSpeedBytes() const;
60
61 virtual uint64 getBudgetAccrualBytesPerSecond() const;
62
63 virtual uint64 getMaxBudgetBytes() const;
64
65 virtual uint64 getMinBudgetForPlayableExperience(int recoverLeewayHintMb) const;
66
67 virtual uint64 getBudgetForWriteBudgetReplenished() const;
68
69 virtual uint64 getBudgetForWriteBudgetLow() const;
70 // NOLINTEND
71
72public:
73 // virtual function thunks
74 // NOLINTBEGIN
75#ifdef LL_PLAT_C
76 MCNAPI bool $isWriteThrottledOS() const;
77
78 MCNAPI ::Core::WriteThrottledOS::OSWriteThrottleTracker::OSWriteThrottleStats
79 $getCurrentWriteThrottleStats(::std::optional<uint64>) const;
80
81 MCNAPI uint64 $getEstimatedUnthrottledWriteSpeedBytes() const;
82
83 MCNAPI uint64 $getBudgetAccrualBytesPerSecond() const;
84
85 MCNAPI uint64 $getMaxBudgetBytes() const;
86
87 MCNAPI uint64 $getMinBudgetForPlayableExperience(int recoverLeewayHintMb) const;
88
89 MCNAPI uint64 $getBudgetForWriteBudgetReplenished() const;
90
91 MCNAPI uint64 $getBudgetForWriteBudgetLow() const;
92#endif
93
94
95 // NOLINTEND
96
97public:
98 // vftables
99 // NOLINTBEGIN
100 MCNAPI static void** $vftable();
101 // NOLINTEND
102};
103
104} // namespace Core::WriteThrottledOS
Definition OSWriteThrottleTracker.h:7
Definition Alias.h:14