LeviLamina
Loading...
Searching...
No Matches
FileUploadManager.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/util/UploadError.h"
8
9// auto generated forward declare list
10// clang-format off
11class FileArchiver;
13class TaskGroup;
14struct FileChunkInfo;
15namespace Core { class Path; }
16namespace Json { class Value; }
17// clang-format on
18
19class FileUploadManager : public ::std::enable_shared_from_this<::FileUploadManager> {
20public:
21 // FileUploadManager inner types declare
22 // clang-format off
24 // clang-format on
25
26 // FileUploadManager inner types define
27 struct MultiPartStreamHelper {
28 public:
29 // member variables
30 // NOLINTBEGIN
38 // NOLINTEND
39
40 public:
41 // prevent constructor by default
42 MultiPartStreamHelper& operator=(MultiPartStreamHelper const&);
43 MultiPartStreamHelper(MultiPartStreamHelper const&);
44 MultiPartStreamHelper();
45
46 public:
47 // member functions
48 // NOLINTBEGIN
50 // NOLINTEND
51
52 public:
53 // destructor thunk
54 // NOLINTBEGIN
55 MCNAPI void $dtor();
56 // NOLINTEND
57 };
58
59public:
60 // member variables
61 // NOLINTBEGIN
73 // NOLINTEND
74
75public:
76 // prevent constructor by default
77 FileUploadManager& operator=(FileUploadManager const&);
78 FileUploadManager(FileUploadManager const&);
79 FileUploadManager();
80
81public:
82 // virtual functions
83 // NOLINTBEGIN
84 virtual ~FileUploadManager();
85
86 virtual float getUploadProgress() const;
87
88 virtual void
89 archiveAndUploadFileToRealmStorage(::std::string const&, ::Core::Path const&, int const, ::std::string const&) = 0;
90
91 virtual void uploadFileToRealmStorage(::std::string const& uploadId, ::Core::Path const& path, int const slotIndex);
92 // NOLINTEND
93
94public:
95 // member functions
96 // NOLINTBEGIN
97 MCNAPI FileUploadManager(::TaskGroup& taskGroup, ::std::shared_ptr<::IFileChunkUploader> fileUploader);
98
100
101 MCNAPI void _resumeUpload();
102
103 MCNAPI void _uploadChunk(::FileChunkInfo const& chunk);
104
105 MCNAPI void _uploadStream();
106
107 MCNAPI void addCallbackQueue(::std::function<void()> callback);
108
109 MCNAPI_C void setFailed(::UploadError reason);
110
111 MCNAPI void uploadFile(
112 ::std::string const& uploadId,
113 ::Core::Path const& filePath,
114 bool autoStartUpload,
115 ::Json::Value const& uploadOptions
116 );
117 // NOLINTEND
118
119public:
120 // static variables
121 // NOLINTBEGIN
122 MCNAPI static ::std::string const& BOUNDARY();
123 // NOLINTEND
124
125public:
126 // constructor thunks
127 // NOLINTBEGIN
128 MCNAPI void* $ctor(::TaskGroup& taskGroup, ::std::shared_ptr<::IFileChunkUploader> fileUploader);
129
130 MCNAPI_C void* $ctor(
131 ::TaskGroup& taskGroup,
132 ::std::shared_ptr<::IFileChunkUploader> fileUploader,
133 ::Bedrock::NotNullNonOwnerPtr<::FileArchiver> const& fileArchiver
134 );
135 // NOLINTEND
136
137public:
138 // destructor thunk
139 // NOLINTBEGIN
140 MCNAPI void $dtor();
141 // NOLINTEND
142
143public:
144 // virtual function thunks
145 // NOLINTBEGIN
146 MCNAPI float $getUploadProgress() const;
147
148 MCNAPI void $uploadFileToRealmStorage(::std::string const& uploadId, ::Core::Path const& path, int const slotIndex);
149
150
151 // NOLINTEND
152
153public:
154 // vftables
155 // NOLINTBEGIN
156 MCNAPI static void** $vftable();
157 // NOLINTEND
158};
Definition Path.h:10
Definition FileArchiver.h:35
MCAPI FileUploadManager(::TaskGroup &taskGroup, ::std::shared_ptr<::IFileChunkUploader > fileUploader)
MCAPI void addCallbackQueue(::std::function< void()> callback)
MCAPI float $getUploadProgress() const
MCAPI void _uploadChunk(::FileChunkInfo const &chunk)
MCAPI void uploadFile(::std::string const &uploadId, ::Core::Path const &filePath, bool autoStartUpload, ::Json::Value const &uploadOptions)
MCAPI void * $ctor(::TaskGroup &taskGroup, ::std::shared_ptr<::IFileChunkUploader > fileUploader)
static MCAPI void ** $vftable()
MCAPI void _resumeUpload()
MCAPI void _generateMultiPartHelper()
static MCAPI ::std::string const & BOUNDARY()
MCAPI void _uploadStream()
MCAPI void $uploadFileToRealmStorage(::std::string const &uploadId, ::Core::Path const &path, int const slotIndex)
MCAPI void $dtor()
Definition IFileChunkUploader.h:15
Definition Value.h:16
Definition TaskGroup.h:53
Definition FileChunkInfo.h:5
Definition FileUploadManager.h:27
Definition Alias.h:14