xpcom/components/nsIModule.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/components/nsIModule.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,82 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +interface nsIFile;
    1.12 +interface nsIComponentManager;
    1.13 +
    1.14 +/**
    1.15 + * The nsIModule interface.
    1.16 + */
    1.17 +
    1.18 +[scriptable, uuid(7392D032-5371-11d3-994E-00805FD26FEE)]
    1.19 +interface nsIModule : nsISupports
    1.20 +{
    1.21 +    /** 
    1.22 +     * Object Instance Creation
    1.23 +     *
    1.24 +     * Obtains a Class Object from a nsIModule for a given CID and IID pair.  
    1.25 +     * This class object can either be query to a nsIFactory or a may be 
    1.26 +     * query to a nsIClassInfo.
    1.27 +     *
    1.28 +     * @param aCompMgr  : The global component manager
    1.29 +     * @param aClass    : ClassID of object instance requested
    1.30 +     * @param aIID      : IID of interface requested
    1.31 +     * 
    1.32 +     */
    1.33 +    void getClassObject(in nsIComponentManager aCompMgr, 
    1.34 +                        in nsCIDRef aClass,
    1.35 +                        in nsIIDRef aIID,
    1.36 +                        [retval, iid_is(aIID)] out nsQIResult aResult);
    1.37 +
    1.38 +
    1.39 +    /**
    1.40 +     * One time registration callback
    1.41 +     *
    1.42 +     * When the nsIModule is discovered, this method will be
    1.43 +     * called so that any setup registration can be preformed.
    1.44 +     *
    1.45 +     * @param aCompMgr  : The global component manager
    1.46 +     * @param aLocation : The location of the nsIModule on disk
    1.47 +     * @param aLoaderStr: Opaque loader specific string
    1.48 +     * @param aType     : Loader Type being used to load this module 
    1.49 +     */
    1.50 +    void registerSelf(in nsIComponentManager aCompMgr, 
    1.51 +                      in nsIFile aLocation,
    1.52 +                      in string aLoaderStr, 
    1.53 +                      in string aType);
    1.54 +    /**
    1.55 +     * One time unregistration callback
    1.56 +     *
    1.57 +     * When the nsIModule is being unregistered, this method will be
    1.58 +     * called so that any unregistration can be preformed
    1.59 +     *
    1.60 +     * @param aCompMgr   : The global component manager
    1.61 +     * @param aLocation  : The location of the nsIModule on disk
    1.62 +     * @param aLoaderStr : Opaque loader specific string
    1.63 +     * 
    1.64 +     */
    1.65 +   void unregisterSelf(in nsIComponentManager aCompMgr, 
    1.66 +                        in nsIFile aLocation,
    1.67 +                        in string  aLoaderStr);
    1.68 +
    1.69 +   /** 
    1.70 +    * Module load management
    1.71 +    * 
    1.72 +    * @param aCompMgr  : The global component manager
    1.73 +    *
    1.74 +    * @return indicates to the caller if the module can be unloaded.
    1.75 +    * 		Returning PR_TRUE isn't a guarantee that the module will be
    1.76 +    *		unloaded. It constitues only willingness of the module to be
    1.77 +    *		unloaded.  It is very important to ensure that no outstanding 
    1.78 +    *       references to the module's code/data exist before returning 
    1.79 +    *       PR_TRUE. 
    1.80 +    *		Returning PR_FALSE guaratees that the module won't be unloaded.
    1.81 +    */
    1.82 +    boolean canUnload(in nsIComponentManager aCompMgr);
    1.83 +};
    1.84 +
    1.85 +

mercurial