Songbird / Development / Songbird Add-Ons API Documentation

sbIJobProgress Interface Reference

Generic interface for exposing long running jobs to the UI. More...

import "sbIJobProgress.idl";

Inheritance diagram for sbIJobProgress:

sbIJobProgressUI sbILocalDatabaseMigrationHandler List of all members.

Public Member Functions

nsIStringEnumerator getErrorMessages ()
 Enumerate all the errors encountered during the job.
void addJobProgressListener (in sbIJobProgressListener aListener)
 Add a listener to be notified when significant job progress has been made.
void removeJobProgressListener (in sbIJobProgressListener aListener)
 Remove a previously added listener.

Public Attributes

const unsigned short STATUS_FAILED = 0x00
 Constant indicating that the job has completed with errors.
const unsigned short STATUS_SUCCEEDED = 0x10
 Constant indicating that the job has completed.
const unsigned short STATUS_RUNNING = 0x20
 Constant indicating that the job is active.
readonly attribute unsigned
short 
status
 Current status of the job.
readonly attribute AString statusText
 Localized message describing the status of the job.
readonly attribute AString titleText
 Localized message describing the type or purpose of the job.
readonly attribute unsigned
long 
progress
 Number of work units completed.
readonly attribute unsigned
long 
total
 Total number of work units to be completed May be set to 0 if the job length is indeterminate.
readonly attribute unsigned
long 
errorCount
 Number of errors that have been encountered.

Detailed Description

Generic interface for exposing long running jobs to the UI.

This is a first-stab at a generic way to expose job progress to the UI. This interface should be used for things like file importing, copying to devices and metadata syncing.

Note:
This interface is likely to change before 1.0

Definition at line 45 of file sbIJobProgress.idl.


Member Function Documentation

nsIStringEnumerator sbIJobProgress::getErrorMessages (  ) 

Enumerate all the errors encountered during the job.

Returns:
A string enumerator of localized error messages

void sbIJobProgress::addJobProgressListener ( in sbIJobProgressListener  aListener  ) 

Add a listener to be notified when significant job progress has been made.

Note:
Notification frequency is at the discretion of the sbIJobProgress implementor
Parameters:
aListener The listener instance

void sbIJobProgress::removeJobProgressListener ( in sbIJobProgressListener  aListener  ) 

Remove a previously added listener.

Parameters:
aListener The listener instance


Member Data Documentation

readonly attribute unsigned short sbIJobProgress::status

Current status of the job.

See also:
STATUS_FAILED, STATUS_RUNNING, etc.

Definition at line 66 of file sbIJobProgress.idl.


The documentation for this interface was generated from the following file:
Generated on Tue Mar 10 14:28:59 2009 for Songbird by  doxygen 1.5.2