Bumping manifests a=b2g-bump
[gecko.git] / xpcom / components / nsIComponentRegistrar.idl
blobe12acdf25b128f70a0e8a7573e03903ff8b54ab6
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 /**
6 * The nsIComponentRegistrar interface.
7 */
9 #include "nsISupports.idl"
11 interface nsIFile;
12 interface nsIFactory;
13 interface nsISimpleEnumerator;
15 [scriptable, uuid(2417cbfe-65ad-48a6-b4b6-eb84db174392)]
16 interface nsIComponentRegistrar : nsISupports
18 /**
19 * autoRegister
21 * Register a .manifest file, or an entire directory containing
22 * these files. Registration lasts for this run only, and is not cached.
24 * @note Formerly this method would register component files directly. This
25 * is no longer supported.
27 void autoRegister(in nsIFile aSpec);
29 /**
30 * autoUnregister
31 * @status OBSOLETE: This method is no longer implemented, but preserved
32 * in this interface for binary compatibility with
33 * Mozilla 1.9.2.
35 void autoUnregister(in nsIFile aSpec);
38 /**
39 * registerFactory
41 * Register a factory with a given ContractID, CID and Class Name.
43 * @param aClass : CID of object
44 * @param aClassName : Class Name of CID (unused)
45 * @param aContractID : ContractID associated with CID aClass. May be null
46 * if no contract ID is needed.
47 * @param aFactory : Factory that will be registered for CID aClass.
48 * If aFactory is null, the contract will be associated
49 * with a previously registered CID.
51 void registerFactory(in nsCIDRef aClass,
52 in string aClassName,
53 in string aContractID,
54 in nsIFactory aFactory);
56 /**
57 * unregisterFactory
59 * Unregister a factory associated with CID aClass.
61 * @param aClass : CID being unregistered
62 * @param aFactory : Factory previously registered to create instances of
63 * CID aClass.
65 * @throws NS_ERROR* Method failure.
66 */
67 void unregisterFactory(in nsCIDRef aClass,
68 in nsIFactory aFactory);
70 /**
71 * registerFactoryLocation
72 * @status OBSOLETE: This method is no longer implemented, but preserved
73 * in this interface for binary compatibility with
74 * Mozilla 1.9.2.
76 void registerFactoryLocation(in nsCIDRef aClass,
77 in string aClassName,
78 in string aContractID,
79 in nsIFile aFile,
80 in string aLoaderStr,
81 in string aType);
83 /**
84 * unregisterFactoryLocation
85 * @status OBSOLETE: This method is no longer implemented, but preserved
86 * in this interface for binary compatibility with
87 * Mozilla 1.9.2.
88 */
89 void unregisterFactoryLocation(in nsCIDRef aClass,
90 in nsIFile aFile);
92 /**
93 * isCIDRegistered
95 * Returns true if a factory is registered for the CID.
97 * @param aClass : CID queried for registeration
98 * @return : true if a factory is registered for CID
99 * false otherwise.
101 boolean isCIDRegistered(in nsCIDRef aClass);
104 * isContractIDRegistered
106 * Returns true if a factory is registered for the contract id.
108 * @param aClass : contract id queried for registeration
109 * @return : true if a factory is registered for contract id
110 * false otherwise.
112 boolean isContractIDRegistered(in string aContractID);
115 * enumerateCIDs
117 * Enumerate the list of all registered CIDs.
119 * @return : enumerator for CIDs. Elements of the enumeration can be QI'ed
120 * for the nsISupportsID interface. From the nsISupportsID, you
121 * can obtain the actual CID.
123 nsISimpleEnumerator enumerateCIDs();
126 * enumerateContractIDs
128 * Enumerate the list of all registered ContractIDs.
130 * @return : enumerator for ContractIDs. Elements of the enumeration can be
131 * QI'ed for the nsISupportsCString interface. From the
132 * nsISupportsCString interface, you can obtain the actual
133 * Contract ID string.
135 nsISimpleEnumerator enumerateContractIDs();
138 * CIDToContractID
139 * @status OBSOLETE: This method is no longer implemented, but preserved
140 * in this interface for binary compatibility with
141 * Mozilla 1.9.2.
143 string CIDToContractID(in nsCIDRef aClass);
146 * contractIDToCID
148 * Returns the CID for a given Contract ID, if one exists and is registered.
150 * @return : Contract ID.
152 nsCIDPtr contractIDToCID(in string aContractID);