com.evolution.player.core.network
Interface IDownloadManager


public interface IDownloadManager

A download manager manages all downloads.

Clients must not implement.

Since:
0.6
See Also:
EvolutionPlayerCore.getDownloadManager()

Nested Class Summary
static class IDownloadManager.TransferStatus
          The states a file transfer can have.
 
Method Summary
 void addDownload(Download download)
          Add the given download to the downloads.
 int getDownloadCount()
          The amount of downloads currently managed.
 Download[] getDownloads()
          All currently known downloads.
 java.lang.String getErrorMessage(Download download)
          A human readable reason why the given download failed, or null if the given download did not fail.
 TransferProgressMonitor getProgressMonitor(Download download)
          Returns the transfer progress monitor for the given download or null if the download is not known or DONE.
 IDownloadManager.TransferStatus getStatus(Download download)
          Current status of the file transfer.
 

Method Detail

addDownload

void addDownload(Download download)
Add the given download to the downloads. The manager will start the download at appropriate time.

Parameters:
download - the download to manage

getDownloadCount

int getDownloadCount()
The amount of downloads currently managed.

Returns:
the download count

getDownloads

Download[] getDownloads()
All currently known downloads.

Returns:
all known downloads

getProgressMonitor

TransferProgressMonitor getProgressMonitor(Download download)
Returns the transfer progress monitor for the given download or null if the download is not known or DONE.

Parameters:
download - the download for which to retrieve the monitor for
Returns:
the progress monitor for the given download or null

getStatus

IDownloadManager.TransferStatus getStatus(Download download)
Current status of the file transfer.

Parameters:
download - the download for which to receive the status for
Returns:
the current status

getErrorMessage

java.lang.String getErrorMessage(Download download)
A human readable reason why the given download failed, or null if the given download did not fail.

Parameters:
download - the download for wich to retrieve the error message
Returns:
the error message or null