41 const K_PREF =
"metadata.lookup.default_provider";
43 .getService(
Ci.fuelIApplication);
48 if (providerValue && providerValue.value) {
49 Application.prefs.setValue(K_PREF, providerValue.value);
60 var bag =
Cc[
"@mozilla.org/hash-property-bag;1"]
61 .createInstance(
Ci.nsIWritablePropertyBag);
62 for (var
name in aParams) {
63 bag.setProperty(
name, aParams[
name]);
68 function newTOC(aFirstTrack, aLastTrack, aLead)
70 var tocClass =
Cc[
"@songbirdnest.com/Songbird/MockCDTOC;1"];
71 var toc = tocClass.createInstance(
Ci.sbIMockCDTOC);
72 toc.initialize(aFirstTrack, aLastTrack, aLead);
79 var toc =
newTOC(1, 15, 285675);
82 toc.addTocEntry(32, 309, 0,
Ci.sbICDTOCEntry.TRACKMODE_AUDIO);
83 toc.addTocEntry(23260, 231, 1,
Ci.sbICDTOCEntry.TRACKMODE_AUDIO);
84 toc.addTocEntry(40612, 242, 2,
Ci.sbICDTOCEntry.TRACKMODE_AUDIO);
85 toc.addTocEntry(58770, 191, 3,
Ci.sbICDTOCEntry.TRACKMODE_AUDIO);
86 toc.addTocEntry(73145, 310, 4,
Ci.sbICDTOCEntry.TRACKMODE_AUDIO);
87 toc.addTocEntry(96415, 290, 5,
Ci.sbICDTOCEntry.TRACKMODE_AUDIO);
88 toc.addTocEntry(118232, 301, 6,
Ci.sbICDTOCEntry.TRACKMODE_AUDIO);
89 toc.addTocEntry(140867, 259, 7,
Ci.sbICDTOCEntry.TRACKMODE_AUDIO);
90 toc.addTocEntry(160322, 316, 8,
Ci.sbICDTOCEntry.TRACKMODE_AUDIO);
91 toc.addTocEntry(184085, 222, 9,
Ci.sbICDTOCEntry.TRACKMODE_AUDIO);
92 toc.addTocEntry(200777, 236, 10,
Ci.sbICDTOCEntry.TRACKMODE_AUDIO);
93 toc.addTocEntry(218535, 185, 11,
Ci.sbICDTOCEntry.TRACKMODE_AUDIO);
94 toc.addTocEntry(232437, 211, 12,
Ci.sbICDTOCEntry.TRACKMODE_AUDIO);
95 toc.addTocEntry(248320, 184, 13,
Ci.sbICDTOCEntry.TRACKMODE_AUDIO);
96 toc.addTocEntry(262145, 313, 14,
Ci.sbICDTOCEntry.TRACKMODE_AUDIO);
103 var toc =
newTOC(1, 1, 131072);
104 toc.addTocEntry(32, 32, 0,
Ci.sbICDTOCEntry.TRACKMODE_AUDIO);
110 var deviceController =
Cc[
"@songbirdnest.com/Songbird/CDDeviceController;1"]
111 .createInstance(
Ci.sbIDeviceController);
112 var cdDevice =
Cc[
"@songbirdnest.com/Songbird/MockCDDevice;1"]
113 .createInstance(
Ci.sbIMockCDDevice)
114 .QueryInterface(
Ci.sbICDDevice);
116 cdDevice.initialize(deviceName,
120 Ci.sbIDeviceController.AUDIO_DISC_TYPE,
124 cdDevice.setDiscTOC(toc);
126 var deviceParams =
new Object;
127 deviceParams[
"sbICDDevice"] = cdDevice;
function sbCreateDevice(deviceName, toc)
function sbMakeMidnightRock()
function sbMakeInstantJunk()
function head_ForceLookupProvider()
function createPropertyBag(aParams)
function newTOC(aFirstTrack, aLastTrack, aLead)