JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
juce::URL::DownloadTask Class Reference

Represents a download task. More...

#include "juce_URL.h"

Inheritance diagram for juce::URL::DownloadTask:
juce::FallbackDownloadTask

Public Types

using Listener = DownloadTaskListener
 

Public Member Functions

virtual ~DownloadTask ()
 Releases the resources of the download task, unregisters the listener and cancels the download if necessary.
 
int64 getTotalLength () const
 Returns the total length of the download task.
 
int64 getLengthDownloaded () const
 Returns the number of bytes that have been downloaded so far.
 
bool isFinished () const
 Returns true if the download finished or there was an error.
 
int statusCode () const
 Returns the status code of the server's response.
 
bool hadError () const
 Returns true if there was an error.
 
File getTargetLocation () const
 Returns the target file location that was provided in URL::downloadToFile.
 

Protected Attributes

int64 contentLength
 
int64 downloaded
 
bool finished
 
bool error
 
int httpCode
 
File targetLocation
 

Friends

class URL
 

Detailed Description

Represents a download task.

Returned by downloadToFile() to allow querying and controlling the download task.

Definition at line 499 of file juce_URL.h.

Member Typedef Documentation

◆ Listener

Definition at line 502 of file juce_URL.h.

Constructor & Destructor Documentation

◆ ~DownloadTask()

juce::URL::DownloadTask::~DownloadTask ( )
virtual

Releases the resources of the download task, unregisters the listener and cancels the download if necessary.

Definition at line 135 of file juce_URL.cpp.

◆ DownloadTask()

juce::URL::DownloadTask::DownloadTask ( )
protected

Definition at line 134 of file juce_URL.cpp.

Member Function Documentation

◆ getLengthDownloaded()

int64 juce::URL::DownloadTask::getLengthDownloaded ( ) const

Returns the number of bytes that have been downloaded so far.

Definition at line 516 of file juce_URL.h.

◆ getTargetLocation()

File juce::URL::DownloadTask::getTargetLocation ( ) const

Returns the target file location that was provided in URL::downloadToFile.

Definition at line 533 of file juce_URL.h.

◆ getTotalLength()

int64 juce::URL::DownloadTask::getTotalLength ( ) const

Returns the total length of the download task.

This may return -1 if the length was not returned by the server.

Definition at line 513 of file juce_URL.h.

◆ hadError()

bool juce::URL::DownloadTask::hadError ( ) const

Returns true if there was an error.

Definition at line 530 of file juce_URL.h.

◆ isFinished()

bool juce::URL::DownloadTask::isFinished ( ) const

Returns true if the download finished or there was an error.

Definition at line 519 of file juce_URL.h.

◆ statusCode()

int juce::URL::DownloadTask::statusCode ( ) const

Returns the status code of the server's response.

This will only be valid after the download has finished.

See also
isFinished

Definition at line 527 of file juce_URL.h.

Friends And Related Symbol Documentation

◆ URL

friend class URL
friend

Definition at line 544 of file juce_URL.h.

Member Data Documentation

◆ contentLength

int64 juce::URL::DownloadTask::contentLength
protected

Definition at line 536 of file juce_URL.h.

◆ downloaded

int64 juce::URL::DownloadTask::downloaded
protected

Definition at line 536 of file juce_URL.h.

◆ error

bool juce::URL::DownloadTask::error
protected

Definition at line 537 of file juce_URL.h.

◆ finished

bool juce::URL::DownloadTask::finished
protected

Definition at line 537 of file juce_URL.h.

◆ httpCode

int juce::URL::DownloadTask::httpCode
protected

Definition at line 538 of file juce_URL.h.

◆ targetLocation

File juce::URL::DownloadTask::targetLocation
protected

Definition at line 539 of file juce_URL.h.


The documentation for this class was generated from the following files: