sbIJobProgress.idl
Go to the documentation of this file.
1 /*
2 //
3 // BEGIN SONGBIRD GPL
4 //
5 // This file is part of the Songbird web player.
6 //
7 // Copyright(c) 2005-2008 POTI, Inc.
8 // http://songbirdnest.com
9 //
10 // This file may be licensed under the terms of of the
11 // GNU General Public License Version 2 (the "GPL").
12 //
13 // Software distributed under the License is distributed
14 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
15 // express or implied. See the GPL for the specific language
16 // governing rights and limitations.
17 //
18 // You should have received a copy of the GPL along with this
19 // program. If not, go to http://www.gnu.org/licenses/gpl.html
20 // or write to the Free Software Foundation, Inc.,
21 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 //
23 // END SONGBIRD GPL
24 //
25  */
26 
27 #include "nsISupports.idl"
28 
29 interface nsIStringEnumerator;
30 interface sbIJobProgressListener;
31 
32 
33 
44 [scriptable, uuid(13979e02-1dd2-11b2-9e89-eefb590278a8)]
46 {
50  const unsigned short STATUS_FAILED = 0x00;
51 
55  const unsigned short STATUS_SUCCEEDED = 0x10;
56 
60  const unsigned short STATUS_RUNNING = 0x20;
61 
66  readonly attribute unsigned short status;
67 
71  readonly attribute boolean blocked;
72 
76  readonly attribute AString statusText;
77 
81  readonly attribute AString titleText;
82 
83 
87  readonly attribute unsigned long progress;
88 
93  readonly attribute unsigned long total;
94 
95 
99  readonly attribute unsigned long errorCount;
100 
106 
107 
114 
120 };
121 
122 
123 
128 [scriptable, function, uuid(75302170-1174-11dd-bd0b-0200200c9a66)]
130 {
136  void onJobProgress(in sbIJobProgress aJobProgress);
137 };
138 
145 [scriptable, uuid(2693a1e5-7e07-4730-bf3b-68e76dd95f90)]
147 {
151  readonly attribute unsigned long elapsedTime;
152 
157  readonly attribute unsigned long remainingTime;
158 
159 };
160 
void onJobProgress(in sbIJobProgress aJobProgress)
Notification that an object implementing sbIJobProgress has changed.
readonly attribute AString statusText
Localized message describing the status of the job.
readonly attribute unsigned long errorCount
Number of errors that have been encountered.
Generic interface for exposing long running jobs to the UI.
const unsigned short STATUS_SUCCEEDED
Constant indicating that the job has completed.
var uuid
Generic interface extending sbIJobProgress that can track expected time, etc in addition to abstract ...
const unsigned short STATUS_RUNNING
Constant indicating that the job is active.
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.
readonly attribute unsigned long elapsedTime
Time elapsed while working on this job, in milliseconds.
readonly attribute unsigned long remainingTime
Estimated time remaining for this job to complete, in milliseconds. May be -1 if the remaining time i...
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.
Implemented to receive notifications from sbIJobProgress interfaces.
readonly attribute AString titleText
Localized message describing the type or purpose of the job.
readonly attribute unsigned short status
Current status of the job.
const unsigned short STATUS_FAILED
Constant indicating that the job has completed with errors.
readonly attribute boolean blocked
If true, progress of job is blocked (e.g., due to locked resource).