// XPCOM stuff

Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");

const CC = Components.classes;
const CI = Components.interfaces;

function YoonoHelp() {
}

YoonoHelp.prototype = {
  classDescription: "Display about:yoono-help page",
  classID:          Components.ID("{3c4de21f-22c9-4e8a-bc16-f8e2a69ebabe}"),
  contractID:       "@mozilla.org/network/protocol/about;1?what=yoono-help",
  QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIAboutModule]),

  newChannel : function(aURI) {
    if(!aURI.spec == "about:yoono-help") return;
    var ios = CC["@mozilla.org/network/io-service;1"].
              getService(CI.nsIIOService);

    var channel = ios.newChannel(
      "chrome://yoono/content/aboutYoonoHelp.xul",
      null,
      null
    );

    channel.originalURI = aURI;
    return channel;
  },

  getURIFlags: function(aURI) {
    return CI.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT;
  }
}


/**
* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
*/
if (XPCOMUtils.generateNSGetFactory)
    var NSGetFactory = XPCOMUtils.generateNSGetFactory([YoonoHelp]);
else
    var NSGetModule = XPCOMUtils.generateNSGetModule([YoonoHelp]);


