@mozilla.org/download-manager;1
This component implements the following interfaces:
Constants
Properties
readonly PRInt32 nsIDownloadManager.activeDownloadCount
The number of files currently being downloaded.
readonly nsISimpleEnumerator nsIDownloadManager.activeDownloads
An enumeration of active nsIDownloads
readonly PRBool nsIDownloadManager.canCleanUp
Whether or not there are downloads that can be cleaned up (removed) i.e. downloads that have completed, have failed or have been canceled.
readonly mozIStorageConnection nsIDownloadManager.DBConnection
The database connection to the downloads database.
readonly nsILocalFile nsIDownloadManager.defaultDownloadsDirectory
Returns the platform default downloads directory.
readonly nsILocalFile nsIDownloadManager.userDownloadsDirectory
Returns the user configured downloads directory. The path is dependent on two user configurable prefs set in preferences:
Browser.download.folderList Indicates the location users wish to save downloaded files too. Values: 0 - The desktop is the default download location. 1 - The system's downloads folder is the default download location. 2 - The default download location is elsewhere as specified in browser.download.dir. If invalid, userDownloadsDirectory will fallback on defaultDownloadsDirectory.
Browser.download.dir - A local path the user may have selected at some point where downloaded files are saved. The use of which is enabled when folderList equals 2.
Methods
| Interface | Method |
|---|---|
| nsIDownloadManager |
nsIDownload addDownload ( PRInt16 downloadType , nsIURI source , nsIURI target , AString displayName , nsIMIMEInfo MIMEInfo , PRTime startTime , nsILocalFile tempFile , nsICancelable cancelable )
|
| nsIDownloadManager |
void addListener ( nsIDownloadProgressListener listener )
|
| nsIDownloadManager |
void cancelDownload ( PRUint32 ID )
|
| nsIDownloadManager |
void cleanUp ( )
|
| nsIDownloadManager |
nsIDownload getDownload ( PRUint32 ID )
|
| nsIDOMEventListener |
void handleEvent ( nsIDOMEvent event )
|
| nsIObserver |
void observe ( nsISupports subject , char* topic , PRUnichar* data )
|
| nsIDownloadManager |
void pauseDownload ( PRUint32 ID )
|
| nsIDownloadManager |
void removeDownload ( PRUint32 ID )
|
| nsIDownloadManager |
void removeListener ( nsIDownloadProgressListener listener )
|
| nsIDownloadManager |
void resumeDownload ( PRUint32 ID )
|
| nsIDownloadManager |
void retryDownload ( PRUint32 ID )
|
Reference documentation is generated from Mozilla's source.
