michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: const Cc = Components.classes; michael@0: const Ci = Components.interfaces; michael@0: michael@0: Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); michael@0: michael@0: #include ./content/listmanager.js michael@0: michael@0: var modScope = this; michael@0: function Init() { michael@0: // Pull the library in. michael@0: var jslib = Cc["@mozilla.org/url-classifier/jslib;1"] michael@0: .getService().wrappedJSObject; michael@0: Function.prototype.inherits = jslib.Function.prototype.inherits; michael@0: modScope.G_Preferences = jslib.G_Preferences; michael@0: modScope.G_PreferenceObserver = jslib.G_PreferenceObserver; michael@0: modScope.G_ObserverServiceObserver = jslib.G_ObserverServiceObserver; michael@0: modScope.G_Debug = jslib.G_Debug; michael@0: modScope.G_Assert = jslib.G_Assert; michael@0: modScope.G_debugService = jslib.G_debugService; michael@0: modScope.G_Alarm = jslib.G_Alarm; michael@0: modScope.BindToObject = jslib.BindToObject; michael@0: modScope.PROT_XMLFetcher = jslib.PROT_XMLFetcher; michael@0: modScope.RequestBackoff = jslib.RequestBackoff; michael@0: michael@0: // We only need to call Init once. michael@0: modScope.Init = function() {}; michael@0: } michael@0: michael@0: function RegistrationData() michael@0: { michael@0: } michael@0: RegistrationData.prototype = { michael@0: classID: Components.ID("{ca168834-cc00-48f9-b83c-fd018e58cae3}"), michael@0: _xpcom_factory: { michael@0: createInstance: function(outer, iid) { michael@0: if (outer != null) michael@0: throw Components.results.NS_ERROR_NO_AGGREGATION; michael@0: Init(); michael@0: return (new PROT_ListManager()).QueryInterface(iid); michael@0: } michael@0: }, michael@0: }; michael@0: michael@0: this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RegistrationData]);