#include <sbHTTPMediaItemDownloadJob.h>
Public Member Functions | |
| virtual | ~sbHTTPMediaItemDownloadJob () |
Public Member Functions inherited from sbBaseMediaItemDownloadJob | |
| NS_DECL_ISUPPORTS NS_DECL_SBIMEDIAITEMDOWNLOADJOB NS_DECL_SBIJOBPROGRESS NS_DECL_SBIJOBCANCELABLE virtual NS_DECL_SBIFILEDOWNLOADERLISTENER | ~sbBaseMediaItemDownloadJob () |
Public Member Functions inherited from sbIMediaItemDownloadJob | |
| void | start () |
Public Member Functions inherited from sbIJobProgress | |
| nsIStringEnumerator | getErrorMessages () |
| Enumerate all the errors encountered during the job. More... | |
| void | addJobProgressListener (in sbIJobProgressListener aListener) |
| Add a listener to be notified when significant job progress has been made. More... | |
| void | removeJobProgressListener (in sbIJobProgressListener aListener) |
| Remove a previously added listener. More... | |
Public Member Functions inherited from sbIJobCancelable | |
| void | cancel () |
| Attempt to cancel the job Throws NS_ERROR_FAILURE if canceling fails. More... | |
Public Member Functions inherited from sbIFileDownloaderListener | |
| void | onProgress () |
| Called when progress is made on file download. More... | |
| void | onComplete () |
| Called when download has completed. More... | |
Static Public Member Functions | |
| static NS_DECL_ISUPPORTS_INHERITED nsresult | New (sbHTTPMediaItemDownloadJob **aJob, sbIMediaItem *aMediaItem, sbILibrary *aTargetLibrary=nsnull) |
Additional Inherited Members | |
Public Attributes inherited from sbIMediaItemDownloadJob | |
| readonly attribute nsIFile | downloadedFile |
| readonly attribute sbIPropertyArray | properties |
| attribute sbITemporaryFileFactory | temporaryFileFactory |
Public Attributes inherited from sbIJobProgress | |
| const unsigned short | STATUS_FAILED = 0x00 |
| Constant indicating that the job has completed with errors. More... | |
| const unsigned short | STATUS_SUCCEEDED = 0x10 |
| Constant indicating that the job has completed. More... | |
| const unsigned short | STATUS_RUNNING = 0x20 |
| Constant indicating that the job is active. More... | |
| readonly attribute unsigned short | status |
| Current status of the job. More... | |
| readonly attribute boolean | blocked |
| If true, progress of job is blocked (e.g., due to locked resource). More... | |
| readonly attribute AString | statusText |
| Localized message describing the status of the job. More... | |
| readonly attribute AString | titleText |
| Localized message describing the type or purpose of the job. More... | |
| readonly attribute unsigned long | progress |
| Number of work units completed. More... | |
| readonly attribute unsigned long | total |
| Total number of work units to be completed May be set to 0 if the job length is indeterminate. More... | |
| readonly attribute unsigned long | errorCount |
| Number of errors that have been encountered. More... | |
Public Attributes inherited from sbIJobCancelable | |
| readonly attribute boolean | canCancel |
| True if it is possible to cancel the job. More... | |
Protected Member Functions inherited from sbBaseMediaItemDownloadJob | |
| virtual nsresult | Start (nsIURI *aURI) |
| virtual nsresult | Stop () |
| virtual nsresult | GetDownloadURI (nsIURI **aURI) |
| virtual nsresult | Initialize () |
| sbBaseMediaItemDownloadJob (sbIMediaItem *aMediaItem, sbILibrary *aTargetLibrary=nsnull) | |
Protected Attributes inherited from sbBaseMediaItemDownloadJob | |
| PRLock * | mLock |
| nsCOMPtr< sbIMediaItem > | mMediaItem |
| nsCOMPtr< sbIMutablePropertyArray > | mProperties |
| nsCOMPtr< sbILibrary > | mTargetLibrary |
| nsCOMPtr< sbIFileDownloader > | mFileDownloader |
| nsCOMPtr< sbITemporaryFileFactory > | mTemporaryFileFactory |
| nsTArray< nsCOMPtr < sbIJobProgressListener > > | mListenerList |
| PRUint16 | mStatus |
This class implements sbIMediaItemDownloadJob for HTTP media items.
Definition at line 63 of file sbHTTPMediaItemDownloadJob.h.
|
virtual |
Destroy an HTTP media item download job instance.
Definition at line 132 of file sbHTTPMediaItemDownloadJob.cpp.
|
static |
Create and return in aJob a new HTTP media item download job to download the media item specified by aMediaItem for the library specified by aTargetLibrary. If aTargetLibrary is not spcified, create a job to download for the main library.
| aJob | Returned download job. |
| aMediaItem | Media item to download. |
| aTargetLibrary | Library for which the media item will be downloaded. |