mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
downloadmanager return shared_ptr to FileFutures instead of bare pointers
This commit is contained in:
@@ -63,20 +63,20 @@ public:
|
||||
using DownloadProgressCallback = std::function<void(const FileFuture&)>;
|
||||
using DownloadFinishedCallback = std::function<void(const FileFuture&)>;
|
||||
using AsyncDownloadFinishedCallback =
|
||||
std::function<void(const std::vector<FileFuture*>&)>;
|
||||
std::function<void(const std::vector<std::shared_ptr<FileFuture>>&)>;
|
||||
|
||||
DownloadManager(std::string requestURL, int applicationVersion,
|
||||
bool useMultithreadedDownload = true);
|
||||
|
||||
// callers responsibility to delete
|
||||
// callbacks happen on a different thread
|
||||
FileFuture* downloadFile(const std::string& url, const ghoul::filesystem::File& file,
|
||||
std::shared_ptr<FileFuture> downloadFile(const std::string& url, const ghoul::filesystem::File& file,
|
||||
bool overrideFile = true,
|
||||
DownloadFinishedCallback finishedCallback = DownloadFinishedCallback(),
|
||||
DownloadProgressCallback progressCallback = DownloadProgressCallback()
|
||||
);
|
||||
|
||||
std::vector<FileFuture*> downloadRequestFiles(const std::string& identifier,
|
||||
std::vector<std::shared_ptr<FileFuture>> downloadRequestFiles(const std::string& identifier,
|
||||
const ghoul::filesystem::Directory& destination, int version,
|
||||
bool overrideFiles = true,
|
||||
DownloadFinishedCallback finishedCallback = DownloadFinishedCallback(),
|
||||
|
||||
Reference in New Issue
Block a user