Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
RemoteStorageProviderSyncProgressHandler.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/ProgressHandler.h"
7#include "mc/platform/ErrorInfo.h"
8#include "mc/util/CallbackToken.h"
9#include "mc/world/actor/player/LoadingState.h"
10
11// auto generated forward declare list
12// clang-format off
14// clang-format on
15
17public:
18 // RemoteStorageProviderSyncProgressHandler inner types declare
19 // clang-format off
20 class SyncState;
21 // clang-format on
22
23 // RemoteStorageProviderSyncProgressHandler inner types define
24 enum class State : int {
25 Idle = 0,
26 WaitingForRequest = 1,
27 Error = 2,
28 Complete = 3,
29 };
30
31 class SyncState : public ::std::enable_shared_from_this<::RemoteStorageProviderSyncProgressHandler::SyncState> {
32 public:
33 // member variables
34 // NOLINTBEGIN
35 ::ll::TypedStorage<4, 4, ::std::atomic<::RemoteStorageProviderSyncProgressHandler::State>> mState;
36 ::ll::TypedStorage<8, 72, ::nonstd::expected<void, ::Bedrock::ErrorInfo<::std::error_code>>> mSyncSuccess;
37 ::ll::TypedStorage<
38 8,
39 64,
40 ::std::function<void(::nonstd::expected<void, ::Bedrock::ErrorInfo<::std::error_code>>)>>
41 mCompletedCallback;
42 ::ll::TypedStorage<1, 1, ::std::atomic<bool>> mCompletedCallbackCalled;
43 // NOLINTEND
44
45 public:
46 // member functions
47 // NOLINTBEGIN
48 MCNAPI void
49 onCompleted(::nonstd::expected<void, ::Bedrock::ErrorInfo<::std::error_code>> result, bool canceled);
50 // NOLINTEND
51 };
52
53public:
54 // member variables
55 // NOLINTBEGIN
56 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::RemoteStorageProviderSyncProgressHandler::SyncState>> mSyncState;
57 ::ll::TypedStorage<
58 8,
59 64,
60 ::std::function<
61 ::CallbackToken(::std::function<void(::nonstd::expected<void, ::Bedrock::ErrorInfo<::std::error_code>>)>)>>
62 mActionCallback;
63 ::ll::TypedStorage<8, 64, ::std::function<void(::nonstd::expected<void, ::Bedrock::ErrorInfo<::std::error_code>>)>>
64 mOnProgressHandlerCompletion;
65 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mStartTimestamp;
66 ::ll::TypedStorage<8, 16, ::CallbackToken> mSyncToken;
67 ::ll::TypedStorage<8, 32, ::std::string> mScreenName;
68 // NOLINTEND
69
70public:
71 // prevent constructor by default
72 RemoteStorageProviderSyncProgressHandler();
73
74public:
75 // virtual functions
76 // NOLINTBEGIN
77 virtual ~RemoteStorageProviderSyncProgressHandler() /*override*/ = default;
78
79 virtual void onStart(::MinecraftScreenModel&) /*override*/;
80
81 virtual void tick(::MinecraftScreenModel& minecraftScreenModel) /*override*/;
82
83 virtual void onCancel(::MinecraftScreenModel&) /*override*/;
84
85 virtual void onExit(::MinecraftScreenModel& minecraftScreenModel) /*override*/;
86
87 virtual ::LoadingState getLoadingState(::MinecraftScreenModel&) const /*override*/;
88
89 virtual ::std::string getProgressMessage(::MinecraftScreenModel&) const /*override*/;
90
91 virtual ::std::string getTitleText() const /*override*/;
92
93 virtual ::std::string getName() const /*override*/;
94 // NOLINTEND
95
96public:
97 // member functions
98 // NOLINTBEGIN
99 MCNAPI RemoteStorageProviderSyncProgressHandler(
100 ::std::function<
101 ::CallbackToken(::std::function<void(::nonstd::expected<void, ::Bedrock::ErrorInfo<::std::error_code>>)>)>
102 actionCallback,
103 ::std::function<void(::nonstd::expected<void, ::Bedrock::ErrorInfo<::std::error_code>>)> completedCallback,
104 ::std::function<void(::nonstd::expected<void, ::Bedrock::ErrorInfo<::std::error_code>>)>
105 onProgressHandlerCompletion,
106 ::std::string const& screenName
107 );
108 // NOLINTEND
109
110public:
111 // constructor thunks
112 // NOLINTBEGIN
113 MCNAPI void* $ctor(
114 ::std::function<
115 ::CallbackToken(::std::function<void(::nonstd::expected<void, ::Bedrock::ErrorInfo<::std::error_code>>)>)>
116 actionCallback,
117 ::std::function<void(::nonstd::expected<void, ::Bedrock::ErrorInfo<::std::error_code>>)> completedCallback,
118 ::std::function<void(::nonstd::expected<void, ::Bedrock::ErrorInfo<::std::error_code>>)>
119 onProgressHandlerCompletion,
120 ::std::string const& screenName
121 );
122 // NOLINTEND
123
124public:
125 // virtual function thunks
126 // NOLINTBEGIN
128
129 MCNAPI void $tick(::MinecraftScreenModel& minecraftScreenModel);
130
132
133 MCNAPI void $onExit(::MinecraftScreenModel& minecraftScreenModel);
134
135 MCNAPI ::LoadingState $getLoadingState(::MinecraftScreenModel&) const;
136
137 MCNAPI ::std::string $getProgressMessage(::MinecraftScreenModel&) const;
138
139 MCNAPI ::std::string $getTitleText() const;
140
141 MCNAPI ::std::string $getName() const;
142 // NOLINTEND
143};
Definition CallbackToken.h:11
Definition MinecraftScreenModel.h:5
Definition ProgressHandler.h:5
Definition RemoteStorageProviderSyncProgressHandler.h:15
MCAPI void onCompleted(::nonstd::expected< void, ::Bedrock::ErrorInfo<::std::error_code > > result, bool canceled)
Definition RemoteStorageProviderSyncProgressHandler.h:5
MCAPI::std::string $getTitleText() const
MCAPI void $onExit(::MinecraftScreenModel &minecraftScreenModel)
MCAPI::std::string $getProgressMessage(::MinecraftScreenModel &) const
MCAPI void $onStart(::MinecraftScreenModel &)
MCAPI::std::string $getName() const
MCAPI void $tick(::MinecraftScreenModel &minecraftScreenModel)
MCAPI::LoadingState $getLoadingState(::MinecraftScreenModel &) const
MCAPI void $onCancel(::MinecraftScreenModel &)
MCAPI void * $ctor(::std::function< ::CallbackToken(::std::function< void(::nonstd::expected< void, ::Bedrock::ErrorInfo<::std::error_code > >)>)> actionCallback, ::std::function< void(::nonstd::expected< void, ::Bedrock::ErrorInfo<::std::error_code > >)> completedCallback, ::std::function< void(::nonstd::expected< void, ::Bedrock::ErrorInfo<::std::error_code > >)> onProgressHandlerCompletion, ::std::string const &screenName)
STL namespace.
Definition ErrorInfo.h:9