Bug 1700051: part 30) Narrow scope of `newOffset`. r=smaug
[gecko.git] / xpcom / components / nsIModule.idl
blob1ac189332111feccb29792e5e432548d4fa9e215
1 /* -*- Mode: C++; 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 interface nsIFile;
9 interface nsIComponentManager;
11 /**
12 * The nsIModule interface.
15 [scriptable, uuid(7392D032-5371-11d3-994E-00805FD26FEE)]
16 interface nsIModule : nsISupports
18 /**
19 * Object Instance Creation
21 * Obtains a Class Object from a nsIModule for a given CID and IID pair.
22 * This class object can either be query to a nsIFactory or a may be
23 * query to a nsIClassInfo.
25 * @param aCompMgr : The global component manager
26 * @param aClass : ClassID of object instance requested
27 * @param aIID : IID of interface requested
30 void getClassObject(in nsIComponentManager aCompMgr,
31 in nsCIDRef aClass,
32 in nsIIDRef aIID,
33 [retval, iid_is(aIID)] out nsQIResult aResult);
36 /**
37 * One time registration callback
39 * When the nsIModule is discovered, this method will be
40 * called so that any setup registration can be preformed.
42 * @param aCompMgr : The global component manager
43 * @param aLocation : The location of the nsIModule on disk
44 * @param aLoaderStr: Opaque loader specific string
45 * @param aType : Loader Type being used to load this module
47 void registerSelf(in nsIComponentManager aCompMgr,
48 in nsIFile aLocation,
49 in string aLoaderStr,
50 in string aType);
51 /**
52 * One time unregistration callback
54 * When the nsIModule is being unregistered, this method will be
55 * called so that any unregistration can be preformed
57 * @param aCompMgr : The global component manager
58 * @param aLocation : The location of the nsIModule on disk
59 * @param aLoaderStr : Opaque loader specific string
62 void unregisterSelf(in nsIComponentManager aCompMgr,
63 in nsIFile aLocation,
64 in string aLoaderStr);
66 /**
67 * Module load management
69 * @param aCompMgr : The global component manager
71 * @return indicates to the caller if the module can be unloaded.
72 * Returning PR_TRUE isn't a guarantee that the module will be
73 * unloaded. It constitues only willingness of the module to be
74 * unloaded. It is very important to ensure that no outstanding
75 * references to the module's code/data exist before returning
76 * PR_TRUE.
77 * Returning PR_FALSE guaratees that the module won't be unloaded.
79 boolean canUnload(in nsIComponentManager aCompMgr);