sbJobProgressService.js
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 const Cc = Components.classes;
28 const Ci = Components.interfaces;
29 const Cr = Components.results;
30 const Ce = Components.Exception;
31 const Cu = Components.utils;
32 
33 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
34 
35 function JobProgressService() {
36 }
37 JobProgressService.prototype = {
38  QueryInterface : XPCOMUtils.generateQI(
39  [Ci.sbIJobProgressService, Ci.nsIClassInfo]),
40  classDescription : 'Songbird Job Progress Service Implementation',
41  classID : Components.ID("{afef6b00-90d5-11dd-ad8b-0800200c9a66}"),
42  contractID : "@songbirdnest.com/Songbird/JobProgressService;1",
43  flags : Ci.nsIClassInfo.MAIN_THREAD_ONLY,
44  implementationLanguage : Ci.nsIProgrammingLanguage.JAVASCRIPT,
45  getHelperForLanguage : function(aLanguage) { return null; },
46  getInterfaces : function(count) {
47  var interfaces = [Ci.sbIJobProgressService,
48  Ci.nsIClassInfo,
49  Ci.nsISupports
50  ];
51  count.value = interfaces.length;
52  return interfaces;
53  },
54 
55  showProgressDialog: function(aJobProgress, aWindow, aTimeout) {
56  if (typeof(SBJobUtils) == "undefined") {
57  Cu.import("resource://app/jsmodules/SBJobUtils.jsm");
58  }
59  // Delegate!
60  SBJobUtils.showProgressDialog(aJobProgress, aWindow, aTimeout);
61  }
62 }
63 
64 
65 function NSGetModule(compMgr, fileSpec) {
66  return XPCOMUtils.generateModule([JobProgressService]);
67 }
const Ce
const Cu
sbDeviceFirmwareAutoCheckForUpdate prototype flags
sbDeviceFirmwareAutoCheckForUpdate prototype contractID
sbOSDControlService prototype QueryInterface
sbDeviceFirmwareAutoCheckForUpdate prototype classDescription
const Cr
sbDeviceFirmwareAutoCheckForUpdate prototype getHelperForLanguage
var count
Definition: test_bug7406.js:32
const Ci
return null
Definition: FeedWriter.js:1143
const Cc
sbDeviceFirmwareAutoCheckForUpdate prototype classID
function JobProgressService()
sbDeviceFirmwareAutoCheckForUpdate prototype getInterfaces
sbDeviceFirmwareAutoCheckForUpdate prototype interfaces
classDescription implementationLanguage
Definition: FeedWriter.js:1427