PageRenderTime 151ms CodeModel.GetById 34ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_api/include/nsIClassInfo.h

http://firefox-mac-pdf.googlecode.com/
C Header | 243 lines | 112 code | 48 blank | 83 comment | 0 complexity | 2fa78e3ffb4606cdb87465c73d8425d6 MD5 | raw file
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/xpcom/components/nsIClassInfo.idl
  3. */
  4. #ifndef __gen_nsIClassInfo_h__
  5. #define __gen_nsIClassInfo_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.h"
  8. #endif
  9. /* For IDL files that don't want to include root IDL files. */
  10. #ifndef NS_NO_VTABLE
  11. #define NS_NO_VTABLE
  12. #endif
  13. /* starting interface: nsIClassInfo */
  14. #define NS_ICLASSINFO_IID_STR "986c11d0-f340-11d4-9075-0010a4e73d9a"
  15. #define NS_ICLASSINFO_IID \
  16. {0x986c11d0, 0xf340, 0x11d4, \
  17. { 0x90, 0x75, 0x00, 0x10, 0xa4, 0xe7, 0x3d, 0x9a }}
  18. /**
  19. * Provides information about a specific implementation class
  20. * @status FROZEN
  21. */
  22. class NS_NO_VTABLE NS_SCRIPTABLE nsIClassInfo : public nsISupports {
  23. public:
  24. NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICLASSINFO_IID)
  25. /**
  26. * Get an ordered list of the interface ids that instances of the class
  27. * promise to implement. Note that nsISupports is an implicit member
  28. * of any such list and need not be included.
  29. *
  30. * Should set *count = 0 and *array = null and return NS_OK if getting the
  31. * list is not supported.
  32. */
  33. /* void getInterfaces (out PRUint32 count, [array, size_is (count), retval] out nsIIDPtr array); */
  34. NS_SCRIPTABLE NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array) = 0;
  35. /**
  36. * Get a language mapping specific helper object that may assist in using
  37. * objects of this class in a specific lanaguage. For instance, if asked
  38. * for the helper for nsIProgrammingLanguage::JAVASCRIPT this might return
  39. * an object that can be QI'd into the nsIXPCScriptable interface to assist
  40. * XPConnect in supplying JavaScript specific behavior to callers of the
  41. * instance object.
  42. *
  43. * see: nsIProgrammingLanguage.idl
  44. *
  45. * Should return null if no helper available for given language.
  46. */
  47. /* nsISupports getHelperForLanguage (in PRUint32 language); */
  48. NS_SCRIPTABLE NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval) = 0;
  49. /**
  50. * A contract ID through which an instance of this class can be created
  51. * (or accessed as a service, if |flags & SINGLETON|), or null.
  52. */
  53. /* readonly attribute string contractID; */
  54. NS_SCRIPTABLE NS_IMETHOD GetContractID(char * *aContractID) = 0;
  55. /**
  56. * A human readable string naming the class, or null.
  57. */
  58. /* readonly attribute string classDescription; */
  59. NS_SCRIPTABLE NS_IMETHOD GetClassDescription(char * *aClassDescription) = 0;
  60. /**
  61. * A class ID through which an instance of this class can be created
  62. * (or accessed as a service, if |flags & SINGLETON|), or null.
  63. */
  64. /* readonly attribute nsCIDPtr classID; */
  65. NS_SCRIPTABLE NS_IMETHOD GetClassID(nsCID * *aClassID) = 0;
  66. /**
  67. * Return language type from list in nsIProgrammingLanguage
  68. */
  69. /* readonly attribute PRUint32 implementationLanguage; */
  70. NS_SCRIPTABLE NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage) = 0;
  71. /**
  72. * Bitflags for 'flags' attribute.
  73. */
  74. enum { SINGLETON = 1U };
  75. enum { THREADSAFE = 2U };
  76. enum { MAIN_THREAD_ONLY = 4U };
  77. enum { DOM_OBJECT = 8U };
  78. enum { PLUGIN_OBJECT = 16U };
  79. enum { EAGER_CLASSINFO = 32U };
  80. /**
  81. * 'flags' attribute bitflag: whether objects of this type implement
  82. * nsIContent.
  83. */
  84. enum { CONTENT_NODE = 64U };
  85. enum { RESERVED = 2147483648U };
  86. /* readonly attribute PRUint32 flags; */
  87. NS_SCRIPTABLE NS_IMETHOD GetFlags(PRUint32 *aFlags) = 0;
  88. /**
  89. * Also a class ID through which an instance of this class can be created
  90. * (or accessed as a service, if |flags & SINGLETON|). If the class does
  91. * not have a CID, it should return NS_ERROR_NOT_AVAILABLE. This attribute
  92. * exists so C++ callers can avoid allocating and freeing a CID, as would
  93. * happen if they used classID.
  94. */
  95. /* [notxpcom] readonly attribute nsCID classIDNoAlloc; */
  96. NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) = 0;
  97. };
  98. NS_DEFINE_STATIC_IID_ACCESSOR(nsIClassInfo, NS_ICLASSINFO_IID)
  99. /* Use this macro when declaring classes that implement this interface. */
  100. #define NS_DECL_NSICLASSINFO \
  101. NS_SCRIPTABLE NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array); \
  102. NS_SCRIPTABLE NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval); \
  103. NS_SCRIPTABLE NS_IMETHOD GetContractID(char * *aContractID); \
  104. NS_SCRIPTABLE NS_IMETHOD GetClassDescription(char * *aClassDescription); \
  105. NS_SCRIPTABLE NS_IMETHOD GetClassID(nsCID * *aClassID); \
  106. NS_SCRIPTABLE NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage); \
  107. NS_SCRIPTABLE NS_IMETHOD GetFlags(PRUint32 *aFlags); \
  108. NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc);
  109. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  110. #define NS_FORWARD_NSICLASSINFO(_to) \
  111. NS_SCRIPTABLE NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array) { return _to GetInterfaces(count, array); } \
  112. NS_SCRIPTABLE NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval) { return _to GetHelperForLanguage(language, _retval); } \
  113. NS_SCRIPTABLE NS_IMETHOD GetContractID(char * *aContractID) { return _to GetContractID(aContractID); } \
  114. NS_SCRIPTABLE NS_IMETHOD GetClassDescription(char * *aClassDescription) { return _to GetClassDescription(aClassDescription); } \
  115. NS_SCRIPTABLE NS_IMETHOD GetClassID(nsCID * *aClassID) { return _to GetClassID(aClassID); } \
  116. NS_SCRIPTABLE NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage) { return _to GetImplementationLanguage(aImplementationLanguage); } \
  117. NS_SCRIPTABLE NS_IMETHOD GetFlags(PRUint32 *aFlags) { return _to GetFlags(aFlags); } \
  118. NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) { return _to GetClassIDNoAlloc(aClassIDNoAlloc); }
  119. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  120. #define NS_FORWARD_SAFE_NSICLASSINFO(_to) \
  121. NS_SCRIPTABLE NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInterfaces(count, array); } \
  122. NS_SCRIPTABLE NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHelperForLanguage(language, _retval); } \
  123. NS_SCRIPTABLE NS_IMETHOD GetContractID(char * *aContractID) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContractID(aContractID); } \
  124. NS_SCRIPTABLE NS_IMETHOD GetClassDescription(char * *aClassDescription) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassDescription(aClassDescription); } \
  125. NS_SCRIPTABLE NS_IMETHOD GetClassID(nsCID * *aClassID) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassID(aClassID); } \
  126. NS_SCRIPTABLE NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImplementationLanguage(aImplementationLanguage); } \
  127. NS_SCRIPTABLE NS_IMETHOD GetFlags(PRUint32 *aFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFlags(aFlags); } \
  128. NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassIDNoAlloc(aClassIDNoAlloc); }
  129. #if 0
  130. /* Use the code below as a template for the implementation class for this interface. */
  131. /* Header file */
  132. class nsClassInfo : public nsIClassInfo
  133. {
  134. public:
  135. NS_DECL_ISUPPORTS
  136. NS_DECL_NSICLASSINFO
  137. nsClassInfo();
  138. private:
  139. ~nsClassInfo();
  140. protected:
  141. /* additional members */
  142. };
  143. /* Implementation file */
  144. NS_IMPL_ISUPPORTS1(nsClassInfo, nsIClassInfo)
  145. nsClassInfo::nsClassInfo()
  146. {
  147. /* member initializers and constructor code */
  148. }
  149. nsClassInfo::~nsClassInfo()
  150. {
  151. /* destructor code */
  152. }
  153. /* void getInterfaces (out PRUint32 count, [array, size_is (count), retval] out nsIIDPtr array); */
  154. NS_IMETHODIMP nsClassInfo::GetInterfaces(PRUint32 *count, nsIID * **array)
  155. {
  156. return NS_ERROR_NOT_IMPLEMENTED;
  157. }
  158. /* nsISupports getHelperForLanguage (in PRUint32 language); */
  159. NS_IMETHODIMP nsClassInfo::GetHelperForLanguage(PRUint32 language, nsISupports **_retval)
  160. {
  161. return NS_ERROR_NOT_IMPLEMENTED;
  162. }
  163. /* readonly attribute string contractID; */
  164. NS_IMETHODIMP nsClassInfo::GetContractID(char * *aContractID)
  165. {
  166. return NS_ERROR_NOT_IMPLEMENTED;
  167. }
  168. /* readonly attribute string classDescription; */
  169. NS_IMETHODIMP nsClassInfo::GetClassDescription(char * *aClassDescription)
  170. {
  171. return NS_ERROR_NOT_IMPLEMENTED;
  172. }
  173. /* readonly attribute nsCIDPtr classID; */
  174. NS_IMETHODIMP nsClassInfo::GetClassID(nsCID * *aClassID)
  175. {
  176. return NS_ERROR_NOT_IMPLEMENTED;
  177. }
  178. /* readonly attribute PRUint32 implementationLanguage; */
  179. NS_IMETHODIMP nsClassInfo::GetImplementationLanguage(PRUint32 *aImplementationLanguage)
  180. {
  181. return NS_ERROR_NOT_IMPLEMENTED;
  182. }
  183. /* readonly attribute PRUint32 flags; */
  184. NS_IMETHODIMP nsClassInfo::GetFlags(PRUint32 *aFlags)
  185. {
  186. return NS_ERROR_NOT_IMPLEMENTED;
  187. }
  188. /* [notxpcom] readonly attribute nsCID classIDNoAlloc; */
  189. NS_IMETHODIMP nsClassInfo::GetClassIDNoAlloc(nsCID *aClassIDNoAlloc)
  190. {
  191. return NS_ERROR_NOT_IMPLEMENTED;
  192. }
  193. /* End of implementation class template. */
  194. #endif
  195. #endif /* __gen_nsIClassInfo_h__ */