1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xpcom/components/nsIComponentManager.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,106 @@ 1.4 +/* -*- Mode: IDL; 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 +/** 1.10 + * The nsIComponentManager interface. 1.11 + */ 1.12 + 1.13 +#include "nsISupports.idl" 1.14 + 1.15 +interface nsIFile; 1.16 +interface nsIFactory; 1.17 +interface nsIArray; 1.18 + 1.19 +[scriptable, uuid(d604ffc3-1ba3-4f6c-b65f-1ed4199364c3)] 1.20 +interface nsIComponentManager : nsISupports 1.21 +{ 1.22 + /** 1.23 + * getClassObject 1.24 + * 1.25 + * Returns the factory object that can be used to create instances of 1.26 + * CID aClass 1.27 + * 1.28 + * @param aClass The classid of the factory that is being requested 1.29 + */ 1.30 + void getClassObject(in nsCIDRef aClass, 1.31 + in nsIIDRef aIID, 1.32 + [iid_is(aIID),retval] out nsQIResult result); 1.33 + 1.34 + /** 1.35 + * getClassObjectByContractID 1.36 + * 1.37 + * Returns the factory object that can be used to create instances of 1.38 + * CID aClass 1.39 + * 1.40 + * @param aClass The classid of the factory that is being requested 1.41 + */ 1.42 + void getClassObjectByContractID(in string aContractID, 1.43 + in nsIIDRef aIID, 1.44 + [iid_is(aIID),retval] out nsQIResult result); 1.45 + 1.46 + 1.47 + /** 1.48 + * createInstance 1.49 + * 1.50 + * Create an instance of the CID aClass and return the interface aIID. 1.51 + * 1.52 + * @param aClass : ClassID of object instance requested 1.53 + * @param aDelegate : Used for aggregation 1.54 + * @param aIID : IID of interface requested 1.55 + */ 1.56 + void createInstance(in nsCIDRef aClass, 1.57 + in nsISupports aDelegate, 1.58 + in nsIIDRef aIID, 1.59 + [iid_is(aIID),retval] out nsQIResult result); 1.60 + 1.61 + /** 1.62 + * createInstanceByContractID 1.63 + * 1.64 + * Create an instance of the CID that implements aContractID and return the 1.65 + * interface aIID. 1.66 + * 1.67 + * @param aContractID : aContractID of object instance requested 1.68 + * @param aDelegate : Used for aggregation 1.69 + * @param aIID : IID of interface requested 1.70 + */ 1.71 + void createInstanceByContractID(in string aContractID, 1.72 + in nsISupports aDelegate, 1.73 + in nsIIDRef aIID, 1.74 + [iid_is(aIID),retval] out nsQIResult result); 1.75 + 1.76 + /** 1.77 + * addBootstrappedManifestLocation 1.78 + * 1.79 + * Adds a bootstrapped manifest location on runtime. 1.80 + * 1.81 + * @param aLocation : A directory where chrome.manifest resides, 1.82 + * or an XPI with it on the root. 1.83 + */ 1.84 + void addBootstrappedManifestLocation(in nsIFile aLocation); 1.85 + 1.86 + /** 1.87 + * removeBootstrappedManifestLocation 1.88 + * 1.89 + * Removes a bootstrapped manifest location on runtime. 1.90 + * 1.91 + * @param aLocation : A directory where chrome.manifest resides, 1.92 + * or an XPI with it on the root. 1.93 + */ 1.94 + void removeBootstrappedManifestLocation(in nsIFile aLocation); 1.95 + 1.96 + /** 1.97 + * getManifestLocations 1.98 + * 1.99 + * Get an array of nsIURIs of all registered and builtin manifest locations. 1.100 + */ 1.101 + nsIArray getManifestLocations(); 1.102 +}; 1.103 + 1.104 + 1.105 +%{ C++ 1.106 +#ifdef MOZILLA_INTERNAL_API 1.107 +#include "nsComponentManagerUtils.h" 1.108 +#endif 1.109 +%} C++