Fix typo in 9b54bd30006c008b4a951331b273613d5bac3abf
[pm.git] / xpcom / components / nsIFactory.idl
blob54152976f9998fca78a0b02f7df77ee5415bb4bb
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"
8 /**
9 * A class factory allows the creation of nsISupports derived
10 * components without specifying a concrete base class.
13 [scriptable, object, uuid(00000001-0000-0000-c000-000000000046)]
14 interface nsIFactory : nsISupports {
15 /**
16 * Creates an instance of a component.
18 * @param aOuter Pointer to a component that wishes to be aggregated
19 * in the resulting instance. This will be nullptr if no
20 * aggregation is requested.
21 * @param iid The IID of the interface being requested in
22 * the component which is being currently created.
23 * @param result [out] Pointer to the newly created instance, if successful.
24 * @throws NS_NOINTERFACE - Interface not accessible.
25 * @throws NS_ERROR_NO_AGGREGATION - if an 'outer' object is supplied, but the
26 * component is not aggregatable.
27 * NS_ERROR* - Method failure.
29 void createInstance(in nsISupports aOuter, in nsIIDRef iid,
30 [retval, iid_is(iid)] out nsQIResult result);
32 /**
33 * LockFactory provides the client a way to keep the component
34 * in memory until it is finished with it. The client can call
35 * LockFactory(PR_TRUE) to lock the factory and LockFactory(PR_FALSE)
36 * to release the factory.
38 * @param lock - Must be PR_TRUE or PR_FALSE
39 * @throws NS_ERROR* - Method failure.
41 void lockFactory(in boolean lock);