1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include
"nsISupports.idl"
9 * A class factory allows the creation of nsISupports derived
10 * components without specifying a concrete base class.
13 [scriptable
, object, uuid(1bb40a56
-9223-41e6
-97d4
-da97bdeb6a4d
)]
14 interface nsIFactory
: nsISupports
{
16 * Creates an instance of a component.
18 * @param iid The IID of the interface being requested in
19 * the component which is being currently created.
20 * @param result [out] Pointer to the newly created instance, if successful.
21 * @throws NS_NOINTERFACE - Interface not accessible.
22 * NS_ERROR* - Method failure.
24 void createInstance
(in nsIIDRef iid
,
25 [retval, iid_is(iid
)] out nsQIResult result
);