1 // -*- coding: utf-8 -*-
2 // vi:si:et:sw=2:sts=2:ts=2
4 JavaScript global constructor swarmTransport
7 see LICENSE.txt for license information
10 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
12 const Cc = Components.classes;
13 const Ci = Components.interfaces;
15 function SwarmTransport() {
18 SwarmTransport.prototype =
20 classDescription: "swarmTransport",
21 classID: Components.ID("3dfea7b2-52e6-467f-b2c6-19fd6d4596bf"),
22 contractID: "@p2pnext.org/tribe/swarmTransport;1",
23 QueryInterface: XPCOMUtils.generateQI(
24 [Ci.tribeISwarmTransport,
25 Ci.nsISecurityCheckedComponent,
26 Ci.nsISupportsWeakReference,
28 _xpcom_factory : SwarmTransportFactory,
29 _xpcom_categories : [{
30 category: "JavaScript global constructor",
31 entry: "swarmTransport"
36 var SwarmTransportFactory =
38 createInstance: function (outer, iid)
41 throw Components.results.NS_ERROR_NO_AGGREGATION;
43 if (!iid.equals(Ci.nsIProtocolHandler) &&
44 !iid.equals(Ci.nsISupports) )
45 throw Components.results.NS_ERROR_NO_INTERFACE;
47 return (new SwarmTransport()).QueryInterface(iid);
51 function NSGetModule(compMgr, fileSpec) {
52 return XPCOMUtils.generateModule([SwarmTransport]);