michael@0: /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim:set ts=2 sw=2 sts=2 et: */ 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: var gRegTestExtComponent = michael@0: { michael@0: /* nsISupports implementation. */ michael@0: QueryInterface: function (aIID) michael@0: { michael@0: if (!aIID.equals(Components.interfaces.nsISupports) && michael@0: !aIID.equals(Components.interfaces.nsIFactory)) michael@0: throw Components.results.NS_ERROR_NO_INTERFACE; michael@0: michael@0: return this; michael@0: }, michael@0: michael@0: /* nsIFactory implementation. */ michael@0: createInstance: function (aOuter, aIID) michael@0: { michael@0: if (null != aOuter) michael@0: throw Components.results.NS_ERROR_NO_AGGREGATION; michael@0: michael@0: return this.QueryInterface(aIID); michael@0: }, michael@0: michael@0: lockFactory: function (aDoLock) {} michael@0: }; michael@0: michael@0: const kClassID = Components.ID("{fe64efb7-c5ab-41a6-b639-e6c0f483181e}"); michael@0: this.NSGetFactory = function NSGetFactory(cid) michael@0: { michael@0: if (!cid.equals(kClassID)) michael@0: throw Components.results.NS_ERROR_NOT_IMPLEMENTED; michael@0: michael@0: return gRegTestExtComponent; michael@0: }