Public Attributes

nsIDownload Interface Reference

Represents a download object. More...

import "nsIDownload.idl";

Inheritance diagram for nsIDownload:
Collaboration diagram for nsIDownload:

List of all members.

Public Attributes

readonly attribute nsILocalFile targetFile
 The target of a download is always a file on the local file system.
readonly attribute long percentComplete
 The percentage of transfer completed.
readonly attribute long long amountTransferred
 The amount of bytes downloaded so far.
readonly attribute long long size
 The size of file in bytes.
readonly attribute nsIURI source
 The source of the transfer.
readonly attribute nsIURI target
 The target of the transfer.
readonly attribute nsICancelable cancelable
 Object that can be used to cancel the download.
readonly attribute AString displayName
 The user-readable description of the transfer.
readonly attribute long long startTime
 The time a transfer was started.
readonly attribute double speed
 The speed of the transfer in bytes/sec.
readonly attribute nsIMIMEInfo MIMEInfo
 Optional.
readonly attribute unsigned long id
 The id of the download that is stored in the database.
readonly attribute short state
 The state of the download.
readonly attribute nsIURI referrer
 The referrer uri of the download.
readonly attribute boolean resumable
 Indicates if the download can be resumed after being paused or not.

Detailed Description

Represents a download object.

Note:
This object is no longer updated once it enters a completed state. Completed states are the following: nsIDownloadManager::DOWNLOAD_FINISHED nsIDownloadManager::DOWNLOAD_FAILED nsIDownloadManager::DOWNLOAD_CANCELED nsIDownloadManager::DOWNLOAD_BLOCKED_PARENTAL nsIDownloadManager::DOWNLOAD_DIRTY nsIDownloadManager::DOWNLOAD_BLOCKED_POLICY

Member Data Documentation

readonly attribute long long nsIDownload::amountTransferred

The amount of bytes downloaded so far.

Object that can be used to cancel the download.

Will be null after the download is finished.

readonly attribute AString nsIDownload::displayName

The user-readable description of the transfer.

readonly attribute unsigned long nsIDownload::id

The id of the download that is stored in the database.

readonly attribute nsIMIMEInfo nsIDownload::MIMEInfo

Optional.

If set, it will contain the target's relevant MIME information. This includes its MIME Type, helper app, and whether that helper should be executed.

readonly attribute long nsIDownload::percentComplete

The percentage of transfer completed.

If the file size is unknown it'll be -1 here.

readonly attribute nsIURI nsIDownload::referrer

The referrer uri of the download.

This is only valid for HTTP downloads, and can be null.

readonly attribute boolean 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 attribute long long nsIDownload::size

The size of file in bytes.

Unknown size is represented by -1.

readonly attribute nsIURI nsIDownload::source

The source of the transfer.

readonly attribute double nsIDownload::speed

The speed of the transfer in bytes/sec.

readonly attribute long long nsIDownload::startTime

The time a transfer was started.

readonly attribute short nsIDownload::state

The state of the download.

See also:
nsIDownloadManager and nsIXPInstallManagerUI
readonly attribute nsIURI nsIDownload::target

The target of the transfer.

The target of a download is always a file on the local file system.


The documentation for this interface was generated from the following file: