nsIDownload
| IID: | c891111e-92a6-47b8-bc46-874ebb61ac9d |
| Inherits From: | nsITransfer |
Represents a download object.
This interface is implemented by the following components:
Properties
readonly PRInt64 amountTransferred
The amount of bytes downloaded so far.
readonly nsICancelable cancelable
Object that can be used to cancel the download. Will be null after the download is finished.
readonly AString displayName
The user-readable description of the transfer.
readonly PRUint32 id
The id of the download that is stored in the database.
readonly nsIMIMEInfo MIMEInfo
Optional. If set, it will contain the target's relevant MIME information. This includes it's MIME Type, helper app, and whether that helper should be executed.
readonly PRInt32 percentComplete
The percentage of transfer completed. If the file size is unknown it'll be -1 here.
readonly nsIURI referrer
The referrer uri of the download. This is only valid for HTTP downloads, and can be null.
readonly PRBool resumable
Indicates if the download can be resumed after being paused or not. This is only the case if the download is over HTTP/1.1 or FTP and if the server supports it.
readonly PRInt64 size
The size of file in bytes. Unknown size is represented by -1.
readonly nsIURI source
The source of the transfer.
readonly double speed
The speed of the transfer in bytes/sec.
readonly PRInt64 startTime
The time a transfer was started.
readonly PRInt16 state
The state of the download.
readonly nsIURI target
The target of the transfer.
readonly nsILocalFile targetFile
The target of a download is always a file on the local file system.
References
This interface is passed as an argument to the following methods:
nsIDownloadProgressListener.onDownloadStateChange, nsIDownloadProgressListener.onProgressChange, nsIDownloadProgressListener.onSecurityChange, nsIDownloadProgressListener.onStateChange
This interface is returned from the following methods:
nsIDownloadManager.addDownload, nsIDownloadManager.getDownload
Reference documentation is generated from Mozilla's source.
