Represents a download task.  
 More...
#include <juce_URL.h>
|  | 
| 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. 
 | 
|  | 
Represents a download task. 
Returned by downloadToFile() to allow querying and controlling the download task. 
◆ Listener
◆ ~DownloadTask()
  
  | 
        
          | virtual URL::DownloadTask::~DownloadTask | ( |  | ) |  |  | virtual | 
 
Releases the resources of the download task, unregisters the listener and cancels the download if necessary. 
 
 
◆ DownloadTask()
  
  | 
        
          | URL::DownloadTask::DownloadTask | ( |  | ) |  |  | protected | 
 
 
◆ getTotalLength()
      
        
          | int64 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. 
 
 
◆ getLengthDownloaded()
      
        
          | int64 URL::DownloadTask::getLengthDownloaded | ( |  | ) | const | 
      
 
Returns the number of bytes that have been downloaded so far. 
 
 
◆ isFinished()
      
        
          | bool URL::DownloadTask::isFinished | ( |  | ) | const | 
      
 
Returns true if the download finished or there was an error. 
 
 
◆ statusCode()
      
        
          | int 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 
 
 
◆ hadError()
      
        
          | bool URL::DownloadTask::hadError | ( |  | ) | const | 
      
 
Returns true if there was an error. 
 
 
◆ getTargetLocation()
      
        
          | File URL::DownloadTask::getTargetLocation | ( |  | ) | const | 
      
 
 
◆ juce_iosURLSessionNotify()
  
  | 
        
          | static void URL::DownloadTask::juce_iosURLSessionNotify | ( | const String & |  | ) |  |  | static | 
 
 
◆ contentLength
  
  | 
        
          | int64 URL::DownloadTask::contentLength = -1 |  | protected | 
 
 
◆ downloaded
  
  | 
        
          | int64 URL::DownloadTask::downloaded = 0 |  | protected | 
 
 
◆ finished
  
  | 
        
          | bool URL::DownloadTask::finished = false |  | protected | 
 
 
◆ error
  
  | 
        
          | bool URL::DownloadTask::error = false |  | protected | 
 
 
◆ httpCode
  
  | 
        
          | int URL::DownloadTask::httpCode = -1 |  | protected | 
 
 
◆ targetLocation
  
  | 
        
          | File URL::DownloadTask::targetLocation |  | protected | 
 
 
The documentation for this class was generated from the following file: