bug 313956: expand installer .exe contents to make complete mar. r=ted.
[gecko.git] / xpcom / components / nsIComponentRegistrar.idl
blob72b5bde16ef3e808692e2967afdec75dbe7a849b
1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
12 * License.
14 * The Original Code is XPCOM.
16 * The Initial Developer of the Original Code is Netscape Communications.
17 * Portions created by the Initial Developer are Copyright (C) 2001
18 * the Initial Developer. All Rights Reserved.
20 * Contributor(s):
22 * Alternatively, the contents of this file may be used under the terms of
23 * either the GNU General Public License Version 2 or later (the "GPL"), or
24 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
25 * in which case the provisions of the GPL or the LGPL are applicable instead
26 * of those above. If you wish to allow use of your version of this file only
27 * under the terms of either the GPL or the LGPL, and not to allow others to
28 * use your version of this file under the terms of the MPL, indicate your
29 * decision by deleting the provisions above and replace them with the notice
30 * and other provisions required by the GPL or the LGPL. If you do not delete
31 * the provisions above, a recipient may use your version of this file under
32 * the terms of any one of the MPL, the GPL or the LGPL.
34 * ***** END LICENSE BLOCK ***** */
36 /**
37 * The nsIComponentRegistrar interface.
40 #include "nsISupports.idl"
42 interface nsIFile;
43 interface nsIFactory;
44 interface nsISimpleEnumerator;
46 [scriptable, uuid(2417cbfe-65ad-48a6-b4b6-eb84db174392)]
47 interface nsIComponentRegistrar : nsISupports
49 /**
50 * autoRegister
52 * Register a .manifest file, or an entire directory containing
53 * these files. Registration lasts for this run only, and is not cached.
55 * @note Formerly this method would register component files directly. This
56 * is no longer supported.
58 void autoRegister(in nsIFile aSpec);
60 /**
61 * autoUnregister
62 * @status OBSOLETE: This method is no longer implemented, but preserved
63 * in this interface for binary compatibility with
64 * Mozilla 1.9.2.
66 void autoUnregister(in nsIFile aSpec);
69 /**
70 * registerFactory
72 * Register a factory with a given ContractID, CID and Class Name.
74 * @param aClass : CID of object
75 * @param aClassName : Class Name of CID (unused)
76 * @param aContractID : ContractID associated with CID aClass. May be null
77 * if no contract ID is needed.
78 * @param aFactory : Factory that will be registered for CID aClass.
79 * If aFactory is null, the contract will be associated
80 * with a previously registered CID.
82 void registerFactory(in nsCIDRef aClass,
83 in string aClassName,
84 in string aContractID,
85 in nsIFactory aFactory);
87 /**
88 * unregisterFactory
90 * Unregister a factory associated with CID aClass.
92 * @param aClass : CID being unregistered
93 * @param aFactory : Factory previously registered to create instances of
94 * CID aClass.
96 * @return NS_OK Unregistration was successful.
97 * NS_ERROR* Method failure.
98 */
99 void unregisterFactory(in nsCIDRef aClass,
100 in nsIFactory aFactory);
103 * registerFactoryLocation
104 * @status OBSOLETE: This method is no longer implemented, but preserved
105 * in this interface for binary compatibility with
106 * Mozilla 1.9.2.
108 void registerFactoryLocation(in nsCIDRef aClass,
109 in string aClassName,
110 in string aContractID,
111 in nsIFile aFile,
112 in string aLoaderStr,
113 in string aType);
116 * unregisterFactoryLocation
117 * @status OBSOLETE: This method is no longer implemented, but preserved
118 * in this interface for binary compatibility with
119 * Mozilla 1.9.2.
121 void unregisterFactoryLocation(in nsCIDRef aClass,
122 in nsIFile aFile);
125 * isCIDRegistered
127 * Returns true if a factory is registered for the CID.
129 * @param aClass : CID queried for registeration
130 * @return : true if a factory is registered for CID
131 * false otherwise.
133 boolean isCIDRegistered(in nsCIDRef aClass);
136 * isContractIDRegistered
138 * Returns true if a factory is registered for the contract id.
140 * @param aClass : contract id queried for registeration
141 * @return : true if a factory is registered for contract id
142 * false otherwise.
144 boolean isContractIDRegistered(in string aContractID);
147 * enumerateCIDs
149 * Enumerate the list of all registered CIDs.
151 * @return : enumerator for CIDs. Elements of the enumeration can be QI'ed
152 * for the nsISupportsID interface. From the nsISupportsID, you
153 * can obtain the actual CID.
155 nsISimpleEnumerator enumerateCIDs();
158 * enumerateContractIDs
160 * Enumerate the list of all registered ContractIDs.
162 * @return : enumerator for ContractIDs. Elements of the enumeration can be
163 * QI'ed for the nsISupportsCString interface. From the
164 * nsISupportsCString interface, you can obtain the actual
165 * Contract ID string.
167 nsISimpleEnumerator enumerateContractIDs();
170 * CIDToContractID
171 * @status OBSOLETE: This method is no longer implemented, but preserved
172 * in this interface for binary compatibility with
173 * Mozilla 1.9.2.
175 string CIDToContractID(in nsCIDRef aClass);
178 * contractIDToCID
180 * Returns the CID for a given Contract ID, if one exists and is registered.
182 * @return : Contract ID.
184 nsCIDPtr contractIDToCID(in string aContractID);