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 MCNAPI_C void _writeData(
59 ::std::vector<uchar> data,
60 uint64 writeBytes,
61 uint64 offset,
62 uint64 progress,
63 ::std::function<void(uint64, bool)> writeComplete
64 );
65
66 MCNAPI_C void downloadFile(
67 ::std::string const& downloadId,
68 ::std::string const& downloadUrl,
69 ::Core::Path const& downloadPath,
70 uint64 expectedFileSize,
71 uint64 fromByteOffset,
72 ::std::string const& downloadVersion,
73 ::std::function<void(::Core::Path const&, ::DownloaderResult)> onCompleteCallback,
74 int slotIndex
75 );
76 // NOLINTEND
77
78public:
79 // constructor thunks
80 // NOLINTBEGIN
81 MCNAPI_C void*
82 $ctor(::std::shared_ptr<::IFilePicker> filePicker, ::std::shared_ptr<::IFileChunkDownloader> fileDownloader);
83 // NOLINTEND
84
85public:
86 // destructor thunk
87 // NOLINTBEGIN
88 MCNAPI void $dtor();
89 // NOLINTEND
90
91public:
92 // virtual function thunks
93 // NOLINTBEGIN
94#ifdef LL_PLAT_C
95 MCNAPI void $update();
96
97 MCNAPI void $cancelDownload();
98
99 MCNAPI float $getDownloadProgress() const;
100#endif
101
102
103 // NOLINTEND
104
105public:
106 // vftables
107 // NOLINTBEGIN
108 MCNAPI static void** $vftable();
109 // NOLINTEND
110};
Definition Path.h:10
static MCAPI void ** $vftable()
MCAPI void $dtor()
Definition IFileChunkDownloader.h:14
Definition IFilePicker.h:11
Definition Alias.h:14