ngLocalizableEqualizerPreset.js
Go to the documentation of this file.
1 /*
2 //
3 // BEGIN NIGHTINGALE GPL
4 //
5 // This file is part of the Nightingale web player.
6 //
7 // http://getnightingale.com
8 //
9 // This file may be licensed under the terms of of the
10 // GNU General Public License Version 2 (the "GPL").
11 //
12 // Software distributed under the License is distributed
13 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
14 // express or implied. See the GPL for the specific language
15 // governing rights and limitations.
16 //
17 // You should have received a copy of the GPL along with this
18 // program. If not, go to http://www.gnu.org/licenses/gpl.html
19 // or write to the Free Software Foundation, Inc.,
20 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 //
22 // END NIGHTINGALE GPL
23 //
24 */
25 
26 "use strict";
27 
28 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
29 
31  XPCOMUtils.defineLazyServiceGetter(this, "_gMM", "@songbirdnest.com/Songbird/Mediacore/Manager;1", "sbIMediacoreManager");
32 }
33 
41  classDescription: "Basic mutable equalizer preset with localizable name",
42  classID: Components.ID("{1c4b8b2c-a2c1-4652-9fb3-523face810b9}"),
43  contractID: "@getnightingale.com/equalizer-presets/localizable;1",
44  QueryInterface: XPCOMUtils.generateQI([Components.interfaces.ngILocalizableEqualizerPreset]),
45 
46  _gMM: null,
47 
48  _values: null,
49  _stringBundle: null,
50  _property: null,
51 
52  get stringBundle() {
53  return this._stringBundle;
54  },
55  set stringBundle(val) {
56  this._stringBundle = val;
57  },
58  get property() {
59  return this._property;
60  },
61  set property(val) {
62  this._property = val;
63  },
64  get name() {
65  if(this._stringBundle && this._property) {
66  var name = this._property;
67  try {
68  name = this._stringBundle.GetStringFromName(this._property);
69  }
70  catch(e) {
71  Components.utils.reportError(e);
72  }
73  finally {
74  return name;
75  }
76  }
77  else
78  throw Components.results.NS_ERROR_NULL_POINTER;
79  },
80 
81  get values() {
82  return this._values;
83  },
84  setValues: function(aValues) {
85  if(aValues instanceof Components.interfaces.nsIArray &&
86  aValues.length == 10) //TODO shouldn't hardcode 10, though the equalizer component may not yet be initialized
87  this._values = aValues;
88  else
89  throw Components.results.NS_ERROR_ILLEGAL_VALUE;
90  }
91 };
92 
93 var NSGetModule = XPCOMUtils.generateNSGetModule([ngLocalizableEqualizerPreset]);
sbDeviceFirmwareAutoCheckForUpdate prototype contractID
sbOSDControlService prototype QueryInterface
sbDeviceFirmwareAutoCheckForUpdate prototype classDescription
this _dialogInput val(dateText)
return null
Definition: FeedWriter.js:1143
sbDeviceFirmwareAutoCheckForUpdate prototype classID
function ngLocalizableEqualizerPreset()