Bug 1850713: remove duplicated setting of early hint preloader id in `ScriptLoader...
[gecko.git] / xpcom / components / nsIComponentManager.idl
blob9abde9960c7976ce45a8f1da926d7e059f602514
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 /**
7 * The nsIComponentManager interface.
8 */
10 #include "nsISupports.idl"
12 interface nsIFile;
13 interface nsIFactory;
14 interface nsIArray;
15 interface nsIUTF8StringEnumerator;
17 [scriptable, builtinclass, uuid(d604ffc3-1ba3-4f6c-b65f-1ed4199364c3)]
18 interface nsIComponentManager : nsISupports
20 /**
21 * getClassObject
23 * Returns the factory object that can be used to create instances of
24 * CID aClass
26 * @param aClass The classid of the factory that is being requested
28 void getClassObject(in nsCIDRef aClass,
29 in nsIIDRef aIID,
30 [iid_is(aIID),retval] out nsQIResult result);
32 /**
33 * getClassObjectByContractID
35 * Returns the factory object that can be used to create instances of
36 * CID aClass
38 * @param aClass The classid of the factory that is being requested
40 void getClassObjectByContractID(in string aContractID,
41 in nsIIDRef aIID,
42 [iid_is(aIID),retval] out nsQIResult result);
45 /**
46 * createInstance
48 * Create an instance of the CID aClass and return the interface aIID.
50 * @param aClass : ClassID of object instance requested
51 * @param aIID : IID of interface requested
53 [noscript]
54 void createInstance(in nsCIDRef aClass,
55 in nsIIDRef aIID,
56 [iid_is(aIID),retval] out nsQIResult result);
58 /**
59 * createInstanceByContractID
61 * Create an instance of the CID that implements aContractID and return the
62 * interface aIID.
64 * @param aContractID : aContractID of object instance requested
65 * @param aIID : IID of interface requested
67 [noscript]
68 void createInstanceByContractID(in string aContractID,
69 in nsIIDRef aIID,
70 [iid_is(aIID),retval] out nsQIResult result);
72 /**
73 * addBootstrappedManifestLocation
75 * Adds a bootstrapped manifest location on runtime.
77 * @param aLocation : A directory where chrome.manifest resides,
78 * or an XPI with it on the root.
80 void addBootstrappedManifestLocation(in nsIFile aLocation);
82 /**
83 * removeBootstrappedManifestLocation
85 * Removes a bootstrapped manifest location on runtime.
87 * @param aLocation : A directory where chrome.manifest resides,
88 * or an XPI with it on the root.
90 void removeBootstrappedManifestLocation(in nsIFile aLocation);
92 /**
93 * getManifestLocations
95 * Get an array of nsIURIs of all registered and builtin manifest locations.
97 nsIArray getManifestLocations();
99 /**
100 * Returns a list of JSM URLs which are used to create components. This
101 * should only be used in automation.
103 nsIUTF8StringEnumerator getComponentJSMs();
106 * Returns a list of ESM URLs which are used to create components. This
107 * should only be used in automation.
109 nsIUTF8StringEnumerator getComponentESModules();
113 %{ C++
114 #ifdef MOZILLA_INTERNAL_API
115 #include "nsComponentManagerUtils.h"
116 #endif
117 %} C++