@mozilla.org/download;1
This component implements the following interfaces:
Constants
Properties
readonly PRInt64 nsIDownload.amountTransferred
The amount of bytes downloaded so far.
readonly nsICancelable nsIDownload.cancelable
Object that can be used to cancel the download. Will be null after the download is finished.
readonly AString nsIDownload.displayName
The user-readable description of the transfer.
readonly PRUint32 nsIDownload.id
The id of the download that is stored in the database.
readonly nsIMIMEInfo nsIDownload.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 nsIDownload.percentComplete
The percentage of transfer completed. If the file size is unknown it'll be -1 here.
readonly nsIURI nsIDownload.referrer
The referrer uri of the download. This is only valid for HTTP downloads, and can be null.
readonly PRBool nsIDownload.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 nsIDownload.size
The size of file in bytes. Unknown size is represented by -1.
readonly nsIURI nsIDownload.source
The source of the transfer.
readonly double nsIDownload.speed
The speed of the transfer in bytes/sec.
readonly PRInt64 nsIDownload.startTime
The time a transfer was started.
readonly PRInt16 nsIDownload.state
The state of the download.
readonly nsIURI nsIDownload.target
The target of the transfer.
readonly nsILocalFile nsIDownload.targetFile
The target of a download is always a file on the local file system.
Methods
| Interface | Method |
|---|---|
| nsITransfer |
void init ( nsIURI source , nsIURI target , AString displayName , nsIMIMEInfo MIMEInfo , PRTime startTime , nsILocalFile tempFile , nsICancelable cancelable )
|
| nsIWebProgressListener |
void onLocationChange ( nsIWebProgress webProgress , nsIRequest request , nsIURI location )
|
| nsIWebProgressListener |
void onProgressChange ( nsIWebProgress webProgress , nsIRequest request , PRInt32 curSelfProgress , PRInt32 maxSelfProgress , PRInt32 curTotalProgress , PRInt32 maxTotalProgress )
|
| nsIWebProgressListener2 |
void onProgressChange64 ( nsIWebProgress webProgress , nsIRequest request , PRInt64 curSelfProgress , PRInt64 maxSelfProgress , PRInt64 curTotalProgress , PRInt64 maxTotalProgress )
|
| nsIWebProgressListener2 |
PRBool onRefreshAttempted ( nsIWebProgress webProgress , nsIURI refreshURI , PRInt32 millis , PRBool sameURI )
|
| nsIWebProgressListener |
void onSecurityChange ( nsIWebProgress webProgress , nsIRequest request , PRUint32 state )
|
| nsIWebProgressListener |
void onStateChange ( nsIWebProgress webProgress , nsIRequest request , PRUint32 stateFlags , nsresult status )
|
| nsIWebProgressListener |
void onStatusChange ( nsIWebProgress webProgress , nsIRequest request , nsresult status , PRUnichar* message )
|
Reference documentation is generated from Mozilla's source.
