LeviLamina
Loading...
Searching...
No Matches
StreamFileDownloader.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/util/DownloaderResult.h"
7#include "mc/util/DownloaderState.h"
8#include "mc/util/IFileChunkDownloader.h"
9
10// auto generated forward declare list
11// clang-format off
12struct FileInfo;
13namespace Bedrock::Http { class Request; }
14// clang-format on
15
16class StreamFileDownloader : public ::IFileChunkDownloader,
17 public ::std::enable_shared_from_this<::StreamFileDownloader> {
18public:
19 // member variables
20 // NOLINTBEGIN
31 // NOLINTEND
32
33#ifdef LL_PLAT_S
34public:
35 // prevent constructor by default
36 StreamFileDownloader& operator=(StreamFileDownloader const&);
37 StreamFileDownloader(StreamFileDownloader const&);
38 StreamFileDownloader();
39
40#else // LL_PLAT_C
41public:
42 // prevent constructor by default
43 StreamFileDownloader& operator=(StreamFileDownloader const&);
44 StreamFileDownloader(StreamFileDownloader const&);
45
46#endif
47public:
48 // virtual functions
49 // NOLINTBEGIN
50#ifdef LL_PLAT_S
51 virtual ~StreamFileDownloader() /*override*/ = default;
52#else // LL_PLAT_C
53 virtual ~StreamFileDownloader() /*override*/;
54#endif
55
56 virtual void update() /*override*/;
57
58 virtual void initRealmsFileDownloader(
59 ::std::string const& downloadId,
60 int const slotIndex,
61 ::std::string const& downloadUrl,
62 ::FileInfo const& file,
63 uint64 fromByteOffset,
64 ::std::string const& downloadVersion,
65 ::std::function<void(::DownloaderResult)> callback
66 ) /*override*/;
67
68 virtual void initFileDownloader(
69 ::std::string const&,
70 ::std::string const& downloadUrl,
71 ::FileInfo const&,
72 uint64 expectedFileSize,
73 uint64 fromByteOffset,
74 ::std::string const&,
75 ::std::function<void(::DownloaderResult)> callback
76 ) /*override*/;
77
78 virtual void downloadFile(
79 ::std::function<void(::std::vector<uchar>, uint64, uint64, int, ::std::function<void(uint64, bool)>)>
80 dataCallback,
81 ::std::function<void(::DownloaderState)> endCallback
82 ) /*override*/;
83
84 virtual bool canCancelDownload() const /*override*/;
85
86 virtual void cancelDownload() /*override*/;
87
88 virtual uint64 getDownloadTotalSize() const /*override*/;
89
90 virtual uint64 getDownloadReceivedSize() const /*override*/;
91
92 virtual float getDownloadProgress() const /*override*/;
93
94 virtual ::Bedrock::Http::Request _makeRequest();
95 // NOLINTEND
96
97public:
98 // member functions
99 // NOLINTBEGIN
100#ifdef LL_PLAT_C
101 MCNAPI StreamFileDownloader();
102#endif
103 // NOLINTEND
104
105public:
106 // constructor thunks
107 // NOLINTBEGIN
108#ifdef LL_PLAT_C
109 MCNAPI void* $ctor();
110#endif
111 // NOLINTEND
112
113public:
114 // destructor thunk
115 // NOLINTBEGIN
116#ifdef LL_PLAT_C
117 MCNAPI void $dtor();
118#endif
119 // NOLINTEND
120
121public:
122 // virtual function thunks
123 // NOLINTBEGIN
124#ifdef LL_PLAT_C
125 MCNAPI void $update();
126
127 MCNAPI void $initRealmsFileDownloader(
128 ::std::string const& downloadId,
129 int const slotIndex,
130 ::std::string const& downloadUrl,
131 ::FileInfo const& file,
132 uint64 fromByteOffset,
133 ::std::string const& downloadVersion,
134 ::std::function<void(::DownloaderResult)> callback
135 );
136
137 MCNAPI void $initFileDownloader(
138 ::std::string const&,
139 ::std::string const& downloadUrl,
140 ::FileInfo const&,
141 uint64 expectedFileSize,
142 uint64 fromByteOffset,
143 ::std::string const&,
144 ::std::function<void(::DownloaderResult)> callback
145 );
146
147 MCNAPI void $downloadFile(
148 ::std::function<void(::std::vector<uchar>, uint64, uint64, int, ::std::function<void(uint64, bool)>)>
149 dataCallback,
150 ::std::function<void(::DownloaderState)> endCallback
151 );
152
153 MCNAPI bool $canCancelDownload() const;
154
155 MCNAPI void $cancelDownload();
156
157 MCNAPI uint64 $getDownloadTotalSize() const;
158
159 MCNAPI uint64 $getDownloadReceivedSize() const;
160
161 MCNAPI float $getDownloadProgress() const;
162
163 MCNAPI ::Bedrock::Http::Request $_makeRequest();
164#endif
165
166
167 // NOLINTEND
168
169public:
170 // vftables
171 // NOLINTBEGIN
172 MCNAPI static void** $vftable();
173 // NOLINTEND
174};
Definition Request.h:15
Definition IFileChunkDownloader.h:14
static MCAPI void ** $vftable()
Definition FileInfo.h:10
Definition Alias.h:14