32 const Cc = Components.classes;
33 const Ci = Components.interfaces;
34 const Cr = Components.results;
42 script:
"sbPlaylistHandlerUtils.js",
45 {cid: Components.ID(
"{ba32eac9-6732-4d5d-be50-156f52b5368b}"),
46 contractid:
"@songbirdnest.com/Songbird/Playlist/Reader/M3U;1",
47 script:
"sbM3UPlaylistHandler.js",
49 category:
"playlist-reader",
50 categoryEntry:
"m3u"},
52 {cid: Components.ID(
"{a6937260-0d7f-4721-8f31-4b8455cf72c9}"),
53 contractid:
"@songbirdnest.com/Songbird/Playlist/Reader/PLS;1",
54 script:
"sbPLSPlaylistHandler.js",
56 category:
"playlist-reader",
57 categoryEntry:
"pls"},
59 {cid: Components.ID(
"{fc67054f-3a60-4d8e-a2ec-fc1c8feac14c}"),
60 contractid:
"@songbirdnest.com/Songbird/Playlist/Reader/Feed;1",
61 script:
"sbFeedPlaylistHandler.js",
63 category:
"playlist-reader",
64 categoryEntry:
"feed"},
66 {cid: Components.ID(
"{75c8f646-e75a-4743-89cd-412fa083ce07}"),
67 contractid:
"@songbirdnest.com/Songbird/Playlist/Reader/HTML;1",
68 script:
"sbHTMLPlaylistHandler.js",
70 category:
"playlist-reader",
71 categoryEntry:
"html"},
73 {cid: Components.ID(
"{e2eeb4bd-85b2-4eda-8a7c-90ad7f04957c}"),
74 contractid:
"@songbirdnest.com/Songbird/Playlist/Reader/ASX;1",
75 script:
"sbASXPlaylistHandler.js",
77 category:
"playlist-reader",
82 mScriptsLoaded:
false,
83 loadScripts:
function () {
84 if (this.mScriptsLoaded)
87 const jssslContractID =
"@mozilla.org/moz/jssubscript-loader;1";
88 const jssslIID =
Ci.mozIJSSubScriptLoader;
90 const dirsvcContractID =
"@mozilla.org/file/directory_service;1";
91 const propsIID =
Ci.nsIProperties;
93 const iosvcContractID =
"@mozilla.org/network/io-service;1";
94 const iosvcIID =
Ci.nsIIOService;
96 var loader =
Cc[jssslContractID].getService(jssslIID);
97 var dirsvc =
Cc[dirsvcContractID].getService(propsIID);
98 var
iosvc =
Cc[iosvcContractID].getService(iosvcIID);
102 var appdir = __LOCATION__.parent.parent;
103 appdir.append(
"scripts");
110 var f = appdir.clone();
111 f.append(scriptName);
114 var fileurl = iosvc.newFileURI(f);
115 loader.loadSubScript(fileurl.spec,
null);
118 dump(
"Error while loading " + fileurl.spec +
"\n");
123 this.mScriptsLoaded =
true;
126 registerSelf:
function (compMgr, fileSpec, location, type) {
127 compMgr = compMgr.QueryInterface(
Ci.nsIComponentRegistrar);
129 var catman =
Cc[
"@mozilla.org/categorymanager;1"]
130 .getService(
Ci.nsICategoryManager);
135 compMgr.registerFactoryLocation(comp.cid,
145 contractid =
"service," + comp.contractid;
147 contractid = comp.contractid;
148 catman.addCategoryEntry(comp.category, comp.categoryEntry,
149 contractid,
true,
true);
157 if (!aIID.equals(
Ci.nsISupports) &&
158 !aIID.equals(
Ci.nsIFactory))
159 throw Cr.NS_ERROR_NO_INTERFACE;
165 throw Cr.NS_ERROR_NO_AGGREGATION;
174 if (!iid.equals(
Ci.nsIFactory))
175 throw Cr.NS_ERROR_NOT_IMPLEMENTED;
177 if (!this.mScriptsLoaded)
190 throw Cr.NS_ERROR_NO_INTERFACE;
193 canUnload:
function(compMgr) {
SafebrowsingApplicationMod prototype registerSelf
sbOSDControlService prototype QueryInterface
SafebrowsingApplicationMod prototype getClassObject
DataRemote prototype constructor
function NSGetModule(compMgr, fileSpec)
var sbPlaylistHandlerModule
_getSelectedPageStyle s i