49 const Cc = Components.classes;
50 const Ci = Components.interfaces;
51 const Cr = Components.results;
52 const Cu = Components.utils;
62 Components.utils.import(
"resource://gre/modules/XPCOMUtils.jsm");
78 hasFirstRunCompleted:
function SBUtils_hasFirstRunCompleted() {
81 .getService(
Ci.fuelIApplication);
82 var hasCompleted = Application.prefs.getValue(
"songbird.firstrun.check.0.3",
98 deferFunction:
function SBUtils_deferFunction(aFunction) {
100 var threadManager =
Cc[
"@mozilla.org/thread-manager;1"]
101 .getService(
Ci.nsIThreadManager);
105 var runnable = { run: aFunction };
106 currentThread.dispatch(runnable,
Ci.nsIEventTarget.DISPATCH_NORMAL);
118 setDescriptionText:
function SBUtils_setDescriptionText(aDescriptionElem,
121 while (aDescriptionElem.firstChild)
122 aDescriptionElem.removeChild(aDescriptionElem.firstChild);
125 var textNode = aDescriptionElem.ownerDocument.createTextNode(aText);
126 aDescriptionElem.appendChild(textNode);
165 this._enumerator = aEnumerator;
166 this._filterFunc = aFilterFunc;
227 getNext:
function SBFilteredEnumerator_getNext() {
229 var nextElement = this._getNext();
231 throw Components.results.NS_ERROR_FAILURE;
234 this._nextElement =
null;
261 _getNext:
function SBFilteredEnumerator__getNext() {
263 if (this._nextElement)
264 return this._nextElement;
267 while (this._enumerator.hasMoreElements()) {
268 var nextElement = this._enumerator.getNext();
269 if (this._filterFunc(nextElement)) {
270 this._nextElement = nextElement;
275 return this._nextElement;
GeneratorThread currentThread
function SBFilteredEnumerator(aEnumerator, aFilterFunc)
sbOSDControlService prototype QueryInterface
DataRemote prototype constructor
SimpleArrayEnumerator prototype hasMoreElements