|
Gin
|
Result of a completed or failed download. More...
#include <gin_downloadmanager.h>
Public Member Functions | |
| bool | saveToFile (const juce::File &targetFile, bool overwrite=true) |
| Saves downloaded data to a file. | |
Public Attributes | |
| juce::URL | url |
| URL that was downloaded. | |
| int | downloadId = 0 |
| Unique download ID. | |
| int | attempts = 0 |
| Number of attempts made. | |
| juce::MemoryBlock | data |
| Downloaded data; empty for a download to a file. | |
| juce::File | file |
| Where a download to a file went; deleted unless ok. | |
| bool | ok = false |
| true if download succeeded | |
| int | httpCode = 0 |
| HTTP response code. | |
| juce::StringPairArray | responseHeaders |
| HTTP response headers. | |
Result of a completed or failed download.
DownloadResult contains all information about a download attempt including the downloaded data, HTTP status, response headers, and success/failure state.
Members:
The result is passed to completion callbacks on the message thread.
| bool DownloadManager::DownloadResult::saveToFile | ( | const juce::File & | targetFile, |
| bool | overwrite = true ) |
Saves downloaded data to a file.
Returns true if successful.
| juce::URL DownloadManager::DownloadResult::url |
URL that was downloaded.
| int DownloadManager::DownloadResult::downloadId = 0 |
Unique download ID.
| int DownloadManager::DownloadResult::attempts = 0 |
Number of attempts made.
| juce::MemoryBlock DownloadManager::DownloadResult::data |
Downloaded data; empty for a download to a file.
| juce::File DownloadManager::DownloadResult::file |
Where a download to a file went; deleted unless ok.
| bool DownloadManager::DownloadResult::ok = false |
true if download succeeded
| int DownloadManager::DownloadResult::httpCode = 0 |
HTTP response code.
| juce::StringPairArray DownloadManager::DownloadResult::responseHeaders |
HTTP response headers.