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/. */
7 * The nsIComponentManager interface.
10 #include
"nsISupports.idl"
15 interface nsIUTF8StringEnumerator
;
17 [scriptable
, builtinclass
, uuid(d604ffc3
-1ba3
-4f6c
-b65f
-1ed4199364c3
)]
18 interface nsIComponentManager
: nsISupports
23 * Returns the factory object that can be used to create instances of
26 * @param aClass The classid of the factory that is being requested
28 void getClassObject
(in nsCIDRef aClass
,
30 [iid_is(aIID
),retval] out nsQIResult result
);
33 * getClassObjectByContractID
35 * Returns the factory object that can be used to create instances of
38 * @param aClass The classid of the factory that is being requested
40 void getClassObjectByContractID
(in string aContractID
,
42 [iid_is(aIID
),retval] out nsQIResult result
);
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
54 void createInstance
(in nsCIDRef aClass
,
56 [iid_is(aIID
),retval] out nsQIResult result
);
59 * createInstanceByContractID
61 * Create an instance of the CID that implements aContractID and return the
64 * @param aContractID : aContractID of object instance requested
65 * @param aIID : IID of interface requested
68 void createInstanceByContractID
(in string aContractID
,
70 [iid_is(aIID
),retval] out nsQIResult result
);
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
);
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
);
93 * getManifestLocations
95 * Get an array of nsIURIs of all registered and builtin manifest locations.
97 nsIArray getManifestLocations
();
100 * Returns a list of JSM URLs which are used to create components. This
101 * should only be used in automation.
103 * TODO: Remove this once m-c and c-c migrations finish (bug 1881887).
105 nsIUTF8StringEnumerator getComponentJSMs
();
108 * Returns a list of ESM URLs which are used to create components. This
109 * should only be used in automation.
111 nsIUTF8StringEnumerator getComponentESModules
();
116 #ifdef MOZILLA_INTERNAL_API
117 #include
"nsComponentManagerUtils.h"