nsIComponentManager.idl 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /* -*- Mode: IDL; 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/. */
  5. /**
  6. * The nsIComponentManager interface.
  7. */
  8. #include "nsISupports.idl"
  9. interface nsIFile;
  10. interface nsIFactory;
  11. interface nsIArray;
  12. [scriptable, uuid(d604ffc3-1ba3-4f6c-b65f-1ed4199364c3)]
  13. interface nsIComponentManager : nsISupports
  14. {
  15. /**
  16. * getClassObject
  17. *
  18. * Returns the factory object that can be used to create instances of
  19. * CID aClass
  20. *
  21. * @param aClass The classid of the factory that is being requested
  22. */
  23. void getClassObject(in nsCIDRef aClass,
  24. in nsIIDRef aIID,
  25. [iid_is(aIID),retval] out nsQIResult result);
  26. /**
  27. * getClassObjectByContractID
  28. *
  29. * Returns the factory object that can be used to create instances of
  30. * CID aClass
  31. *
  32. * @param aClass The classid of the factory that is being requested
  33. */
  34. void getClassObjectByContractID(in string aContractID,
  35. in nsIIDRef aIID,
  36. [iid_is(aIID),retval] out nsQIResult result);
  37. /**
  38. * createInstance
  39. *
  40. * Create an instance of the CID aClass and return the interface aIID.
  41. *
  42. * @param aClass : ClassID of object instance requested
  43. * @param aDelegate : Used for aggregation
  44. * @param aIID : IID of interface requested
  45. */
  46. void createInstance(in nsCIDRef aClass,
  47. in nsISupports aDelegate,
  48. in nsIIDRef aIID,
  49. [iid_is(aIID),retval] out nsQIResult result);
  50. /**
  51. * createInstanceByContractID
  52. *
  53. * Create an instance of the CID that implements aContractID and return the
  54. * interface aIID.
  55. *
  56. * @param aContractID : aContractID of object instance requested
  57. * @param aDelegate : Used for aggregation
  58. * @param aIID : IID of interface requested
  59. */
  60. void createInstanceByContractID(in string aContractID,
  61. in nsISupports aDelegate,
  62. in nsIIDRef aIID,
  63. [iid_is(aIID),retval] out nsQIResult result);
  64. /**
  65. * addBootstrappedManifestLocation
  66. *
  67. * Adds a bootstrapped manifest location on runtime.
  68. *
  69. * @param aLocation : A directory where chrome.manifest resides,
  70. * or an XPI with it on the root.
  71. */
  72. void addBootstrappedManifestLocation(in nsIFile aLocation);
  73. /**
  74. * removeBootstrappedManifestLocation
  75. *
  76. * Removes a bootstrapped manifest location on runtime.
  77. *
  78. * @param aLocation : A directory where chrome.manifest resides,
  79. * or an XPI with it on the root.
  80. */
  81. void removeBootstrappedManifestLocation(in nsIFile aLocation);
  82. /**
  83. * getManifestLocations
  84. *
  85. * Get an array of nsIURIs of all registered and builtin manifest locations.
  86. */
  87. nsIArray getManifestLocations();
  88. };
  89. %{ C++
  90. #ifdef MOZILLA_INTERNAL_API
  91. #include "nsComponentManagerUtils.h"
  92. #endif
  93. %} C++