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