PageRenderTime 46ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_sdk/idl/nsIClassInfo.idl

http://firefox-mac-pdf.googlecode.com/
IDL | 131 lines | 22 code | 15 blank | 94 comment | 0 complexity | 5792d28d109e5529a5e7d36618c78935 MD5 | raw file
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  2. *
  3. * ***** BEGIN LICENSE BLOCK *****
  4. * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5. *
  6. * The contents of this file are subject to the Mozilla Public License Version
  7. * 1.1 (the "License"); you may not use this file except in compliance with
  8. * the License. You may obtain a copy of the License at
  9. * http://www.mozilla.org/MPL/
  10. *
  11. * Software distributed under the License is distributed on an "AS IS" basis,
  12. * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13. * for the specific language governing rights and limitations under the
  14. * License.
  15. *
  16. * The Original Code is Mozilla Communicator client code, released
  17. * March 31, 1998.
  18. *
  19. * The Initial Developer of the Original Code is
  20. * Netscape Communications Corporation.
  21. * Portions created by the Initial Developer are Copyright (C) 1998
  22. * the Initial Developer. All Rights Reserved.
  23. *
  24. * Contributor(s):
  25. * John Bandhauer <jband@netscape.com>
  26. *
  27. * Alternatively, the contents of this file may be used under the terms of
  28. * either of the GNU General Public License Version 2 or later (the "GPL"),
  29. * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  30. * in which case the provisions of the GPL or the LGPL are applicable instead
  31. * of those above. If you wish to allow use of your version of this file only
  32. * under the terms of either the GPL or the LGPL, and not to allow others to
  33. * use your version of this file under the terms of the MPL, indicate your
  34. * decision by deleting the provisions above and replace them with the notice
  35. * and other provisions required by the GPL or the LGPL. If you do not delete
  36. * the provisions above, a recipient may use your version of this file under
  37. * the terms of any one of the MPL, the GPL or the LGPL.
  38. *
  39. * ***** END LICENSE BLOCK ***** */
  40. #include "nsISupports.idl"
  41. /**
  42. * Provides information about a specific implementation class
  43. * @status FROZEN
  44. */
  45. [scriptable, uuid(986c11d0-f340-11d4-9075-0010a4e73d9a)]
  46. interface nsIClassInfo : nsISupports
  47. {
  48. /**
  49. * Get an ordered list of the interface ids that instances of the class
  50. * promise to implement. Note that nsISupports is an implicit member
  51. * of any such list and need not be included.
  52. *
  53. * Should set *count = 0 and *array = null and return NS_OK if getting the
  54. * list is not supported.
  55. */
  56. void getInterfaces(out PRUint32 count,
  57. [array, size_is(count), retval] out nsIIDPtr array);
  58. /**
  59. * Get a language mapping specific helper object that may assist in using
  60. * objects of this class in a specific lanaguage. For instance, if asked
  61. * for the helper for nsIProgrammingLanguage::JAVASCRIPT this might return
  62. * an object that can be QI'd into the nsIXPCScriptable interface to assist
  63. * XPConnect in supplying JavaScript specific behavior to callers of the
  64. * instance object.
  65. *
  66. * see: nsIProgrammingLanguage.idl
  67. *
  68. * Should return null if no helper available for given language.
  69. */
  70. nsISupports getHelperForLanguage(in PRUint32 language);
  71. /**
  72. * A contract ID through which an instance of this class can be created
  73. * (or accessed as a service, if |flags & SINGLETON|), or null.
  74. */
  75. readonly attribute string contractID;
  76. /**
  77. * A human readable string naming the class, or null.
  78. */
  79. readonly attribute string classDescription;
  80. /**
  81. * A class ID through which an instance of this class can be created
  82. * (or accessed as a service, if |flags & SINGLETON|), or null.
  83. */
  84. readonly attribute nsCIDPtr classID;
  85. /**
  86. * Return language type from list in nsIProgrammingLanguage
  87. */
  88. readonly attribute PRUint32 implementationLanguage;
  89. /**
  90. * Bitflags for 'flags' attribute.
  91. */
  92. const PRUint32 SINGLETON = 1 << 0;
  93. const PRUint32 THREADSAFE = 1 << 1;
  94. const PRUint32 MAIN_THREAD_ONLY = 1 << 2;
  95. const PRUint32 DOM_OBJECT = 1 << 3;
  96. const PRUint32 PLUGIN_OBJECT = 1 << 4;
  97. const PRUint32 EAGER_CLASSINFO = 1 << 5;
  98. /**
  99. * 'flags' attribute bitflag: whether objects of this type implement
  100. * nsIContent.
  101. */
  102. const PRUint32 CONTENT_NODE = 1 << 6;
  103. // The high order bit is RESERVED for consumers of these flags.
  104. // No implementor of this interface should ever return flags
  105. // with this bit set.
  106. const PRUint32 RESERVED = 1 << 31;
  107. readonly attribute PRUint32 flags;
  108. /**
  109. * Also a class ID through which an instance of this class can be created
  110. * (or accessed as a service, if |flags & SINGLETON|). If the class does
  111. * not have a CID, it should return NS_ERROR_NOT_AVAILABLE. This attribute
  112. * exists so C++ callers can avoid allocating and freeing a CID, as would
  113. * happen if they used classID.
  114. */
  115. [notxpcom] readonly attribute nsCID classIDNoAlloc;
  116. };