LeviLamina
Loading...
Searching...
No Matches
IFileChunkDownloader.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
9// auto generated forward declare list
10// clang-format off
11struct FileInfo;
12// clang-format on
13
15public:
16 // IFileChunkDownloader inner types define
17 using DataCallback =
18 ::std::function<void(::std::vector<uchar>, uint64, uint64, ::std::function<void(uint64, bool)>)>;
19
20 using EndCallback = ::std::function<void(::DownloaderState)>;
21
22 using WriteCompleteCallback = ::std::function<void(uint64, bool)>;
23
24public:
25 // virtual functions
26 // NOLINTBEGIN
27#ifdef LL_PLAT_S
28 virtual ~IFileChunkDownloader() = default;
29#else // LL_PLAT_C
30 virtual ~IFileChunkDownloader();
31#endif
32
33 virtual void update() = 0;
34
35 virtual void initRealmsFileDownloader(
36 ::std::string const&,
37 int const,
38 ::std::string const&,
39 ::FileInfo const&,
40 uint64,
41 ::std::string const&,
42 ::std::function<void(::DownloaderResult)>
43 ) = 0;
44
45 virtual void initFileDownloader(
46 ::std::string const&,
47 ::std::string const&,
48 ::FileInfo const&,
49 uint64,
50 uint64,
51 ::std::string const&,
52 ::std::function<void(::DownloaderResult)>
53 ) = 0;
54
55 virtual void downloadFile(
56 ::std::function<void(::std::vector<uchar>, uint64, uint64, ::std::function<void(uint64, bool)>)>,
57 ::std::function<void(::DownloaderState)>
58 ) = 0;
59
60 virtual bool canCancelDownload() const = 0;
61
62 virtual void cancelDownload() = 0;
63
64 virtual uint64 getDownloadTotalSize() const = 0;
65
66 virtual uint64 getDownloadReceivedSize() const = 0;
67
68 virtual float getDownloadProgress() const = 0;
69 // NOLINTEND
70
71public:
72 // static variables
73 // NOLINTBEGIN
74 MCNAPI_C static ::std::add_lvalue_reference_t<char const* const[]> DownloaderResultStrings();
75 // NOLINTEND
76
77public:
78 // destructor thunk
79 // NOLINTBEGIN
80 MCNAPI void $dtor();
81 // NOLINTEND
82
83public:
84 // virtual function thunks
85 // NOLINTBEGIN
86
87 // NOLINTEND
88
89public:
90 // vftables
91 // NOLINTBEGIN
92 MCNAPI static void** $vftable();
93 // NOLINTEND
94};
Definition IFileChunkDownloader.h:14
static MCAPI void ** $vftable()
MCAPI void $dtor()
Definition FileInfo.h:10