36 const PREFIX_ADDON_URI =
"urn:songbird:addon:";
49 return PREFIX_ADDON_URI +
id;
62 write :
function (buffer,
count){
66 writeFrom :
function (stream,
count){},
70 var serializer = Components.classes[
"@mozilla.org/rdf/xml-serializer;1"]
71 .createInstance(Components.interfaces.nsIRDFXMLSerializer);
74 serializer.QueryInterface(Components.interfaces.nsIRDFXMLSource);
75 serializer.Serialize(outputStream);
77 outputStream.data.split(
'\n').forEach(
function(line) {
78 dump(prefix + line +
"\n");
90 var rdfService = Components.classes[
"@mozilla.org/rdf/rdf-service;1"]
91 .getService(Components.interfaces.nsIRDFService);
92 var datasource = rdfService.GetDataSourceBlocking(
"rdf:addon-metadata");
99 var cu = Components.classes[
"@mozilla.org/rdf/container-utils;1"]
100 .getService(Components.interfaces.nsIRDFContainerUtils);
101 var container = cu.MakeSeq(datasource, itemRoot);
102 var addons = container.GetElements();
104 while (addons.hasMoreElements()) {
105 var addon = addons.getNext().QueryInterface(Components.interfaces.nsIRDFResource);
106 if (addon.Value ==
ADDON_NS(
"bluemonday@getnightingale.com")) {
117 rdfService.GetResource(
EM_NS(
"description"))),
true);
121 return Components.results.NS_OK;
function assertEqual(aExpected, aActual, aMessage)