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 WriteCompleteCallback = ::std::function<void(uint64, bool)>;
18
19 using DataCallback =
20 ::std::function<void(::std::vector<uchar>, uint64, uint64, ::std::function<void(uint64, bool)>)>;
21
22 using EndCallback = ::std::function<void(::DownloaderState)>;
23
24public:
25 // virtual functions
26 // NOLINTBEGIN
27 // vIndex: 0
28 virtual ~IFileChunkDownloader() = default;
29
30 // vIndex: 1
31 virtual void update() = 0;
32
33 // vIndex: 2
34 virtual void initRealmsFileDownloader(
35 ::std::string const&,
36 int const,
37 ::std::string const&,
38 ::FileInfo const&,
39 uint64,
40 ::std::string const&,
41 ::std::function<void(::DownloaderResult)>
42 ) = 0;
43
44 // vIndex: 3
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 // vIndex: 4
56 virtual void downloadFile(
57 ::std::function<void(::std::vector<uchar>, uint64, uint64, ::std::function<void(uint64, bool)>)>,
58 ::std::function<void(::DownloaderState)>
59 ) = 0;
60
61 // vIndex: 5
62 virtual bool canCancelDownload() const = 0;
63
64 // vIndex: 6
65 virtual void cancelDownload() = 0;
66
67 // vIndex: 7
68 virtual uint64 getDownloadTotalSize() const = 0;
69
70 // vIndex: 8
71 virtual uint64 getDownloadReceivedSize() const = 0;
72
73 // vIndex: 9
74 virtual float getDownloadProgress() const = 0;
75 // NOLINTEND
76
77public:
78 // virtual function thunks
79 // NOLINTBEGIN
80
81 // NOLINTEND
82};
Definition IFileChunkDownloader.h:14
Definition FileInfo.h:10