LeviLamina
Loading...
Searching...
No Matches
FileDownloadManager.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/DownloaderResult.h"
8
9// auto generated forward declare list
10// clang-format off
11class AppPlatform;
13class IFilePicker;
14namespace Core { class Path; }
15// clang-format on
16
17class FileDownloadManager : public ::std::enable_shared_from_this<::FileDownloadManager> {
18public:
19 // member variables
20 // NOLINTBEGIN
35 // NOLINTEND
36
37public:
38 // prevent constructor by default
39 FileDownloadManager& operator=(FileDownloadManager const&);
40 FileDownloadManager(FileDownloadManager const&);
41 FileDownloadManager();
42
43public:
44 // virtual functions
45 // NOLINTBEGIN
46#ifdef LL_PLAT_S
47 virtual ~FileDownloadManager() = default;
48#else // LL_PLAT_C
49 virtual ~FileDownloadManager();
50#endif
51
52 virtual void update();
53
54 virtual void cancelDownload();
55
56 virtual float getDownloadProgress() const;
57 // NOLINTEND
58
59public:
60 // member functions
61 // NOLINTBEGIN
62#ifdef LL_PLAT_C
63 MCNAPI FileDownloadManager(
64 ::std::shared_ptr<::IFilePicker> filePicker,
65 ::std::shared_ptr<::IFileChunkDownloader> fileDownloader,
66 ::Bedrock::NotNullNonOwnerPtr<::AppPlatform> appPlatform
67 );
68
69 MCNAPI void _writeData(
70 ::std::vector<uchar> data,
71 uint64 writeBytes,
72 uint64 offset,
73 uint64 progress,
74 int chunkIndex,
75 ::std::function<void(uint64, bool)> writeComplete
76 );
77
78 MCNAPI void downloadFile(
79 ::std::string const& downloadId,
80 ::std::string const& downloadUrl,
81 ::Core::Path const& downloadPath,
82 uint64 expectedFileSize,
83 uint64 fromByteOffset,
84 ::std::string const& downloadVersion,
85 ::std::function<void(::Core::Path const&, ::DownloaderResult)> onCompleteCallback,
86 int slotIndex
87 );
88
89 MCNAPI void pauseDownload();
90#endif
91 // NOLINTEND
92
93public:
94 // constructor thunks
95 // NOLINTBEGIN
96#ifdef LL_PLAT_C
97 MCNAPI void* $ctor(
98 ::std::shared_ptr<::IFilePicker> filePicker,
99 ::std::shared_ptr<::IFileChunkDownloader> fileDownloader,
100 ::Bedrock::NotNullNonOwnerPtr<::AppPlatform> appPlatform
101 );
102#endif
103 // NOLINTEND
104
105public:
106 // destructor thunk
107 // NOLINTBEGIN
108#ifdef LL_PLAT_C
109 MCNAPI void $dtor();
110#endif
111 // NOLINTEND
112
113public:
114 // virtual function thunks
115 // NOLINTBEGIN
116#ifdef LL_PLAT_C
117 MCNAPI void $update();
118
119 MCNAPI void $cancelDownload();
120
121 MCNAPI float $getDownloadProgress() const;
122#endif
123
124
125 // NOLINTEND
126};
Definition AppPlatform.h:78
Definition Path.h:11
Definition IFileChunkDownloader.h:14
Definition IFilePicker.h:11
Definition Alias.h:14