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
35 initRealmsFileDownloader(::std::string const&, int const, ::std::string const&, ::FileInfo const&, uint64, ::std::string const&, ::std::function<void(::DownloaderResult)>) = 0;
36
37 // vIndex: 3
38 virtual void
39 initFileDownloader(::std::string const&, ::std::string const&, ::FileInfo const&, uint64, uint64, ::std::string const&, ::std::function<void(::DownloaderResult)>) = 0;
40
41 // vIndex: 4
42 virtual void
43 downloadFile(::std::function<void(::std::vector<uchar>, uint64, uint64, ::std::function<void(uint64, bool)>)>, ::std::function<void(::DownloaderState)>) = 0;
44
45 // vIndex: 5
46 virtual bool canCancelDownload() const = 0;
47
48 // vIndex: 6
49 virtual void cancelDownload() = 0;
50
51 // vIndex: 7
52 virtual uint64 getDownloadTotalSize() const = 0;
53
54 // vIndex: 8
55 virtual uint64 getDownloadReceivedSize() const = 0;
56
57 // vIndex: 9
58 virtual float getDownloadProgress() const = 0;
59 // NOLINTEND
60
61public:
62 // destructor thunk
63 // NOLINTBEGIN
64
65 // NOLINTEND
66
67public:
68 // virtual function thunks
69 // NOLINTBEGIN
70
71 // NOLINTEND
72};
Definition IFileChunkDownloader.h:14
Definition FileInfo.h:10