17class FileDownloadManager :
public ::std::enable_shared_from_this<::FileDownloadManager> {
37 FileDownloadManager& operator=(FileDownloadManager
const&);
38 FileDownloadManager(FileDownloadManager
const&);
39 FileDownloadManager();
45 virtual ~FileDownloadManager() =
default;
47 virtual ~FileDownloadManager();
50 virtual void update();
52 virtual void cancelDownload();
54 virtual float getDownloadProgress()
const;
61 MCNAPI FileDownloadManager(
62 ::std::shared_ptr<::IFilePicker> filePicker,
63 ::std::shared_ptr<::IFileChunkDownloader> fileDownloader
66 MCNAPI
void _writeData(
67 ::std::vector<uchar> data,
71 ::std::function<
void(uint64,
bool)> writeComplete
74 MCNAPI
bool canCancelDownload()
const;
76 MCNAPI
void downloadFile(
77 ::std::string
const& downloadId,
78 ::std::string
const& downloadUrl,
80 uint64 expectedFileSize,
81 uint64 fromByteOffset,
82 ::std::string
const& downloadVersion,
83 ::std::function<
void(
::Core::Path const&, ::DownloaderResult)> onCompleteCallback,
87 MCNAPI uint64 getDownloadSize()
const;
89 MCNAPI ::DownloadState getDownloadState()
const;
91 MCNAPI ::DownloadError
const& getError()
const;
93 MCNAPI uint64 getFileSize()
const;
95 MCNAPI
void pauseDownload();
104 $ctor(::std::shared_ptr<::IFilePicker> filePicker, ::std::shared_ptr<::IFileChunkDownloader> fileDownloader);
118 MCNAPI
void $update();
120 MCNAPI
void $cancelDownload();
122 MCNAPI
float $getDownloadProgress()
const;