Gin
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
DownloadManager::DownloadResult Struct Reference

Result of a completed or failed download. More...

#include <gin_downloadmanager.h>

Public Member Functions

bool saveToFile (const juce::File &file, 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.
 
bool ok = false
 true if download succeeded
 
int httpCode = 0
 HTTP response code.
 
juce::StringPairArray responseHeaders
 HTTP response headers.
 

Detailed Description

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.

See also
DownloadManager

Member Function Documentation

◆ saveToFile()

bool DownloadManager::DownloadResult::saveToFile ( const juce::File &  file,
bool  overwrite = true 
)

Saves downloaded data to a file.

Returns true if successful.

Member Data Documentation

◆ url

juce::URL DownloadManager::DownloadResult::url

URL that was downloaded.

◆ downloadId

int DownloadManager::DownloadResult::downloadId = 0

Unique download ID.

◆ attempts

int DownloadManager::DownloadResult::attempts = 0

Number of attempts made.

◆ data

juce::MemoryBlock DownloadManager::DownloadResult::data

Downloaded data.

◆ ok

bool DownloadManager::DownloadResult::ok = false

true if download succeeded

◆ httpCode

int DownloadManager::DownloadResult::httpCode = 0

HTTP response code.

◆ responseHeaders

juce::StringPairArray DownloadManager::DownloadResult::responseHeaders

HTTP response headers.


The documentation for this struct was generated from the following file: