Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
EduCloudUploadProgressHandler.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/game/edu_cloud/UploadWorldProgress.h"
7#include "mc/client/gui/EmptyProgressHandler.h"
8#include "mc/client/gui/ProgressAnimation.h"
9#include "mc/client/services/ms_graph/GraphResponse.h"
10#include "mc/deps/core/threading/Async.h"
11#include "mc/deps/core/utility/NonOwnerPointer.h"
12#include "mc/platform/Result.h"
13#include "mc/world/actor/player/LoadingState.h"
14#include "mc/world/level/storage/CloudSaveLevelInfo.h"
15
16// auto generated forward declare list
17// clang-format off
19namespace EduCloud { struct IEduCloudSaveSystem; }
20namespace MSGraph::Models { struct DriveItem; }
21namespace MSGraph::Models { struct GraphError; }
22// clang-format on
23
25public:
26 // member variables
27 // NOLINTBEGIN
28 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::EduCloud::IEduCloudSaveSystem>> mEduCloudSaveSystem;
29 ::ll::TypedStorage<4, 4, ::LoadingState> mLoadingState;
30 ::ll::TypedStorage<4, 4, ::EduCloud::UploadWorldProgress> mUploadWorldProgress;
31 ::ll::TypedStorage<8, 16, ::Bedrock::Threading::Async<::Bedrock::Result<bool>>> mUploadHandle;
32 ::ll::TypedStorage<8, 176, ::std::optional<::CloudSaveLevelInfo>> mCloudSaveLevelInfo;
33 ::ll::TypedStorage<
34 8,
35 16,
36 ::Bedrock::Threading::Async<::Bedrock::Result<::MSGraph::Models::DriveItem, ::MSGraph::Models::GraphError>>>
37 mEduCloudWorldHandle;
38 ::ll::TypedStorage<8, 32, ::std::string> mLevelId;
39 ::ll::TypedStorage<8, 32, ::std::string> mLevelName;
40 ::ll::TypedStorage<4, 4, ::MSGraph::GraphResponse> mErrorStatus;
41 ::ll::TypedStorage<1, 1, bool> mShouldRetryAsNewFile;
42 ::ll::TypedStorage<1, 1, bool> mHasRetriedAsNewFile;
43 ::ll::TypedStorage<1, 1, bool> mExitingErrorScreen;
44 ::ll::TypedStorage<1, 1, bool> mCanceled;
45 ::ll::TypedStorage<8, 32, ::std::string> mTitleText;
46 ::ll::TypedStorage<8, 32, ::std::string> mProgressText;
47 ::ll::TypedStorage<8, 8, ::std::chrono::milliseconds> mEduCloudIsDoneInterval;
48 ::ll::TypedStorage<1, 1, bool> mIsSyncing;
49 ::ll::TypedStorage<8, 32, ::std::string> mPreviousProgressText;
50 ::ll::TypedStorage<4, 4, float> mResumableLoadingProgress;
51 ::ll::TypedStorage<4, 4, float> mLoadingCompletedSpeed;
52 ::ll::TypedStorage<8, 8, uint64> mFileSize;
53 ::ll::TypedStorage<8, 8, uint64> mResumableCurrentUploadedAmount;
54 ::ll::TypedStorage<8, 8, uint64> mResumableCurrentChunkSize;
55 // NOLINTEND
56
57public:
58 // prevent constructor by default
59 EduCloudUploadProgressHandler();
60
61public:
62 // virtual functions
63 // NOLINTBEGIN
64 virtual void tick(::MinecraftScreenModel& minecraftScreenModel) /*override*/;
65
66 virtual void onComplete(::MinecraftScreenModel& minecraftScreenModel) /*override*/;
67
68 virtual void onCancel(::MinecraftScreenModel& minecraftScreenModel) /*override*/;
69
70 virtual void onStart(::MinecraftScreenModel& minecraftScreenModel) /*override*/;
71
72 virtual ::LoadingState getLoadingState(::MinecraftScreenModel& minecraftScreenModel) const /*override*/;
73
74 virtual ::std::string getProgressMessage(::MinecraftScreenModel& minecraftScreenModel) const /*override*/;
75
76 virtual float getLoadingProgress(::MinecraftScreenModel& minecraftScreenModel) const /*override*/;
77
78 virtual ::std::string getTitleText() const /*override*/;
79
80 virtual ::std::string getName() const /*override*/;
81
82 virtual ::ProgressAnimation showLoadingBar() const /*override*/;
83 // NOLINTEND
84
85public:
86 // member functions
87 // NOLINTBEGIN
88 MCNAPI EduCloudUploadProgressHandler(
89 ::std::string levelId,
90 ::std::string levelName,
91 ::Bedrock::NonOwnerPointer<::EduCloud::IEduCloudSaveSystem> eduCloudSaveSystem,
92 ::std::optional<::CloudSaveLevelInfo> cloudSaveLevelInfo
93 );
94
95 MCNAPI ::std::string getLevelId() const;
96
97 MCNAPI ::std::string const getUploadErrorCode() const;
98
99 MCNAPI void startUpload();
100
101 MCNAPI void updateText(::MinecraftScreenModel& minecraftScreenModel);
102 // NOLINTEND
103
104public:
105 // constructor thunks
106 // NOLINTBEGIN
107 MCNAPI void* $ctor(
108 ::std::string levelId,
109 ::std::string levelName,
110 ::Bedrock::NonOwnerPointer<::EduCloud::IEduCloudSaveSystem> eduCloudSaveSystem,
111 ::std::optional<::CloudSaveLevelInfo> cloudSaveLevelInfo
112 );
113 // NOLINTEND
114
115public:
116 // virtual function thunks
117 // NOLINTBEGIN
118 MCNAPI void $tick(::MinecraftScreenModel& minecraftScreenModel);
119
120 MCNAPI void $onComplete(::MinecraftScreenModel& minecraftScreenModel);
121
122 MCNAPI void $onCancel(::MinecraftScreenModel& minecraftScreenModel);
123
124 MCNAPI void $onStart(::MinecraftScreenModel& minecraftScreenModel);
125
126 MCNAPI ::LoadingState $getLoadingState(::MinecraftScreenModel& minecraftScreenModel) const;
127
128 MCNAPI ::std::string $getProgressMessage(::MinecraftScreenModel& minecraftScreenModel) const;
129
130 MCNAPI float $getLoadingProgress(::MinecraftScreenModel& minecraftScreenModel) const;
131
132 MCNAPI ::std::string $getTitleText() const;
133
134 MCNAPI ::std::string $getName() const;
135
136 MCNAPI ::ProgressAnimation $showLoadingBar() const;
137 // NOLINTEND
138};
Definition CloudSaveLevelInfo.h:10
Definition EduCloudUploadProgressHandler.h:5
MCAPI::std::string $getTitleText() const
MCAPI float $getLoadingProgress(::MinecraftScreenModel &minecraftScreenModel) const
MCAPI void $onComplete(::MinecraftScreenModel &minecraftScreenModel)
MCAPI::ProgressAnimation $showLoadingBar() const
MCAPI::std::string const getUploadErrorCode() const
MCAPI void updateText(::MinecraftScreenModel &minecraftScreenModel)
MCAPI::std::string $getName() const
MCAPI::LoadingState $getLoadingState(::MinecraftScreenModel &minecraftScreenModel) const
MCAPI::std::string getLevelId() const
MCAPI void * $ctor(::std::string levelId, ::std::string levelName, ::Bedrock::NonOwnerPointer<::EduCloud::IEduCloudSaveSystem > eduCloudSaveSystem, ::std::optional<::CloudSaveLevelInfo > cloudSaveLevelInfo)
MCAPI::std::string $getProgressMessage(::MinecraftScreenModel &minecraftScreenModel) const
MCAPI void $onStart(::MinecraftScreenModel &minecraftScreenModel)
MCAPI void $onCancel(::MinecraftScreenModel &minecraftScreenModel)
MCAPI void $tick(::MinecraftScreenModel &minecraftScreenModel)
Definition EmptyProgressHandler.h:5
Definition MinecraftScreenModel.h:5
STL namespace.
Definition IEduCloudSaveSystem.h:7
Definition DriveItem.h:7
Definition GraphError.h:7