sbIFileDownloader Interface Reference

import"sbIFileDownloader.idl";

Inheritance diagram for sbIFileDownloader:
[legend]
Collaboration diagram for sbIFileDownloader:
[legend]

Public Member Functions

void start ()
 Start file download from source URI to destination file. If source URI is not specified, use source URI spec. If destination file is not specified, create a temporary one. More...
 
void cancel ()
 Cancel file download. More...
 

Public Attributes

readonly attribute unsigned
long long 
bytesToDownload
 Number of bytes in file being downloaded. More...
 
readonly attribute unsigned
long long 
bytesDownloaded
 Number of bytes in file that have been downloaded. More...
 
readonly attribute unsigned long percentComplete
 Percentage (0-100) of bytes of file that have been downloaded. More...
 
readonly attribute boolean complete
 True if file download has completed, whether successful or not. More...
 
readonly attribute boolean succeeded
 True if file downloaded successfully. Will be false if download is cancelled. More...
 
attribute sbIFileDownloaderListener listener
 Listener for download events. More...
 
attribute nsIURI sourceURI
 URI of source of file. More...
 
attribute AString sourceURISpec
 URI spec of source of file. More...
 
attribute nsIFile destinationFile
 Destination file. If not set when download is started, a temporary file will be created and set in destinationFile. More...
 
attribute AString destinationFileExtension
 Destination file extension. If a temporary file is created, set its file extension to destinationFileExtension. More...
 
attribute sbITemporaryFileFactory temporaryFileFactory
 Temporary file factory to use for any temporary files. More...
 
readonly attribute nsIRequest request
 The request object used during the file download. More...
 

Detailed Description

This interface provides support for downloading files.

"@songbirdnest.com/Songbird/FileDownloader;1" Use create instance with this component.

Definition at line 45 of file sbIFileDownloader.idl.

Member Function Documentation

void sbIFileDownloader::cancel ( )

Cancel file download.

void sbIFileDownloader::start ( )

Start file download from source URI to destination file. If source URI is not specified, use source URI spec. If destination file is not specified, create a temporary one.

Member Data Documentation

readonly attribute unsigned long long sbIFileDownloader::bytesDownloaded

Number of bytes in file that have been downloaded.

Definition at line 58 of file sbIFileDownloader.idl.

readonly attribute unsigned long long sbIFileDownloader::bytesToDownload

Number of bytes in file being downloaded.

Definition at line 51 of file sbIFileDownloader.idl.

readonly attribute boolean sbIFileDownloader::complete

True if file download has completed, whether successful or not.

Definition at line 72 of file sbIFileDownloader.idl.

attribute nsIFile sbIFileDownloader::destinationFile

Destination file. If not set when download is started, a temporary file will be created and set in destinationFile.

Definition at line 109 of file sbIFileDownloader.idl.

attribute AString sbIFileDownloader::destinationFileExtension

Destination file extension. If a temporary file is created, set its file extension to destinationFileExtension.

Definition at line 117 of file sbIFileDownloader.idl.

attribute sbIFileDownloaderListener sbIFileDownloader::listener

Listener for download events.

Definition at line 87 of file sbIFileDownloader.idl.

readonly attribute unsigned long sbIFileDownloader::percentComplete

Percentage (0-100) of bytes of file that have been downloaded.

Definition at line 65 of file sbIFileDownloader.idl.

readonly attribute nsIRequest sbIFileDownloader::request

The request object used during the file download.

Note
The object is only available after calling start and becomes invalid when calling cancel.

Definition at line 146 of file sbIFileDownloader.idl.

attribute nsIURI sbIFileDownloader::sourceURI

URI of source of file.

Definition at line 94 of file sbIFileDownloader.idl.

attribute AString sbIFileDownloader::sourceURISpec

URI spec of source of file.

Definition at line 101 of file sbIFileDownloader.idl.

readonly attribute boolean sbIFileDownloader::succeeded

True if file downloaded successfully. Will be false if download is cancelled.

Definition at line 80 of file sbIFileDownloader.idl.

attribute sbITemporaryFileFactory sbIFileDownloader::temporaryFileFactory

Temporary file factory to use for any temporary files.

Definition at line 123 of file sbIFileDownloader.idl.


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